Skip to content

Commit

Permalink
Delegatecall
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw109550 committed Feb 5, 2024
1 parent 057aedb commit 988c642
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rvsol/src/Step.sol
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ 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
// we now use delegatecall to preserve caller.
// TODO: refactor ORACLE using library
let res := delegatecall(cgas, addr, memPtr, 0x44, 0x00, 0x20) // output into scratch space
if res { // 1 on success
localizedKey := mload(0x00)
}
Expand Down

0 comments on commit 988c642

Please sign in to comment.