diff --git a/proto/osmosis/tokenfactory/params.proto b/proto/osmosis/tokenfactory/params.proto new file mode 100644 index 000000000..604da3956 --- /dev/null +++ b/proto/osmosis/tokenfactory/params.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package osmosis.tokenfactory; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; + +message HookWhitelist { + uint64 code_id = 1 [(gogoproto.customname) = "CodeID"]; + string denom_creator = 2; +} + +// Params defines the parameters for the tokenfactory module. +message Params { + // DenomCreationFee defines the fee to be charged on the creation of a new + // denom. The fee is drawn from the MsgCreateDenom's sender account, and + // transferred to the community pool. + repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"denom_creation_fee\"", + (gogoproto.nullable) = false + ]; + + // DenomCreationGasConsume defines the gas cost for creating a new denom. + // This is intended as a spam deterrence mechanism. + // + // See: https://github.com/CosmWasm/token-factory/issues/11 + uint64 denom_creation_gas_consume = 2 [ + (gogoproto.moretags) = "yaml:\"denom_creation_gas_consume\"", + (gogoproto.nullable) = true + ]; + + // FeeCollectorAddress is the address where fees collected from denom creation + // are sent to + string fee_collector_address = 3; + repeated HookWhitelist whitelisted_hooks = 4; +} diff --git a/proto/osmosis/tokenfactory/v1beta1/genesis.proto b/proto/osmosis/tokenfactory/v1beta1/genesis.proto index a7d695544..11c97c5f3 100644 --- a/proto/osmosis/tokenfactory/v1beta1/genesis.proto +++ b/proto/osmosis/tokenfactory/v1beta1/genesis.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; +import "osmosis/tokenfactory/params.proto"; import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "osmosis/tokenfactory/v1beta1/params.proto"; option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; diff --git a/proto/osmosis/tokenfactory/v1beta1/params.proto b/proto/osmosis/tokenfactory/v1beta1/params.proto index 08d702017..e7e8b1b7a 100644 --- a/proto/osmosis/tokenfactory/v1beta1/params.proto +++ b/proto/osmosis/tokenfactory/v1beta1/params.proto @@ -5,7 +5,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; +option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types/v1beta1"; // Params defines the parameters for the tokenfactory module. message Params { diff --git a/proto/osmosis/tokenfactory/v1beta1/query.proto b/proto/osmosis/tokenfactory/v1beta1/query.proto index b01ab2344..d7b4d6f8d 100644 --- a/proto/osmosis/tokenfactory/v1beta1/query.proto +++ b/proto/osmosis/tokenfactory/v1beta1/query.proto @@ -3,8 +3,8 @@ package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "osmosis/tokenfactory/params.proto"; import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "osmosis/tokenfactory/v1beta1/params.proto"; option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; diff --git a/proto/osmosis/tokenfactory/v1beta1/tx.proto b/proto/osmosis/tokenfactory/v1beta1/tx.proto index 2cf3f7fb7..e122fe71f 100644 --- a/proto/osmosis/tokenfactory/v1beta1/tx.proto +++ b/proto/osmosis/tokenfactory/v1beta1/tx.proto @@ -7,7 +7,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -import "osmosis/tokenfactory/v1beta1/params.proto"; +import "osmosis/tokenfactory/params.proto"; option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types"; diff --git a/wasmbinding/test/custom_message_test.go b/wasmbinding/test/custom_message_test.go index 95c4519e1..760417c16 100644 --- a/wasmbinding/test/custom_message_test.go +++ b/wasmbinding/test/custom_message_test.go @@ -76,6 +76,7 @@ func (suite *CustomMessengerTestSuite) SetupTest() { sdk.NewCoins(sdk.NewInt64Coin(params.DefaultDenom, 10_000_000)), 0, FeeCollectorAddress, + tokenfactorytypes.DefaultWhitelistedHooks, )) suite.Require().NoError(err) diff --git a/wasmbinding/test/custom_query_test.go b/wasmbinding/test/custom_query_test.go index 8bef356d5..781151936 100644 --- a/wasmbinding/test/custom_query_test.go +++ b/wasmbinding/test/custom_query_test.go @@ -255,6 +255,7 @@ func (suite *CustomQuerierTestSuite) TestDenomAdmin() { sdk.NewCoins(sdk.NewInt64Coin(params.DefaultDenom, 10_000_000)), 0, FeeCollectorAddress, + tokenfactorytypes.DefaultWhitelistedHooks, )) suite.Require().NoError(err) diff --git a/x/tokenfactory/keeper/before_send.go b/x/tokenfactory/keeper/before_send.go index 69befbb7f..81e25796e 100644 --- a/x/tokenfactory/keeper/before_send.go +++ b/x/tokenfactory/keeper/before_send.go @@ -99,6 +99,11 @@ func (k Keeper) callBeforeSendListener(ctx context.Context, from, to sdk.AccAddr return err } + // Do not invoke hook if denom is not whitelisted and `from` is a module + if !k.isHookWhitelisted(c, coin.Denom, cwAddr) { + return nil + } + var msgBz []byte // get msgBz, either BlockBeforeSend or TrackBeforeSend diff --git a/x/tokenfactory/keeper/before_send_test.go b/x/tokenfactory/keeper/before_send_test.go index 540452d0e..0378ab92f 100644 --- a/x/tokenfactory/keeper/before_send_test.go +++ b/x/tokenfactory/keeper/before_send_test.go @@ -67,6 +67,24 @@ func (suite *KeeperTestSuite) TestTrackBeforeSendWasm() { queryResp, err := suite.GetNeutronZoneApp(suite.ChainA).WasmKeeper.QuerySmart(suite.ChainA.GetContext(), cosmwasmAddress, []byte(`{"total_supply_at":{}}`)) suite.Require().NoError(err) + + // Contract has not been called because it is not whitelisted + suite.Require().Equal("\"0\"", string(queryResp)) + + // Whitelist the hook + params := types.DefaultParams() + params.WhitelistedHooks = []*types.HookWhitelist{{DenomCreator: senderAddress.String(), CodeID: codeID}} + err = suite.GetNeutronZoneApp(suite.ChainA).TokenFactoryKeeper.SetParams(suite.ChainA.GetContext(), params) + suite.Require().NoError(err) + + // mint tokens again + _, err = suite.msgServer.Mint(suite.ChainA.GetContext(), types.NewMsgMint(suite.TestAccs[0].String(), tokenToSend)) + suite.Require().NoError(err) + + queryResp, err = suite.GetNeutronZoneApp(suite.ChainA).WasmKeeper.QuerySmart(suite.ChainA.GetContext(), cosmwasmAddress, []byte(`{"total_supply_at":{}}`)) + suite.Require().NoError(err) + + // Whitelisted contract has now been called suite.Require().Equal("\"100\"", string(queryResp)) }) } diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index 335ff509e..ac371decf 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -57,6 +57,7 @@ func (suite *KeeperTestSuite) Setup() { sdktypes.NewCoins(sdktypes.NewInt64Coin(params.DefaultDenom, TopUpCoinsAmount)), 0, FeeCollectorAddress, + types.DefaultWhitelistedHooks, )) suite.Require().NoError(err) diff --git a/x/tokenfactory/keeper/params.go b/x/tokenfactory/keeper/params.go index 4faa1764d..e9e124f7b 100644 --- a/x/tokenfactory/keeper/params.go +++ b/x/tokenfactory/keeper/params.go @@ -29,3 +29,24 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { store.Set(types.ParamsKey, bz) return nil } + +func (k Keeper) isHookWhitelisted(ctx sdk.Context, denom string, contractAddress sdk.AccAddress) bool { + contractInfo := k.contractKeeper.GetContractInfo(ctx, contractAddress) + if contractInfo == nil { + return false + } + codeID := contractInfo.CodeID + whitelistedHooks := k.GetParams(ctx).WhitelistedHooks + denomCreator, _, err := types.DeconstructDenom(denom) + if err != nil { + return false + } + + for _, hook := range whitelistedHooks { + if hook.CodeID == codeID && hook.DenomCreator == denomCreator { + return true + } + } + + return false +} diff --git a/x/tokenfactory/types/expected_keepers.go b/x/tokenfactory/types/expected_keepers.go index 6c65d173b..45e7d8b0e 100644 --- a/x/tokenfactory/types/expected_keepers.go +++ b/x/tokenfactory/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( "context" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -36,4 +37,5 @@ type BankHooks interface { type ContractKeeper interface { Sudo(ctx context.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error) + GetContractInfo(ctx context.Context, contractAddress sdk.AccAddress) *wasmtypes.ContractInfo } diff --git a/x/tokenfactory/types/genesis.pb.go b/x/tokenfactory/types/genesis.pb.go index 29435e226..5f90a3d83 100644 --- a/x/tokenfactory/types/genesis.pb.go +++ b/x/tokenfactory/types/genesis.pb.go @@ -143,30 +143,31 @@ func init() { } var fileDescriptor_5749c3f71850298b = []byte{ - // 368 bytes of a gzipped FileDescriptorProto + // 370 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xca, 0x2f, 0xce, 0xcd, 0x2f, 0xce, 0x2c, 0xd6, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0x4b, 0x4b, 0x4c, 0x2e, 0xc9, 0x2f, 0xaa, 0xd4, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x81, 0xaa, 0xd5, 0x43, 0x56, 0xab, 0x07, 0x55, - 0x2b, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xa8, 0x0f, 0x62, 0x41, 0xf4, 0x48, 0x99, 0xe0, - 0x35, 0x3f, 0xb1, 0xb4, 0x24, 0x23, 0xbf, 0x28, 0xb3, 0xa4, 0xd2, 0x37, 0xb5, 0x24, 0x31, 0x25, - 0xb1, 0x24, 0x11, 0xaa, 0x4b, 0x13, 0xaf, 0xae, 0x82, 0xc4, 0xa2, 0xc4, 0x5c, 0xa8, 0xa3, 0x94, - 0x8e, 0x30, 0x72, 0xf1, 0xb8, 0x43, 0x9c, 0x19, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xe4, 0xc4, 0xc5, - 0x06, 0x51, 0x20, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, 0xa2, 0x87, 0xcf, 0xd9, 0x7a, 0x01, - 0x60, 0xb5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0x75, 0x0a, 0x15, 0x70, 0xf1, 0x41, - 0xd5, 0xc5, 0xa7, 0xa4, 0xe6, 0xe5, 0xe7, 0x16, 0x4b, 0x30, 0x29, 0x30, 0x6b, 0x70, 0x1b, 0x69, - 0xe1, 0x37, 0x0b, 0xea, 0x0e, 0x17, 0x90, 0x16, 0x27, 0x59, 0x90, 0x89, 0x9f, 0xee, 0xc9, 0x8b, - 0x56, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0xa1, 0x9a, 0xa7, 0x14, 0xc4, 0x0b, 0x15, 0x70, 0x81, 0xf0, - 0x8f, 0x22, 0xbc, 0x01, 0x16, 0x11, 0x52, 0xe3, 0x62, 0x05, 0x2b, 0x05, 0xfb, 0x82, 0xd3, 0x49, - 0xe0, 0xd3, 0x3d, 0x79, 0x1e, 0x88, 0x49, 0x60, 0x61, 0xa5, 0x20, 0x88, 0xb4, 0x50, 0x1b, 0x23, - 0x97, 0x10, 0x3c, 0x18, 0xe3, 0x73, 0xa1, 0xe1, 0x28, 0xc1, 0x04, 0xf6, 0xbb, 0x09, 0x7e, 0xf7, - 0x82, 0x6d, 0x72, 0x44, 0x8f, 0x03, 0x27, 0x45, 0xa8, 0xcb, 0x25, 0x21, 0xf6, 0x61, 0x9a, 0xae, - 0x14, 0x24, 0x88, 0x11, 0x73, 0x56, 0x2c, 0x2f, 0x16, 0xc8, 0x33, 0x3a, 0x05, 0x9c, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, - 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x59, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x7e, 0x5e, 0x6a, 0x69, 0x49, 0x51, 0x7e, 0x9e, 0x6e, 0x7e, 0x51, 0x3a, 0x8c, - 0xad, 0x5f, 0x66, 0xa2, 0x5f, 0x81, 0x1a, 0xdf, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, - 0x78, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xcf, 0x93, 0x08, 0xaa, 0x02, 0x00, 0x00, + 0x2b, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, 0xa8, 0x0f, 0x62, 0x41, 0xf4, 0x48, 0x29, 0x62, + 0x35, 0xbf, 0x20, 0xb1, 0x28, 0x31, 0x17, 0x6a, 0xac, 0x94, 0x09, 0x5e, 0x27, 0x24, 0x96, 0x96, + 0x64, 0xe4, 0x17, 0x65, 0x96, 0x54, 0xfa, 0xa6, 0x96, 0x24, 0xa6, 0x24, 0x96, 0x24, 0x42, 0x74, + 0x29, 0xed, 0x61, 0xe4, 0xe2, 0x71, 0x87, 0x38, 0x2f, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x8a, + 0x8b, 0x0d, 0x62, 0xac, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x8c, 0x1e, 0x56, 0xe7, 0x06, + 0x80, 0xd5, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x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 0x74, 0x18, 0x5b, 0xbf, 0xcc, 0x44, 0xbf, 0x02, 0x35, 0xca, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, + 0xd8, 0xc0, 0xf1, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x27, 0x7d, 0x62, 0x1f, 0x9a, 0x02, + 0x00, 0x00, } func (this *GenesisDenom) Equal(that interface{}) bool { diff --git a/x/tokenfactory/types/params.go b/x/tokenfactory/types/params.go index 2e587c27a..06c1f76aa 100644 --- a/x/tokenfactory/types/params.go +++ b/x/tokenfactory/types/params.go @@ -12,10 +12,12 @@ var ( KeyDenomCreationFee = []byte("DenomCreationFee") KeyDenomCreationGasConsume = []byte("DenomCreationGasConsume") KeyFeeCollectorAddress = []byte("FeeCollectorAddress") + KeyWhitelistedHooks = []byte("WhitelistedHooks") // We don't want to charge users for denom creation DefaultDenomCreationFee sdk.Coins DefaultDenomCreationGasConsume uint64 DefaultFeeCollectorAddress = "" + DefaultWhitelistedHooks = []*HookWhitelist{} ) // ParamKeyTable the param key table for tokenfactory module. @@ -23,17 +25,18 @@ func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -func NewParams(denomCreationFee sdk.Coins, denomCreationGasConsume uint64, feeCollectorAddress string) Params { +func NewParams(denomCreationFee sdk.Coins, denomCreationGasConsume uint64, feeCollectorAddress string, whitelistedHooks []*HookWhitelist) Params { return Params{ DenomCreationFee: denomCreationFee, DenomCreationGasConsume: denomCreationGasConsume, FeeCollectorAddress: feeCollectorAddress, + WhitelistedHooks: whitelistedHooks, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams(DefaultDenomCreationFee, DefaultDenomCreationGasConsume, DefaultFeeCollectorAddress) + return NewParams(DefaultDenomCreationFee, DefaultDenomCreationGasConsume, DefaultFeeCollectorAddress, DefaultWhitelistedHooks) } // Validate validates params @@ -54,6 +57,10 @@ func (p Params) Validate() error { return fmt.Errorf("failed to validate params: %w", err) } + if err := validateWhitelistedHooks(p.WhitelistedHooks); err != nil { + return fmt.Errorf("failed to validate params: %w", err) + } + return nil } @@ -63,6 +70,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyDenomCreationFee, &p.DenomCreationFee, validateDenomCreationFee), paramtypes.NewParamSetPair(KeyDenomCreationGasConsume, &p.DenomCreationGasConsume, validateDenomCreationGasConsume), paramtypes.NewParamSetPair(KeyFeeCollectorAddress, &p.FeeCollectorAddress, validateFeeCollectorAddress), + paramtypes.NewParamSetPair(KeyWhitelistedHooks, &p.WhitelistedHooks, validateWhitelistedHooks), } } @@ -105,3 +113,24 @@ func validateFeeCollectorAddress(i interface{}) error { return nil } + +func validateWhitelistedHooks(i interface{}) error { + hooks, ok := i.([]*HookWhitelist) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + seenHooks := map[string]bool{} + for _, hook := range hooks { + hookStr := hook.String() + if seenHooks[hookStr] { + return fmt.Errorf("duplicate whitelisted hook: %#v", hook) + } + seenHooks[hookStr] = true + _, err := sdk.AccAddressFromBech32(hook.DenomCreator) + if err != nil { + return fmt.Errorf("invalid denom creator address: %w", err) + } + } + return nil +} diff --git a/x/tokenfactory/types/params.pb.go b/x/tokenfactory/types/params.pb.go index fabd4e60f..d05e3c72d 100644 --- a/x/tokenfactory/types/params.pb.go +++ b/x/tokenfactory/types/params.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: osmosis/tokenfactory/v1beta1/params.proto +// source: osmosis/tokenfactory/params.proto package types @@ -27,6 +27,58 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type HookWhitelist struct { + CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + DenomCreator string `protobuf:"bytes,2,opt,name=denom_creator,json=denomCreator,proto3" json:"denom_creator,omitempty"` +} + +func (m *HookWhitelist) Reset() { *m = HookWhitelist{} } +func (m *HookWhitelist) String() string { return proto.CompactTextString(m) } +func (*HookWhitelist) ProtoMessage() {} +func (*HookWhitelist) Descriptor() ([]byte, []int) { + return fileDescriptor_09c297db7c49d1cf, []int{0} +} +func (m *HookWhitelist) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HookWhitelist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HookWhitelist.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HookWhitelist) XXX_Merge(src proto.Message) { + xxx_messageInfo_HookWhitelist.Merge(m, src) +} +func (m *HookWhitelist) XXX_Size() int { + return m.Size() +} +func (m *HookWhitelist) XXX_DiscardUnknown() { + xxx_messageInfo_HookWhitelist.DiscardUnknown(m) +} + +var xxx_messageInfo_HookWhitelist proto.InternalMessageInfo + +func (m *HookWhitelist) GetCodeID() uint64 { + if m != nil { + return m.CodeID + } + return 0 +} + +func (m *HookWhitelist) GetDenomCreator() string { + if m != nil { + return m.DenomCreator + } + return "" +} + // Params defines the parameters for the tokenfactory module. type Params struct { // DenomCreationFee defines the fee to be charged on the creation of a new @@ -40,14 +92,15 @@ type Params struct { DenomCreationGasConsume uint64 `protobuf:"varint,2,opt,name=denom_creation_gas_consume,json=denomCreationGasConsume,proto3" json:"denom_creation_gas_consume,omitempty" yaml:"denom_creation_gas_consume"` // FeeCollectorAddress is the address where fees collected from denom creation // are sent to - FeeCollectorAddress string `protobuf:"bytes,3,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` + FeeCollectorAddress string `protobuf:"bytes,3,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` + WhitelistedHooks []*HookWhitelist `protobuf:"bytes,4,rep,name=whitelisted_hooks,json=whitelistedHooks,proto3" json:"whitelisted_hooks,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_cc8299d306f3ff47, []int{0} + return fileDescriptor_09c297db7c49d1cf, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -97,40 +150,86 @@ func (m *Params) GetFeeCollectorAddress() string { return "" } -func init() { - proto.RegisterType((*Params)(nil), "osmosis.tokenfactory.v1beta1.Params") +func (m *Params) GetWhitelistedHooks() []*HookWhitelist { + if m != nil { + return m.WhitelistedHooks + } + return nil } func init() { - proto.RegisterFile("osmosis/tokenfactory/v1beta1/params.proto", fileDescriptor_cc8299d306f3ff47) -} - -var fileDescriptor_cc8299d306f3ff47 = []byte{ - // 372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xb1, 0x6e, 0xe2, 0x40, - 0x10, 0xf5, 0xc2, 0x09, 0xe9, 0x7c, 0xcd, 0xc9, 0x77, 0x51, 0x00, 0x45, 0x36, 0x71, 0x65, 0x0a, - 0xbc, 0x82, 0x44, 0x29, 0xd2, 0x05, 0x4b, 0x49, 0x15, 0x09, 0x51, 0xa6, 0xb1, 0xd6, 0xf6, 0xd8, - 0xb1, 0xc0, 0x3b, 0xc8, 0xbb, 0xa0, 0xf0, 0x17, 0xa9, 0xf2, 0x11, 0xf9, 0x87, 0xf4, 0x94, 0x94, - 0xa9, 0x9c, 0x08, 0xfe, 0x80, 0x2f, 0x88, 0xb0, 0x4d, 0x04, 0x49, 0xaa, 0x9d, 0x99, 0xf7, 0xe6, - 0xcd, 0xdb, 0xd9, 0x55, 0xdb, 0x28, 0x12, 0x14, 0xb1, 0xa0, 0x12, 0x47, 0xc0, 0x43, 0xe6, 0x4b, - 0x4c, 0xe7, 0x74, 0xd6, 0xf5, 0x40, 0x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xd7, 0xc7, 0xf1, 0x18, - 0xb6, 0x6b, 0x77, 0x59, 0x10, 0xa4, 0x20, 0x44, 0xbd, 0xda, 0x22, 0xd6, 0xef, 0xe1, 0xbf, 0x10, - 0xc0, 0xd9, 0x61, 0x57, 0x05, 0xd4, 0x1f, 0x2c, 0x56, 0x3a, 0x59, 0xae, 0x74, 0xf2, 0xbe, 0xd2, - 0xc9, 0xe3, 0x5a, 0x57, 0x96, 0x6b, 0x5d, 0x79, 0x5d, 0xeb, 0xca, 0xdd, 0xc5, 0xde, 0x8d, 0x39, - 0x4c, 0x65, 0x8a, 0xbc, 0x83, 0x69, 0xb4, 0x8b, 0xe9, 0xec, 0x9c, 0x3e, 0x1c, 0xfe, 0x87, 0x7c, - 0x0b, 0x5e, 0x2d, 0x7f, 0x98, 0xb3, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xfe, 0x4d, 0x2d, - 0x34, 0x02, 0x00, 0x00, + proto.RegisterType((*HookWhitelist)(nil), "osmosis.tokenfactory.HookWhitelist") + proto.RegisterType((*Params)(nil), "osmosis.tokenfactory.Params") +} + +func init() { proto.RegisterFile("osmosis/tokenfactory/params.proto", fileDescriptor_09c297db7c49d1cf) } + +var fileDescriptor_09c297db7c49d1cf = []byte{ + // 456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xb1, 0x8e, 0xd3, 0x40, + 0x10, 0x8d, 0x49, 0x14, 0xc4, 0xc2, 0x49, 0x87, 0x39, 0x84, 0x93, 0xc2, 0xce, 0x39, 0x4d, 0x28, + 0xce, 0xd6, 0x1d, 0x88, 0x82, 0x8e, 0x18, 0x01, 0x57, 0x20, 0x45, 0x6e, 0x10, 0x34, 0xd6, 0xc6, + 0x3b, 0x76, 0x56, 0x89, 0x77, 0x22, 0xef, 0xe6, 0x20, 0x5f, 0x01, 0x15, 0x1f, 0xc1, 0x97, 0xa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xb7, 0x7f, 0xf5, 0xdc, 0xff, + 0x72, 0x78, 0xac, 0xda, 0xd7, 0x69, 0x57, 0x5f, 0xd1, 0xb3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x1d, 0x23, 0x36, 0x33, 0xd1, 0x02, 0x00, 0x00, +} + +func (m *HookWhitelist) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HookWhitelist) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HookWhitelist) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DenomCreator) > 0 { + i -= len(m.DenomCreator) + copy(dAtA[i:], m.DenomCreator) + i = encodeVarintParams(dAtA, i, uint64(len(m.DenomCreator))) + i-- + dAtA[i] = 0x12 + } + if m.CodeID != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.CodeID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -153,6 +252,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.WhitelistedHooks) > 0 { + for iNdEx := len(m.WhitelistedHooks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WhitelistedHooks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.FeeCollectorAddress) > 0 { i -= len(m.FeeCollectorAddress) copy(dAtA[i:], m.FeeCollectorAddress) @@ -193,6 +306,22 @@ func encodeVarintParams(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *HookWhitelist) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CodeID != 0 { + n += 1 + sovParams(uint64(m.CodeID)) + } + l = len(m.DenomCreator) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + return n +} + func (m *Params) Size() (n int) { if m == nil { return 0 @@ -212,6 +341,12 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovParams(uint64(l)) } + if len(m.WhitelistedHooks) > 0 { + for _, e := range m.WhitelistedHooks { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } return n } @@ -221,6 +356,107 @@ func sovParams(x uint64) (n int) { func sozParams(x uint64) (n int) { return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *HookWhitelist) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HookWhitelist: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HookWhitelist: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) + } + m.CodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomCreator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomCreator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -335,6 +571,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.FeeCollectorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedHooks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistedHooks = append(m.WhitelistedHooks, &HookWhitelist{}) + if err := m.WhitelistedHooks[len(m.WhitelistedHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/tokenfactory/types/query.pb.go b/x/tokenfactory/types/query.pb.go index 2e62dcd7f..3d6b122ff 100644 --- a/x/tokenfactory/types/query.pb.go +++ b/x/tokenfactory/types/query.pb.go @@ -419,50 +419,50 @@ func init() { } var fileDescriptor_6f22013ad0f72e3f = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xc7, 0x3b, 0xa8, 0x55, 0x46, 0xd1, 0x30, 0xa0, 0xc1, 0x06, 0xb7, 0x32, 0x12, 0x03, 0x09, - 0x76, 0x04, 0x89, 0x07, 0x91, 0x08, 0x8b, 0x31, 0x26, 0x86, 0x04, 0x57, 0x62, 0x22, 0x31, 0x69, - 0xa6, 0xdd, 0xa1, 0x34, 0xb0, 0xfb, 0xca, 0xcc, 0x94, 0xd8, 0x10, 0x2e, 0x98, 0x78, 0x36, 0xf1, - 0xe8, 0xff, 0xe0, 0xdf, 0xc1, 0x91, 0x84, 0x8b, 0xa7, 0xc6, 0x80, 0x7f, 0x41, 0x0f, 0x5e, 0xbc, - 0x98, 0xce, 0xce, 0xf2, 0xc3, 0x96, 0x4d, 0x85, 0xc4, 0xdb, 0x76, 0xe6, 0xbd, 0xef, 0xfb, 0x7e, - 0xe6, 0xbd, 0x97, 0xe2, 0x11, 0x50, 0x01, 0xa8, 0xb2, 0x62, 0x1a, 0x56, 0x45, 0xb8, 0xcc, 0x8b, - 0x1a, 0x64, 0x8d, 0x6d, 0x8c, 0x17, 0x84, 0xe6, 0xe3, 0x6c, 0xbd, 0x2a, 0x64, 0x2d, 0x57, 0x91, - 0xa0, 0x81, 0x0c, 0xda, 0xc8, 0xdc, 0xf1, 0xc8, 0x9c, 0x8d, 0xcc, 0xf4, 0x97, 0xa0, 0x04, 0x26, - 0x90, 0x35, 0xbf, 0xa2, 0x9c, 0xcc, 0x60, 0x09, 0xa0, 0xb4, 0x26, 0x18, 0xaf, 0x94, 0x19, 0x0f, - 0x43, 0xd0, 0x5c, 0x97,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f, - 0x64, 0x0f, 0xe1, 0xde, 0x96, 0xc1, 0x26, 0x53, 0x9d, 0xda, 0x6e, 0xb3, 0x5d, 0x99, 0xa7, 0x67, - 0x4b, 0xb6, 0xb8, 0x73, 0x06, 0x77, 0x9a, 0x4c, 0x75, 0x82, 0x9b, 0x5f, 0x96, 0x10, 0xe4, 0x2d, - 0xea, 0x11, 0x33, 0xf9, 0x85, 0xf0, 0xcd, 0xb6, 0xc3, 0x4d, 0x9e, 0x75, 0x60, 0x2e, 0x69, 0x35, - 0x33, 0x33, 0x67, 0x17, 0xb0, 0x84, 0x4b, 0x86, 0x70, 0x91, 0x78, 0xe7, 0x6f, 0x68, 0xc1, 0x14, - 0xca, 0x2b, 0x11, 0xfa, 0xf9, 0x15, 0x80, 0x55, 0x77, 0x61, 0x67, 0xdf, 0x41, 0xbb, 0xfb, 0x0e, - 0xfa, 0xb1, 0xef, 0xa0, 0xcf, 0x07, 0x4e, 0x6a, 0xf7, 0xc0, 0x49, 0x7d, 0x3f, 0x70, 0x52, 0x4b, - 0x8f, 0x4b, 0x65, 0xbd, 0x52, 0x2d, 0xe4, 0x8a, 0x10, 0xb0, 0x50, 0x54, 0xb5, 0x84, 0xf0, 0x01, - 0xc8, 0x52, 0xfc, 0xcd, 0x36, 0x26, 0xd9, 0x87, 0x93, 0x46, 0x74, 0xad, 0x22, 0x54, 0x21, 0x6d, - 0xfe, 0xfb, 0x1e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xca, 0x76, 0xec, 0xdc, 0xda, 0x07, 0x00, - 0x00, + // 677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xee, 0xf2, 0xfb, 0x59, 0x65, 0x14, 0x0d, 0x03, 0x1a, 0x6c, 0x70, 0x2b, 0xa3, 0x31, 0x98, + 0xe0, 0x8e, 0x20, 0xf1, 0x00, 0x12, 0xa1, 0x18, 0x63, 0x62, 0x48, 0x60, 0x25, 0x1e, 0x88, 0x49, + 0x33, 0xed, 0x0e, 0xa5, 0x81, 0xdd, 0xb7, 0xcc, 0x4c, 0x89, 0x0d, 0xe1, 0x82, 0x89, 0x67, 0x13, + 0x8f, 0x7e, 0x07, 0x3f, 0x07, 0x47, 0x12, 0x2e, 0x9e, 0x1a, 0x03, 0x7e, 0x82, 0x1e, 0xbc, 0x78, + 0x31, 0x9d, 0x99, 0xe5, 0x8f, 0x2d, 0x9b, 0x5a, 0x12, 0x6f, 0xdb, 0x79, 0x9f, 0xf7, 0x79, 0x9f, + 0xe7, 0xfd, 0x93, 0xa2, 0x51, 0x90, 0x21, 0xc8, 0xb2, 0xa4, 0x0a, 0xd6, 0x79, 0xb4, 0xca, 0x8a, + 0x0a, 0x44, 0x8d, 0x6e, 0x8d, 0x17, 0xb8, 0x62, 0xe3, 0x74, 0xb3, 0xca, 0x45, 0xcd, 0xab, 0x08, + 0x50, 0x80, 0x87, 0x2d, 0xd2, 0x3b, 0x8d, 0xf4, 0x2c, 0x32, 0x33, 0x58, 0x82, 0x12, 0x68, 0x20, + 0x6d, 0x7e, 0x99, 0x9c, 0xcc, 0x70, 0x09, 0xa0, 0xb4, 0xc1, 0x29, 0xab, 0x94, 0x29, 0x8b, 0x22, + 0x50, 0x4c, 0x95, 0x21, 0x92, 0x36, 0x3a, 0xd2, 0xb6, 0x76, 0x85, 0x09, 0x16, 0xc6, 0x90, 0xc9, + 0x44, 0x79, 0xac, 0xaa, 0xd6, 0x40, 0x94, 0x55, 0x6d, 0x81, 0x2b, 0x16, 0x30, 0xc5, 0x4c, 0x16, + 0x19, 0x44, 0x78, 0xa9, 0xa9, 0x7c, 0x51, 0x53, 0xf9, 0x7c, 0xb3, 0xca, 0xa5, 0x22, 0x4b, 0x68, + 0xe0, 0xcc, 0xab, 0xac, 0x40, 0x24, 0x39, 0x9e, 0x42, 0x69, 0x53, 0x72, 0xc8,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, 0x57, 0xb4, 0xc3, 0x65, 0xec, 0x5f, 0x7c, + 0xa0, 0x05, 0x5d, 0x28, 0x2f, 0x79, 0x14, 0xe4, 0xd7, 0x00, 0xd6, 0x73, 0x8b, 0x7b, 0x87, 0xae, + 0xb3, 0x7f, 0xe8, 0x3a, 0xdf, 0x0f, 0x5d, 0xe7, 0xd3, 0x91, 0x9b, 0xda, 0x3f, 0x72, 0x53, 0xdf, + 0x8e, 0xdc, 0xd4, 0xca, 0xd3, 0x52, 0x59, 0xad, 0x55, 0x0b, 0x5e, 0x11, 0x42, 0x1a, 0xf1, 0xaa, + 0x12, 0x10, 0x3d, 0x02, 0x51, 0x8a, 0xbf, 0xe9, 0xd6, 0x24, 0x7d, 0x7f, 0x56, 0x88, 0xaa, 0x55, + 0xb8, 0x2c, 0xa4, 0xf5, 0x7f, 0xde, 0x93, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xf0, 0xc4, + 0xcf, 0xca, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/types/tx.go b/x/tokenfactory/types/tx.go index b453ddb2f..3925b0b5a 100644 --- a/x/tokenfactory/types/tx.go +++ b/x/tokenfactory/types/tx.go @@ -32,9 +32,5 @@ func (msg *MsgUpdateParams) Validate() error { return errorsmod.Wrap(err, "authority is invalid") } - if _, err := sdk.AccAddressFromBech32(msg.Params.FeeCollectorAddress); err != nil { - return errorsmod.Wrap(err, "fee_collector_address is invalid") - } - - return nil + return msg.Params.Validate() } diff --git a/x/tokenfactory/types/tx.pb.go b/x/tokenfactory/types/tx.pb.go index 9e48c15bd..236c58ed4 100644 --- a/x/tokenfactory/types/tx.pb.go +++ b/x/tokenfactory/types/tx.pb.go @@ -857,74 +857,74 @@ func init() { } var fileDescriptor_283b6c9a90a846b4 = []byte{ - // 1062 bytes of a gzipped FileDescriptorProto + // 1064 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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09, 0x70, 0xe5, 0xdd, 0xf3, 0xc8, 0x9e, 0xe9, 0x67, 0x52, 0x34, 0xc7, 0xd3, - 0x7c, 0xf3, 0x0b, 0xb0, 0x18, 0x06, 0x98, 0x1f, 0x92, 0x27, 0xcd, 0x26, 0x45, 0x8c, 0xe5, 0x6e, - 0x66, 0x25, 0x88, 0x70, 0x8d, 0x93, 0x1a, 0x54, 0x00, 0xc7, 0x4b, 0x13, 0xca, 0x5b, 0x19, 0x4f, - 0x37, 0x46, 0x7a, 0x2a, 0x38, 0xce, 0x0a, 0x58, 0xd2, 0x62, 0x63, 0x13, 0x9d, 0x7f, 0x95, 0x01, - 0x95, 0x2e, 0xc5, 0x6f, 0xc7, 0x80, 0x7d, 0xb0, 0x54, 0xef, 0x52, 0xbc, 0x4f, 0x49, 0x98, 0xb6, - 0x60, 0xb3, 0x17, 0xd9, 0x39, 0xc5, 0x11, 0x80, 0xda, 0x11, 0x25, 0x61, 0xdf, 0x84, 0x2c, 0x69, - 0x42, 0x1b, 0x04, 0x4b, 0xdb, 0x20, 0x24, 0x27, 0x36, 0xfc, 0xa1, 0xcf, 0x41, 0x0b, 0x62, 0x1f, - 0x3d, 0x69, 0x86, 0xc1, 0x54, 0x6e, 0x7c, 0x04, 0x6e, 0x0f, 0x1e, 0x82, 0xe5, 0x5e, 0x64, 0x2f, - 0x28, 0xa4, 0xee, 0x3a, 0x15, 0x36, 0x4b, 0x60, 0x4e, 0x34, 0x24, 0x14, 0xf9, 0xb5, 0xca, 0xb5, - 0x5e, 0x64, 0x2f, 0xf7, 0x7b, 0x55, 0x86, 0x1c, 0xef, 0x2e, 0x46, 0x27, 0xb2, 0x8a, 0x49, 0x4f, - 0x8c, 0xac, 0xbb, 0xa0, 0xd8, 0x39, 0x75, 0x62, 0xfa, 0x52, 0x12, 0x95, 0x17, 0x06, 0x58, 0xab, - 0x32, 0xff, 0x00, 0xf1, 0x0a, 0x3a, 0x22, 0x14, 0x1d, 0x20, 0xdc, 0x7c, 0x46, 0x48, 0xfb, 0xff, - 0xd0, 0xfa, 0x39, 0x58, 0x6c, 0x10, 0xcc, 0x29, 0x6c, 0x70, 0xb9, 0x6b, 0x5a, 0x6f, 0xae, 0x17, - 0xd9, 0x6b, 0x0a, 0x9f, 0x0a, 0x3b, 0xde, 0x42, 0xfc, 0x2c, 0x76, 0xb4, 0xfc, 0x69, 0x46, 0xf7, - 0xa3, 0x91, 0xba, 0x19, 0xe2, 0x85, 0xba, 0x94, 0x22, 0x90, 0x85, 0x16, 0x21, 0x6d, 0x27, 0x0f, - 0x36, 0x47, 0x69, 0x4c, 0x4c, 0xf8, 0xc5, 0x00, 0xab, 0x0a, 0x20, 0x47, 0x40, 0x15, 0x71, 0xd8, - 0x84, 0x1c, 0x4e, 0xe3, 0x81, 0x07, 0xee, 0x86, 0x9a, 0xa6, 0xfb, 0xff, 0x7e, 0xbf, 0xff, 0x71, - 0x3b, 0xe9, 0xff, 0x38, 0x77, 0x65, 0x5d, 0x9f, 0x01, 0x3d, 0x1a, 0x63, 0xb2, 0xe3, 0x25, 0x79, - 0xca, 0xf3, 0x03, 0x82, 0x9d, 0xfb, 0xe0, 0xbd, 0x11, 0x25, 0x26, 0x12, 0xa2, 0x1b, 0x60, 0xb9, - 0xca, 0xfc, 0x7d, 0x42, 0x1b, 0xe8, 0x90, 0x42, 0xcc, 0x8e, 0x10, 0x7d, 0x3b, 0xa7, 0xd7, 0x03, - 0xab, 0x5c, 0x17, 0x30, 0x7c, 0x82, 0x1f, 0xf4, 0x22, 0x7b, 0x53, 0xf1, 0x62, 0x50, 0xe6, 0x14, - 0x8f, 0x22, 0x9b, 0x5f, 0x83, 0x95, 0x78, 0xb9, 0x3f, 0x16, 0x6f, 0xc9, 0x8c, 0xf9, 0x5e, 0x64, - 0x5b, 0x99, 0x8c, 0x83, 0xa3, 0x71, 0x98, 0x58, 0x7e, 0x9c, 0x69, 0xa4, 0x0f, 0x46, 0x36, 0xd2, - 0x91, 0xb0, 0xb2, 0x10, 0x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1, 0xd3, 0x17, 0x73, 0xb0, 0x98, 0x99, 0x02, 0xe3, 0x7b, 0x66, 0x10, 0x6e, + 0x7d, 0x3c, 0x15, 0x3c, 0x79, 0xab, 0x75, 0xf3, 0xa5, 0x98, 0x00, 0xd5, 0xa7, 0xaf, 0x2e, 0x8a, + 0xc6, 0xeb, 0x8b, 0xa2, 0xf1, 0xf7, 0x45, 0xd1, 0xf8, 0xf1, 0xb2, 0x38, 0xf3, 0xfa, 0xb2, 0x38, + 0xf3, 0xd7, 0x65, 0x71, 0xe6, 0x9b, 0xbd, 0x20, 0xe4, 0xc7, 0xdd, 0x86, 0xdb, 0x24, 0x91, 0x87, + 0x51, 0x97, 0x53, 0x82, 0x4b, 0x84, 0x06, 0xc9, 0x6f, 0xef, 0x64, 0xd7, 0x7b, 0x91, 0x9d, 0x7e, + 0xfc, 0xac, 0x83, 0x58, 0x63, 0x56, 0xfe, 0x49, 0xf0, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xab, 0x2e, 0xa9, 0x6f, 0x19, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/types/v1beta1/params.pb.go b/x/tokenfactory/types/v1beta1/params.pb.go new file mode 100644 index 000000000..2cf60f11d --- /dev/null +++ b/x/tokenfactory/types/v1beta1/params.pb.go @@ -0,0 +1,442 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/tokenfactory/v1beta1/params.proto + +package v1beta1 + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the tokenfactory module. +type Params struct { + // DenomCreationFee defines the fee to be charged on the creation of a new + // denom. The fee is drawn from the MsgCreateDenom's sender account, and + // transferred to the community pool. + DenomCreationFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=denom_creation_fee,json=denomCreationFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"denom_creation_fee" yaml:"denom_creation_fee"` + // DenomCreationGasConsume defines the gas cost for creating a new denom. + // This is intended as a spam deterrence mechanism. + // + // See: https://github.com/CosmWasm/token-factory/issues/11 + DenomCreationGasConsume uint64 `protobuf:"varint,2,opt,name=denom_creation_gas_consume,json=denomCreationGasConsume,proto3" json:"denom_creation_gas_consume,omitempty" yaml:"denom_creation_gas_consume"` + // FeeCollectorAddress is the address where fees collected from denom creation + // are sent to + FeeCollectorAddress string `protobuf:"bytes,3,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_cc8299d306f3ff47, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDenomCreationFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.DenomCreationFee + } + return nil +} + +func (m *Params) GetDenomCreationGasConsume() uint64 { + if m != nil { + return m.DenomCreationGasConsume + } + return 0 +} + +func (m *Params) GetFeeCollectorAddress() string { + if m != nil { + return m.FeeCollectorAddress + } + return "" +} + +func init() { + proto.RegisterType((*Params)(nil), "osmosis.tokenfactory.v1beta1.Params") +} + +func init() { + proto.RegisterFile("osmosis/tokenfactory/v1beta1/params.proto", fileDescriptor_cc8299d306f3ff47) +} + +var fileDescriptor_cc8299d306f3ff47 = []byte{ + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xbd, 0x6e, 0xe2, 0x40, + 0x10, 0xf6, 0xc2, 0x09, 0xe9, 0x7c, 0xcd, 0xc9, 0x77, 0xa7, 0x03, 0x74, 0xb2, 0x39, 0x57, 0xa6, + 0xc0, 0x2b, 0x48, 0xaa, 0x14, 0x91, 0x82, 0xa5, 0xa4, 0x8a, 0x14, 0x51, 0x45, 0x69, 0xac, 0xb5, + 0x3d, 0x76, 0x2c, 0xf0, 0x0e, 0xf2, 0x2e, 0x28, 0xbc, 0x45, 0xaa, 0x3c, 0x44, 0xde, 0x21, 0x3d, + 0x25, 0x65, 0x2a, 0x27, 0x82, 0x37, 0xe0, 0x09, 0x22, 0xfc, 0x13, 0x41, 0x92, 0xca, 0x33, 0xf3, + 0x7d, 0xf3, 0xcd, 0xe7, 0x99, 0x55, 0xbb, 0x28, 0x12, 0x14, 0xb1, 0xa0, 0x12, 0xc7, 0xc0, 0x43, + 0xe6, 0x4b, 0x4c, 0x17, 0x74, 0xde, 0xf7, 0x40, 0xb2, 0x3e, 0x9d, 0xb2, 0x94, 0x25, 0xc2, 0x9e, + 0xa6, 0x28, 0x51, 0xfb, 0x57, 0x52, 0xed, 0x7d, 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xfa, 0x3e, + 0xfa, 0x15, 0x02, 0x38, 0x15, 0x76, 0x56, 0x40, 0xc3, 0xeb, 0xe5, 0x5a, 0x27, 0xab, 0xb5, 0x4e, + 0x5e, 0xd7, 0x3a, 0xb9, 0xdf, 0xe8, 0xca, 0x6a, 0xa3, 0x2b, 0xcf, 0x1b, 0x5d, 0xb9, 0x39, 0xdd, + 0xfb, 0x63, 0x0e, 0x33, 0x99, 0x22, 0xef, 0x61, 0x1a, 0x55, 0x31, 0x9d, 0x1f, 0xd3, 0xbb, 0xc3, + 0xf7, 0x90, 0x6f, 0xa1, 0xba, 0xaa, 0xd7, 0xc8, 0x0f, 0x74, 0xf4, 0x16, 0x00, 0x00, 0xff, 0xff, + 0xc4, 0x5e, 0x24, 0x25, 0x3c, 0x02, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeeCollectorAddress) > 0 { + i -= len(m.FeeCollectorAddress) + copy(dAtA[i:], m.FeeCollectorAddress) + i = encodeVarintParams(dAtA, i, uint64(len(m.FeeCollectorAddress))) + i-- + dAtA[i] = 0x1a + } + if m.DenomCreationGasConsume != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DenomCreationGasConsume)) + i-- + dAtA[i] = 0x10 + } + if len(m.DenomCreationFee) > 0 { + for iNdEx := len(m.DenomCreationFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DenomCreationFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DenomCreationFee) > 0 { + for _, e := range m.DenomCreationFee { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if m.DenomCreationGasConsume != 0 { + n += 1 + sovParams(uint64(m.DenomCreationGasConsume)) + } + l = len(m.FeeCollectorAddress) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomCreationFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomCreationFee = append(m.DenomCreationFee, types.Coin{}) + if err := m.DenomCreationFee[len(m.DenomCreationFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomCreationGasConsume", wireType) + } + m.DenomCreationGasConsume = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DenomCreationGasConsume |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeCollectorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +)