I need to find out how to:

  1. Connect web3 to the smart contract that contains the TOKEN token via a ethereum node URL running parity, and use getter function on this contract to obtain the 'total sold' (as per ERC20 standard interfaces)

  2. get current eth value from any exchange or the node running parity and multiply by x which is the fixed exchange rate for each TOKEN token

Any idea how to do it?

  • Yes, check google. I guess you have not even tried. The first result in google is your answer. – Florian Castelain Jan 19 '18 at 2:10
  • @Andromelus I see Erc20 has a method total supply, but does it have total sold? Or do I have to set a constant of my initialSupply and calculate from there? – Eduardo Jan 19 '18 at 2:41

Your Answer

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

Browse other questions tagged or ask your own question.