github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/feesplit/types/keys.go (about) 1 package types 2 3 import sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 4 5 // constants 6 const ( 7 // module name 8 ModuleName = "feesplit" 9 // StoreKey to be used when creating the KVStore 10 StoreKey = ModuleName 11 // RouterKey to be used for message routing 12 RouterKey = ModuleName 13 14 QueryParameters = "params" 15 QueryFeeSplits = "fee-splits" 16 QueryFeeSplit = "fee-split" 17 QueryDeployerFeeSplits = "deployer-fee-splits" 18 QueryDeployerFeeSplitsDetail = "deployer-fee-splits-detail" 19 QueryWithdrawerFeeSplits = "withdrawer-fee-splits" 20 ) 21 22 // prefix bytes for the fees persistent store 23 const ( 24 prefixFeeSplit = iota + 1 25 prefixDeployer 26 prefixWithdrawer 27 prefixContractShare 28 ) 29 30 // KVStore key prefixes 31 var ( 32 KeyPrefixFeeSplit = []byte{prefixFeeSplit} 33 KeyPrefixDeployer = []byte{prefixDeployer} 34 KeyPrefixWithdrawer = []byte{prefixWithdrawer} 35 KeyPrefixContractShare = []byte{prefixContractShare} 36 ) 37 38 // GetKeyPrefixDeployer returns the KVStore key prefix for storing 39 // registered fee split contract for a deployer 40 func GetKeyPrefixDeployer(deployerAddress sdk.AccAddress) []byte { 41 return append(KeyPrefixDeployer, deployerAddress.Bytes()...) 42 } 43 44 // GetKeyPrefixWithdrawer returns the KVStore key prefix for storing 45 // registered fee split contract for a withdrawer 46 func GetKeyPrefixWithdrawer(withdrawerAddress sdk.AccAddress) []byte { 47 return append(KeyPrefixWithdrawer, withdrawerAddress.Bytes()...) 48 }