-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: testnet support #349
Conversation
Jonathansumner
commented
May 13, 2024
•
edited
Loading
edited
- Detects the chain ID and replaces accordingly
cmd/fetchd/cmd/genasiupgrade.go
Outdated
OldAddrPrefix = "fetch" | ||
) | ||
|
||
var networkInfos = map[string]NetworkConfig{ | ||
"mainnet": { |
There was a problem hiding this comment.
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).
cmd/fetchd/cmd/genasiupgrade.go
Outdated
TokenBridge: TokenBridge{ | ||
Addr: "fetch1qxxlalvsdjd07p07y3rc5fu6ll8k4tmetpha8n", // TODO(JS): amend this | ||
NewAdmin: "fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw", // TODO(JS): amend this | ||
}, |
There was a problem hiding this comment.
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.
cmd/fetchd/cmd/genasiupgrade.go
Outdated
//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]", |
There was a problem hiding this comment.
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.