0.0.1-test-2 • Published 3 years ago

ethasm v0.0.1-test-2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

EVM assembler

GitHub

ethasm <file_name>

Example code

push1 0x80      // start code
push1 0x40
mstore   

// if callvalue == zero, jump to @tag, revert otherwise.
callvalue
dup1
iszero
push @tag    
jumpi
push1 0x00
dup1
revert

@tag
    jumpdest 
    pop
    push1 0x40
    mload
    dup1
    push1 0x01
    swap1
    mstore
    push1 0x20
    swap1
    return

stop
npm start <FILE_PATH> 
608060405234801561001057600080fd5b506040518060019052602090f300