5

I am trying to write an application using web3.js and I want to integrate some ERC20 functionality. But rather than muddy up the mainnet, I'd like to try things on the Testnet first. I see that https://ropsten.etherscan.io/address/0x722dd3f80bac40c951b51bdd28dd19d435762180#tokentxns is a standard Testnet token. Is there anyway for me to get my hands on some?

Or perhaps another ERC20 compliant testnet token?

1
  • good question, with apparently no answer. you'd think, this being one of the most common use cases, like ever, that the Ethereum ecosystem would provide a standard solution, but no. such a s h i t s h o w
    – ekkis
    Dec 29, 2021 at 0:03

4 Answers 4

3

In that contract https://ropsten.etherscan.io/address/0x722dd3f80bac40c951b51bdd28dd19d435762180#code you need to call the function showMeTheMoney with your address and amount of tokens. It should deposit that amount in your address.

function showMeTheMoney(address _to, uint256 _value) {
    totalSupply += _value;
    balances[_to] += _value;
    Transfer(0, _to, _value);
}
4
  • Here's a dumb question - how do I run the function?
    – Shamoon
    May 14, 2018 at 3:08
  • 1
    You have the contract address and you can get the contract abi from the etherscan page. With that you can create an instance of the contract and call the method showMeTheMoney().
    – Ismael
    May 14, 2018 at 15:39
  • But how do I call the method?
    – Shamoon
    May 14, 2018 at 15:41
  • 2
    In web3 v1.0 it should be ``` const token = web3.eth.Contract(TokenABI, TokenAddress); await token.methods.showMeTheMoney(UserAddress, TokenAmount).send({ from: UserAddress, gas: 200000 }); ```
    – Ismael
    May 14, 2018 at 16:51
2

I just found out that Etherscan has a beta feature tab called Write Contract and it allows to directly interact with the TST smart contract with the use of Metamask.

Etherscan's Beta version of its Write Contract Feature

1
  • which, of course, doesn't work on the Standard Test Token: ropsten.etherscan.io/token/… -- because nothing in this ecosystem ever just works
    – ekkis
    Dec 29, 2021 at 0:01
0

Just deploy own ERC20 token contract to the testnet and use that.

-1

Because all Erc20 tokens have same rules, you can create your own ERC20 token. I have published an article to explain it in step by step tutorial. you can find it here:

https://athamidn.medium.com/step-by-step-get-erc20-test-token-faucet-on-ropsten-d20850375f2c

1
  • you'd think someone would have created this facility by now to save everyone the trouble
    – ekkis
    Dec 29, 2021 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.