Skip to content

Commit

Permalink
Add basic "print" functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchatruc committed Apr 9, 2024
1 parent 1fdde1c commit f4b310e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions system-contracts/contracts/EvmInterpreter.yul
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ object "EVMInterpreter" {
gasRemaining := sub(prevGas, toCharge)
}

function printHex(value) {
mstore(0, value)
log1(0, 32, 0x00debdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebde)
}

function printString(value) {
mstore(0, value)
log1(0, 32, 0x00debdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdebdf)
}

////////////////////////////////////////////////////////////////
// FALLBACK
////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit f4b310e

Please sign in to comment.