Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 614 Bytes

5-19-05.md

File metadata and controls

21 lines (13 loc) · 614 Bytes

On test network, use a faucet to get ETH.

1 wei 10^18 For a transaction, its always wei who is send

web3.js

can use web3 towei/fromwei function to convert wei to eth

to verify : object.c[0] it's betster to use object.toNumber() to get the value

important to add payable if we want to get money from the transaction. could be any amount.

constructor function in solidty have the same name than the contract

a fallback function just interecept any transfer to the contract and execute

fallback function can take at max 2300 gas :

  • no writing at storage
  • no calling external function
  • no send ether...