I am using erc20(psp22) smart contract to create fungible token. Contract successfully compiled and deployed. While I was deploying, I added initial_supply: Balance as 2. I tried to read initial_supply from local node in contract ui and display return value of initial supply 2,000,000,000,000 (shown in image).

enter image description here

Once again I uploaded and added initial_supply: Balance as 2 in contract ui by using Shuibuya testnet. This time return value of initial supply 2,000,000,000,000,000,000.

Why initial_supply is different even though I provided same initial supply while uploading on different testnet?

enter image description here

I have tried same in polkadotjs with shibuya testnet instead return value it throws error.

enter image description here

Someone please explain me why this is happening?

1 Answer 1


The UI will read your contract metadata and if the argument of the method is Balance then, by default, it will apply the chain-decimals. That is why if you input 1 in for a Balance field in Shibuya it will actually make the call for 1 + 18 decimals. If the argument field is an u128 then this doesn't apply (1 will be 1).

To do so in polkadot js UI for Shibuya chose atto (smallest unit): enter image description here

Also until this is not merged, please use our website with the weightV2 fix (you will not get the error you share in the last screen): https://polkadotjs-apps.web.app/#/explorer

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.