An erc20 token has been smart contracted in MyEtherWallet
(Ropsten) and verified & published in etherscan.io
. I want to list this token in an exchange I've built. Can I do it by installing a private blockchain(geth) in my exchange server and able to do rpc calls like it's done for ETH? If it is not possible, what are the other options?
Add a comment
|
1 Answer
Yes you need to setup a local Geth instance and start it in testnet
non-mining mode as described in Ropsten docs.
Wait for it to sync, then you'll be able to access it via RPC (WS-RPC is needed to be able to subscribe to new events, HTTP-RPC can be used for listing past events).
Then you can subscribe to and list the Transfer
events of your contact using the ERC20 ABI.
-
-
-
1Http-rpc is request-reply, for asynchronous events you need websocket protocol. You can do trades using your local instance, provided you use a funded account and specify some gas amount. Only funded transactions get propagated through the network, also in a testnet.– rustyxJul 16, 2018 at 17:52
-
I read that testnets are for only testing purpose. Does a testnet become mainnet if we apply gas price for it? If that is true, is it applicable for only erc20-tokens?– krkartJul 17, 2018 at 6:10
-
1A testnet is like a mainnet except its ether is worthless. Instead of mining testnet ether, the testnet gives it out for free to anyone interested. The main principle of paying for gas though is still the same. A testnet never becomes mainnet.– rustyxJul 17, 2018 at 6:48