From e6cbd7d80d2685972b149ae8e5032ad84821fabd Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 5 Feb 2024 18:11:48 +0900 Subject: [PATCH] test --- rvsol/src/Step.sol | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rvsol/src/Step.sol b/rvsol/src/Step.sol index 51168c1a..32906160 100644 --- a/rvsol/src/Step.sol +++ b/rvsol/src/Step.sol @@ -770,7 +770,11 @@ contract Step { mstore(add(memPtr, 0x04), key) mstore(add(memPtr, 0x24), offset) let cgas := 100000 // TODO change call gas - let res := call(cgas, addr, 0, memPtr, 0x44, 0x00, 0x40) // output into scratch space + + // CALL: msg.sender: this contract, + // DELEGATECALL: msg.sender: tx.origin + + let res := delegatecall(cgas, addr, memPtr, 0x44, 0x00, 0x40) // output into scratch space if res { // 1 on success dat := mload(0x00) datlen := mload(0x20) @@ -786,7 +790,11 @@ contract Step { mstore(add(memPtr, 0x04), preImageKey) mstore(add(memPtr, 0x24), localContext_) let cgas := 100000 // TODO change call gas - let res := call(cgas, addr, 0, memPtr, 0x44, 0x00, 0x20) // output into scratch space + + // CALL: msg.sender: this contract + // DELEGATECALL: msg.sender: tx.origin + + let res := delegatecall(cgas, addr, memPtr, 0x44, 0x00, 0x20) // output into scratch space if res { // 1 on success localizedKey := mload(0x00) leave