diff --git a/app/upgrades/v4/upgrade.go b/app/upgrades/v4/upgrade.go index 9c9d1f494..f32ddd3c2 100644 --- a/app/upgrades/v4/upgrade.go +++ b/app/upgrades/v4/upgrade.go @@ -413,8 +413,6 @@ func ConvertOldRollappToNew(oldRollapp rollapptypes.Rollapp) rollapptypes.Rollap } } -var defaultGasPrice, _ = sdk.NewIntFromString("10000000000") - func ConvertOldSequencerToNew(old sequencertypes.Sequencer) sequencertypes.Sequencer { return sequencertypes.Sequencer{ Address: old.Address, @@ -440,7 +438,7 @@ func ConvertOldSequencerToNew(old sequencertypes.Sequencer) sequencertypes.Seque }, ExtraData: nil, Snapshots: []*sequencertypes.SnapshotInfo{}, - GasPrice: &defaultGasPrice, + GasPrice: "10000000000", FeeDenom: nil, }, } diff --git a/proto/dymensionxyz/dymension/sequencer/metadata.proto b/proto/dymensionxyz/dymension/sequencer/metadata.proto index 16ce7246a..2809c400b 100644 --- a/proto/dymensionxyz/dymension/sequencer/metadata.proto +++ b/proto/dymensionxyz/dymension/sequencer/metadata.proto @@ -32,7 +32,7 @@ message SequencerMetadata { // snapshots of the sequencer repeated SnapshotInfo snapshots = 14; // gas_price defines the value for each gas unit - string gas_price = 15 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string gas_price = 15; // fee_denom is the base denom for fees DenomMetadata fee_denom = 16; } diff --git a/x/eibc/types/demand_order.pb.go b/x/eibc/types/demand_order.pb.go index b531c66dc..bd21d028d 100644 --- a/x/eibc/types/demand_order.pb.go +++ b/x/eibc/types/demand_order.pb.go @@ -36,7 +36,6 @@ type DemandOrder struct { // price is the amount that the fulfiller sends to original eibc transfer recipient Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` // fee is the effective profit made by the fulfiller because they pay price and receive fee + price - // NOTE: can be empty coins (meaning zero) Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` Recipient string `protobuf:"bytes,5,opt,name=recipient,proto3" json:"recipient,omitempty"` // Deprecated: use DemandOrder.IsFulfilled method instead. @@ -47,7 +46,7 @@ type DemandOrder struct { Type types1.RollappPacket_Type `protobuf:"varint,10,opt,name=type,proto3,enum=dymensionxyz.dymension.common.RollappPacket_Type" json:"type,omitempty"` // fulfiller_address is the bech32-encoded address of the account which fulfilled the order. FulfillerAddress string `protobuf:"bytes,11,opt,name=fulfiller_address,json=fulfillerAddress,proto3" json:"fulfiller_address,omitempty"` - // creation_height is the height of the block when order was created. + // creation_height is the height of the block on the hub when order was created. CreationHeight uint64 `protobuf:"varint,12,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` } diff --git a/x/eibc/types/tx.pb.go b/x/eibc/types/tx.pb.go index bc7095464..49c7c30d3 100644 --- a/x/eibc/types/tx.pb.go +++ b/x/eibc/types/tx.pb.go @@ -38,7 +38,7 @@ type MsgFulfillOrder struct { FulfillerAddress string `protobuf:"bytes,1,opt,name=fulfiller_address,json=fulfillerAddress,proto3" json:"fulfiller_address,omitempty"` // order_id is the unique identifier of the order to be fulfilled. OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` - // expected_fee is the nominal fee set in the order. + // expected_fee is the nominal fee set in the order. Fulfiller will generally make less profit (after deducting bridge fee) ExpectedFee string `protobuf:"bytes,3,opt,name=expected_fee,json=expectedFee,proto3" json:"expected_fee,omitempty"` } diff --git a/x/rollapp/keeper/msg_server_update_rollapp_test.go b/x/rollapp/keeper/msg_server_update_rollapp_test.go index 7f9f9021f..7a6dae7fe 100644 --- a/x/rollapp/keeper/msg_server_update_rollapp_test.go +++ b/x/rollapp/keeper/msg_server_update_rollapp_test.go @@ -8,7 +8,6 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/dymensionxyz/gerr-cosmos/gerrc" "github.com/dymensionxyz/sdk-utils/utils/ucoin" - "github.com/dymensionxyz/sdk-utils/utils/uptr" "github.com/dymensionxyz/dymension/v3/x/rollapp/types" sequencertypes "github.com/dymensionxyz/dymension/v3/x/sequencer/types" @@ -833,7 +832,7 @@ func (s *RollappTestSuite) TestCreateAndUpdateRollapp() { Checksum: "checksum", }, }, - GasPrice: uptr.To(sdk.NewInt(100)), + GasPrice: "100", } _, err = s.seqMsgServer.UpdateSequencerInformation(s.Ctx, &sequencertypes.MsgUpdateSequencerInformation{ Creator: addrInit, diff --git a/x/sequencer/keeper/msg_server_update_test.go b/x/sequencer/keeper/msg_server_update_test.go index 2aa52eb57..a8c99a2fa 100644 --- a/x/sequencer/keeper/msg_server_update_test.go +++ b/x/sequencer/keeper/msg_server_update_test.go @@ -4,7 +4,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/dymensionxyz/sdk-utils/utils/uptr" rollapptypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" "github.com/dymensionxyz/dymension/v3/x/sequencer/types" @@ -51,7 +50,7 @@ func (s *SequencerTestSuite) TestUpdateSequencer() { Checksum: "checksum", }, }, - GasPrice: uptr.To(sdk.NewInt(100)), + GasPrice: "100", }, }, expError: nil, @@ -81,7 +80,7 @@ func (s *SequencerTestSuite) TestUpdateSequencer() { Checksum: "checksum", }, }, - GasPrice: uptr.To(sdk.NewInt(100)), + GasPrice: "100", }, Status: 0, Tokens: nil, diff --git a/x/sequencer/types/metadata.pb.go b/x/sequencer/types/metadata.pb.go index b19b1e7e3..c7b4979b2 100644 --- a/x/sequencer/types/metadata.pb.go +++ b/x/sequencer/types/metadata.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -49,7 +48,7 @@ type SequencerMetadata struct { // snapshots of the sequencer Snapshots []*SnapshotInfo `protobuf:"bytes,14,rep,name=snapshots,proto3" json:"snapshots,omitempty"` // gas_price defines the value for each gas unit - GasPrice *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,15,opt,name=gas_price,json=gasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_price,omitempty"` + GasPrice string `protobuf:"bytes,15,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` // fee_denom is the base denom for fees FeeDenom *DenomMetadata `protobuf:"bytes,16,opt,name=fee_denom,json=feeDenom,proto3" json:"fee_denom,omitempty"` } @@ -164,6 +163,13 @@ func (m *SequencerMetadata) GetSnapshots() []*SnapshotInfo { return nil } +func (m *SequencerMetadata) GetGasPrice() string { + if m != nil { + return m.GasPrice + } + return "" +} + func (m *SequencerMetadata) GetFeeDenom() *DenomMetadata { if m != nil { return m.FeeDenom @@ -369,44 +375,42 @@ func init() { } var fileDescriptor_0ffb58cf0478671a = []byte{ - // 595 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x5d, 0xb6, 0x6e, 0x4b, 0x9c, 0x76, 0x1b, 0x11, 0x42, 0x66, 0x88, 0x52, 0x7a, 0x40, 0x15, - 0x12, 0x09, 0xea, 0x24, 0xee, 0x8c, 0x49, 0x68, 0x08, 0xa4, 0x29, 0x63, 0x87, 0x71, 0x89, 0xdc, - 0xe4, 0x5b, 0x1a, 0x2d, 0x89, 0x8d, 0x3f, 0x77, 0xa4, 0xfc, 0x0a, 0x7e, 0x16, 0xc7, 0x1d, 0x11, - 0x07, 0x84, 0xba, 0x3f, 0x82, 0xec, 0x24, 0x5d, 0x77, 0x40, 0x3b, 0xc5, 0xef, 0xf9, 0x7b, 0xcf, - 0xce, 0xf3, 0x67, 0x93, 0x20, 0x99, 0x17, 0x50, 0x62, 0xc6, 0xcb, 0x6a, 0xfe, 0xfd, 0x16, 0x04, - 0x08, 0x5f, 0x67, 0x50, 0xc6, 0x20, 0x83, 0x02, 0x14, 0x4b, 0x98, 0x62, 0xbe, 0x90, 0x5c, 0x71, - 0x6f, 0xb0, 0x2a, 0xf0, 0x97, 0xc0, 0x5f, 0x0a, 0xf6, 0x1f, 0xa6, 0x3c, 0xe5, 0xa6, 0x38, 0xd0, - 0xa3, 0x5a, 0x37, 0x5c, 0x74, 0xc8, 0x83, 0xd3, 0xb6, 0xe6, 0x53, 0xe3, 0xe9, 0x51, 0xb2, 0x5d, - 0xf0, 0x32, 0xbb, 0x04, 0x49, 0xad, 0x81, 0x35, 0x72, 0xc2, 0x16, 0xea, 0x99, 0x04, 0x14, 0xcb, - 0x72, 0xa4, 0x9b, 0xf5, 0x4c, 0x03, 0xbd, 0x27, 0xc4, 0x11, 0x63, 0x11, 0x21, 0x40, 0x82, 0x74, - 0x6b, 0xb0, 0x31, 0x72, 0x42, 0x5b, 0x8c, 0xc5, 0xa9, 0xc6, 0x9e, 0x47, 0x3a, 0x52, 0xc4, 0x48, - 0xb7, 0x0d, 0x6f, 0xc6, 0xde, 0x63, 0x62, 0xc3, 0x55, 0x11, 0x19, 0xde, 0x36, 0xfc, 0x36, 0x5c, - 0x15, 0xa1, 0x9e, 0x1a, 0x92, 0x9e, 0x04, 0x54, 0x11, 0x13, 0x59, 0x34, 0x93, 0x39, 0x52, 0xc7, - 0xcc, 0xbb, 0x9a, 0x7c, 0x2b, 0xb2, 0x33, 0x99, 0xa3, 0xf7, 0x9c, 0x74, 0xa1, 0x12, 0x39, 0x97, - 0x20, 0x75, 0x0d, 0x25, 0x66, 0x3b, 0x6e, 0xcb, 0x9d, 0xc9, 0x5c, 0x97, 0xa4, 0x50, 0x02, 0x66, - 0x58, 0xbb, 0xb8, 0xb5, 0x4b, 0xc3, 0x19, 0x97, 0x73, 0xb2, 0x1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 0xf6, 0xba, 0xc4, 0xaa, 0xe8, 0xba, 0x21, 0xad, 0x6a, 0x08, 0xa4, 0xbb, 0x9a, 0x86, 0x3e, - 0xed, 0x36, 0x0f, 0xd3, 0x10, 0xb5, 0xda, 0x6d, 0x39, 0xdd, 0x10, 0x8f, 0xc8, 0xd6, 0x14, 0xb2, - 0x74, 0xaa, 0x8c, 0x4b, 0x27, 0x6c, 0x90, 0x5e, 0x34, 0x9e, 0x42, 0x7c, 0x89, 0xb3, 0x82, 0x6e, - 0xd4, 0x8b, 0xb6, 0x78, 0x78, 0x4e, 0x7a, 0x77, 0xfe, 0xce, 0x5c, 0x81, 0x0c, 0x45, 0xce, 0xe6, - 0xed, 0xe5, 0x68, 0xa0, 0xee, 0xf2, 0x09, 0x43, 0x68, 0xb6, 0x68, 0xc6, 0xda, 0x1a, 0x2a, 0xc1, - 0x4b, 0x28, 0x95, 0xb1, 0xee, 0x85, 0x4b, 0x7c, 0x78, 0xf2, 0x73, 0xd1, 0xb7, 0xae, 0x17, 0x7d, - 0xeb, 0xef, 0xa2, 0x6f, 0xfd, 0xb8, 0xe9, 0xaf, 0x5d, 0xdf, 0xf4, 0xd7, 0x7e, 0xdd, 0xf4, 0xd7, - 0xbe, 0xbc, 0x59, 0x39, 0xb7, 0xff, 0x3c, 0x05, 0x57, 0x07, 0x41, 0xb5, 0xf2, 0x1e, 0x98, 0xb3, - 0x9c, 0x6c, 0x99, 0x5b, 0x7d, 0xf0, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x0d, 0x05, 0x9d, 0x40, + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xad, 0xdb, 0x34, 0xb1, 0xd7, 0x49, 0x5a, 0x2c, 0x84, 0x96, 0x22, 0x2c, 0x93, 0x53, 0x4e, + 0x36, 0x4a, 0x25, 0xee, 0x40, 0x2e, 0x20, 0x90, 0x2a, 0x87, 0x1e, 0xca, 0xc5, 0xda, 0x38, 0x13, + 0xc7, 0xaa, 0xed, 0x5d, 0x76, 0x37, 0xc1, 0xe1, 0x2b, 0xf8, 0x1a, 0xbe, 0x81, 0x63, 0x8f, 0x1c, + 0x51, 0xf2, 0x23, 0x68, 0xd7, 0x76, 0x9a, 0x1c, 0x50, 0x6e, 0xfb, 0xde, 0xcc, 0xbc, 0xd9, 0x99, + 0x7d, 0x8b, 0x82, 0xd9, 0x3a, 0x87, 0x42, 0xa4, 0xb4, 0x28, 0xd7, 0x3f, 0x1e, 0x41, 0x20, 0xe0, + 0xdb, 0x12, 0x8a, 0x18, 0x78, 0x90, 0x83, 0x24, 0x33, 0x22, 0x89, 0xcf, 0x38, 0x95, 0xd4, 0xf1, + 0xf6, 0x0b, 0xfc, 0x1d, 0xf0, 0x77, 0x05, 0x57, 0x4f, 0x13, 0x9a, 0x50, 0x9d, 0x1c, 0xa8, 0x53, + 0x55, 0x37, 0xf8, 0xd5, 0x42, 0x4f, 0x26, 0x4d, 0xce, 0xe7, 0x5a, 0xd3, 0xc1, 0xa8, 0x93, 0xd3, + 0x22, 0xbd, 0x07, 0x8e, 0x0d, 0xcf, 0x18, 0x5a, 0x61, 0x03, 0x55, 0x64, 0x06, 0x92, 0xa4, 0x99, + 0xc0, 0xe7, 0x55, 0xa4, 0x86, 0xce, 0x0b, 0x64, 0xb1, 0x11, 0x8b, 0x04, 0xc0, 0x4c, 0xe0, 0xb6, + 0x77, 0x36, 0xb4, 0x42, 0x93, 0x8d, 0xd8, 0x44, 0x61, 0xc7, 0x41, 0x2d, 0xce, 0x62, 0x81, 0x3b, + 0x9a, 0xd7, 0x67, 0xe7, 0x39, 0x32, 0x61, 0x95, 0x47, 0x9a, 0x37, 0x35, 0xdf, 0x81, 0x55, 0x1e, + 0xaa, 0xd0, 0x00, 0xf5, 0x38, 0x08, 0x19, 0x11, 0x96, 0x46, 0x4b, 0x9e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0, 0xb9, 0x42, 0xa6, 0x84, 0x0c, 0x12, 0x4e, 0xf2, 0xda, 0x4f, 0x3b, 0xec, 0x74, 0x91, + 0x51, 0xe2, 0x53, 0x4d, 0x1a, 0xe5, 0x00, 0x50, 0x77, 0x7f, 0x42, 0xf5, 0x82, 0xcd, 0x8c, 0xfa, + 0x91, 0xab, 0x6a, 0xbb, 0xe1, 0xd4, 0x23, 0x3f, 0x43, 0xed, 0x05, 0xa4, 0xc9, 0x42, 0x6a, 0x95, + 0x56, 0x58, 0x23, 0xd5, 0x34, 0x5e, 0x40, 0x7c, 0x2f, 0x96, 0x39, 0x3e, 0xab, 0x9a, 0x36, 0x78, + 0x70, 0x87, 0x7a, 0x07, 0xd3, 0x69, 0x5b, 0xa7, 0x82, 0x65, 0x64, 0xdd, 0x18, 0xbe, 0x86, 0xca, + 0xb9, 0x53, 0x22, 0xa0, 0xbe, 0xa2, 0x3e, 0x2b, 0x69, 0x28, 0x19, 0x2d, 0xa0, 0x90, 0x5a, 0xba, + 0x17, 0xee, 0xf0, 0xbb, 0x9b, 0xdf, 0x1b, 0xd7, 0x78, 0xd8, 0xb8, 0xc6, 0xdf, 0x8d, 0x6b, 0xfc, + 0xdc, 0xba, 0x27, 0x0f, 0x5b, 0xf7, 0xe4, 0xcf, 0xd6, 0x3d, 0xf9, 0xfa, 0x26, 0x49, 0xe5, 0x62, + 0x39, 0xf5, 0x63, 0x9a, 0xff, 0xef, 0x7b, 0xaf, 0xae, 0x83, 0x72, 0xef, 0x8f, 0xcb, 0x35, 0x03, + 0x31, 0x6d, 0xeb, 0x9f, 0x7a, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x81, 0x64, 0x5c, 0xed, 0x14, 0x04, 0x00, 0x00, } @@ -444,15 +448,10 @@ func (m *SequencerMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x82 } - if m.GasPrice != nil { - { - size := m.GasPrice.Size() - i -= size - if _, err := m.GasPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMetadata(dAtA, i, uint64(size)) - } + if len(m.GasPrice) > 0 { + i -= len(m.GasPrice) + copy(dAtA[i:], m.GasPrice) + i = encodeVarintMetadata(dAtA, i, uint64(len(m.GasPrice))) i-- dAtA[i] = 0x7a } @@ -759,8 +758,8 @@ func (m *SequencerMetadata) Size() (n int) { n += 1 + l + sovMetadata(uint64(l)) } } - if m.GasPrice != nil { - l = m.GasPrice.Size() + l = len(m.GasPrice) + if l > 0 { n += 1 + l + sovMetadata(uint64(l)) } if m.FeeDenom != nil { @@ -1256,11 +1255,7 @@ func (m *SequencerMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.GasPrice = &v - if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.GasPrice = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 16: if wireType != 2 { diff --git a/x/sequencer/types/msg_create_test.go b/x/sequencer/types/msg_create_test.go index 5c73ae64a..532640767 100644 --- a/x/sequencer/types/msg_create_test.go +++ b/x/sequencer/types/msg_create_test.go @@ -8,11 +8,9 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/dymensionxyz/gerr-cosmos/gerrc" - "github.com/dymensionxyz/sdk-utils/utils/uptr" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/dymensionxyz/gerr-cosmos/gerrc" "github.com/stretchr/testify/require" "github.com/dymensionxyz/dymension/v3/testutil/sample" @@ -88,7 +86,7 @@ func TestMsgCreateSequencer_ValidateBasic(t *testing.T) { Checksum: "checksum", }, }, - GasPrice: uptr.To(sdk.NewInt(100)), + GasPrice: "100", FeeDenom: &DenomMetadata{ Display: "DEN", Base: "aden", diff --git a/x/sequencer/types/msg_update_test.go b/x/sequencer/types/msg_update_test.go index 6ecb00a47..44c262fa4 100644 --- a/x/sequencer/types/msg_update_test.go +++ b/x/sequencer/types/msg_update_test.go @@ -4,8 +4,6 @@ import ( "strings" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/dymensionxyz/sdk-utils/utils/uptr" "github.com/stretchr/testify/require" "github.com/dymensionxyz/dymension/v3/testutil/sample" @@ -43,7 +41,7 @@ func TestMsgUpdateSequencerInformation_ValidateBasic(t *testing.T) { Checksum: "checksum", }, }, - GasPrice: uptr.To(sdk.NewInt(100)), + GasPrice: "100", }, }, }, {