[CLD-1916]: feat(evm): port link token state code#13
[CLD-1916]: feat(evm): port link token state code#13graham-chainlink wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Ports EVM LinkToken state loading/view generation logic into this repo to support reading LINK/Static LINK token deployments from an address bundle (TypeAndVersion map), aligning with the CLD changesets/view layer.
Changes:
- Adds
LinkTokenStateandStaticLinkTokenStatewithGenerate*Viewhelpers. - Adds
MaybeLoadLinkTokenChainStateandMaybeLoadStaticLinkTokenStateto bind on-chain wrappers from address/type+version inputs. - Introduces unit tests covering nil bindings, duplicate contract instances, and version mismatch behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| pkg/family/evm/link_state.go | Implements LINK & Static LINK state structs, view generation, and chain-state loaders using TypeAndVersion address maps. |
| pkg/family/evm/link_state_test.go | Adds focused unit tests for nil bindings, dedupe error behavior, and version mismatch handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ca15072 to
7987d67
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7987d67 to
5bb816b
Compare
ecPablo
left a comment
There was a problem hiding this comment.
This one I think I already ported here: https://github.com/smartcontractkit/cld-changesets/tree/main/pkg/contract/link/view/v1_0
Port from https://github.com/smartcontractkit/chainlink/blob/7e663cb96847f78902ca9c61ae2b302931fd0434/deployment/common/changeset/state/evm.go#L438-L438
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1916