0

I made ethereum contract according to sample code. And then generated ethereum wallet. The abstract contract is as follow.

pragma solidity ^0.4.18;

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

Now I want to send ether to other using this contract. How to send transaction using contract? plz help me.

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

let the address you wish to transfer ether to be adr

adr.transfer(1000);

the value inside transfer would be in Wei

  • Hi @Skyuppercut. This answer is helpful for me, but not enough to understand. plz tell me in detail. thanks. – Coder HHC Jun 6 '18 at 5:14
  • transfer is an inbuilt function of type 'address'. It can be used to send ether to addresses. Start reading the documentation link – Skyuppercut Jun 6 '18 at 8:19

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.