github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata/send-eth.sol (about)

     1  pragma solidity 0.4.24;
     2  contract MyContract {
     3      constructor() public payable {}
     4      address a = 0x1e14d5373E1AF9Cc77F0032aD2cd0FBA8be5Ea2e;
     5      function transferTo()payable{}
     6      function foo() {
     7  
     8          // send ether with default 21,000 gas
     9          // likely causes OOG in callee
    10          a.send(1 ether);
    11  
    12          // send ether with all remaining gas
    13          // but no success check!
    14          a.call.value(1 ether)();
    15  
    16          // RECOMMENDED
    17          // send all remaining gas
    18          // explicitly handle callee throw
    19          if(!a.call.value(1 ether)()) throw;
    20      }
    21  }