From 1b95f79ea7c599b7df0748897c554ae0d05bcb8f Mon Sep 17 00:00:00 2001 From: codchen Date: Thu, 28 Dec 2023 16:16:12 +0800 Subject: [PATCH] Add ACL constants for Bank Wei prefix (#387) ## Describe your changes and provide context ## Testing performed to validate your change --- proto/cosmos/accesscontrol/constants.proto | 2 + types/accesscontrol/constants.pb.go | 200 +++++++++++---------- types/accesscontrol/resource.go | 2 + x/accesscontrol/testutil/accesscontrol.go | 9 +- 4 files changed, 111 insertions(+), 102 deletions(-) diff --git a/proto/cosmos/accesscontrol/constants.proto b/proto/cosmos/accesscontrol/constants.proto index 47c10e8b0..c4a055b52 100644 --- a/proto/cosmos/accesscontrol/constants.proto +++ b/proto/cosmos/accesscontrol/constants.proto @@ -144,6 +144,8 @@ enum ResourceType { KV_EVM_CODE_HASH = 105; // child of KV_EVM KV_EVM_CODE = 106; // child of KV_EVM KV_EVM_CODE_SIZE = 107; // child of KV_EVM + + KV_BANK_WEI_BALANCE = 108; // child of KV_BANK } enum WasmMessageSubtype { diff --git a/types/accesscontrol/constants.pb.go b/types/accesscontrol/constants.pb.go index ae03a387a..4867c0837 100644 --- a/types/accesscontrol/constants.pb.go +++ b/types/accesscontrol/constants.pb.go @@ -207,6 +207,7 @@ const ( ResourceType_KV_EVM_CODE_HASH ResourceType = 105 ResourceType_KV_EVM_CODE ResourceType = 106 ResourceType_KV_EVM_CODE_SIZE ResourceType = 107 + ResourceType_KV_BANK_WEI_BALANCE ResourceType = 108 ) var ResourceType_name = map[int32]string{ @@ -314,6 +315,7 @@ var ResourceType_name = map[int32]string{ 105: "KV_EVM_CODE_HASH", 106: "KV_EVM_CODE", 107: "KV_EVM_CODE_SIZE", + 108: "KV_BANK_WEI_BALANCE", } var ResourceType_value = map[string]int32{ @@ -421,6 +423,7 @@ var ResourceType_value = map[string]int32{ "KV_EVM_CODE_HASH": 105, "KV_EVM_CODE": 106, "KV_EVM_CODE_SIZE": 107, + "KV_BANK_WEI_BALANCE": 108, } func (x ResourceType) String() string { @@ -468,102 +471,103 @@ func init() { } var fileDescriptor_36568f7561081112 = []byte{ - // 1544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0x59, 0x77, 0x1b, 0xb7, - 0x15, 0x96, 0x6c, 0x59, 0x0b, 0xbc, 0x5d, 0xc3, 0xfb, 0x46, 0x3b, 0xb2, 0x1b, 0xbb, 0x8a, 0x23, - 0xc5, 0x76, 0xd7, 0xa4, 0x6d, 0x0a, 0x0e, 0xae, 0xc8, 0x11, 0x67, 0x80, 0x11, 0x80, 0xe1, 0xe2, - 0xb6, 0x07, 0x95, 0x18, 0xd6, 0x71, 0x13, 0x9b, 0x3e, 0x22, 0xdd, 0xd3, 0xfe, 0x86, 0xbe, 0xf4, - 0x67, 0xf5, 0x31, 0x0f, 0x7d, 0xe8, 0x63, 0x8f, 0xfd, 0x47, 0x7a, 0x30, 0x73, 0x49, 0x0f, 0x27, - 0x72, 0xf2, 0x24, 0xf1, 0x7e, 0x1f, 0x2e, 0x80, 0xef, 0x6e, 0x18, 0x76, 0x7f, 0x38, 0x9e, 0xbc, - 0x1c, 0x4f, 0x76, 0x0e, 0x86, 0xc3, 0xd1, 0x64, 0x32, 0x1c, 0xbf, 0x9a, 0x1e, 0x8d, 0xbf, 0xdd, - 0x19, 0x8e, 0x5f, 0x4d, 0xa6, 0x07, 0xaf, 0xa6, 0x93, 0xed, 0xd7, 0x47, 0xe3, 0xe9, 0x98, 0xdf, - 0x2a, 0x59, 0xdb, 0x0b, 0xac, 0xed, 0xbf, 0x3d, 0x3e, 0x1c, 0x4d, 0x0f, 0x1e, 0x6f, 0x7d, 0xce, - 0x98, 0x28, 0x00, 0xf7, 0x8f, 0xd7, 0x23, 0x7e, 0x9a, 0xad, 0xe5, 0xaa, 0xa3, 0x74, 0x4f, 0xc1, - 0x12, 0x5f, 0x67, 0x2b, 0x06, 0x85, 0x84, 0x65, 0xbe,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x73, 0x34, 0x1c, 0x15, - 0xd7, 0x5f, 0x63, 0x27, 0x85, 0x1a, 0x94, 0xb7, 0xef, 0x74, 0x61, 0x39, 0x18, 0xd2, 0xd1, 0xcb, - 0x52, 0x44, 0x39, 0xfa, 0x7b, 0xf8, 0xff, 0x64, 0x90, 0xbc, 0xd3, 0xf5, 0x4d, 0xa1, 0x3a, 0xb0, - 0xc2, 0xcf, 0x31, 0xd6, 0xe9, 0x7a, 0xeb, 0x44, 0x27, 0x56, 0x2d, 0x38, 0x45, 0x60, 0x4f, 0xd8, - 0x14, 0x56, 0xf9, 0x59, 0xb6, 0xd1, 0xe9, 0x7a, 0x6d, 0x44, 0x94, 0x20, 0xac, 0x05, 0x27, 0x9d, - 0xae, 0x97, 0xc5, 0x99, 0xce, 0xb0, 0xf5, 0x4e, 0xd7, 0x63, 0xa6, 0xa3, 0x36, 0x6c, 0xf0, 0x8b, - 0xec, 0x7c, 0xa7, 0xeb, 0x9d, 0xee, 0xa0, 0xda, 0x15, 0x91, 0xd3, 0x66, 0x00, 0x2c, 0x5c, 0x69, - 0xbe, 0xda, 0x77, 0xb5, 0x43, 0xef, 0x84, 0x69, 0xa1, 0xb3, 0x70, 0x9a, 0xdf, 0x66, 0xd7, 0xdf, - 0x63, 0xa2, 0xd5, 0x32, 0xd8, 0x12, 0xae, 0x64, 0x59, 0x38, 0x13, 0xa2, 0xf6, 0x1e, 0xde, 0x45, - 0x94, 0x68, 0x2c, 0x9c, 0x0d, 0x51, 0x79, 0x7f, 0x58, 0x2f, 0x31, 0x09, 0xab, 0x62, 0xad, 0xe0, - 0x1c, 0xbf, 0xc6, 0x2e, 0x55, 0xa0, 0xae, 0x48, 0x62, 0x29, 0x9c, 0x36, 0x70, 0x9e, 0x6e, 0x24, - 0x72, 0xd7, 0x06, 0x20, 0x0f, 0xe1, 0xc7, 0x2c, 0x2e, 0xde, 0x3a, 0x6d, 0x10, 0x2e, 0x70, 0xce, - 0xce, 0x91, 0x2c, 0xde, 0xe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xec, 0x9b, 0xc3, 0x69, 0x78, 0xdb, 0x6e, 0xb0, 0x53, 0xfb, 0x39, - 0x9a, 0xf0, 0xba, 0x3d, 0xcd, 0xd6, 0xb0, 0x8f, 0x51, 0xee, 0x10, 0x96, 0x9b, 0x7b, 0xff, 0x7e, - 0xdb, 0x58, 0xfe, 0xee, 0x6d, 0x63, 0xf9, 0x7f, 0x6f, 0x1b, 0xcb, 0xff, 0x7a, 0xd7, 0x58, 0xfa, - 0xee, 0x5d, 0x63, 0xe9, 0xbf, 0xef, 0x1a, 0x4b, 0xcf, 0x3e, 0x7b, 0xfe, 0x62, 0xfa, 0xf5, 0x9b, - 0xc3, 0xed, 0xe1, 0xf8, 0xe5, 0x0e, 0x7d, 0xb7, 0x94, 0x7f, 0x3e, 0x9d, 0x7c, 0xf5, 0xcd, 0x4e, - 0x70, 0x5a, 0xfb, 0x90, 0x39, 0x5c, 0x2d, 0xbe, 0x5f, 0x9e, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, - 0x36, 0x53, 0x33, 0x74, 0xe7, 0x0c, 0x00, 0x00, + // 1554 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0x59, 0x77, 0x14, 0xb9, + 0x15, 0xb6, 0xc1, 0x78, 0x11, 0xdb, 0x45, 0xec, 0x5b, 0xc3, 0x18, 0x32, 0x10, 0x0f, 0x63, 0x0f, + 0x90, 0x75, 0x26, 0xc9, 0x44, 0x5d, 0x75, 0xdd, 0x2d, 0x77, 0x95, 0x54, 0x96, 0x54, 0xbd, 0x90, + 0xe4, 0x28, 0x76, 0x4f, 0x87, 0x21, 0x03, 0x34, 0xc7, 0xdd, 0xe4, 0x24, 0xbf, 0x21, 0x2f, 0xf9, + 0x59, 0x79, 0x9c, 0xc7, 0x3c, 0xe6, 0xc0, 0x73, 0xfe, 0x43, 0x8e, 0xaa, 0x6e, 0x37, 0xd5, 0x35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 0xa7, 0xcd, 0x00, 0x58, 0x08, 0x69, + 0xbe, 0xda, 0x77, 0xb5, 0x43, 0xef, 0x84, 0x69, 0xa1, 0xb3, 0x70, 0x92, 0xdf, 0x64, 0x57, 0xdf, + 0x61, 0xa2, 0xd5, 0x32, 0xd8, 0x12, 0xae, 0x64, 0x59, 0x38, 0x15, 0xb2, 0xf6, 0x0e, 0xde, 0x45, + 0x8c, 0xd1, 0x58, 0x38, 0x1d, 0xb2, 0xf2, 0xee, 0xb0, 0x3e, 0xc6, 0x24, 0xac, 0x92, 0x5a, 0xc1, + 0x19, 0x7e, 0x85, 0x5d, 0xa8, 0x40, 0x5d, 0x91, 0xc8, 0x58, 0x38, 0x6d, 0xe0, 0x2c, 0x45, 0x24, + 0x72, 0xd7, 0x06, 0x20, 0x0f, 0xe1, 0xc7, 0x2c, 0x2f, 0xde, 0x3a, 0x6d, 0x10, 0xce, 0x71, 0xce, + 0xce, 0x90, 0x2c, 0xde, 0xe6, 0x59, 0x96, 0x0c, 0x80, 0xf3, 0x73, 0xec, 0xf4, 0xcc, 0x16, 0xa3, + 0xd2, 0x29, 0x9c, 0x0f, 0xa9, 0x9d, 0x99, 0x9a, 0x22, 0x11, 0x2a, 0x42, 0x0b, 0x17, 0xc8, 0x6f, + 0x55, 0x00, 0x5a, 0x70, 0x91, 0xdf, 0x60, 0x57, 0xea, 0x50, 0x8a, 0x4e, 0xc4, 0xc2, 0x09, 0xb8, + 0xf4, 0xbe, 0x85, 0x22, 0x4e, 0xa5, 0x82, 0xcb, 0xfc, 0x3a, 0xbb, 0x5c, 0x87, 0x22, 0x83, 0x45, + 0x54, 0x57, 0x08, 0x24, 0x85, 0xb0, 0x1f, 0xb5, 0x85, 0x6a, 0xa1, 0x37, 0xc2, 0x21, 0x5c, 0x0d, + 0x25, 0x5a, 0x53, 0x3e, 0x43, 0x25, 0x12, 0x37, 0xf0, 0x91, 0xce, 0x95, 0x43, 0x03, 0xd7, 0xe8, + 0x58, 0xc4, 0xc9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, 0xae, + 0x16, 0x1f, 0x36, 0x8f, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x0c, 0x7e, 0xf1, 0x00, 0x0d, + 0x00, 0x00, } diff --git a/types/accesscontrol/resource.go b/types/accesscontrol/resource.go index 17c4a7131..aa717e3e8 100644 --- a/types/accesscontrol/resource.go +++ b/types/accesscontrol/resource.go @@ -31,12 +31,14 @@ var ResourceTree = map[ResourceType]TreeNode{ ResourceType_KV_BANK_SUPPLY, ResourceType_KV_BANK_DENOM, ResourceType_KV_BANK_BALANCES, + ResourceType_KV_BANK_WEI_BALANCE, }}, ResourceType_KV_BANK_SUPPLY: {ResourceType_KV_BANK, []ResourceType{}}, ResourceType_KV_BANK_DENOM: {ResourceType_KV_BANK, []ResourceType{}}, ResourceType_KV_BANK_BALANCES: {ResourceType_KV_BANK, []ResourceType{}}, ResourceType_KV_BANK_DEFERRED: {ResourceType_KV, []ResourceType{ResourceType_KV_BANK_DEFERRED_MODULE_TX_INDEX}}, ResourceType_KV_BANK_DEFERRED_MODULE_TX_INDEX: {ResourceType_KV_BANK_DEFERRED, []ResourceType{}}, + ResourceType_KV_BANK_WEI_BALANCE: {ResourceType_KV_BANK, []ResourceType{}}, ResourceType_KV_STAKING: {ResourceType_KV, []ResourceType{ ResourceType_KV_STAKING_DELEGATION, ResourceType_KV_STAKING_VALIDATOR, diff --git a/x/accesscontrol/testutil/accesscontrol.go b/x/accesscontrol/testutil/accesscontrol.go index 29e25e867..2be4ecc95 100644 --- a/x/accesscontrol/testutil/accesscontrol.go +++ b/x/accesscontrol/testutil/accesscontrol.go @@ -23,10 +23,11 @@ var TestingStoreKeyToResourceTypePrefixMap = acltypes.StoreKeyToResourceTypePref acltypes.ResourceType_Mem: acltypes.EmptyPrefix, }, banktypes.StoreKey: { - acltypes.ResourceType_KV_BANK: acltypes.EmptyPrefix, - acltypes.ResourceType_KV_BANK_BALANCES: banktypes.BalancesPrefix, - acltypes.ResourceType_KV_BANK_SUPPLY: banktypes.SupplyKey, - acltypes.ResourceType_KV_BANK_DENOM: banktypes.DenomMetadataPrefix, + acltypes.ResourceType_KV_BANK: acltypes.EmptyPrefix, + acltypes.ResourceType_KV_BANK_BALANCES: banktypes.BalancesPrefix, + acltypes.ResourceType_KV_BANK_SUPPLY: banktypes.SupplyKey, + acltypes.ResourceType_KV_BANK_DENOM: banktypes.DenomMetadataPrefix, + acltypes.ResourceType_KV_BANK_WEI_BALANCE: banktypes.WeiBalancesPrefix, }, banktypes.DeferredCacheStoreKey: { acltypes.ResourceType_KV_BANK_DEFERRED: acltypes.EmptyPrefix,