diff --git a/app/ante.go b/app/ante.go index b37d2218a..4a83135a0 100644 --- a/app/ante.go +++ b/app/ante.go @@ -89,7 +89,7 @@ func NewAnteHandlerAndDepGenerator(options HandlerOptions) (sdk.AnteHandler, sdk anteDecorators := []sdk.AnteFullDecorator{ sdk.DefaultWrappedAnteDecorator(ante.NewSetUpContextDecorator(antedecorators.GetGasMeterSetter(options.ParamsKeeper.(paramskeeper.Keeper)))), // outermost AnteDecorator. SetUpContext must be called first - antedecorators.NewGaslessDecorator([]sdk.AnteFullDecorator{ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.ParamsKeeper.(paramskeeper.Keeper), options.TxFeeChecker)}, *options.OracleKeeper), + antedecorators.NewGaslessDecorator([]sdk.AnteFullDecorator{ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.ParamsKeeper.(paramskeeper.Keeper), options.TxFeeChecker)}, *options.OracleKeeper, options.EVMKeeper), sdk.DefaultWrappedAnteDecorator(wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit, antedecorators.GetGasMeterSetter(options.ParamsKeeper.(paramskeeper.Keeper)))), // after setup context to enforce limits early sdk.DefaultWrappedAnteDecorator(ante.NewRejectExtensionOptionsDecorator()), oracle.NewSpammingPreventionDecorator(*options.OracleKeeper), diff --git a/app/antedecorators/accesscontrol_wasm_dependency.go b/app/antedecorators/accesscontrol_wasm_dependency.go index 6f6119023..bb546d46d 100644 --- a/app/antedecorators/accesscontrol_wasm_dependency.go +++ b/app/antedecorators/accesscontrol_wasm_dependency.go @@ -24,7 +24,6 @@ func NewACLWasmDependencyDecorator(aclKeeper aclkeeper.Keeper, wasmKeeper wasm.K } func (ad ACLWasmDependencyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { - for _, msg := range tx.GetMsgs() { switch m := msg.(type) { case *acltypes.MsgRegisterWasmDependency: diff --git a/app/antedecorators/gasless.go b/app/antedecorators/gasless.go index 628b1194f..f71798b1d 100644 --- a/app/antedecorators/gasless.go +++ b/app/antedecorators/gasless.go @@ -10,6 +10,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" dextypes "github.com/sei-protocol/sei-chain/x/dex/types" + evmkeeper "github.com/sei-protocol/sei-chain/x/evm/keeper" + evmtypes "github.com/sei-protocol/sei-chain/x/evm/types" oraclekeeper "github.com/sei-protocol/sei-chain/x/oracle/keeper" oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" ) @@ -17,10 +19,11 @@ import ( type GaslessDecorator struct { wrapped []sdk.AnteFullDecorator oracleKeeper oraclekeeper.Keeper + evmKeeper *evmkeeper.Keeper } -func NewGaslessDecorator(wrapped []sdk.AnteFullDecorator, oracleKeeper oraclekeeper.Keeper) GaslessDecorator { - return GaslessDecorator{wrapped: wrapped, oracleKeeper: oracleKeeper} +func NewGaslessDecorator(wrapped []sdk.AnteFullDecorator, oracleKeeper oraclekeeper.Keeper, evmKeeper *evmkeeper.Keeper) GaslessDecorator { + return GaslessDecorator{wrapped: wrapped, oracleKeeper: oracleKeeper, evmKeeper: evmKeeper} } func (gd GaslessDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { @@ -28,7 +31,7 @@ func (gd GaslessDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, // eagerly set infinite gas meter so that queries performed by IsTxGasless will not incur gas cost ctx = ctx.WithGasMeter(storetypes.NewNoConsumptionInfiniteGasMeter()) - isGasless, err := IsTxGasless(tx, ctx, gd.oracleKeeper) + isGasless, err := IsTxGasless(tx, ctx, gd.oracleKeeper, gd.evmKeeper) if err != nil { return ctx, err } @@ -108,7 +111,7 @@ func (gd GaslessDecorator) AnteDeps(txDeps []sdkacltypes.AccessOperation, tx sdk return next(append(txDeps, deps...), tx, txIndex) } -func IsTxGasless(tx sdk.Tx, ctx sdk.Context, oracleKeeper oraclekeeper.Keeper) (bool, error) { +func IsTxGasless(tx sdk.Tx, ctx sdk.Context, oracleKeeper oraclekeeper.Keeper, evmKeeper *evmkeeper.Keeper) (bool, error) { if len(tx.GetMsgs()) == 0 { // empty TX shouldn't be gasless return false, nil @@ -129,6 +132,10 @@ func IsTxGasless(tx sdk.Tx, ctx sdk.Context, oracleKeeper oraclekeeper.Keeper) ( if err != nil || !isGasless { return false, err } + case *evmtypes.MsgAssociate: + if !evmAssociateIsGasless(m, ctx, evmKeeper) { + return false, nil + } default: return false, nil } @@ -190,3 +197,10 @@ func oracleVoteIsGasless(msg *oracletypes.MsgAggregateExchangeRateVote, ctx sdk. // otherwise we allow it return true, nil } + +func evmAssociateIsGasless(msg *evmtypes.MsgAssociate, ctx sdk.Context, keeper *evmkeeper.Keeper) bool { + // not gasless if already associated + seiAddr := sdk.MustAccAddressFromBech32(msg.Sender) + _, associated := keeper.GetEVMAddress(ctx, seiAddr) + return !associated +} diff --git a/app/antedecorators/gasless_test.go b/app/antedecorators/gasless_test.go index 9f50f7242..58143c1ce 100644 --- a/app/antedecorators/gasless_test.go +++ b/app/antedecorators/gasless_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" "github.com/sei-protocol/sei-chain/app/antedecorators" "github.com/sei-protocol/sei-chain/x/dex/types" + evmkeeper "github.com/sei-protocol/sei-chain/x/evm/keeper" oraclekeeper "github.com/sei-protocol/sei-chain/x/oracle/keeper" oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" "github.com/stretchr/testify/require" @@ -91,9 +92,9 @@ func (t FakeTx) FeeGranter() sdk.AccAddress { return nil } -func CallGaslessDecoratorWithMsg(ctx sdk.Context, msg sdk.Msg, oracleKeeper oraclekeeper.Keeper) error { +func CallGaslessDecoratorWithMsg(ctx sdk.Context, msg sdk.Msg, oracleKeeper oraclekeeper.Keeper, evmKeeper *evmkeeper.Keeper) error { anteDecorators := []sdk.AnteFullDecorator{ - antedecorators.NewGaslessDecorator([]sdk.AnteFullDecorator{sdk.DefaultWrappedAnteDecorator(FakeAnteDecoratorGasReqd{})}, oracleKeeper), + antedecorators.NewGaslessDecorator([]sdk.AnteFullDecorator{sdk.DefaultWrappedAnteDecorator(FakeAnteDecoratorGasReqd{})}, oracleKeeper, evmKeeper), } chainedHandler, depGen := sdk.ChainAnteDecorators(anteDecorators...) fakeTx := FakeTx{ @@ -140,12 +141,12 @@ func TestOracleVoteGasless(t *testing.T) { } // reset gasless - err = CallGaslessDecoratorWithMsg(ctx, &vote1, input.OracleKeeper) + err = CallGaslessDecoratorWithMsg(ctx, &vote1, input.OracleKeeper, nil) require.Error(t, err) // reset gasless gasless = true - err = CallGaslessDecoratorWithMsg(ctx, &vote2, input.OracleKeeper) + err = CallGaslessDecoratorWithMsg(ctx, &vote2, input.OracleKeeper, nil) require.NoError(t, err) require.True(t, gasless) } @@ -167,14 +168,14 @@ func TestDexCancelOrderGasless(t *testing.T) { // not whitelisted // reset gasless gasless = true - err := CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &cancelMsg1, oraclekeeper.Keeper{}) + err := CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &cancelMsg1, oraclekeeper.Keeper{}, nil) require.NoError(t, err) require.False(t, gasless) // whitelisted // reset gasless gasless = true - err = CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &cancelMsg2, oraclekeeper.Keeper{}) + err = CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &cancelMsg2, oraclekeeper.Keeper{}, nil) require.NoError(t, err) require.True(t, gasless) } @@ -183,7 +184,7 @@ func TestNonGaslessMsg(t *testing.T) { // this needs to be updated if its changed from constant true // reset gasless gasless = true - err := CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &types.MsgRegisterContract{}, oraclekeeper.Keeper{}) + err := CallGaslessDecoratorWithMsg(sdk.NewContext(nil, tmproto.Header{}, false, nil).WithIsCheckTx(true), &types.MsgRegisterContract{}, oraclekeeper.Keeper{}, nil) require.NoError(t, err) require.False(t, gasless) } diff --git a/app/app.go b/app/app.go index 8315f2317..a42864cd4 100644 --- a/app/app.go +++ b/app/app.go @@ -1786,7 +1786,7 @@ func (app *App) checkTotalBlockGasWanted(ctx sdk.Context, txs [][]byte) bool { // such tx will not be processed and thus won't consume gas. Skipping continue } - isGasless, err := antedecorators.IsTxGasless(decoded, ctx, app.OracleKeeper) + isGasless, err := antedecorators.IsTxGasless(decoded, ctx, app.OracleKeeper, &app.EvmKeeper) if err != nil { ctx.Logger().Error("error checking if tx is gasless", "error", err) continue diff --git a/proto/evm/tx.proto b/proto/evm/tx.proto index 8b00a6690..0d32c7c45 100644 --- a/proto/evm/tx.proto +++ b/proto/evm/tx.proto @@ -13,6 +13,7 @@ service Msg { rpc Send(MsgSend) returns (MsgSendResponse); rpc RegisterPointer(MsgRegisterPointer) returns (MsgRegisterPointerResponse); rpc AssociateContractAddress(MsgAssociateContractAddress) returns (MsgAssociateContractAddressResponse); + rpc Associate(MsgAssociate) returns (MsgAssociateResponse); } message MsgEVMTransaction { @@ -72,4 +73,11 @@ message MsgAssociateContractAddress { string address = 2; } -message MsgAssociateContractAddressResponse {} \ No newline at end of file +message MsgAssociateContractAddressResponse {} + +message MsgAssociate { + string sender = 1; + string custom_message = 2; +} + +message MsgAssociateResponse {} \ No newline at end of file diff --git a/x/evm/ante/preprocess.go b/x/evm/ante/preprocess.go index 0789a15cd..5537cbedc 100644 --- a/x/evm/ante/preprocess.go +++ b/x/evm/ante/preprocess.go @@ -391,6 +391,12 @@ func (p *EVMAddressDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo ctx.Logger().Error(fmt.Sprintf("failed to migrate EVM address balance (%s) %s", evmAddr.Hex(), err)) return ctx, err } + if evmtypes.IsTxMsgAssociate(tx) { + // check if there is non-zero balance + if !p.evmKeeper.BankKeeper().GetBalance(ctx, signer, sdk.MustGetBaseDenom()).IsPositive() && !p.evmKeeper.BankKeeper().GetWeiBalance(ctx, signer).IsPositive() { + return ctx, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "account needs to have at least 1 wei to force association") + } + } } return next(ctx, tx, simulate) } diff --git a/x/evm/client/cli/native_tx.go b/x/evm/client/cli/native_tx.go index b08518455..ba96608c2 100644 --- a/x/evm/client/cli/native_tx.go +++ b/x/evm/client/cli/native_tx.go @@ -177,3 +177,28 @@ func AssociateContractAddressCmd() *cobra.Command { return cmd } + +func NativeAssociateCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "native-associate [custom msg]", + Short: `Set address association for the sender.`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgAssociate(clientCtx.GetFromAddress(), args[0]) + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index 0ef58bf48..20c8ba612 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -71,6 +71,7 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(NewAddCWERC20PointerProposalTxCmd()) cmd.AddCommand(NewAddCWERC721PointerProposalTxCmd()) cmd.AddCommand(AssociateContractAddressCmd()) + cmd.AddCommand(NativeAssociateCmd()) return cmd } diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 9ccb8779a..116570c27 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -343,3 +343,7 @@ func (server msgServer) AssociateContractAddress(goCtx context.Context, msg *typ server.SetAddressMapping(ctx, addr, evmAddr) return &types.MsgAssociateContractAddressResponse{}, nil } + +func (server msgServer) Associate(context.Context, *types.MsgAssociate) (*types.MsgAssociateResponse, error) { + return &types.MsgAssociateResponse{}, nil +} diff --git a/x/evm/keeper/msg_server_test.go b/x/evm/keeper/msg_server_test.go index 3ca811cfb..11d8e5b05 100644 --- a/x/evm/keeper/msg_server_test.go +++ b/x/evm/keeper/msg_server_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "bytes" + "context" "crypto/sha256" "encoding/hex" "math/big" @@ -11,6 +12,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -18,6 +20,8 @@ import ( "github.com/sei-protocol/sei-chain/example/contracts/sendall" "github.com/sei-protocol/sei-chain/example/contracts/simplestorage" testkeeper "github.com/sei-protocol/sei-chain/testutil/keeper" + dexcache "github.com/sei-protocol/sei-chain/x/dex/cache" + dexutils "github.com/sei-protocol/sei-chain/x/dex/utils" "github.com/sei-protocol/sei-chain/x/evm/ante" "github.com/sei-protocol/sei-chain/x/evm/artifacts/erc20" "github.com/sei-protocol/sei-chain/x/evm/artifacts/erc721" @@ -708,3 +712,55 @@ func TestAssociateContractAddress(t *testing.T) { require.NotNil(t, err) require.Contains(t, err.Error(), "no wasm contract found at the given address") } + +func TestAssociate(t *testing.T) { + ctx := testkeeper.EVMTestApp.GetContextForDeliverTx([]byte{}).WithChainID("sei-test").WithBlockHeight(1) + ctx = ctx.WithContext( + context.WithValue(ctx.Context(), dexutils.DexMemStateContextKey, &dexcache.MemState{}), + ) + privKey := testkeeper.MockPrivateKey() + seiAddr, evmAddr := testkeeper.PrivateKeyToAddresses(privKey) + acc := testkeeper.EVMTestApp.AccountKeeper.NewAccountWithAddress(ctx, seiAddr) + testkeeper.EVMTestApp.AccountKeeper.SetAccount(ctx, acc) + msg := types.NewMsgAssociate(seiAddr, "test") + tb := testkeeper.EVMTestApp.GetTxConfig().NewTxBuilder() + tb.SetMsgs(msg) + tb.SetSignatures(signing.SignatureV2{ + PubKey: privKey.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: acc.GetSequence(), + }) + signerData := authsigning.SignerData{ + ChainID: "sei-test", + AccountNumber: acc.GetAccountNumber(), + Sequence: acc.GetSequence(), + } + signBytes, err := testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().GetSignBytes(testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().DefaultMode(), signerData, tb.GetTx()) + require.Nil(t, err) + sig, err := privKey.Sign(signBytes) + require.Nil(t, err) + sigs := make([]signing.SignatureV2, 1) + sigs[0] = signing.SignatureV2{ + PubKey: privKey.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: testkeeper.EVMTestApp.GetTxConfig().SignModeHandler().DefaultMode(), + Signature: sig, + }, + Sequence: acc.GetSequence(), + } + require.Nil(t, tb.SetSignatures(sigs...)) + sdktx := tb.GetTx() + txbz, err := testkeeper.EVMTestApp.GetTxConfig().TxEncoder()(sdktx) + require.Nil(t, err) + + res := testkeeper.EVMTestApp.DeliverTx(ctx, abci.RequestDeliverTx{Tx: txbz}, sdktx, sha256.Sum256(txbz)) + require.NotEqual(t, uint32(0), res.Code) // not enough balance + + require.Nil(t, testkeeper.EVMTestApp.BankKeeper.AddWei(ctx, sdk.AccAddress(evmAddr[:]), sdk.OneInt())) + + res = testkeeper.EVMTestApp.DeliverTx(ctx, abci.RequestDeliverTx{Tx: txbz}, sdktx, sha256.Sum256(txbz)) + require.Equal(t, uint32(0), res.Code) +} diff --git a/x/evm/types/message_associate.go b/x/evm/types/message_associate.go new file mode 100644 index 000000000..2107487dd --- /dev/null +++ b/x/evm/types/message_associate.go @@ -0,0 +1,54 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgAssociate = "evm_associate" + +var ( + _ sdk.Msg = &MsgAssociate{} +) + +func NewMsgAssociate(sender sdk.AccAddress, customMsg string) *MsgAssociate { + return &MsgAssociate{Sender: sender.String(), CustomMessage: customMsg} +} + +func (msg *MsgAssociate) Route() string { + return RouterKey +} + +func (msg *MsgAssociate) Type() string { + return TypeMsgAssociate +} + +func (msg *MsgAssociate) GetSigners() []sdk.AccAddress { + from, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{from} +} + +func (msg *MsgAssociate) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +func (msg *MsgAssociate) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) + } + + return nil +} + +func IsTxMsgAssociate(tx sdk.Tx) bool { + msgs := tx.GetMsgs() + if len(msgs) != 1 { + return false + } + _, ok := msgs[0].(*MsgAssociate) + return ok +} diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index fedbdcfee..42a5057e9 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -642,6 +642,94 @@ func (m *MsgAssociateContractAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAssociateContractAddressResponse proto.InternalMessageInfo +type MsgAssociate struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + CustomMessage string `protobuf:"bytes,2,opt,name=custom_message,json=customMessage,proto3" json:"custom_message,omitempty"` +} + +func (m *MsgAssociate) Reset() { *m = MsgAssociate{} } +func (m *MsgAssociate) String() string { return proto.CompactTextString(m) } +func (*MsgAssociate) ProtoMessage() {} +func (*MsgAssociate) Descriptor() ([]byte, []int) { + return fileDescriptor_d72e73a3d1d93781, []int{12} +} +func (m *MsgAssociate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAssociate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAssociate.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 *MsgAssociate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAssociate.Merge(m, src) +} +func (m *MsgAssociate) XXX_Size() int { + return m.Size() +} +func (m *MsgAssociate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAssociate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAssociate proto.InternalMessageInfo + +func (m *MsgAssociate) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgAssociate) GetCustomMessage() string { + if m != nil { + return m.CustomMessage + } + return "" +} + +type MsgAssociateResponse struct { +} + +func (m *MsgAssociateResponse) Reset() { *m = MsgAssociateResponse{} } +func (m *MsgAssociateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAssociateResponse) ProtoMessage() {} +func (*MsgAssociateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d72e73a3d1d93781, []int{13} +} +func (m *MsgAssociateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAssociateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAssociateResponse.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 *MsgAssociateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAssociateResponse.Merge(m, src) +} +func (m *MsgAssociateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAssociateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAssociateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAssociateResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgEVMTransaction)(nil), "seiprotocol.seichain.evm.MsgEVMTransaction") proto.RegisterType((*MsgEVMTransactionResponse)(nil), "seiprotocol.seichain.evm.MsgEVMTransactionResponse") @@ -655,62 +743,68 @@ func init() { proto.RegisterType((*MsgRegisterPointerResponse)(nil), "seiprotocol.seichain.evm.MsgRegisterPointerResponse") proto.RegisterType((*MsgAssociateContractAddress)(nil), "seiprotocol.seichain.evm.MsgAssociateContractAddress") proto.RegisterType((*MsgAssociateContractAddressResponse)(nil), "seiprotocol.seichain.evm.MsgAssociateContractAddressResponse") + proto.RegisterType((*MsgAssociate)(nil), "seiprotocol.seichain.evm.MsgAssociate") + proto.RegisterType((*MsgAssociateResponse)(nil), "seiprotocol.seichain.evm.MsgAssociateResponse") } func init() { proto.RegisterFile("evm/tx.proto", fileDescriptor_d72e73a3d1d93781) } var fileDescriptor_d72e73a3d1d93781 = []byte{ - // 798 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xc0, 0xeb, 0x26, 0xdb, 0x6c, 0x5f, 0xaa, 0x46, 0x6b, 0xad, 0x90, 0x63, 0x20, 0x29, 0x86, - 0x85, 0xf0, 0xa7, 0x36, 0x9b, 0x05, 0x71, 0x40, 0x48, 0x34, 0x6d, 0xc4, 0xee, 0x21, 0x02, 0x99, - 0xee, 0x1e, 0xb8, 0x44, 0x13, 0xfb, 0xad, 0x63, 0x11, 0xcf, 0x44, 0x33, 0xe3, 0x68, 0xf3, 0x05, - 0x38, 0xaf, 0x10, 0x12, 0x7c, 0x06, 0x4e, 0x7c, 0x8c,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orProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x36, 0x6d, 0xc5, 0x8a, 0x46, 0xaa, 0x8c, 0x10, 0x46, 0x20, 0xb3, 0xad, 0xe4, 0xb2, 0x75, + 0xaa, 0xfe, 0x98, 0x6c, 0x9c, 0x16, 0x3d, 0x14, 0x05, 0xea, 0x3f, 0x34, 0x39, 0x10, 0x2d, 0x58, + 0x27, 0x87, 0x5e, 0x84, 0x15, 0x39, 0xa1, 0x89, 0x8a, 0xbb, 0xc2, 0xee, 0x52, 0x88, 0x5e, 0xa0, + 0xe7, 0xa0, 0x28, 0xd0, 0x3e, 0x43, 0x4f, 0x7d, 0x82, 0x9e, 0x73, 0xcc, 0xb1, 0xc8, 0xc1, 0x2d, + 0xec, 0x17, 0x29, 0x76, 0x97, 0x64, 0x6c, 0x19, 0x52, 0xe5, 0x9c, 0xb8, 0x33, 0xf3, 0xcd, 0xcc, + 0x37, 0x3f, 0xbb, 0x84, 0x16, 0x4e, 0x32, 0x5f, 0x3e, 0xf3, 0xc6, 0x9c, 0x49, 0x66, 0x77, 0x04, + 0xa6, 0xfa, 0x14, 0xb1, 0x91, 0x27, 0x30, 0x8d, 0x4e, 0x49, 0x4a, 0x3d, 0x9c, 0x64, 0xce, 0x56, + 0xc2, 0x58, 0x32, 0x42, 0x5f, 0x5b, 0x87, 0xf9, 0x53, 0x9f, 0xd0, 0xa9, 0x71, 0x72, 0x36, 0x13, + 0x96, 0x30, 0x7d, 0xf4, 0xd5, 0xa9, 0xd0, 0x76, 0x23, 0x26, 0x32, 0x26, 0xfc, 0x21, 0x11, 0xe8, + 0x4f, 0xee, 0x0f, 0x51, 0x92, 0xfb, 0x7e, 0xc4, 0x52, 0x5a, 0xd8, 0x37, 0x54, 0x62, 0xa4, 0x79, + 0x26, 0x8c, 0xc2, 0xfd, 0xd5, 0x82, 0x3b, 0x81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0xae, 0x66, 0x70, 0x02, + 0x35, 0xb3, 0xfd, 0x0b, 0x9d, 0x15, 0xc4, 0xf9, 0xe8, 0x7f, 0x21, 0x55, 0xd4, 0x1c, 0x36, 0x66, + 0xb7, 0xf1, 0xd3, 0x85, 0xde, 0x33, 0x68, 0xe7, 0xf3, 0x9b, 0xa0, 0xab, 0xb4, 0xcf, 0x2d, 0xe8, + 0xcc, 0xdd, 0x92, 0x2f, 0x16, 0x86, 0x9c, 0xe7, 0xe6, 0x7c, 0xfd, 0x46, 0x6e, 0x15, 0xa5, 0x08, + 0x1a, 0xaf, 0xf7, 0xe7, 0xde, 0x72, 0xb1, 0x1c, 0x6f, 0x39, 0x5c, 0x99, 0xe4, 0xe0, 0xdb, 0x17, + 0xe7, 0x5d, 0xeb, 0xe5, 0x79, 0xd7, 0xfa, 0xf7, 0xbc, 0x6b, 0x3d, 0xbf, 0xe8, 0xae, 0xbc, 0xbc, + 0xe8, 0xae, 0xfc, 0x7d, 0xd1, 0x5d, 0xf9, 0x71, 0x77, 0xd9, 0xff, 0xa3, 0x7e, 0x6a, 0x86, 0xeb, + 0xda, 0xfe, 0xe0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x08, 0xef, 0xf5, 0x36, 0x08, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -729,6 +823,7 @@ type MsgClient interface { Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) RegisterPointer(ctx context.Context, in *MsgRegisterPointer, opts ...grpc.CallOption) (*MsgRegisterPointerResponse, error) AssociateContractAddress(ctx context.Context, in *MsgAssociateContractAddress, opts ...grpc.CallOption) (*MsgAssociateContractAddressResponse, error) + Associate(ctx context.Context, in *MsgAssociate, opts ...grpc.CallOption) (*MsgAssociateResponse, error) } type msgClient struct { @@ -775,12 +870,22 @@ func (c *msgClient) AssociateContractAddress(ctx context.Context, in *MsgAssocia return out, nil } +func (c *msgClient) Associate(ctx context.Context, in *MsgAssociate, opts ...grpc.CallOption) (*MsgAssociateResponse, error) { + out := new(MsgAssociateResponse) + err := c.cc.Invoke(ctx, "/seiprotocol.seichain.evm.Msg/Associate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { EVMTransaction(context.Context, *MsgEVMTransaction) (*MsgEVMTransactionResponse, error) Send(context.Context, *MsgSend) (*MsgSendResponse, error) RegisterPointer(context.Context, *MsgRegisterPointer) (*MsgRegisterPointerResponse, error) AssociateContractAddress(context.Context, *MsgAssociateContractAddress) (*MsgAssociateContractAddressResponse, error) + Associate(context.Context, *MsgAssociate) (*MsgAssociateResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -799,6 +904,9 @@ func (*UnimplementedMsgServer) RegisterPointer(ctx context.Context, req *MsgRegi func (*UnimplementedMsgServer) AssociateContractAddress(ctx context.Context, req *MsgAssociateContractAddress) (*MsgAssociateContractAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssociateContractAddress not implemented") } +func (*UnimplementedMsgServer) Associate(ctx context.Context, req *MsgAssociate) (*MsgAssociateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Associate not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -876,6 +984,24 @@ func _Msg_AssociateContractAddress_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Msg_Associate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAssociate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Associate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seiprotocol.seichain.evm.Msg/Associate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Associate(ctx, req.(*MsgAssociate)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "seiprotocol.seichain.evm.Msg", HandlerType: (*MsgServer)(nil), @@ -896,6 +1022,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AssociateContractAddress", Handler: _Msg_AssociateContractAddress_Handler, }, + { + MethodName: "Associate", + Handler: _Msg_Associate_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "evm/tx.proto", @@ -1363,6 +1493,66 @@ func (m *MsgAssociateContractAddressResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *MsgAssociate) 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 *MsgAssociate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAssociate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CustomMessage) > 0 { + i -= len(m.CustomMessage) + copy(dAtA[i:], m.CustomMessage) + i = encodeVarintTx(dAtA, i, uint64(len(m.CustomMessage))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAssociateResponse) 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 *MsgAssociateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAssociateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1578,6 +1768,32 @@ func (m *MsgAssociateContractAddressResponse) Size() (n int) { return n } +func (m *MsgAssociate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CustomMessage) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAssociateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2947,6 +3163,170 @@ func (m *MsgAssociateContractAddressResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgAssociate) 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 ErrIntOverflowTx + } + 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: MsgAssociate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAssociate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CustomMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAssociateResponse) 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 ErrIntOverflowTx + } + 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: MsgAssociateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAssociateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0