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

refactor(amplifier): standardizes contract config read/write between chain specific and global contracts #397

Merged
merged 12 commits into from
Oct 15, 2024

Conversation

eguajardo
Copy link
Contributor

  • differentiates between contractConfig (e.g. config.axelar.contracts.Gateway.avalanche) and contractBaseConfig (e.g. config.axelar.contracts.Gateway), both are equivalent for global contracts
  • adds lastUploadedCodeId attribute to contractBaseConfig
  • moves codeId to contractConfig
  • upload (also scripts with --fetchCodeId option) will update lastUploadedCodeId instead of codeId
  • instantiation and migration will set codeId in contractConfig
  • scripts have 3 ways to get the codeId for instantiation/migration (previously set contractConfig.codeId will be ignored), in order of priority:
    1. take it from argument if --codeId was set
    2. if --fetchCodeId flag was set, it retrieves the code Id from the network by comparing the code hash stored from a governance proposal
    3. copies contractBaseConfig.lastUploadedCodeId which was previously set during upload

https://axelarnetwork.atlassian.net/browse/AXE-5189

@eguajardo eguajardo requested a review from a team as a code owner October 3, 2024 03:28
@eguajardo eguajardo merged commit e5ccf0e into main Oct 15, 2024
6 checks passed
@eguajardo eguajardo deleted the refactor/contract-configs-standard branch October 15, 2024 16:57
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