3

I have been testing with evm and I am not getting any output.

Code -

pragma solidity ^0.4.18;

contract d8 {

    function myBalance() pure public returns (uint) {
        return 880;
    }

}

My asm is from here -

solc --asm d8.sol > d8.asm

Then I tried -

evm compile d8.asm

Not much happens (output is a blank line).

I tried various options and adding "run" at the end but nothing produced any output.

Has anyone any suggestions?

0

Solidity has an own workflow to deal with assembly. Refer to https://solidity.readthedocs.io/en/develop/assembly.html# and check the phases:

  1. Assembly
  2. Desugaring
  3. Opcode Stream
  4. Byte Stream

Output of phase 2 can be generated as follows: solc --asm

However, evm compile expects you to have phase 3.

e.g. check the code: https://github.com/IC3Hydra/Hydra/blob/master/submarine_sends/to_contract/clone_withdraw.easm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.