Skip to content

Setup Gateways for token #173

@abhayks1

Description

@abhayks1
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions