-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: connect to already deployed contracts #113
Conversation
* the `compiled_contract` argument was used only for computing the `contract_id`
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.
Looks reasonable. Will defer to @digorithm for final review.
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.
Looks good, great job removing the need for passing the compiled to contract around, much better with just the contract id -- just left a tiny request for comment.
Tiny conflict with |
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.
LGTM. Let's keep in mind that this is a breaking change -- we're moving from creating a contract instance with the compiled contract to taking only the contract id. All tests out there will break with this change. It will require minimal changes on the user side, though, similar to the changes in harness.rs
in this PR.
* In accordance with FuelLabs/fuels-rs#113
Closes #88.
This PR changes the way to instantiate a contract. Since the compiled code is actually not needed
to interact with the contract, we just provide the
contract_id
.This PR also creates a "default instantiation" for contracts, mainly for test purposes.
Comment: not sure about some design choices around string or
new_default
.