0

Background:

Currently we have an Dapp running on Ropsten. We've created an ERC20 token on Ropsten. Our employees are awarded these tokens over time. We want to use Dappos to allow our employees to spend these tokens at internal facilities. This doesn't seem possible on Ropsten; Dappos is able to locate our token successfully, but as it has no value, the amount of the token deemed necessary for the transaction is always 0, regardless of the dollar amount of the transaction. This effectively renders Dappos useless to us if we stay on Ropsten to test.

Question:

Therefore, we'd like to move to a private Ethereum blockchain to test. Can anyone elucidate how we can set or engineer a value for our token on a private blockchain so we can transact with our token internally using Dappos?

Also, if I am incorrect about Dappos providing no value on Ropsten for an ERC20 token, please correct me.

2 Answers 2

0

You will probably face the same problem on a private network.

Dappos is checking the price on CoinGecko and your token is not listed on any exchange.

The only way to gets around the problem is by disabling fiat conversion, but the parity will be 1$ = 1 Token, as you can see on the second screenshot.

Dappos configuration

enter image description here

Hope that helps

1
  • I appreciate the info. I think I'll modify the code base for internal testing to prevent it from reaching out to CoinGecko and engineer a fluctuating value, and then use the real Dappos when we move to the mainnet. Commented Feb 20, 2020 at 13:39
0

If anyone has a similar use case, I've modified it to work for our coin on the test net. Feel free to pm, but in a nutshell just make the code in cart.js around line 126 check if you've selected your token on Dappos, and set the coingeckoId to a string that makes sense for you.

let coingeckoId = ''
  if (selectedToken === 'XXX') {
    coingeckoId = 'XXX'
  } else {
    coingeckoId = rootGetters['settings/selectedTokenObject'].coingeckoId
  }

Then in conversion.js check if coingeckoId === the lower case form of that custom id you set, and respond with the desired price ratio:

    if (coingeckoId === 'xxx') {
      return 1 / 100
    }

Not incredibly sexy, but it works for testing purposes to get the proper amount and retains functionality for ETH and live ERC20 tokens.

Note: Have yet to test actually moving the coin as our scanning functionality still needs to be developed. Will post an update here upon success.

Your Answer

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

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