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

[DPA-1313]: feat(deployment): add link contract deployment #15379

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

graham-chainlink
Copy link
Collaborator

Added a new changeset in shared package which deploys the link token.

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1313

@graham-chainlink graham-chainlink requested review from a team as code owners November 22, 2024 05:13
chain deployment.Chain,
ab deployment.AddressBook,
) (*deployment.ContractDeploy[*link_token.LinkToken], error) {
linkToken, err := deployment.DeployContract[*link_token.LinkToken](lggr, chain, ab,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a criticism of you but I really hate that we have a function which returns a result, but also has a side-effect of updating a supplied address-book. :/ That's a sort of mis-matched use of function and side effect I'm not happy with. Need to rethink it.

You're doing it right, here, I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the link deployment needed for test environments? If not, can we not use already deployed link contracts in various chains?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ That's a sort of mis-matched use of function and side effect I'm not happy with. Need to rethink it.

Good to know! I was kind of following the establish pattern here as seen in the code.

Is the link deployment needed for test environments? If not, can we not use already deployed link contracts in various chains?

My understanding is that this changeset will be used for future new chains as well? And we are building a common bunch of useful changesets?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that this is the contract we can officially use as link contract for new chains? I was under impression this is just a test equivalent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the intended one, please ignore me

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know! I was kind of following the establish pattern here as seen in the code.

Yeah - established patterns aren't all "Good" yet. We have been evolving this under deadline pressure, so we're just now coming back to re-evaluate emerging patterns. You're not doing bad here, it's more you're echoing something that I need to rethink.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the intended one, please ignore me

@AnieeG thanks, let me double check with someone to be sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnieeG i doubled checked with Rodrigo, yes this is the one to use.

@graham-chainlink graham-chainlink force-pushed the ggoh/DPA-1313/deploy-link-token branch from 99d23be to dc90c89 Compare November 25, 2024 05:40
cgruber
cgruber previously approved these changes Nov 25, 2024
connorwstein
connorwstein previously approved these changes Nov 25, 2024
)

// DeployLinkTokenContract deploys a link token contract to the provided chain.
func DeployLinkTokenContract(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit could probably just inline this actually in the changeset, I know we do this elsewhere but we're thinking its overkill and intend to inline the deploy.go functions inside the changesets.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice, i had it right in my first iteration but then i followed the MCMS and moved the logic in to internal, let me bring the original back as i prefer that too!

Added a new changeset in shared package which deploys the link token.

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1313
@graham-chainlink graham-chainlink added this pull request to the merge queue Nov 27, 2024
Merged via the queue into develop with commit 0baf958 Nov 27, 2024
149 checks passed
@graham-chainlink graham-chainlink deleted the ggoh/DPA-1313/deploy-link-token branch November 27, 2024 01:13
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.

4 participants