Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adapt to cross chain token mintable version #417

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

j75689
Copy link
Contributor

@j75689 j75689 commented Aug 14, 2023

Description

adapt to cross chain token mintable version

Rationale

bnb-chain/greenfield-cosmos-sdk#270

Example

Proposal Example:

{
 "messages": [
  {
   "@type": "/cosmos.crosschain.v1.MsgMintModuleTokens",
   "authority": "0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2",
   "amount": "10000000000000000000000000000"
  }
 ],
 "metadata": "",
 "deposit": "1000000000000000000BNB",
 "title": "Mint CC Token",
 "summary": "Mint CC Token"
}

Mint Token

./build/bin/gnfd tx gov submit-proposal ./draft_proposal.json --home ./deployment/localup/.local/validator0 --from validator0 --keyring-backend test --node http://localhost:26750 --fees 1000000000000000000BNB -b sync --gas "200000000" --yes

./build/bin/gnfd tx gov vote 1 yes --home ./deployment/localup/.local/validator0 --keyring-backend test --from validator0 --gas "20000000" --fees "100000000000000000BNB" --keyring-backend test --node http://localhost:26750 -b sync --yes

Query Balance and Supply

./build/bin/gnfd q bank balances 0xB73C0Aac4C1E606C6E495d848196355e6CB30381 --node http://localhost:26750
./build/bin/gnfd q bank total --node http://localhost:26750

Changes

Notable changes:

  • app

keys[crosschaintypes.StoreKey],
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

// set the BaseApp's parameter store
app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	maccPerms = map[string][]string{
		authtypes.FeeCollectorName:         nil,
		distrtypes.ModuleName:              nil,
		stakingtypes.BondedPoolName:        {authtypes.Burner, authtypes.Staking},
		stakingtypes.NotBondedPoolName:     {authtypes.Burner, authtypes.Staking},
		govtypes.ModuleName:                {authtypes.Burner},
		paymentmoduletypes.ModuleName:      {authtypes.Minter, authtypes.Burner, authtypes.Staking},
		crosschaintypes.ModuleName:         {authtypes.Minter},
		permissionmoduletypes.ModuleName:   nil,
		bridgemoduletypes.ModuleName:       nil,
		spmoduletypes.ModuleName:           {authtypes.Staking},
		virtualgroupmoduletypes.ModuleName: nil,
	}

I think payment module should not have Minter permission

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@j75689 j75689 force-pushed the feat/cross-chain_token_mint branch from 3da4d3f to 4157d8e Compare August 14, 2023 15:22
@unclezoro unclezoro added this pull request to the merge queue Aug 15, 2023
Merged via the queue into bnb-chain:develop with commit b1e2cd5 Aug 15, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants