Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
pcw109550 committed Feb 5, 2024
1 parent f51ad2d commit e6cbd7d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rvsol/src/Step.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit e6cbd7d

Please sign in to comment.