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

feat: testnet support #349

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

Jonathansumner
Copy link
Member

@Jonathansumner Jonathansumner commented May 13, 2024

  • Detects the chain ID and replaces accordingly

@Jonathansumner Jonathansumner self-assigned this May 13, 2024
OldAddrPrefix = "fetch"
)

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.

//go:embed reconciliation_data.csv
var reconciliationData []byte

// ASIGenesisUpgradeCmd returns replace-genesis-values cobra Command.
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
1 check passed
@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.

None yet

2 participants