[CLD-1916]: fix(aptos): port LoadMCMSAddresses#8
Conversation
There was a problem hiding this comment.
Pull request overview
Moves Aptos MCMS address loading logic into this repository, adding the supporting Aptos family package code and tests so Aptos deployments can resolve MCMS addresses from the CLDF datastore.
Changes:
- Add
LoadMCMSAddressesfor Aptos to load MCMS account addresses from the environment datastore. - Introduce Aptos-specific contract type constant(s) for datastore entries.
- Add unit tests covering success and several error scenarios; update
go.modrequirements accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/family/aptos/state.go | Adds LoadMCMSAddresses implementation to read Aptos MCMS addresses from the datastore. |
| pkg/family/aptos/state_test.go | Adds unit tests for LoadMCMSAddresses using an in-memory CLDF environment/datastore. |
| pkg/family/aptos/contract.go | Defines Aptos-specific datastore contract type for MCMS. |
| pkg/contract/version.go | Adds a semver constant for the supported contract version (1.6.0). |
| go.mod | Promotes required dependencies (aptos-go-sdk, chain-selectors, solana-go, mcms) to direct requirements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fb49896 to
a1fba55
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a1fba55 to
96d802f
Compare
96d802f to
ea7d8ee
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ea7d8ee to
278adeb
Compare
| ) | ||
|
|
||
| const ( | ||
| AptosMCMSType cldf.ContractType = "AptosManyChainMultisig" |
There was a problem hiding this comment.
We already have a contract type in cldf here https://github.com/smartcontractkit/chainlink-deployments-framework/blob/main/engine/cld/mcms/proposalutils/contract_types.go these are mostly used in evm, but raising this as I'm not sure if we should move those to cld-changesets or move aptos to cldf
There was a problem hiding this comment.
oh good to know! let me update it!
There was a problem hiding this comment.
these are mostly used in evm, but raising this as I'm not sure if we should move those to cld-changesets or move aptos to cldf
yeah good questions, will those contract types be used outside of changesets?
278adeb to
cfbd0b5
Compare
| ) | ||
|
|
||
| // GetState loads the MCMSWithTimelockState from the environment | ||
| func GetState(env cldf.Environment, selector uint64) (*MCMSWithTimelockState, error) { |
There was a problem hiding this comment.
On 2nd thought i think we can remove this as it is just a light wrapper around maybeLoadMCMSWithTimelockChainState
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cfbd0b5 to
c2b249c
Compare
c2b249c to
f3fbeab
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f3fbeab to
a157dc4
Compare
There was a problem hiding this comment.
CLDF already has this as pointed out by pablo
a157dc4 to
b86626e
Compare
b86626e to
efd52db
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move the aptos [LoadMCMSAddresses](https://github.com/smartcontractkit/chainlink/blob/7e663cb96847f78902ca9c61ae2b302931fd0434/deployment/common/changeset/state/aptos.go#L18-L18) function from chainlink repo to here. JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1916
efd52db to
bbb5e19
Compare
|
|
||
| const ( | ||
| // todo: move to CLDF? | ||
| AptosMCMSType cldf.ContractType = "AptosManyChainMultisig" |
There was a problem hiding this comment.
May move this to CLDF with others , so i dont have to move 1 at a time
| for _, selector := range chainSelectors { | ||
| var mcmsAddress aptos.AccountAddress | ||
| found := false | ||
| refs := env.DataStore.Addresses().Filter(datastore.AddressRefByChainSelector(selector)) |
There was a problem hiding this comment.
changed this from addressbook to datastore
Move the aptos LoadMCMSAddresses function from chainlink repo to here.
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1916