bee icon indicating copy to clipboard operation
bee copied to clipboard

Refer to xDai instead of ETH if in mainnet

Open tmm360 opened this issue 3 years ago • 5 comments

Summary

Currently printed text on logs refers always to ETH, even if mainnet where the coin is xDai instead. Update printed texts.

Example: time="2022-01-09T18:40:10Z" level=warning msg="cannot continue until there is sufficient ETH (for Gas) and at least 1 BZZ available on xxxxxxxxxxxx"

Expected behavior

Each net should call its main coin properly.

Actual behavior

It's always cited ETH.

Possible solution

A dictionary with Net->CoinName should be kept as a coin name source by text printers.

tmm360 avatar Jan 09 '22 18:01 tmm360

thanks @tmm360. I believe that xDai is officially called Gnosis chain now, and I'm not sure what the native token will be, I guess GNO. Let's follow up on this once their transition is done, and we can sweep through the codebase and do the appropriate cleanups

acud avatar Jan 09 '22 22:01 acud

@acud Correct, it's Gnosis Chain, but main coin is still xDai. It is a bridge on stablecoin Dai, so no clue that is will go to change name. Anyway, the dictionary is easy to update at any moment the coin should change name in future, if it will.

tmm360 avatar Jan 09 '22 22:01 tmm360

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 11 '22 01:03 github-actions[bot]

.

tmm360 avatar Mar 11 '22 15:03 tmm360

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 21 '22 02:06 github-actions[bot]

Instead of naming token variables by it's symbol names, bee client can use network agnostic term in order to be flexible.

For example whenever bee codebase needs to refer to native token of the blockchain it can use native token. This would be much more flexible naming since bee contracts could be deployed to different networks on mainnet, testnet or local deployments.

Similarly, whenever bee needs to refer to swarm token it shouldn't use bzz (symbol name), but swarm token, since these also have different symbol names on different networks.

vladopajic avatar Dec 05 '22 21:12 vladopajic

I don't agree. To explicit quote the token name remove any ambiguity. Important when some one is using bee for the first time. It's a very very simple implementation.

tmm360 avatar Dec 05 '22 21:12 tmm360

Instead of naming token variables by it's symbol names, bee client can use network agnostic term in order to be flexible.

There is clearly a usability issue here and the solution is not necessary more flexibility, but rather some added clarity. I think it makes sense to internally keep track of the context if it is about native token or swarm token, however when communicating with the user it would be better to resolve it to the actual token name.

agazso avatar Dec 06 '22 15:12 agazso