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

Send balance when contract doesn't exist #5664

Merged
merged 5 commits into from
Sep 11, 2024
Merged

Send balance when contract doesn't exist #5664

merged 5 commits into from
Sep 11, 2024

Conversation

athei
Copy link
Member

@athei athei commented Sep 10, 2024

Fixes #5577

I decided to bubble up the error from where we actually try to load the contract info. This helps to make sure that we don't miss some entry point by accident. The draw back is that we have to live with some additional .expect.

@pgherveou With this logic the proxy and its runtime part should be completely unaware whether something is a contract call or a balance transfer. They should just route everything into pallet_revive.

@athei athei added the R0-silent Changes should not be mentioned in any release notes label Sep 10, 2024
Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

LGTM

substrate/frame/revive/src/tests.rs Outdated Show resolved Hide resolved
substrate/frame/revive/src/tests.rs Outdated Show resolved Hide resolved
substrate/frame/revive/src/exec.rs Outdated Show resolved Hide resolved
substrate/frame/revive/src/exec.rs Outdated Show resolved Hide resolved
#[test]
fn calling_plain_account_fails() {
fn calling_plain_account_is_balance_transfer() {
Copy link
Member

Choose a reason for hiding this comment

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

🎉

substrate/frame/revive/src/tests.rs Outdated Show resolved Hide resolved
substrate/frame/revive/src/tests.rs Outdated Show resolved Hide resolved
@athei athei enabled auto-merge September 11, 2024 07:46
@athei athei added this pull request to the merge queue Sep 11, 2024
Merged via the queue into master with commit ea5fb02 Sep 11, 2024
201 of 204 checks passed
@athei athei deleted the at/send_balance branch September 11, 2024 11:36
@alialobidm
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling an address without associated code should do a balance transfer
4 participants