ink icon indicating copy to clipboard operation
ink copied to clipboard

Simplify the types that `ink_e2e` requires for balances

Open cmichi opened this issue 9 months ago • 1 comments

We currently "forward" the two types that pallet-revive uses for balances.

It's either U256 or the configured pallet_revive::Config::Currency. The latter is basically the Polkadot SDK currency of the runtime and the former the Eth-compatible one. There is a calculation factor pallet_revive::Config::NativeToEthRatio that is used to convert between the two.

This poses some unnecessary user friction, as e.g. in our E2E tests some methods require U256 while others need ink::Environment::Balance. We should instead decide on one type and do the conversion via NativeToEthRatio in the backend.

cmichi avatar Mar 24 '25 20:03 cmichi

@chungquantin is working on this

evilrobot-01 avatar Apr 23 '25 15:04 evilrobot-01

Duplicate of https://github.com/use-ink/ink/issues/2597, closing.

cmichi avatar Oct 29 '25 15:10 cmichi