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

Fix wrong contract account id for instantiate #965

Merged
merged 10 commits into from
Feb 17, 2023
Merged

Conversation

lean-apple
Copy link
Contributor

@lean-apple lean-apple commented Feb 9, 2023

Closes #777.

The last contract account id was used instead of the first one for the Instantiated Event.

A find_last method was added in the events_types of subxt to lighten the current code and for block_types, here.

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

Assuming it works okay by passing the repro in #777. LGTM!

crates/cargo-contract/src/cmd/extrinsics/instantiate.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/instantiate.rs Outdated Show resolved Hide resolved
crates/cargo-contract/src/cmd/extrinsics/instantiate.rs Outdated Show resolved Hide resolved
@lean-apple lean-apple marked this pull request as ready for review February 16, 2023 04:45
@cmichi
Copy link
Collaborator

cmichi commented Feb 16, 2023

Oha, I somehow thought we had merged a hotfix for this issue.

@ascjones We should issue a patch release with this one and the template fix.

@lean-apple Is the PR still WIP? If not change the title please. Please also update the first sentence in the description to "Closes $link_to_issue.". When we merged the PR GitHub will then automatically close the issue.

@lean-apple lean-apple changed the title WIP - Fix wrong contract account id for instantiate Fix wrong contract account id for instantiate Feb 16, 2023
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

Thank you, Lea!

@cmichi cmichi merged commit a74d4e4 into master Feb 17, 2023
@cmichi cmichi deleted the ln-fix-wr-account-id branch February 17, 2023 07:38
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.

If contract instantiates sub-contracts, cargo contract instantiate returns wrong contract account id
3 participants