-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
chain deployment.Chain, | ||
ab deployment.AddressBook, | ||
) (*deployment.ContractDeploy[*link_token.LinkToken], error) { | ||
linkToken, err := deployment.DeployContract[*link_token.LinkToken](lggr, chain, ab, |
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.
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.
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.
Is the link deployment needed for test environments? If not, can we not use already deployed link contracts in various chains?
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.
/ 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?
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.
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.
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.
If this is the intended one, please ignore me
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.
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.
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.
If this is the intended one, please ignore me
@AnieeG thanks, let me double check with someone to be sure
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.
@AnieeG i doubled checked with Rodrigo, yes this is the one to use.
99d23be
to
dc90c89
Compare
) | ||
|
||
// DeployLinkTokenContract deploys a link token contract to the provided chain. | ||
func DeployLinkTokenContract( |
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.
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.
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.
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
d7823ac
dc90c89
to
d7823ac
Compare
Added a new changeset in shared package which deploys the link token.
JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1313