iotaledger / evm-toolkit

EVM Toolkit is a frontend offering user friendly interaction with a L2 ISC chain, including Faucet and Withdrawal from a L2 chain
Apache License 2.0
5 stars 6 forks source link

feat: wrap/unwrap native SMR and wSMR #23

Closed trungtt198x closed 11 months ago

trungtt198x commented 1 year ago

Description of change

For Governance project, it is required to implement the functions wrap and unwrap on the existing evm-toolkit. The function wrap enables to deposit native SMR (on L2) tokens to get the wSMR tokens used as ERC20Votes tokens. The function unwrap enables to withdraw the wSMR tokens back into the native SMR tokens.

Governance operations like creating proposals, voting the proposals and etc will happen on another frontend that is: https://www.tally.xyz/

The evm-toolkit aims to provide only the functions wrap and unwrap.

Links to any relevant issues

Governance project: https://github.com/orgs/iotaledger/projects/67 Relevant issue: https://github.com/iotaledger/shimmer-evm-governance/issues/2

Type of change

How the change has been tested

Manual tests were carried out.

image

Change checklist

nicole-obrien commented 11 months ago

You can interact with L2 Smr via erc20 interface using the contract 0x1074010000000000000000000000000000000000 is there a need to wrap shimmer at all?

trungtt198x commented 11 months ago

You can interact with L2 Smr via erc20 interface using the contract 0x1074010000000000000000000000000000000000 is there a need to wrap shimmer at all?

For a new Governance project, we do need such wrap/unwrap on UI.

nicole-obrien commented 11 months ago

You can interact with L2 Smr via erc20 interface using the contract 0x1074010000000000000000000000000000000000 is there a need to wrap shimmer at all?

For a new Governance project, we do need such wrap/unwrap on UI.

But there is an erc20 interface for SMR, that can be interacted with? Seems like it would be smoother UX to not have the user wrap the smr to wSMR.

https://explorer.evm.shimmer.network/address/0x1074010000000000000000000000000000000000 https://explorer.evm.shimmer.network/token/0x1074010000000000000000000000000000000000

Phyloiota commented 11 months ago

You can interact with L2 Smr via erc20 interface using the contract 0x1074010000000000000000000000000000000000 is there a need to wrap shimmer at all?

For a new Governance project, we do need such wrap/unwrap on UI.

But there is an erc20 interface for SMR, that can be interacted with? Seems like it would be smoother UX to not have the user wrap the smr to wSMR.

https://explorer.evm.shimmer.network/address/0x1074010000000000000000000000000000000000 https://explorer.evm.shimmer.network/token/0x1074010000000000000000000000000000000000

Hey Nicole.

For our Governance system in SMR EVM, which is based on Open Zepplin's Governor, the users need wrapped SMR because only wrapped SMR contains the necessary functionality to work with the eOpen Zeppelin Governance contracts. The Chain native SMR does not provide the necessary function.

This means the wSMR is the chain's Governance token, and we need an easily accessible way for users to convert from SMR to wSMR.

We do not want to force them to do this via 3rd party protocols like dexes.

That's why we need to provide it as part of the toolkit

nicole-obrien commented 11 months ago

You can interact with L2 Smr via erc20 interface using the contract 0x1074010000000000000000000000000000000000 is there a need to wrap shimmer at all?

For a new Governance project, we do need such wrap/unwrap on UI.

But there is an erc20 interface for SMR, that can be interacted with? Seems like it would be smoother UX to not have the user wrap the smr to wSMR. https://explorer.evm.shimmer.network/address/0x1074010000000000000000000000000000000000 https://explorer.evm.shimmer.network/token/0x1074010000000000000000000000000000000000

Hey Nicole.

For our Governance system in SMR EVM, which is based on Open Zepplin's Governor, the users need wrapped SMR because only wrapped SMR contains the necessary functionality to work with the eOpen Zeppelin Governance contracts. The Chain native SMR does not provide the necessary function.

This means the wSMR is the chain's Governance token, and we need an easily accessible way for users to convert from SMR to wSMR.

We do not want to force them to do this via 3rd party protocols like dexes.

That's why we need to provide it as part of the toolkit

Maybe this is the wrong place for a discussion, but do we really need another token to confuse users? Can't there be a governance token with a different name than having 3 different shimmer tokens and 4 different interfaces for devs. Its absurd that we need to wrap an already wrapped asset. This isn't good UX.