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

Token Config #164

Open
abhayks1 opened this issue Oct 1, 2019 · 0 comments
Open

Token Config #164

abhayks1 opened this issue Oct 1, 2019 · 0 comments
Labels

Comments

@abhayks1
Copy link
Contributor

abhayks1 commented Oct 1, 2019

Token Config

Facilitator should support stake & mint / redeem & unstake of any EIP20Token. For this, Mosaic Config needs to be generic. Current Mosaic Config is OST specific i.e. it contains chain setup related contract addresses.
Aim of Token Config is to support stake & mint / redeem & unstake of any EIP20Token.

  • In concept, Mosaic config is for chain setup. It contains contract addresses information which were deployed while doing chain setup.

  • Mosaic config contains bootnodes, genesis information which are chain setup specific.

  • For token setup, separate Gateway/CoGateway contract addresses are deployed. It should not be coupled with mosaic config.

  • Proposal is to create a separate Token Config which contains addresses needed while setup of token.

  • Mosaic Config has 1 origin chain and multiple auxiliary chains information. However Token Config contains 1 origin chain and 1 auxiliary chain information.

  • MessageBus, GatewayLib, MerklePatriciaProof library contract addresses are pre-requisite for token setup. A separate Token Config doesn't need to contain these library addresses. It can inherit these information from Mosaic Config.

  • A single Mosaic Config can be inherited by multiple Token Configs.

  • Token Config composition Mosaic Config. It takes file path in key "mosaicConfig".

  • Token Config name will be identifier of token. e.g. LGBT.json, WETH.json

  • While generating Token Config, fetch symbol from Gateway address else file name can be Gateway address

  • While starting facilitator Mosaic/Token config will be passed as input.

  • Proposed structure

{
  "mosaicConfig": "./directory/Mosaic.json",
  "auxChainId": 1406,
  "origin": {
    "baseTokenAddress": "",
    "valueTokenAddress": "",
    "gatewayOrganizationAddress": "",
    "eip20GatewayAddress": "",
    "gatewayLibAddress": "<optional>",
    "messageBusAddress": "<optional>",
    "merklePatriciaLibAddress": "<optional>",
    "stakePoolAddress": "<optional>"
  },
  "auxiliary": {
    "coGatewayOrganizationAddress": "",
    "utilityTokenAddress": "",
    "eip20CoGatewayAddress": "",
    "gatewayLibAddress": "<optional>",
    "messageBusAddress": "<optional>",
    "merklePatriciaLibAddress": "<optional>",
    "redeemPoolAddress": "<optional>"
  }
}
@abhayks1 abhayks1 self-assigned this Oct 1, 2019
@abhayks1 abhayks1 added the Epic label Oct 3, 2019
@abhayks1 abhayks1 removed their assignment Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant