status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
300 stars 79 forks source link

Community token contract decimal points do not match decimal points specified in the form #14073

Open anastasiyaig opened 8 months ago

anastasiyaig commented 8 months ago

Description

https://sepolia-optimism.etherscan.io/token/0x3ef88a85e9ca2d187b3632a63b2d9d763a44aa6c?a=0xf008ce0e07f8996c0fe71beb59e076207b214e2d

Screenshot 2024-03-21 at 14 08 07 Screenshot 2024-03-21 at 14 08 34
anastasiyaig commented 8 months ago

@jrainville i put it to 2.29 for now but please check it out

jrainville commented 8 months ago

I think this is per design. DP is decimal points and it just for the UI. The actual number of decimals cannot be updated iirc and is always 18. cc @endulab @noeliaSD

endulab commented 8 months ago

Correct, every community smart contract has dp = 18. DP set by the user in the form refers only to displaying values.

anastasiyaig commented 8 months ago

thank you guys! @benjthayer do we need this field at all then? I think it is the second time in am confused with it, it also confused @stefandunca , we both thought this value should reflect the contract decimals

benjthayer commented 8 months ago

thank you guys! @benjthayer do we need this field at all then? I think it is the second time in am confused with it, it also confused @stefandunca , we both thought this value should reflect the contract decimals

Yes then that is a little odd. If the minting form is intended to determine how many decimals should be displayed out of the 18, then we probably need some additional copy on the dp field stating that so the minter is clear on what they are setting.

@John-44 I'm not 100% on the use case for allowing the user to limit the display of dp's? Is it to do with the level of granular control that the Owner/TM may want to have when using decimals of the asset for token permissions? Or is it more to do with controlling the display of the asset if/when it becomes listed on an exchange and the value of the token may cause it to be displayed with many decimals?

noeliaSD commented 8 months ago

I think this is per design. DP is decimal points and it just for the UI. The actual number of decimals cannot be updated iirc and is always 18. cc @endulab @noeliaSD

On the UI, afaik, we will be using this DP number (so in this case 2 decimals) on the airdrop flow. There's an open PR for that.

jrainville commented 7 months ago

So what should we do here? is there anything to fix or it's just making things clearer in the UI?

benjthayer commented 7 months ago

So what should we do here? is there anything to fix or it's just making things clearer in the UI?

@jrainville - need to chat this one through with John - added to my list :)

jrainville commented 6 months ago

@benjthayer any news on this one?