feat: add erc20 multi-minter support#10
Open
kpitapeersyst wants to merge 36 commits intorelease/v0.6.x-xrplevmfrom
Open
feat: add erc20 multi-minter support#10kpitapeersyst wants to merge 36 commits intorelease/v0.6.x-xrplevmfrom
kpitapeersyst wants to merge 36 commits intorelease/v0.6.x-xrplevmfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add erc20 multi-minter support
Replaces the single-owner model for ERC20 token pairs with a multi-minter authorization model. Each
TokenPairnow stores anowner_addresseslist, and mint/burn authorization checks any address in that list instead of a single owner.Key changes
TokenPair.owner_addressis deprecated in favor ofowner_addresses(repeated string).MsgTransferOwnershipis replaced byMsgAddMinterandMsgRemoveMinter. QueryOwnerAddressis replaced byOwnerAddresses(now accepting adenomargument). Queries still populate the deprecatedowner_addressfield for backwards compatibility.IsAuthorizedMinter.MigrateOwnerAddressesmigrates existing token pairs from the single-owner field to the list. Dedicatedmulti_minter.goholds the minter management logic,transfer_ownership.gois removed.Owner()andTransferOwnership()are removed from the ERC20/WERC20 precompiles (IOwnable.sol, ABI, events, interface, types).Burn0uses the new multi-minter check.MsgAddMinter/MsgRemoveMinterValidateBasicaccepts the configured bech32 address prefix; owner-addresses list length check is removed fromTokenPair.Validate, IBC empty-owner case documented.AddMinter/RemoveMinter(msg server + e2e), multi-minter keeper paths,MintCoins,GetTokenPair(s)owner fields, migration (legacy owner can still mint), queryOwnerAddressesby denom,IsAuthorizedMinter,HasDuplicates, andValidateOwnerAddresses. Removes obsolete precompile ownership/transfer-ownership tests.werc20/abi.json, addHasDuplicateshelper inutils.Files most worth reviewing
proto/cosmos/evm/erc20/v1/{erc20,tx,query}.protox/erc20/keeper/multi_minter.go,x/erc20/keeper/msg_server.go,x/erc20/keeper/mint.gox/erc20/types/{msg.go,token_pair.go,errors.go}precompiles/erc20/{erc20.go,tx.go,events.go,types.go,interfaces.go,query.go}precompiles/erc20/IOwnable.sol(removal) andprecompiles/{erc20,werc20}/abi.jsonAuthor Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
release/v0.6.x-xrplevmbranch