The Provenance Blockchain message fees module supports comprehensive governance-based management of message fees through three types of proposals that enable the addition, updating, and removal of message type fees. These governance proposals include AddMsgFeeProposal for creating new message-based fees with optional recipient distribution, UpdateMsgFeeProposal for modifying existing fee structures, and RemoveMsgFeeProposal for deleting message fees, providing a democratic and transparent mechanism for managing the blockchain's economic parameters through community governance.
Add MsgFee Proposal
AddMsgFeeProposal defines a governance proposal to create a new msgfee entry for a specific MsgType.
protobuf// Source: https://github.com/provenance-io/provenance/blob/main/proto/provenance/msgfees/v1/proposals.proto#L13-L34 // AddMsgFeeProposal defines a governance proposal to add additional msg based fee message AddMsgFeeProposal { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; // propsal title string title = 1; // propsal description string description = 2; // type url of msg to add fee string msg_type_url = 3; // additional fee for msg type cosmos.base.v1beta1.Coin additional_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // optional recipient to recieve basis points string recipient = 5; // basis points to use when recipient is present (1 - 10,000) string recipient_basis_points = 6; }
Sample Command
Sample command to add an additional fee locally:
shell${PROVENANCE_DEV_DIR}/build/provenanced -t tx msgfees proposal add "adding" "adding bank send addition fee" 10000000000nhash \ --msg-type=/cosmos.bank.v1beta1.MsgSend --additional-fee 99usd.local\ --from node0 \ --home ${PROVENANCE_DEV_DIR}/build/node0 \ --chain-id chain-local \ --keyring-backend test \ --gas auto \ --fees 250990180nhash \ --broadcast-mode block \ --yes \ --testnet
Update MsgFee Proposal
UpdateMsgFeeProposal defines a governance proposal to update a current message-based fee.
protobuf// Source: https://github.com/provenance-io/provenance/blob/main/proto/provenance/msgfees/v1/proposals.proto#L36-L55 // UpdateMsgFeeProposal defines a governance proposal to update a current msg based fee message UpdateMsgFeeProposal { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; // propsal title string title = 1; // propsal description string description = 2; // type url of msg to update fee string msg_type_url = 3; // additional fee for msg type cosmos.base.v1beta1.Coin additional_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // optional recipient to recieve basis points string recipient = 5; // basis points to use when recipient is present (1 - 10,000) string recipient_basis_points = 6; }
Remove MsgFee Proposal
RemoveMsgFeeProposal defines a governance proposal to delete a current message-based fee.
protobuf// Source: https://github.com/provenance-io/provenance/blob/main/proto/provenance/msgfees/v1/proposals.proto#L57-L68 // RemoveMsgFeeProposal defines a governance proposal to delete a current msg based fee message RemoveMsgFeeProposal { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; // propsal title string title = 1; // propsal description string description = 2; // type url of msg fee to remove string msg_type_url = 3; }
Related Resources
- GitHub Repository: provenance-io/provenance
- Proposals Proto File: provenance/msgfees/v1/proposals.proto
- Documentation: Provenance Blockchain Developer Portal