-
Notifications
You must be signed in to change notification settings - Fork 11
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
Delegatecall causes execution error. #235
Closed
Subway2023 opened this issue
Feb 25, 2025
· 1 comment
· Fixed by paritytech/polkadot-sdk#7729 or #243
Closed
Delegatecall causes execution error. #235
Subway2023 opened this issue
Feb 25, 2025
· 1 comment
· Fixed by paritytech/polkadot-sdk#7729 or #243
Comments
Thanks for reporting this! Currently our runtime returns with an error if there is no contract behind the target address which is inconsistent with what the EVM does. This change will fix it: paritytech/polkadot-sdk#7729 |
github-merge-queue bot
pushed a commit
to paritytech/polkadot-sdk
that referenced
this issue
Feb 26, 2025
This PR changes the behavior of delegate calls when the callee is not a contract account: Instead of returning a `CodeNotFound` error, this is allowed and the caller observes a successful call with empty output. The change makes for example the following contract behave the same as on EVM: ```Solidity contract DelegateCall { function delegateToLibrary() external returns (bool) { address testAddress = 0x0000000000000000000000000000000000000000; (bool success, ) = testAddress.delegatecall( abi.encodeWithSignature("test()") ); return success; } } ``` Closes paritytech/revive#235 --------- Signed-off-by: xermicus <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
xermicus
added a commit
that referenced
this issue
Feb 27, 2025
Closes #235 --------- Signed-off-by: xermicus <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resolc version: 0.1.0-dev.9+commit.82ab39d.llvm-18.1.8
Run with resolc
I have set up an execution environment that can directly execute the bytecode generated by revive compilation.
compile
execute
Run with remix
The text was updated successfully, but these errors were encountered: