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

Draft
wants to merge 9 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 :)

@@ -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).

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
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
_gas: inkwell::values::IntValue<'ctx>,
_address: inkwell::values::IntValue<'ctx>,
address: inkwell::values::IntValue<'ctx>,
_value: Option<inkwell::values::IntValue<'ctx>>,
Copy link
Member

Choose a reason for hiding this comment

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

Should be removed.

@ermalkaleci ermalkaleci marked this pull request as draft October 17, 2024 14:23
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