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

Implement delegate_call #80

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

ermalkaleci
Copy link
Contributor

@ermalkaleci ermalkaleci commented Oct 12, 2024

Closes #67

TODO:

  • Update pallet-revive to take address instead of code hash

address public sender;
uint256 public value;

event DidSetVars();
Copy link
Member

Choose a reason for hiding this comment

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

Testing this is irrelevant here? Keeping the fixtures as concise as possible eases debugging them :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just making sure emitted event belongs to caller and not callee

@@ -43,6 +43,7 @@ test_spec!(call, "Caller", "Call.sol");
test_spec!(transfer, "Transfer", "Transfer.sol");
test_spec!(return_data_oob, "ReturnDataOob", "ReturnDataOob.sol");
test_spec!(immutables, "Immutables", "Immutables.sol");
test_spec!(delegate, "Delegate", "Delegate.sol");
Copy link
Member

Choose a reason for hiding this comment

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

This could use some better test coverage, i.e. calling into non-existent accounts, plain accounts, recursively into self (from runtime code and the constructor).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add more cases

crates/llvm-context/src/polkavm/evm/call.rs Outdated Show resolved Hide resolved
crates/llvm-context/src/polkavm/evm/call.rs Show resolved Hide resolved
crates/llvm-context/src/polkavm/evm/call.rs Show resolved Hide resolved
crates/llvm-context/src/polkavm/evm/call.rs Outdated Show resolved Hide resolved
crates/llvm-context/src/polkavm/evm/call.rs Outdated Show resolved Hide resolved
@ermalkaleci ermalkaleci marked this pull request as draft October 17, 2024 14:23
@ermalkaleci ermalkaleci marked this pull request as ready for review November 19, 2024 12:10
@xermicus
Copy link
Member

@ermalkaleci we will fix the CI first

@xermicus
Copy link
Member

@ermalkaleci merging main will fix the CI issue

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.

Thank you @ermalkaleci!

@ermalkaleci
Copy link
Contributor Author

@xermicus merge conflicts resolved

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.

Support the delegatecall opcode
3 participants