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

Bridge / DEX config onchain #19

Open
redDwarf03 opened this issue Aug 1, 2024 · 1 comment
Open

Bridge / DEX config onchain #19

redDwarf03 opened this issue Aug 1, 2024 · 1 comment
Labels
feature New feature request stand by

Comments

@redDwarf03
Copy link
Member

Is your feature request related to a problem?

No response

Describe the solution you'd like

The relation between UCIds and token addresses for each environment is configured in a json file in the project.
When we want to add new tokens, we need to recompile the project and update dependencies.
The goal of this issue is to move onchain the configuration /lib/src/domain/repositories/tokens/ucids_tokens.json

No need to define all networks in the same config
Distinct config for each network.

So, instead of

{
    "mainnet": {
        "0000457EACA7FBAA96DB4A8D506A0B69684F546166FBF3C55391B1461907EFA58EAF": 1027,
        "00005751A05BA007E7E2518DEA171DBBD67B0527C637232F923830C39BFF9E8F159A": 20920
    },
    "testnet": {
        "00001A4AB7AD0CE2B494C965C66FF2962692A5FE5ECB71B345ABB53BAD88A83A01F1": 3890,
        "00003DF600E329199BF3EE8FBE2B8223413D70BCDD97E15089E6A74D94DE3F1173B4": 1027,
        "0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827": 1839,
        "00001ED63AC2850CEA282D3D0CA5047418BC2720CB49D15B611D2845611F605716A1": 20920
    },
    "devnet": {
        "00001A4AB7AD0CE2B494C965C66FF2962692A5FE5ECB71B345ABB53BAD88A83A01F1": 3890,
        "00003DF600E329199BF3EE8FBE2B8223413D70BCDD97E15089E6A74D94DE3F1173B4": 1027,
        "0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827": 1839,
        "0000353AF3AF4BC3CB70E16A5DA4F5A842140C8FE63314E9B7336089C973821B544F": 1027
    }
}

Create in each network a transaction chain with data txn

{
  "ucids": {
        "00001A4AB7AD0CE2B494C965C66FF2962692A5FE5ECB71B345ABB53BAD88A83A01F1": 3890,
        "00003DF600E329199BF3EE8FBE2B8223413D70BCDD97E15089E6A74D94DE3F1173B4": 1027,
        "0000288BF6F0E12457B125DC54D2DFA4EB010BE3073CF02E10FB79B696180F55B827": 1839,
        "0000353AF3AF4BC3CB70E16A5DA4F5A842140C8FE63314E9B7336089C973821B544F": 1027
    }
}

We can follow the example of verified tokens available in these tx chains
https://testnet.archethic.net/explorer/chain?address=0000b01e7a497f0576a004c5957d14956e165a6f301d76cda35ba49be4444dac00eb
https://mainnet.archethic.net/explorer/chain?address=000030ed4ed79a05cfaa90b803c0ba933307de9923064651975b59047df3aaf223bb

Additional context

Remove coin's name from CryptoPrice class

Epic

No response

@redDwarf03 redDwarf03 added the feature New feature request label Aug 1, 2024
@redDwarf03
Copy link
Member Author

finish before #13

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

No branches or pull requests

1 participant