Skip to content

feat: testnet support#349

Merged
Jonathansumner merged 3 commits intofeat/aasi-merger-cmdfrom
feat/asi-testnet-support
May 16, 2024
Merged

feat: testnet support#349
Jonathansumner merged 3 commits intofeat/aasi-merger-cmdfrom
feat/asi-testnet-support

Conversation

@Jonathansumner
Copy link
Member

@Jonathansumner Jonathansumner commented May 13, 2024

  • Detects the chain ID and replaces accordingly

@Jonathansumner Jonathansumner requested a review from pbukva May 13, 2024 18:18
@Jonathansumner Jonathansumner self-assigned this May 13, 2024
)

var networkInfos = map[string]NetworkConfig{
"mainnet": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you suggested during the discussion, the key (the "mainnet" in this particular example) should have value of original chain-id from input genesis.json (e.g. fetchhub-4 in this particular case).

Comment on lines +71 to +74
TokenBridge: TokenBridge{
Addr: "fetch1qxxlalvsdjd07p07y3rc5fu6ll8k4tmetpha8n", // TODO(JS): amend this
NewAdmin: "fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw", // TODO(JS): amend this
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testnet, there is no bridge contract = the function handling bridge contract should not be executed. Thei saso means that TokenBridge member in the structure should be pointer so it is not necessary to be set.

func ASIGenesisUpgradeCmd(defaultNodeHome string) *cobra.Command {
cmd := &cobra.Command{
Use: "asi-genesis-upgrade",
Use: "asi-genesis-upgrade [testnet|mainnet]",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop the [testnet|mainnet] paremeter (the decission wil be made automatically based on the chain-id value in the input genesis.json file.

@Jonathansumner Jonathansumner merged commit bfbf0a8 into feat/aasi-merger-cmd May 16, 2024
@Jonathansumner Jonathansumner deleted the feat/asi-testnet-support branch May 16, 2024 10:37
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

Successfully merging this pull request may close these issues.

2 participants