Guest User

Untitled

a guest
Dec 12th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Returned error: The method eth_sendTransaction does not exist/is not available
  2.  
  3. const cacheAddress_ = "0xDD963fCdD32ccC802470CdB85A634dE8A47E9257"
  4. const circulationAddress_ = "0x2dA320D8efF599f11Fe575124020743c9c2E8088"
  5. var web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/v3/API_KEY"))
  6.  
  7. async function transfer() {
  8. const contract = new web3.eth.Contract(lvn.ABI, lvn.address)
  9. const block = await contract.methods.transfer(circulationAddress_, new BigNumber(10**9*10**18)).send({ from: cacheAddress_ })
  10. const circulationBalance = await contract.methods.balanceOf(circulationAddress_).call()
  11. const cacheBalance = await getCacheBalance()
  12. console.log({ circulationBalance, cacheBalance })
  13. }
  14.  
  15. transfer()
Add Comment
Please, Sign In to add comment