Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Gateways for token #173

Open
abhayks1 opened this issue Oct 3, 2019 · 1 comment
Open

Setup Gateways for token #173

abhayks1 opened this issue Oct 3, 2019 · 1 comment

Comments

@abhayks1
Copy link
Contributor

abhayks1 commented Oct 3, 2019

  • It will deploy contracts to setup gateways for an EIP20 token.

  • Deployer addresses in both chains should be unlocked.

  • It will populate token-config and write file in .mosaic directory. Proposed path:

.mosaic/<origin-chain>/<aux-chain-id>/token-config.json

e.g.

.mosaic/ropsten/1406/wETH.json
  • -deploy-libraries is an optional argument needed to deploy library contracts. If it's passed, it should deploy MessageBus, GatewayLib and MPP library contracts. It not passed library contracts should not be deployed.

  • if --mosaic-config argument is given then library contracts should be read from the mosaicConfigPath.

  • Any of --mosaic-config or -deploy-libraries is mandatory. Validation error should be thrown id both passed.

  • Make sure proper validations are in place for the arguments.

  • Proposed command:

./mosaic setup-gateways <origin-chain-name> <auxiliary-chain-id> <origin-gethendpoint> <auxiliary-gethendpoint> <initConfigPath> --mosaic-config <mosaicConfigPath> -deploy-libraries
  • Init config could look like below:
            {
            "originTxOptions": {
                "from": "0x7b829edc5d894bdc00a8d1717c90e9f369f41a18",
                "gasPrice": 3000000000
            },
            "auxiliaryTxOptions": {
                "from": "0x7b829edc5d894bdc00a8d1717c90e9f369f41a18",
                "gasPrice": 4000000
            },
            "originBounty": "10",
            "auxiliaryBounty": "10",
            "originValueTokenAddress": "0x325f05a75999347b7d8461BaEf274afAE0B8AE1c",
            "originBaseTokenAddress": "0x325f05a75999347b7d8461BaEf274afAE0B8AE1c",
            "originBurnerAddress": "0x0000000000000000000000000000000000000000",
            "auxiliaryBurnerAddress": "0x0000000000000000000000000000000000000000",
            "originGatewayOrganizationOwner": "0x4bdc7ED91924d23B8F8cD4f3AEA854a2555e506D",
            "auxiliaryCoGatewayAndUtilityTokenOrganizationOwner": "0xcB8F6c8eBAD6F81fa0A3B956057551a259601A58"
        }
  • Integration test for setup gateway
- Update readme

- Publish existing token configs from the repo based on originChain, auxChainId and gateway address.
@abhayks1
Copy link
Contributor Author

abhayks1 commented Oct 11, 2019

token-config name should be gateway address. It's unique.
Token Symbol can't be name of token-config since it's not unique. There can be multiple gateways for same token symbol.
e.g. 0xae02c7b1c324a8d94a564bc8d713df89eae441fe.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant