Nodeschool Public Materials

    solcasm

    1.2.1 • Public • Published

    solcasm (evm-assembler)

    Build Status

    solc --asm compatible assembler

    1.- Write EVM assembly in the same format as solc --asm output

      mstore(0x40, 0x80)
      callvalue
      dup1
      iszero
      tag_1
      jumpi
      0x00
      dup1
      revert
    tag_1:
      pop
      dataSize(sub_0)
      dup1
      dataOffset(sub_0)
      0x00
      codecopy
      0x00
      return
    stop
    
    sub_0: assembly {
          mstore(0x40, 0x80)
    }

    2.- Compile it

    npx solcasm contract.evm contract.bin
    

    output:

    6080604052348015600f57600080fd5b50600580601d6000396000f3006080604052
    

    Install

    npm i solcasm

    DownloadsWeekly Downloads

    0

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    51.3 kB

    Total Files

    38

    Last publish

    Collaborators

    • rafaelsalguero