From 95186e0b1a03dcd07ce5ecf36a4a8d890e19d641 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Fri, 11 Oct 2024 10:37:35 +0200 Subject: [PATCH 1/7] docs: move invalid v20 breaking changes (#2986) --- docs/releases/v20_breaking_changes.md | 9 --------- docs/releases/v21_breaking_changes.md | 9 ++++++++- 2 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 docs/releases/v20_breaking_changes.md diff --git a/docs/releases/v20_breaking_changes.md b/docs/releases/v20_breaking_changes.md deleted file mode 100644 index 1519ccf8a6..0000000000 --- a/docs/releases/v20_breaking_changes.md +++ /dev/null @@ -1,9 +0,0 @@ - -# V20 Breaking Changes - -### Emissions factors deprecated - -* `EmissionsFactors` have been deprecated and removed from the `emissions` module. - - This results in the removal of the query `/zeta-chain/emissions/get_emissions_factors`. - - The fixed block reward amount can now be queried via `/zeta-chain/emissions/params`. This is constant for every block and does not depend on any factors. - diff --git a/docs/releases/v21_breaking_changes.md b/docs/releases/v21_breaking_changes.md index df82831bad..818258fdf3 100644 --- a/docs/releases/v21_breaking_changes.md +++ b/docs/releases/v21_breaking_changes.md @@ -8,4 +8,11 @@ * If the chain already exists, the details will be updated. * If the chain does not exist, it will be added to the list of chains and saved to the store. * A new transaction type `RemoveChainInfo` has also been added to remove a chain from the list of chains. - * It accepts the chain-id of the chain to be removed as a parameter. \ No newline at end of file + * It accepts the chain-id of the chain to be removed as a parameter. + +### Emissions factors deprecated + +* `EmissionsFactors` have been deprecated and removed from the `emissions` module. + - This results in the removal of the query `/zeta-chain/emissions/get_emissions_factors`. + - The fixed block reward amount can now be queried via `/zeta-chain/emissions/params`. This is constant for every block and does not depend on any factors. + From 404bd9625da63d958daa185839fc2fe5d1d93475 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 11 Oct 2024 10:19:32 -0700 Subject: [PATCH 2/7] refactor: configure solana chain during e2e setup (#2990) * refactor: configure solana chain during setup * add sol back to app_test.go --- cmd/zetae2e/local/local.go | 2 +- e2e/e2etests/test_solana_withdraw.go | 7 ++- e2e/runner/setup_solana.go | 70 +++++++++++++++++++++++++++- e2e/runner/solana.go | 4 +- x/observer/genesis.go | 3 -- x/observer/genesis_test.go | 6 --- x/observer/types/chain_params.go | 21 --------- zetaclient/context/app_test.go | 4 +- 8 files changed, 78 insertions(+), 39 deletions(-) diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 23a7f6b866..588a74e367 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -226,7 +226,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) { deployerRunner.ERC20CustodyAddr = deployerRunner.ERC20CustodyV2Addr if testSolana { - deployerRunner.SetSolanaContracts(conf.AdditionalAccounts.UserSolana.SolanaPrivateKey.String()) + deployerRunner.SetupSolana(conf.AdditionalAccounts.UserSolana.SolanaPrivateKey.String()) } noError(deployerRunner.FundEmissionsPool()) diff --git a/e2e/e2etests/test_solana_withdraw.go b/e2e/e2etests/test_solana_withdraw.go index 9ff5114c34..c7f6ccc58b 100644 --- a/e2e/e2etests/test_solana_withdraw.go +++ b/e2e/e2etests/test_solana_withdraw.go @@ -13,19 +13,22 @@ import ( func TestSolanaWithdraw(r *runner.E2ERunner, args []string) { require.Len(r, args, 1) + withdrawAmount := parseBigInt(r, args[0]) + // get ERC20 SOL balance before withdraw balanceBefore, err := r.SOLZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress()) require.NoError(r, err) r.Logger.Info("runner balance of SOL before withdraw: %d", balanceBefore) + require.Equal(r, 1, balanceBefore.Cmp(withdrawAmount), "Insufficient balance for withdrawal") + // parse withdraw amount (in lamports), approve amount is 1 SOL approvedAmount := new(big.Int).SetUint64(solana.LAMPORTS_PER_SOL) - withdrawAmount := parseBigInt(r, args[0]) require.Equal( r, -1, withdrawAmount.Cmp(approvedAmount), - "Withdrawal amount must be less than the approved amount (1e9).", + "Withdrawal amount must be less than the approved amount (1e9)", ) // load deployer private key diff --git a/e2e/runner/setup_solana.go b/e2e/runner/setup_solana.go index 8f209dd23e..17bf3149dd 100644 --- a/e2e/runner/setup_solana.go +++ b/e2e/runner/setup_solana.go @@ -1,14 +1,20 @@ package runner import ( + "time" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" "github.com/near/borsh-go" + "github.com/pkg/errors" "github.com/stretchr/testify/require" + "github.com/zeta-chain/node/e2e/utils" "github.com/zeta-chain/node/pkg/chains" + "github.com/zeta-chain/node/pkg/constant" solanacontracts "github.com/zeta-chain/node/pkg/contracts/solana" + observertypes "github.com/zeta-chain/node/x/observer/types" ) // SetupSolanaAccount imports the deployer's private key @@ -20,8 +26,8 @@ func (r *E2ERunner) SetupSolanaAccount() { r.Logger.Info("SolanaDeployerAddress: %s", r.SolanaDeployerAddress) } -// SetSolanaContracts set Solana contracts -func (r *E2ERunner) SetSolanaContracts(deployerPrivateKey string) { +// SetupSolana sets Solana contracts and params +func (r *E2ERunner) SetupSolana(deployerPrivateKey string) { r.Logger.Print("⚙️ initializing gateway program on Solana") // set Solana contracts @@ -78,4 +84,64 @@ func (r *E2ERunner) SetSolanaContracts(deployerPrivateKey string) { balance, err := r.SolanaClient.GetBalance(r.Ctx, pdaComputed, rpc.CommitmentConfirmed) require.NoError(r, err) r.Logger.Info("initial PDA balance: %d lamports", balance.Value) + + err = r.ensureSolanaChainParams() + require.NoError(r, err) +} + +func (r *E2ERunner) ensureSolanaChainParams() error { + if r.ZetaTxServer == nil { + return errors.New("ZetaTxServer is not initialized") + } + + creator := r.ZetaTxServer.MustGetAccountAddressFromName(utils.OperationalPolicyName) + + chainID := chains.SolanaLocalnet.ChainId + + chainParams := &observertypes.ChainParams{ + ChainId: chainID, + ConfirmationCount: 32, + ZetaTokenContractAddress: constant.EVMZeroAddress, + ConnectorContractAddress: constant.EVMZeroAddress, + Erc20CustodyContractAddress: constant.EVMZeroAddress, + GasPriceTicker: 5, + WatchUtxoTicker: 0, + InboundTicker: 2, + OutboundTicker: 2, + OutboundScheduleInterval: 2, + OutboundScheduleLookahead: 5, + BallotThreshold: observertypes.DefaultBallotThreshold, + MinObserverDelegation: observertypes.DefaultMinObserverDelegation, + IsSupported: true, + GatewayAddress: solanacontracts.SolanaGatewayProgramID, + } + + updateMsg := observertypes.NewMsgUpdateChainParams(creator, chainParams) + + if _, err := r.ZetaTxServer.BroadcastTx(utils.OperationalPolicyName, updateMsg); err != nil { + return errors.Wrap(err, "unable to broadcast solana chain params tx") + } + + resetMsg := observertypes.NewMsgResetChainNonces(creator, chainID, 0, 0) + if _, err := r.ZetaTxServer.BroadcastTx(utils.OperationalPolicyName, resetMsg); err != nil { + return errors.Wrap(err, "unable to broadcast solana chain nonce reset tx") + } + + r.Logger.Print("⚙️ voted for adding solana chain params (localnet). Waiting for confirmation") + + query := &observertypes.QueryGetChainParamsForChainRequest{ChainId: chainID} + + const duration = 2 * time.Second + + for i := 0; i < 10; i++ { + _, err := r.ObserverClient.GetChainParamsForChain(r.Ctx, query) + if err == nil { + r.Logger.Print("⚙️ solana chain params are set") + return nil + } + + time.Sleep(duration) + } + + return errors.New("unable to set Solana chain params") } diff --git a/e2e/runner/solana.go b/e2e/runner/solana.go index 8ff67b9d72..4d5e6a9b9d 100644 --- a/e2e/runner/solana.go +++ b/e2e/runner/solana.go @@ -153,7 +153,7 @@ func (r *E2ERunner) WithdrawSOLZRC20( tx, err := r.SOLZRC20.Approve(r.ZEVMAuth, r.SOLZRC20Addr, approveAmount) require.NoError(r, err) receipt := utils.MustWaitForTxReceipt(r.Ctx, r.ZEVMClient, tx, r.Logger, r.ReceiptTimeout) - utils.RequireTxSuccessful(r, receipt) + utils.RequireTxSuccessful(r, receipt, "approve") // withdraw tx, err = r.SOLZRC20.Withdraw(r.ZEVMAuth, []byte(to.String()), amount) @@ -162,7 +162,7 @@ func (r *E2ERunner) WithdrawSOLZRC20( // wait for tx receipt receipt = utils.MustWaitForTxReceipt(r.Ctx, r.ZEVMClient, tx, r.Logger, r.ReceiptTimeout) - utils.RequireTxSuccessful(r, receipt) + utils.RequireTxSuccessful(r, receipt, "withdraw") r.Logger.Info("Receipt txhash %s status %d", receipt.TxHash, receipt.Status) // wait for the cctx to be mined diff --git a/x/observer/genesis.go b/x/observer/genesis.go index 46ed737b6f..12a92887c2 100644 --- a/x/observer/genesis.go +++ b/x/observer/genesis.go @@ -26,15 +26,12 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) btcChainParams.IsSupported = true goerliChainParams := types.GetDefaultGoerliLocalnetChainParams() goerliChainParams.IsSupported = true - solanaChainParams := types.GetDefaultSolanaLocalnetChainParams() - solanaChainParams.IsSupported = true zetaPrivnetChainParams := types.GetDefaultZetaPrivnetChainParams() zetaPrivnetChainParams.IsSupported = true k.SetChainParamsList(ctx, types.ChainParamsList{ ChainParams: []*types.ChainParams{ btcChainParams, goerliChainParams, - solanaChainParams, zetaPrivnetChainParams, }, }) diff --git a/x/observer/genesis_test.go b/x/observer/genesis_test.go index 096dc0db43..13f9a54008 100644 --- a/x/observer/genesis_test.go +++ b/x/observer/genesis_test.go @@ -68,15 +68,12 @@ func TestGenesis(t *testing.T) { btcChainParams.IsSupported = true goerliChainParams := types.GetDefaultGoerliLocalnetChainParams() goerliChainParams.IsSupported = true - solanaChainParams := types.GetDefaultSolanaLocalnetChainParams() - solanaChainParams.IsSupported = true zetaPrivnetChainParams := types.GetDefaultZetaPrivnetChainParams() zetaPrivnetChainParams.IsSupported = true localnetChainParams := types.ChainParamsList{ ChainParams: []*types.ChainParams{ btcChainParams, goerliChainParams, - solanaChainParams, zetaPrivnetChainParams, }, } @@ -107,15 +104,12 @@ func TestGenesis(t *testing.T) { btcChainParams.IsSupported = true goerliChainParams := types.GetDefaultGoerliLocalnetChainParams() goerliChainParams.IsSupported = true - solanaChainParams := types.GetDefaultSolanaLocalnetChainParams() - solanaChainParams.IsSupported = true zetaPrivnetChainParams := types.GetDefaultZetaPrivnetChainParams() zetaPrivnetChainParams.IsSupported = true localnetChainParams := types.ChainParamsList{ ChainParams: []*types.ChainParams{ btcChainParams, goerliChainParams, - solanaChainParams, zetaPrivnetChainParams, }, } diff --git a/x/observer/types/chain_params.go b/x/observer/types/chain_params.go index d9d1cc2294..b1a5335e58 100644 --- a/x/observer/types/chain_params.go +++ b/x/observer/types/chain_params.go @@ -11,7 +11,6 @@ import ( "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/constant" - solanacontracts "github.com/zeta-chain/node/pkg/contracts/solana" ) var ( @@ -148,7 +147,6 @@ func GetDefaultChainParams() ChainParamsList { GetDefaultMumbaiTestnetChainParams(), GetDefaultBtcTestnetChainParams(), GetDefaultBtcRegtestChainParams(), - GetDefaultSolanaLocalnetChainParams(), GetDefaultGoerliLocalnetChainParams(), }, } @@ -299,25 +297,6 @@ func GetDefaultBtcRegtestChainParams() *ChainParams { IsSupported: false, } } -func GetDefaultSolanaLocalnetChainParams() *ChainParams { - return &ChainParams{ - ChainId: chains.SolanaLocalnet.ChainId, - ConfirmationCount: 32, - ZetaTokenContractAddress: constant.EVMZeroAddress, - ConnectorContractAddress: constant.EVMZeroAddress, - Erc20CustodyContractAddress: constant.EVMZeroAddress, - GasPriceTicker: 5, - WatchUtxoTicker: 0, - InboundTicker: 2, - OutboundTicker: 2, - OutboundScheduleInterval: 2, - OutboundScheduleLookahead: 5, - BallotThreshold: DefaultBallotThreshold, - MinObserverDelegation: DefaultMinObserverDelegation, - IsSupported: false, - GatewayAddress: solanacontracts.SolanaGatewayProgramID, - } -} func GetDefaultGoerliLocalnetChainParams() *ChainParams { return &ChainParams{ ChainId: chains.GoerliLocalnet.ChainId, diff --git a/zetaclient/context/app_test.go b/zetaclient/context/app_test.go index 7439aebc44..2297a3cdec 100644 --- a/zetaclient/context/app_test.go +++ b/zetaclient/context/app_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/zeta-chain/node/pkg/chains" + "github.com/zeta-chain/node/testutil/sample" "github.com/zeta-chain/node/x/observer/types" "github.com/zeta-chain/node/zetaclient/config" "golang.org/x/exp/maps" @@ -38,8 +39,7 @@ func TestAppContext(t *testing.T) { btcParams := types.GetDefaultBtcMainnetChainParams() btcParams.IsSupported = true - solParams := types.GetDefaultSolanaLocalnetChainParams() - solParams.IsSupported = true + solParams := sample.ChainParamsSupported(chains.SolanaLocalnet.ChainId) fancyL2 := chains.Chain{ ChainId: 123, From cb9f34854b1effa2da165837e94bbe0aff716af9 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Mon, 14 Oct 2024 10:02:48 +0200 Subject: [PATCH 3/7] fix(emissions): add nil checks for reward distributions (#2999) * add nil check in beginBlocker * add nil check in params * variable renaming * fix imports * fix test --- app/app.go | 2 +- testutil/keeper/keeper.go | 2 +- x/emissions/abci.go | 29 ++- x/emissions/abci_test.go | 235 ++++++++++++------ x/emissions/keeper/params_test.go | 6 +- x/emissions/module.go | 2 +- x/emissions/types/keys.go | 4 +- .../types/message_update_params_test.go | 2 +- x/emissions/types/params.go | 22 +- x/emissions/types/params_test.go | 4 +- 10 files changed, 209 insertions(+), 99 deletions(-) diff --git a/app/app.go b/app/app.go index 4fe5595199..897cf305fe 100644 --- a/app/app.go +++ b/app/app.go @@ -224,7 +224,7 @@ var ( fungibletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, emissionstypes.ModuleName: nil, emissionstypes.UndistributedObserverRewardsPool: nil, - emissionstypes.UndistributedTssRewardsPool: nil, + emissionstypes.UndistributedTSSRewardsPool: nil, } // module accounts that are NOT allowed to receive tokens diff --git a/testutil/keeper/keeper.go b/testutil/keeper/keeper.go index 0582c4232f..ed3a107dac 100644 --- a/testutil/keeper/keeper.go +++ b/testutil/keeper/keeper.go @@ -136,7 +136,7 @@ var moduleAccountPerms = map[string][]string{ fungibletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, emissionstypes.ModuleName: {authtypes.Minter}, emissionstypes.UndistributedObserverRewardsPool: nil, - emissionstypes.UndistributedTssRewardsPool: nil, + emissionstypes.UndistributedTSSRewardsPool: nil, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, ibccrosschaintypes.ModuleName: nil, } diff --git a/x/emissions/abci.go b/x/emissions/abci.go index b4b75562ff..c1924ff2e2 100644 --- a/x/emissions/abci.go +++ b/x/emissions/abci.go @@ -15,6 +15,15 @@ import ( func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper) { emissionPoolBalance := keeper.GetReservesFactor(ctx) + // reduce frequency of log messages + logEach10Blocks := func(message string) { + if ctx.BlockHeight()%10 == 0 { + ctx.Logger().Info(message) + } else { + ctx.Logger().Debug(message) + } + } + // Get the block rewards from the params params, found := keeper.GetParams(ctx) if !found { @@ -22,9 +31,17 @@ func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper) { return } blockRewards := params.BlockRewardAmount + + // skip if block rewards are nil or not positive + if blockRewards.IsNil() || !blockRewards.IsPositive() { + logEach10Blocks("Block rewards are nil or not positive") + return + } + if blockRewards.GT(emissionPoolBalance) { - ctx.Logger(). - Info(fmt.Sprintf("Block rewards %s are greater than emission pool balance %s", blockRewards.String(), emissionPoolBalance.String())) + logEach10Blocks(fmt.Sprintf("Block rewards %s are greater than emission pool balance %s", + blockRewards.String(), emissionPoolBalance.String()), + ) return } @@ -44,7 +61,7 @@ func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper) { ctx.Logger().Error(fmt.Sprintf("Error while distributing observer rewards %s", err)) return } - err = DistributeTssRewards(tmpCtx, tssSignerRewards, keeper.GetBankKeeper()) + err = DistributeTSSRewards(tmpCtx, tssSignerRewards, keeper.GetBankKeeper()) if err != nil { ctx.Logger().Error(fmt.Sprintf("Error while distributing tss signer rewards %s", err)) return @@ -166,9 +183,9 @@ func DistributeObserverRewards( return nil } -// DistributeTssRewards trasferes the allocated rewards to the Undistributed Tss Rewards Pool. +// DistributeTSSRewards trasferes the allocated rewards to the Undistributed Tss Rewards Pool. // This is done so that the reserves factor is properly calculated in the next block -func DistributeTssRewards(ctx sdk.Context, amount sdk.Int, bankKeeper types.BankKeeper) error { +func DistributeTSSRewards(ctx sdk.Context, amount sdk.Int, bankKeeper types.BankKeeper) error { coin := sdk.NewCoins(sdk.NewCoin(config.BaseDenom, amount)) - return bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, types.UndistributedTssRewardsPool, coin) + return bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, types.UndistributedTSSRewardsPool, coin) } diff --git a/x/emissions/abci_test.go b/x/emissions/abci_test.go index 26420231fd..681a8b1247 100644 --- a/x/emissions/abci_test.go +++ b/x/emissions/abci_test.go @@ -13,9 +13,10 @@ import ( "github.com/zeta-chain/node/pkg/sdkconfig" keepertest "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" - emissionsModule "github.com/zeta-chain/node/x/emissions" + "github.com/zeta-chain/node/x/emissions" + emissionskeeper "github.com/zeta-chain/node/x/emissions/keeper" emissionstypes "github.com/zeta-chain/node/x/emissions/types" - observerTypes "github.com/zeta-chain/node/x/observer/types" + observertypes "github.com/zeta-chain/node/x/observer/types" ) func TestBeginBlocker(t *testing.T) { @@ -35,14 +36,14 @@ func TestBeginBlocker(t *testing.T) { zk.ObserverKeeper.SetBallot(ctx, &ballot) ballotIdentifiers = append(ballotIdentifiers, ballot.BallotIdentifier) } - zk.ObserverKeeper.SetBallotList(ctx, &observerTypes.BallotListForHeight{ + zk.ObserverKeeper.SetBallotList(ctx, &observertypes.BallotListForHeight{ Height: 0, BallotsIndexList: ballotIdentifiers, }) //Act for i := 0; i < 100; i++ { - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) } @@ -64,12 +65,12 @@ func TestBeginBlocker(t *testing.T) { zk.ObserverKeeper.SetBallot(ctx, &ballot) ballotIdentifiers = append(ballotIdentifiers, ballot.BallotIdentifier) } - zk.ObserverKeeper.SetBallotList(ctx, &observerTypes.BallotListForHeight{ + zk.ObserverKeeper.SetBallotList(ctx, &observertypes.BallotListForHeight{ Height: 0, BallotsIndexList: ballotIdentifiers, }) for i := 0; i < 100; i++ { - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) } for _, observer := range observerSet.ObserverList { @@ -82,7 +83,7 @@ func TestBeginBlocker(t *testing.T) { k, ctx, sk, _ := keepertest.EmissionsKeeper(t) feeCollectorAddress := sk.AuthKeeper.GetModuleAccount(ctx, types.FeeCollectorName).GetAddress() for i := 0; i < 100; i++ { - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) } require.True(t, sk.BankKeeper.GetBalance(ctx, feeCollectorAddress, config.BaseDenom).Amount.IsZero()) @@ -99,13 +100,13 @@ func TestBeginBlocker(t *testing.T) { ) require.NoError(t, err) // Setup module accounts for emission pools except for observer pool , so that the observer distribution fails - _ = sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.UndistributedTssRewardsPool).GetAddress() + _ = sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.UndistributedTSSRewardsPool).GetAddress() feeCollectorAddress := sk.AuthKeeper.GetModuleAccount(ctx, types.FeeCollectorName).GetAddress() _ = sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.ModuleName).GetAddress() for i := 0; i < 100; i++ { // produce a block - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) } require.True(t, sk.BankKeeper.GetBalance(ctx, feeCollectorAddress, config.BaseDenom).Amount.IsZero()) @@ -138,7 +139,7 @@ func TestBeginBlocker(t *testing.T) { bankMock.On("SendCoinsFromModuleToModule", mock.Anything, emissionstypes.ModuleName, k.GetFeeCollector(), mock.Anything). Return(emissionstypes.ErrUnableToWithdrawEmissions).Once() - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) bankMock.AssertNumberOfCalls(t, "SendCoinsFromModuleToModule", 1) }) @@ -165,7 +166,7 @@ func TestBeginBlocker(t *testing.T) { bankMock.On("SendCoinsFromModuleToModule", mock.Anything, emissionstypes.ModuleName, emissionstypes.UndistributedObserverRewardsPool, mock.Anything). Return(emissionstypes.ErrUnableToWithdrawEmissions).Once() - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) bankMock.AssertNumberOfCalls(t, "SendCoinsFromModuleToModule", 2) }) @@ -196,9 +197,9 @@ func TestBeginBlocker(t *testing.T) { // fail third distribution bankMock.On("SendCoinsFromModuleToModule", - mock.Anything, emissionstypes.ModuleName, emissionstypes.UndistributedTssRewardsPool, mock.Anything). + mock.Anything, emissionstypes.ModuleName, emissionstypes.UndistributedTSSRewardsPool, mock.Anything). Return(emissionstypes.ErrUnableToWithdrawEmissions).Once() - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) bankMock.AssertNumberOfCalls(t, "SendCoinsFromModuleToModule", 3) }) @@ -216,7 +217,7 @@ func TestBeginBlocker(t *testing.T) { zk.ObserverKeeper.SetBallot(ctx, &ballot) ballotIdentifiers = append(ballotIdentifiers, ballot.BallotIdentifier) } - zk.ObserverKeeper.SetBallotList(ctx, &observerTypes.BallotListForHeight{ + zk.ObserverKeeper.SetBallotList(ctx, &observertypes.BallotListForHeight{ Height: 0, BallotsIndexList: ballotIdentifiers, }) @@ -232,7 +233,7 @@ func TestBeginBlocker(t *testing.T) { // Setup module accounts for emission pools undistributedObserverPoolAddress := sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.UndistributedObserverRewardsPool). GetAddress() - undistributedTssPoolAddress := sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.UndistributedTssRewardsPool). + undistributedTssPoolAddress := sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.UndistributedTSSRewardsPool). GetAddress() feeCollecterAddress := sk.AuthKeeper.GetModuleAccount(ctx, types.FeeCollectorName).GetAddress() emissionPool := sk.AuthKeeper.GetModuleAccount(ctx, emissionstypes.ModuleName).GetAddress() @@ -251,7 +252,7 @@ func TestBeginBlocker(t *testing.T) { for i := 0; i < numberOfTestBlocks; i++ { emissionPoolBeforeBlockDistribution := sk.BankKeeper.GetBalance(ctx, emissionPool, config.BaseDenom).Amount // produce a block - emissionsModule.BeginBlocker(ctx, *k) + emissions.BeginBlocker(ctx, *k) // require distribution amount emissionPoolBalanceAfterBlockDistribution := sk.BankKeeper.GetBalance( @@ -313,27 +314,29 @@ func TestBeginBlocker(t *testing.T) { func TestDistributeObserverRewards(t *testing.T) { sdkconfig.SetDefault(false) - k, ctx, _, _ := keepertest.EmissionsKeeper(t) observerSet := sample.ObserverSet(4) tt := []struct { - name string - votes [][]observerTypes.VoteType - totalRewardsForBlock sdkmath.Int - expectedRewards map[string]int64 - ballotStatus observerTypes.BallotStatus - slashAmount sdkmath.Int + name string + votes [][]observertypes.VoteType + observerStartingEmissions sdkmath.Int + totalRewardsForBlock sdkmath.Int + expectedRewards map[string]int64 + ballotStatus observertypes.BallotStatus + slashAmount sdkmath.Int + rewardsPerBlock sdkmath.LegacyDec }{ { name: "all observers rewarded correctly", - votes: [][]observerTypes.VoteType{ + votes: [][]observertypes.VoteType{ { - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, }, + observerStartingEmissions: sdkmath.NewInt(100), // total reward units would be 4 as all votes match the ballot status totalRewardsForBlock: sdkmath.NewInt(100), expectedRewards: map[string]int64{ @@ -342,19 +345,21 @@ func TestDistributeObserverRewards(t *testing.T) { observerSet.ObserverList[2]: 125, observerSet.ObserverList[3]: 125, }, - ballotStatus: observerTypes.BallotStatus_BallotFinalized_SuccessObservation, - slashAmount: sdkmath.NewInt(25), + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: emissionstypes.BlockReward, }, { name: "one observer slashed", - votes: [][]observerTypes.VoteType{ + votes: [][]observertypes.VoteType{ { - observerTypes.VoteType_FailureObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_FailureObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, }, + observerStartingEmissions: sdkmath.NewInt(100), // total reward units would be 3 as 3 votes match the ballot status totalRewardsForBlock: sdkmath.NewInt(75), expectedRewards: map[string]int64{ @@ -363,19 +368,21 @@ func TestDistributeObserverRewards(t *testing.T) { observerSet.ObserverList[2]: 125, observerSet.ObserverList[3]: 125, }, - ballotStatus: observerTypes.BallotStatus_BallotFinalized_SuccessObservation, - slashAmount: sdkmath.NewInt(25), + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: emissionstypes.BlockReward, }, { name: "all observer slashed", - votes: [][]observerTypes.VoteType{ + votes: [][]observertypes.VoteType{ { - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, }, + observerStartingEmissions: sdkmath.NewInt(100), // total reward units would be 0 as no votes match the ballot status totalRewardsForBlock: sdkmath.NewInt(100), expectedRewards: map[string]int64{ @@ -384,19 +391,21 @@ func TestDistributeObserverRewards(t *testing.T) { observerSet.ObserverList[2]: 75, observerSet.ObserverList[3]: 75, }, - ballotStatus: observerTypes.BallotStatus_BallotFinalized_FailureObservation, - slashAmount: sdkmath.NewInt(25), + ballotStatus: observertypes.BallotStatus_BallotFinalized_FailureObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: emissionstypes.BlockReward, }, { name: "slashed to zero if slash amount is greater than available emissions", - votes: [][]observerTypes.VoteType{ + votes: [][]observertypes.VoteType{ { - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, }, + observerStartingEmissions: sdkmath.NewInt(100), // total reward units would be 0 as no votes match the ballot status totalRewardsForBlock: sdkmath.NewInt(100), expectedRewards: map[string]int64{ @@ -405,25 +414,27 @@ func TestDistributeObserverRewards(t *testing.T) { observerSet.ObserverList[2]: 0, observerSet.ObserverList[3]: 0, }, - ballotStatus: observerTypes.BallotStatus_BallotFinalized_FailureObservation, - slashAmount: sdkmath.NewInt(2500), + ballotStatus: observertypes.BallotStatus_BallotFinalized_FailureObservation, + slashAmount: sdkmath.NewInt(2500), + rewardsPerBlock: emissionstypes.BlockReward, }, { name: "withdraw able emissions unchanged if rewards and slashes are equal", - votes: [][]observerTypes.VoteType{ + votes: [][]observertypes.VoteType{ { - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, { - observerTypes.VoteType_FailureObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, - observerTypes.VoteType_SuccessObservation, + observertypes.VoteType_FailureObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, }, }, + observerStartingEmissions: sdkmath.NewInt(100), // total reward units would be 7 as 7 votes match the ballot status, including both ballots totalRewardsForBlock: sdkmath.NewInt(70), expectedRewards: map[string]int64{ @@ -432,19 +443,82 @@ func TestDistributeObserverRewards(t *testing.T) { observerSet.ObserverList[2]: 120, observerSet.ObserverList[3]: 120, }, - ballotStatus: observerTypes.BallotStatus_BallotFinalized_SuccessObservation, + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: emissionstypes.BlockReward, + }, + { + name: "no rewards if block reward is nil", + votes: [][]observertypes.VoteType{ + { + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + }, + }, + observerStartingEmissions: sdkmath.NewInt(0), + // total reward units would be 4 as all votes match the ballot status + totalRewardsForBlock: sdkmath.NewInt(0), + expectedRewards: map[string]int64{ + observerSet.ObserverList[0]: 0, + observerSet.ObserverList[1]: 0, + observerSet.ObserverList[2]: 0, + observerSet.ObserverList[3]: 0, + }, + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, slashAmount: sdkmath.NewInt(25), + //rewardsPerBlock: nil, + }, + { + name: "no rewards if block reward is negative", + votes: [][]observertypes.VoteType{ + { + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + }, + }, + observerStartingEmissions: sdkmath.NewInt(0), + // total reward units would be 4 as all votes match the ballot status + totalRewardsForBlock: sdkmath.NewInt(0), + expectedRewards: map[string]int64{ + observerSet.ObserverList[0]: 0, + observerSet.ObserverList[1]: 0, + observerSet.ObserverList[2]: 0, + observerSet.ObserverList[3]: 0, + }, + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: sdk.NewDec(1).NegMut(), + }, + { + name: "no rewards if block reward is zero", + votes: [][]observertypes.VoteType{ + { + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + observertypes.VoteType_SuccessObservation, + }, + }, + observerStartingEmissions: sdkmath.NewInt(0), + // total reward units would be 4 as all votes match the ballot status + totalRewardsForBlock: sdkmath.NewInt(0), + expectedRewards: map[string]int64{ + observerSet.ObserverList[0]: 0, + observerSet.ObserverList[1]: 0, + observerSet.ObserverList[2]: 0, + observerSet.ObserverList[3]: 0, + }, + ballotStatus: observertypes.BallotStatus_BallotFinalized_SuccessObservation, + slashAmount: sdkmath.NewInt(25), + rewardsPerBlock: sdk.ZeroDec(), }, } for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { - for _, observer := range observerSet.ObserverList { - k.SetWithdrawableEmission(ctx, emissionstypes.WithdrawableEmissions{ - Address: observer, - Amount: sdkmath.NewInt(100), - }) - } - // Keeper initialization k, ctx, sk, zk := keepertest.EmissionsKeeper(t) zk.ObserverKeeper.SetObserverSet(ctx, observerSet) @@ -457,24 +531,24 @@ func TestDistributeObserverRewards(t *testing.T) { err := sk.BankKeeper.MintCoins(ctx, emissionstypes.ModuleName, totalRewardCoins) require.NoError(t, err) - // Set starting emission for all observers to 100 so that we can calculate the rewards and slashes + // Set starting emission for all observers to a specified value so that we can calculate the rewards and slashes for _, observer := range observerSet.ObserverList { k.SetWithdrawableEmission(ctx, emissionstypes.WithdrawableEmissions{ Address: observer, - Amount: sdkmath.NewInt(100), + Amount: tc.observerStartingEmissions, }) } // Set the params params := emissionstypes.DefaultParams() params.ObserverSlashAmount = tc.slashAmount - err = k.SetParams(ctx, params) - require.NoError(t, err) + params.BlockRewardAmount = tc.rewardsPerBlock + setEmissionsParams(t, ctx, *k, params) // Set the ballot list ballotIdentifiers := []string{} for i, votes := range tc.votes { - ballot := observerTypes.Ballot{ + ballot := observertypes.Ballot{ BallotIdentifier: "ballot" + string(rune(i)), BallotStatus: tc.ballotStatus, VoterList: observerSet.ObserverList, @@ -483,14 +557,14 @@ func TestDistributeObserverRewards(t *testing.T) { zk.ObserverKeeper.SetBallot(ctx, &ballot) ballotIdentifiers = append(ballotIdentifiers, ballot.BallotIdentifier) } - zk.ObserverKeeper.SetBallotList(ctx, &observerTypes.BallotListForHeight{ + zk.ObserverKeeper.SetBallotList(ctx, &observertypes.BallotListForHeight{ Height: 0, BallotsIndexList: ballotIdentifiers, }) ctx = ctx.WithBlockHeight(100) // Distribute the rewards and check if the rewards are distributed correctly - err = emissionsModule.DistributeObserverRewards(ctx, tc.totalRewardsForBlock, *k, params) + err = emissions.DistributeObserverRewards(ctx, tc.totalRewardsForBlock, *k, params) require.NoError(t, err) for i, observer := range observerSet.ObserverList { @@ -507,3 +581,14 @@ func TestDistributeObserverRewards(t *testing.T) { }) } } + +// setEmissionsParams sets the emissions params in the store without validation +func setEmissionsParams(t *testing.T, ctx sdk.Context, k emissionskeeper.Keeper, params emissionstypes.Params) { + store := ctx.KVStore(k.GetStoreKey()) + bz, err := k.GetCodec().Marshal(¶ms) + if err != nil { + require.NoError(t, err) + } + + store.Set(emissionstypes.KeyPrefix(emissionstypes.ParamsKey), bz) +} diff --git a/x/emissions/keeper/params_test.go b/x/emissions/keeper/params_test.go index 72c752c3ad..41800829fe 100644 --- a/x/emissions/keeper/params_test.go +++ b/x/emissions/keeper/params_test.go @@ -38,7 +38,7 @@ func TestKeeper_GetParams(t *testing.T) { BallotMaturityBlocks: int64(emissionstypes.BallotMaturityBlocks), BlockRewardAmount: emissionstypes.BlockReward, }, - constainsErr: "slash amount cannot be less than 0", + constainsErr: "slash amount must not be negative", }, { name: "validator emission percentage too high", @@ -122,7 +122,7 @@ func TestKeeper_GetParams(t *testing.T) { BallotMaturityBlocks: -100, BlockRewardAmount: emissionstypes.BlockReward, }, - constainsErr: "ballot maturity types must be gte 0", + constainsErr: "ballot maturity types must not be negative", }, { name: "block reward amount too low", @@ -134,7 +134,7 @@ func TestKeeper_GetParams(t *testing.T) { BallotMaturityBlocks: int64(emissionstypes.BallotMaturityBlocks), BlockRewardAmount: sdkmath.LegacyMustNewDecFromStr("-10.00"), }, - constainsErr: "block reward amount cannot be less than 0", + constainsErr: "block reward amount must not be negative", }, } for _, tt := range tests { diff --git a/x/emissions/module.go b/x/emissions/module.go index 08676efb54..b445cf3d44 100644 --- a/x/emissions/module.go +++ b/x/emissions/module.go @@ -150,7 +150,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra InitGenesis(ctx, am.keeper, genState) am.keeper.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - am.keeper.GetAuthKeeper().GetModuleAccount(ctx, types.UndistributedTssRewardsPool) + am.keeper.GetAuthKeeper().GetModuleAccount(ctx, types.UndistributedTSSRewardsPool) am.keeper.GetAuthKeeper().GetModuleAccount(ctx, types.UndistributedObserverRewardsPool) return []abci.ValidatorUpdate{} diff --git a/x/emissions/types/keys.go b/x/emissions/types/keys.go index 0c71be1284..b800b1a529 100644 --- a/x/emissions/types/keys.go +++ b/x/emissions/types/keys.go @@ -10,7 +10,7 @@ const ( // ModuleName defines the module name ModuleName = "emissions" UndistributedObserverRewardsPool = ModuleName + "Observers" - UndistributedTssRewardsPool = ModuleName + "Tss" + UndistributedTSSRewardsPool = ModuleName + "Tss" // StoreKey defines the primary module store key StoreKey = ModuleName @@ -42,7 +42,7 @@ const ( var ( EmissionsModuleAddress = authtypes.NewModuleAddress(ModuleName) UndistributedObserverRewardsPoolAddress = authtypes.NewModuleAddress(UndistributedObserverRewardsPool) - UndistributedTssRewardsPoolAddress = authtypes.NewModuleAddress(UndistributedTssRewardsPool) + UndistributedTssRewardsPoolAddress = authtypes.NewModuleAddress(UndistributedTSSRewardsPool) // BlockReward is an initial block reward amount when emissions module was initialized. // The current value can be obtained from by querying the params BlockReward = sdk.MustNewDecFromStr("9620949074074074074.074070733466756687") diff --git a/x/emissions/types/message_update_params_test.go b/x/emissions/types/message_update_params_test.go index cf02f19000..c5722a19f2 100644 --- a/x/emissions/types/message_update_params_test.go +++ b/x/emissions/types/message_update_params_test.go @@ -29,7 +29,7 @@ func TestMsgUpdateParams_ValidateBasic(t *testing.T) { Params: params, } err := msg.ValidateBasic() - require.ErrorContains(t, err, "block reward amount cannot be less than 0") + require.ErrorContains(t, err, "block reward amount must not be negative") }) t.Run("valid", func(t *testing.T) { diff --git a/x/emissions/types/params.go b/x/emissions/types/params.go index 715c615b9d..582de6ffd4 100644 --- a/x/emissions/types/params.go +++ b/x/emissions/types/params.go @@ -63,7 +63,7 @@ func validateValidatorEmissionPercentage(i interface{}) error { if dec.GT(sdk.OneDec()) { return fmt.Errorf("validator emission percentage cannot be more than 100 percent") } - if dec.LT(sdk.ZeroDec()) { + if dec.IsNegative() { return fmt.Errorf("validator emission percentage cannot be less than 0 percent") } return nil @@ -78,7 +78,7 @@ func validateObserverEmissionPercentage(i interface{}) error { if dec.GT(sdk.OneDec()) { return fmt.Errorf("observer emission percentage cannot be more than 100 percent") } - if dec.LT(sdk.ZeroDec()) { + if dec.IsNegative() { return fmt.Errorf("observer emission percentage cannot be less than 0 percent") } return nil @@ -93,7 +93,7 @@ func validateTssEmissionPercentage(i interface{}) error { if dec.GT(sdk.OneDec()) { return fmt.Errorf("tss emission percentage cannot be more than 100 percent") } - if dec.LT(sdk.ZeroDec()) { + if dec.IsNegative() { return fmt.Errorf("tss emission percentage cannot be less than 0 percent") } return nil @@ -104,8 +104,11 @@ func validateObserverSlashAmount(i interface{}) error { if !ok { return fmt.Errorf("invalid parameter type: %T", i) } - if v.LT(sdk.ZeroInt()) { - return fmt.Errorf("slash amount cannot be less than 0") + if v.IsNil() { + return fmt.Errorf("observer slash amount cannot be nil") + } + if v.IsNegative() { + return fmt.Errorf("slash amount must not be negative") } return nil } @@ -117,7 +120,7 @@ func validateBallotMaturityBlocks(i interface{}) error { } if v < 0 { - return fmt.Errorf("ballot maturity types must be gte 0") + return fmt.Errorf("ballot maturity types must not be negative") } return nil @@ -128,8 +131,11 @@ func validateBlockRewardsAmount(i interface{}) error { if !ok { return fmt.Errorf("invalid parameter type: %T", i) } - if v.LT(sdkmath.LegacyZeroDec()) { - return fmt.Errorf("block reward amount cannot be less than 0") + if v.IsNil() { + return fmt.Errorf("block reward amount cannot be nil") + } + if v.IsNegative() { + return fmt.Errorf("block reward amount must not be negative") } return nil } diff --git a/x/emissions/types/params_test.go b/x/emissions/types/params_test.go index 6a8e90a98b..5facd08f9f 100644 --- a/x/emissions/types/params_test.go +++ b/x/emissions/types/params_test.go @@ -56,6 +56,7 @@ func TestValidateObserverSlashAmount(t *testing.T) { require.Error(t, validateObserverSlashAmount(10)) require.Error(t, validateObserverSlashAmount("10")) require.Error(t, validateObserverSlashAmount(sdkmath.NewInt(-10))) // Less than 0 + require.Error(t, validateObserverSlashAmount(nil)) require.NoError(t, validateObserverSlashAmount(sdkmath.NewInt(10))) } @@ -69,6 +70,7 @@ func TestValidateBlockRewardAmount(t *testing.T) { require.Error(t, validateBlockRewardsAmount("0.50")) require.Error(t, validateBlockRewardsAmount("-0.50")) require.Error(t, validateBlockRewardsAmount(sdkmath.LegacyMustNewDecFromStr("-0.50"))) + require.Error(t, validateBlockRewardsAmount(nil)) require.NoError(t, validateBlockRewardsAmount(sdkmath.LegacyMustNewDecFromStr("0.50"))) require.NoError(t, validateBlockRewardsAmount(sdkmath.LegacyZeroDec())) require.NoError(t, validateBlockRewardsAmount(BlockReward)) @@ -113,7 +115,7 @@ func TestValidate(t *testing.T) { t.Run("should error for negative block reward amount", func(t *testing.T) { params := NewParams() params.BlockRewardAmount = sdkmath.LegacyMustNewDecFromStr("-1.30") - require.ErrorContains(t, params.Validate(), "block reward amount cannot be less than 0") + require.ErrorContains(t, params.Validate(), "block reward amount must not be negative") }) } func TestParamsString(t *testing.T) { From 902554eabe927f54c7d0c92ab0c2c8e8616dc186 Mon Sep 17 00:00:00 2001 From: Francisco de Borja Aranda Castillejo Date: Mon, 14 Oct 2024 14:55:15 +0200 Subject: [PATCH 4/7] refactor(precompile): do not execute write functions on staticcall (#3001) * refactor(staking): do not execute write functions on staticcall * use require --------- Co-authored-by: lumtis --- precompiles/bank/bank.go | 4 +-- precompiles/bank/method_test.go | 8 +++--- precompiles/staking/staking.go | 20 +++++++++++++- precompiles/types/errors.go | 8 ++++++ precompiles/types/errors_test.go | 46 +++++++++++++------------------- 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/precompiles/bank/bank.go b/precompiles/bank/bank.go index 436364dfa6..51a559edd3 100644 --- a/precompiles/bank/bank.go +++ b/precompiles/bank/bank.go @@ -136,8 +136,8 @@ func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, readOnly bool) ([]byt // Deposit and Withdraw methods are both not allowed in read-only mode. case DepositMethodName, WithdrawMethodName: if readOnly { - return nil, ptypes.ErrUnexpected{ - Got: "method not allowed in read-only mode: " + method.Name, + return nil, ptypes.ErrWriteMethod{ + Method: method.Name, } } diff --git a/precompiles/bank/method_test.go b/precompiles/bank/method_test.go index 912c41b40c..107439c576 100644 --- a/precompiles/bank/method_test.go +++ b/precompiles/bank/method_test.go @@ -46,8 +46,8 @@ func Test_Methods(t *testing.T) { success, err := ts.bankContract.Run(ts.mockEVM, ts.mockVMContract, true) require.ErrorIs( t, - ptypes.ErrUnexpected{ - Got: "method not allowed in read-only mode: deposit", + ptypes.ErrWriteMethod{ + Method: "deposit", }, err) require.Empty(t, success) @@ -73,8 +73,8 @@ func Test_Methods(t *testing.T) { success, err := ts.bankContract.Run(ts.mockEVM, ts.mockVMContract, true) require.ErrorIs( t, - ptypes.ErrUnexpected{ - Got: "method not allowed in read-only mode: withdraw", + ptypes.ErrWriteMethod{ + Method: "withdraw", }, err) require.Empty(t, success) diff --git a/precompiles/staking/staking.go b/precompiles/staking/staking.go index 7ef467b039..f3a01a541e 100644 --- a/precompiles/staking/staking.go +++ b/precompiles/staking/staking.go @@ -380,7 +380,7 @@ func (c *Contract) MoveStake( // Run is the entrypoint of the precompiled contract, it switches over the input method, // and execute them accordingly. -func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, _ bool) ([]byte, error) { +func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, readOnly bool) ([]byte, error) { method, err := ABI.MethodById(contract.Input[:4]) if err != nil { return nil, err @@ -415,6 +415,12 @@ func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, _ bool) ([]byte, erro } return res, nil case StakeMethodName: + if readOnly { + return nil, ptypes.ErrWriteMethod{ + Method: method.Name, + } + } + var res []byte execErr := stateDB.ExecuteNativeAction(contract.Address(), nil, func(ctx sdk.Context) error { res, err = c.Stake(ctx, evm, contract, method, args) @@ -425,6 +431,12 @@ func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, _ bool) ([]byte, erro } return res, nil case UnstakeMethodName: + if readOnly { + return nil, ptypes.ErrWriteMethod{ + Method: method.Name, + } + } + var res []byte execErr := stateDB.ExecuteNativeAction(contract.Address(), nil, func(ctx sdk.Context) error { res, err = c.Unstake(ctx, evm, contract, method, args) @@ -435,6 +447,12 @@ func (c *Contract) Run(evm *vm.EVM, contract *vm.Contract, _ bool) ([]byte, erro } return res, nil case MoveStakeMethodName: + if readOnly { + return nil, ptypes.ErrWriteMethod{ + Method: method.Name, + } + } + var res []byte execErr := stateDB.ExecuteNativeAction(contract.Address(), nil, func(ctx sdk.Context) error { res, err = c.MoveStake(ctx, evm, contract, method, args) diff --git a/precompiles/types/errors.go b/precompiles/types/errors.go index 03e397fa14..a624ab27af 100644 --- a/precompiles/types/errors.go +++ b/precompiles/types/errors.go @@ -94,6 +94,14 @@ func (e ErrInvalidMethod) Error() string { return fmt.Sprintf("invalid method: %s", e.Method) } +type ErrWriteMethod struct { + Method string +} + +func (e ErrWriteMethod) Error() string { + return fmt.Sprintf("method not allowed in read-only mode: %s", e.Method) +} + type ErrUnexpected struct { When string Got string diff --git a/precompiles/types/errors_test.go b/precompiles/types/errors_test.go index c80647a08d..d432aa901c 100644 --- a/precompiles/types/errors_test.go +++ b/precompiles/types/errors_test.go @@ -13,9 +13,7 @@ func Test_ErrInvalidAddr(t *testing.T) { } got := e.Error() expect := "invalid address foo, reason: bar" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidAddr{"foo", "bar"}, e) } @@ -26,9 +24,7 @@ func Test_ErrInvalidNumberOfArgs(t *testing.T) { } got := e.Error() expect := "invalid number of arguments; expected 2; got: 1" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidNumberOfArgs{1, 2}, e) } @@ -38,9 +34,7 @@ func Test_ErrInvalidArgument(t *testing.T) { } got := e.Error() expect := "invalid argument: foo" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidArgument{"foo"}, e) } @@ -50,9 +44,7 @@ func Test_ErrInvalidMethod(t *testing.T) { } got := e.Error() expect := "invalid method: foo" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidMethod{"foo"}, e) } @@ -65,9 +57,7 @@ func Test_ErrInvalidCoin(t *testing.T) { } got := e.Error() expect := "invalid coin: denom: foo, is negative: true, is nil: false, is empty: false" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidCoin{"foo", true, false, false}, e) } @@ -77,9 +67,7 @@ func Test_ErrInvalidAmount(t *testing.T) { } got := e.Error() expect := "invalid token amount: foo" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidAmount{"foo"}, e) } @@ -90,9 +78,7 @@ func Test_ErrUnexpected(t *testing.T) { } got := e.Error() expect := "unexpected error in foo: bar" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrUnexpected{"foo", "bar"}, e) } @@ -103,9 +89,7 @@ func Test_ErrInsufficientBalance(t *testing.T) { } got := e.Error() expect := "insufficient balance: requested foo, current bar" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInsufficientBalance{"foo", "bar"}, e) } @@ -116,8 +100,16 @@ func Test_ErrInvalidToken(t *testing.T) { } got := e.Error() expect := "invalid token foo: bar" - if got != expect { - t.Errorf("Expected %v, got %v", expect, got) - } + require.Equal(t, expect, got) require.ErrorIs(t, ErrInvalidToken{"foo", "bar"}, e) } + +func Test_ErrWriteMethod(t *testing.T) { + e := ErrWriteMethod{ + Method: "foo", + } + got := e.Error() + expect := "method not allowed in read-only mode: foo" + require.Equal(t, expect, got) + require.ErrorIs(t, ErrWriteMethod{"foo"}, e) +} From 09e8c3a120c1e1de53e3bbf00d1c028f0a45c99d Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Mon, 14 Oct 2024 11:34:28 -0700 Subject: [PATCH 5/7] fix!: tolerate v2 contracts in tss migration tests (#3002) * fix!: tolerate v2 contracts in tss migration tests * fix upgrade tests --------- Co-authored-by: skosito --- e2e/runner/admin_evm.go | 5 +++-- e2e/utils/require.go | 20 ++++++++++++++++---- go.mod | 2 +- go.sum | 4 ++-- pkg/contracts/testdappv2/TestDAppV2.abi | 4 ++-- pkg/contracts/testdappv2/TestDAppV2.bin | 2 +- pkg/contracts/testdappv2/TestDAppV2.go | 18 +++++++++--------- pkg/contracts/testdappv2/TestDAppV2.json | 6 +++--- pkg/contracts/testdappv2/TestDAppV2.sol | 2 +- x/fungible/keeper/v2_evm.go | 4 ++-- zetaclient/chains/evm/signer/v2_sign.go | 4 ++-- 11 files changed, 42 insertions(+), 29 deletions(-) diff --git a/e2e/runner/admin_evm.go b/e2e/runner/admin_evm.go index a373f2325a..1cd0c29db8 100644 --- a/e2e/runner/admin_evm.go +++ b/e2e/runner/admin_evm.go @@ -26,13 +26,14 @@ func (r *E2ERunner) UpdateTssAddressForConnector() { func (r *E2ERunner) UpdateTssAddressForErc20custody() { require.NoError(r, r.SetTSSAddresses()) - tx, err := r.ERC20Custody.UpdateTSSAddress(r.EVMAuth, r.TSSAddress) + tx, err := r.ERC20CustodyV2.UpdateTSSAddress(r.EVMAuth, r.TSSAddress) require.NoError(r, err) r.Logger.Info(fmt.Sprintf("TSS ERC20 Address Update Tx: %s", tx.Hash().String())) receipt := utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, tx, r.Logger, r.ReceiptTimeout) utils.RequireTxSuccessful(r, receipt) - tssAddressOnCustody, err := r.ERC20Custody.TSSAddress(&bind.CallOpts{Context: r.Ctx}) + // we have to reference ERC20CustodyV2 since it's `TssAddress` on v2 and `TSSAddress` on v1 + tssAddressOnCustody, err := r.ERC20CustodyV2.TssAddress(&bind.CallOpts{Context: r.Ctx}) require.NoError(r, err) require.Equal(r, r.TSSAddress, tssAddressOnCustody) } diff --git a/e2e/utils/require.go b/e2e/utils/require.go index e610219e15..3dedb7dd26 100644 --- a/e2e/utils/require.go +++ b/e2e/utils/require.go @@ -25,15 +25,27 @@ func RequireCCTXStatus( // RequireTxSuccessful checks if the receipt status is successful. // Currently, it accepts eth receipt, but we can make this more generic by using type assertion. func RequireTxSuccessful(t require.TestingT, receipt *ethtypes.Receipt, msgAndArgs ...any) { - msg := "receipt status is not successful" - require.Equal(t, ethtypes.ReceiptStatusSuccessful, receipt.Status, msg+errSuffix(msgAndArgs...)) + msg := "receipt status is not successful: %s" + require.Equal( + t, + ethtypes.ReceiptStatusSuccessful, + receipt.Status, + msg+errSuffix(msgAndArgs...), + receipt.TxHash.String(), + ) } // RequiredTxFailed checks if the receipt status is failed. // Currently, it accepts eth receipt, but we can make this more generic by using type assertion. func RequiredTxFailed(t require.TestingT, receipt *ethtypes.Receipt, msgAndArgs ...any) { - msg := "receipt status is not successful" - require.Equal(t, ethtypes.ReceiptStatusFailed, receipt.Status, msg+errSuffix(msgAndArgs...)) + msg := "receipt status is not successful: %s" + require.Equal( + t, + ethtypes.ReceiptStatusFailed, + receipt.Status, + msg+errSuffix(msgAndArgs...), + receipt.TxHash.String(), + ) } func errSuffix(msgAndArgs ...any) string { diff --git a/go.mod b/go.mod index eb87031b7e..23dae42fae 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/zeta-chain/ethermint v0.0.0-20241010181243-044e22bdb7e7 github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 - github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20240924201108-3a274ce7bad0 + github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef gitlab.com/thorchain/tss/go-tss v1.6.5 go.nhat.io/grpcmock v0.25.0 golang.org/x/crypto v0.23.0 diff --git a/go.sum b/go.sum index 14bfa8eb35..f5be31056c 100644 --- a/go.sum +++ b/go.sum @@ -4208,8 +4208,8 @@ github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f h1:XqUvw9a3EnDa2 github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f/go.mod h1:B1FDE6kHs8hozKSX1/iXgCdvlFbS6+FeAupoBHDK0Cc= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 h1:vck/FcIIpFOvpBUm0NO17jbEtmSz/W/a5Y4jRuSJl6I= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138/go.mod h1:U494OsZTWsU75hqoriZgMdSsgSGP1mUL1jX+wN/Aez8= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20240924201108-3a274ce7bad0 h1:GbfO2dyjSAWqBH0xDIttwPB2fE5A+zw0UUbEoW3S3wU= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20240924201108-3a274ce7bad0/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef h1:tfF31iib7rTeBLGrvWMbW2HM6omkzPDjsX8QM2VY6a4= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901 h1:9whtN5fjYHfk4yXIuAsYP2EHxImwDWDVUOnZJ2pfL3w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901/go.mod h1:d2iTC62s9JwKiCMPhcDDXbIZmuzAyJ4lwso0H5QyRbk= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= diff --git a/pkg/contracts/testdappv2/TestDAppV2.abi b/pkg/contracts/testdappv2/TestDAppV2.abi index cbfdc1bfca..95618cf9db 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.abi +++ b/pkg/contracts/testdappv2/TestDAppV2.abi @@ -215,9 +215,9 @@ "type": "address" }, { - "internalType": "uint64", + "internalType": "uint256", "name": "amount", - "type": "uint64" + "type": "uint256" }, { "internalType": "bytes", diff --git a/pkg/contracts/testdappv2/TestDAppV2.bin b/pkg/contracts/testdappv2/TestDAppV2.bin index 0a7fe69007..1c087ef1b5 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.bin +++ b/pkg/contracts/testdappv2/TestDAppV2.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063a799911f1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063a799911f146101f9578063c234fecf14610215578063c7a339a91461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a777146101385780635ac1e07014610163578063676cc0541461018c5780639291fe26146101bc576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190610e90565b6103ad565b005b6101a660048036038101906101a19190610e30565b6104e7565b6040516101b39190611131565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190610de7565b61069c565b6040516101f09190611173565b60405180910390f35b610213600480360381019061020e9190610de7565b6106df565b005b34801561022157600080fd5b5061023c60048036038101906102379190610ca8565b610708565b005b34801561024a57600080fd5b5061026560048036038101906102609190610d78565b61074b565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6104088180606001906103c0919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61046581806060019061041b919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b8060000160208101906104789190610ca8565b600282806060019061048a919061118e565b60405161049892919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906105339190610ca8565b73ffffffffffffffffffffffffffffffffffffffff1614610589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058090611153565b60405180910390fd5b6105d683838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61062483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906106379190610ca8565b6002848460405161064992919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016106b39190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6106e8816109c0565b156106f257600080fd5b6106fb81610a16565b6107058134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610754816109c0565b1561075e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161079b939291906110df565b602060405180830381600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed9190610cd5565b6107f657600080fd5b6107ff81610a16565b6108098183610a6a565b505050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220e090c5cd81361f8bba5d13d4fb801ab148714dad774e12a4acf812e341dc93c564736f6c63430008070033 +608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063c234fecf1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063c234fecf146101ec578063c7a339a914610215578063c9028a361461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a77714610138578063676cc054146101635780639291fe2614610193578063a799911f146101d0576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b61017d60048036038101906101789190610e30565b6103ad565b60405161018a9190611131565b60405180910390f35b34801561019f57600080fd5b506101ba60048036038101906101b59190610de7565b610562565b6040516101c79190611173565b60405180910390f35b6101ea60048036038101906101e59190610de7565b6105a5565b005b3480156101f857600080fd5b50610213600480360381019061020e9190610ca8565b6105ce565b005b34801561022157600080fd5b5061023c60048036038101906102379190610d78565b610611565b005b34801561024a57600080fd5b5061026560048036038101906102609190610e90565b6106d4565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906103f99190610ca8565b73ffffffffffffffffffffffffffffffffffffffff161461044f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044690611153565b60405180910390fd5b61049c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b6104ea83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906104fd9190610ca8565b6002848460405161050f92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016105799190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105ae816109c0565b156105b857600080fd5b6105c181610a16565b6105cb8134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61061a816109c0565b1561062457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401610661939291906110df565b602060405180830381600087803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b39190610cd5565b6106bc57600080fd5b6106c581610a16565b6106cf8183610a6a565b505050565b61072f8180606001906106e7919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61078c818060600190610742919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b80600001602081019061079f9190610ca8565b60028280606001906107b1919061118e565b6040516107bf92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220da9e50cb7b79ace99166ed06c9234f984bc9599fca79796389af6656411f73f964736f6c63430008070033 diff --git a/pkg/contracts/testdappv2/TestDAppV2.go b/pkg/contracts/testdappv2/TestDAppV2.go index 50e4bbcecb..5c32fe96f8 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.go +++ b/pkg/contracts/testdappv2/TestDAppV2.go @@ -38,7 +38,7 @@ type TestDAppV2MessageContext struct { type TestDAppV2RevertContext struct { Sender common.Address Asset common.Address - Amount uint64 + Amount *big.Int RevertMessage []byte } @@ -51,8 +51,8 @@ type TestDAppV2zContext struct { // TestDAppV2MetaData contains all meta data concerning the TestDAppV2 contract. var TestDAppV2MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"amountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"calledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"erc20Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expectedOnCallSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"gasCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getAmountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getCalledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structTestDAppV2.MessageContext\",\"name\":\"messageContext\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structTestDAppV2.zContext\",\"name\":\"_context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"revertMessage\",\"type\":\"bytes\"}],\"internalType\":\"structTestDAppV2.RevertContext\",\"name\":\"revertContext\",\"type\":\"tuple\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"senderWithMessage\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_expectedOnCallSender\",\"type\":\"address\"}],\"name\":\"setExpectedOnCallSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"simpleCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063a799911f1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063a799911f146101f9578063c234fecf14610215578063c7a339a91461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a777146101385780635ac1e07014610163578063676cc0541461018c5780639291fe26146101bc576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190610e90565b6103ad565b005b6101a660048036038101906101a19190610e30565b6104e7565b6040516101b39190611131565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190610de7565b61069c565b6040516101f09190611173565b60405180910390f35b610213600480360381019061020e9190610de7565b6106df565b005b34801561022157600080fd5b5061023c60048036038101906102379190610ca8565b610708565b005b34801561024a57600080fd5b5061026560048036038101906102609190610d78565b61074b565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6104088180606001906103c0919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61046581806060019061041b919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b8060000160208101906104789190610ca8565b600282806060019061048a919061118e565b60405161049892919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906105339190610ca8565b73ffffffffffffffffffffffffffffffffffffffff1614610589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058090611153565b60405180910390fd5b6105d683838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61062483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906106379190610ca8565b6002848460405161064992919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016106b39190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6106e8816109c0565b156106f257600080fd5b6106fb81610a16565b6107058134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610754816109c0565b1561075e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161079b939291906110df565b602060405180830381600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed9190610cd5565b6107f657600080fd5b6107ff81610a16565b6108098183610a6a565b505050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220e090c5cd81361f8bba5d13d4fb801ab148714dad774e12a4acf812e341dc93c564736f6c63430008070033", + ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"amountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"calledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"erc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"erc20Call\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expectedOnCallSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"gasCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getAmountWithMessage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"getCalledWithMessage\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structTestDAppV2.MessageContext\",\"name\":\"messageContext\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCall\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"origin\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainID\",\"type\":\"uint256\"}],\"internalType\":\"structTestDAppV2.zContext\",\"name\":\"_context\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_zrc20\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"onCrossChainCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"revertMessage\",\"type\":\"bytes\"}],\"internalType\":\"structTestDAppV2.RevertContext\",\"name\":\"revertContext\",\"type\":\"tuple\"}],\"name\":\"onRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"senderWithMessage\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_expectedOnCallSender\",\"type\":\"address\"}],\"name\":\"setExpectedOnCallSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"message\",\"type\":\"string\"}],\"name\":\"simpleCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063c234fecf1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063c234fecf146101ec578063c7a339a914610215578063c9028a361461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a77714610138578063676cc054146101635780639291fe2614610193578063a799911f146101d0576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b61017d60048036038101906101789190610e30565b6103ad565b60405161018a9190611131565b60405180910390f35b34801561019f57600080fd5b506101ba60048036038101906101b59190610de7565b610562565b6040516101c79190611173565b60405180910390f35b6101ea60048036038101906101e59190610de7565b6105a5565b005b3480156101f857600080fd5b50610213600480360381019061020e9190610ca8565b6105ce565b005b34801561022157600080fd5b5061023c60048036038101906102379190610d78565b610611565b005b34801561024a57600080fd5b5061026560048036038101906102609190610e90565b6106d4565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906103f99190610ca8565b73ffffffffffffffffffffffffffffffffffffffff161461044f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044690611153565b60405180910390fd5b61049c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b6104ea83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906104fd9190610ca8565b6002848460405161050f92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016105799190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105ae816109c0565b156105b857600080fd5b6105c181610a16565b6105cb8134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61061a816109c0565b1561062457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401610661939291906110df565b602060405180830381600087803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b39190610cd5565b6106bc57600080fd5b6106c581610a16565b6106cf8183610a6a565b505050565b61072f8180606001906106e7919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61078c818060600190610742919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b80600001602081019061079f9190610ca8565b60028280606001906107b1919061118e565b6040516107bf92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220da9e50cb7b79ace99166ed06c9234f984bc9599fca79796389af6656411f73f964736f6c63430008070033", } // TestDAppV2ABI is the input ABI used to generate the binding from. @@ -492,23 +492,23 @@ func (_TestDAppV2 *TestDAppV2TransactorSession) OnCrossChainCall(_context TestDA return _TestDAppV2.Contract.OnCrossChainCall(&_TestDAppV2.TransactOpts, _context, _zrc20, amount, message) } -// OnRevert is a paid mutator transaction binding the contract method 0x5ac1e070. +// OnRevert is a paid mutator transaction binding the contract method 0xc9028a36. // -// Solidity: function onRevert((address,address,uint64,bytes) revertContext) returns() +// Solidity: function onRevert((address,address,uint256,bytes) revertContext) returns() func (_TestDAppV2 *TestDAppV2Transactor) OnRevert(opts *bind.TransactOpts, revertContext TestDAppV2RevertContext) (*types.Transaction, error) { return _TestDAppV2.contract.Transact(opts, "onRevert", revertContext) } -// OnRevert is a paid mutator transaction binding the contract method 0x5ac1e070. +// OnRevert is a paid mutator transaction binding the contract method 0xc9028a36. // -// Solidity: function onRevert((address,address,uint64,bytes) revertContext) returns() +// Solidity: function onRevert((address,address,uint256,bytes) revertContext) returns() func (_TestDAppV2 *TestDAppV2Session) OnRevert(revertContext TestDAppV2RevertContext) (*types.Transaction, error) { return _TestDAppV2.Contract.OnRevert(&_TestDAppV2.TransactOpts, revertContext) } -// OnRevert is a paid mutator transaction binding the contract method 0x5ac1e070. +// OnRevert is a paid mutator transaction binding the contract method 0xc9028a36. // -// Solidity: function onRevert((address,address,uint64,bytes) revertContext) returns() +// Solidity: function onRevert((address,address,uint256,bytes) revertContext) returns() func (_TestDAppV2 *TestDAppV2TransactorSession) OnRevert(revertContext TestDAppV2RevertContext) (*types.Transaction, error) { return _TestDAppV2.Contract.OnRevert(&_TestDAppV2.TransactOpts, revertContext) } diff --git a/pkg/contracts/testdappv2/TestDAppV2.json b/pkg/contracts/testdappv2/TestDAppV2.json index 3117879927..632521fa63 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.json +++ b/pkg/contracts/testdappv2/TestDAppV2.json @@ -216,9 +216,9 @@ "type": "address" }, { - "internalType": "uint64", + "internalType": "uint256", "name": "amount", - "type": "uint64" + "type": "uint256" }, { "internalType": "bytes", @@ -286,5 +286,5 @@ "type": "receive" } ], - "bin": "608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063a799911f1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063a799911f146101f9578063c234fecf14610215578063c7a339a91461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a777146101385780635ac1e07014610163578063676cc0541461018c5780639291fe26146101bc576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b34801561016f57600080fd5b5061018a60048036038101906101859190610e90565b6103ad565b005b6101a660048036038101906101a19190610e30565b6104e7565b6040516101b39190611131565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190610de7565b61069c565b6040516101f09190611173565b60405180910390f35b610213600480360381019061020e9190610de7565b6106df565b005b34801561022157600080fd5b5061023c60048036038101906102379190610ca8565b610708565b005b34801561024a57600080fd5b5061026560048036038101906102609190610d78565b61074b565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6104088180606001906103c0919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61046581806060019061041b919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b8060000160208101906104789190610ca8565b600282806060019061048a919061118e565b60405161049892919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906105339190610ca8565b73ffffffffffffffffffffffffffffffffffffffff1614610589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058090611153565b60405180910390fd5b6105d683838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61062483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906106379190610ca8565b6002848460405161064992919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016106b39190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6106e8816109c0565b156106f257600080fd5b6106fb81610a16565b6107058134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610754816109c0565b1561075e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161079b939291906110df565b602060405180830381600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed9190610cd5565b6107f657600080fd5b6107ff81610a16565b6108098183610a6a565b505050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220e090c5cd81361f8bba5d13d4fb801ab148714dad774e12a4acf812e341dc93c564736f6c63430008070033" + "bin": "608060405234801561001057600080fd5b5061150a806100206000396000f3fe6080604052600436106100c65760003560e01c8063c234fecf1161007f578063de43156e11610059578063de43156e14610267578063e2842ed714610290578063f592cbfb146102cd578063f936ae851461030a576100cd565b8063c234fecf146101ec578063c7a339a914610215578063c9028a361461023e576100cd565b806336e980a0146100d25780634297a263146100fb57806359f4a77714610138578063676cc054146101635780639291fe2614610193578063a799911f146101d0576100cd565b366100cd57005b600080fd5b3480156100de57600080fd5b506100f960048036038101906100f49190610de7565b610347565b005b34801561010757600080fd5b50610122600480360381019061011d9190610d02565b610371565b60405161012f9190611173565b60405180910390f35b34801561014457600080fd5b5061014d610389565b60405161015a91906110c4565b60405180910390f35b61017d60048036038101906101789190610e30565b6103ad565b60405161018a9190611131565b60405180910390f35b34801561019f57600080fd5b506101ba60048036038101906101b59190610de7565b610562565b6040516101c79190611173565b60405180910390f35b6101ea60048036038101906101e59190610de7565b6105a5565b005b3480156101f857600080fd5b50610213600480360381019061020e9190610ca8565b6105ce565b005b34801561022157600080fd5b5061023c60048036038101906102379190610d78565b610611565b005b34801561024a57600080fd5b5061026560048036038101906102609190610e90565b6106d4565b005b34801561027357600080fd5b5061028e60048036038101906102899190610ed9565b61080e565b005b34801561029c57600080fd5b506102b760048036038101906102b29190610d02565b610907565b6040516102c49190611116565b60405180910390f35b3480156102d957600080fd5b506102f460048036038101906102ef9190610de7565b610927565b6040516103019190611116565b60405180910390f35b34801561031657600080fd5b50610331600480360381019061032c9190610d2f565b610977565b60405161033e91906110c4565b60405180910390f35b610350816109c0565b1561035a57600080fd5b61036381610a16565b61036e816000610a6a565b50565b60036020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168460000160208101906103f99190610ca8565b73ffffffffffffffffffffffffffffffffffffffff161461044f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044690611153565b60405180910390fd5b61049c83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b6104ea83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505034610a6a565b8360000160208101906104fd9190610ca8565b6002848460405161050f92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509392505050565b600060036000836040516020016105799190611098565b604051602081830303815290604052805190602001208152602001908152602001600020549050919050565b6105ae816109c0565b156105b857600080fd5b6105c181610a16565b6105cb8134610a6a565b50565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61061a816109c0565b1561062457600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401610661939291906110df565b602060405180830381600087803b15801561067b57600080fd5b505af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b39190610cd5565b6106bc57600080fd5b6106c581610a16565b6106cf8183610a6a565b505050565b61072f8180606001906106e7919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61078c818060600190610742919061118e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506000610a6a565b80600001602081019061079f9190610ca8565b60028280606001906107b1919061118e565b6040516107bf92919061107f565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61085b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506109c0565b1561086557600080fd5b6108b282828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610a16565b61090082828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a6a565b5050505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000600160008360405160200161093e9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a900460ff169050919050565b6002818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040516020016109d1906110af565b60405160208183030381529060405280519060200120826040516020016109f89190611098565b60405160208183030381529060405280519060200120149050919050565b600180600083604051602001610a2c9190611098565b60405160208183030381529060405280519060200120815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b806003600084604051602001610a809190611098565b604051602081830303815290604052805190602001208152602001908152602001600020819055505050565b6000610abf610aba84611216565b6111f1565b905082815260208101848484011115610adb57610ada6113ef565b5b610ae684828561132a565b509392505050565b6000610b01610afc84611247565b6111f1565b905082815260208101848484011115610b1d57610b1c6113ef565b5b610b2884828561132a565b509392505050565b600081359050610b3f81611461565b92915050565b600081519050610b5481611478565b92915050565b600081359050610b698161148f565b92915050565b60008083601f840112610b8557610b846113d1565b5b8235905067ffffffffffffffff811115610ba257610ba16113cc565b5b602083019150836001820283011115610bbe57610bbd6113e5565b5b9250929050565b600082601f830112610bda57610bd96113d1565b5b8135610bea848260208601610aac565b91505092915050565b600081359050610c02816114a6565b92915050565b600082601f830112610c1d57610c1c6113d1565b5b8135610c2d848260208601610aee565b91505092915050565b600060208284031215610c4c57610c4b6113db565b5b81905092915050565b600060808284031215610c6b57610c6a6113db565b5b81905092915050565b600060608284031215610c8a57610c896113db565b5b81905092915050565b600081359050610ca2816114bd565b92915050565b600060208284031215610cbe57610cbd6113f9565b5b6000610ccc84828501610b30565b91505092915050565b600060208284031215610ceb57610cea6113f9565b5b6000610cf984828501610b45565b91505092915050565b600060208284031215610d1857610d176113f9565b5b6000610d2684828501610b5a565b91505092915050565b600060208284031215610d4557610d446113f9565b5b600082013567ffffffffffffffff811115610d6357610d626113f4565b5b610d6f84828501610bc5565b91505092915050565b600080600060608486031215610d9157610d906113f9565b5b6000610d9f86828701610bf3565b9350506020610db086828701610c93565b925050604084013567ffffffffffffffff811115610dd157610dd06113f4565b5b610ddd86828701610c08565b9150509250925092565b600060208284031215610dfd57610dfc6113f9565b5b600082013567ffffffffffffffff811115610e1b57610e1a6113f4565b5b610e2784828501610c08565b91505092915050565b600080600060408486031215610e4957610e486113f9565b5b6000610e5786828701610c36565b935050602084013567ffffffffffffffff811115610e7857610e776113f4565b5b610e8486828701610b6f565b92509250509250925092565b600060208284031215610ea657610ea56113f9565b5b600082013567ffffffffffffffff811115610ec457610ec36113f4565b5b610ed084828501610c55565b91505092915050565b600080600080600060808688031215610ef557610ef46113f9565b5b600086013567ffffffffffffffff811115610f1357610f126113f4565b5b610f1f88828901610c74565b9550506020610f3088828901610b30565b9450506040610f4188828901610c93565b935050606086013567ffffffffffffffff811115610f6257610f616113f4565b5b610f6e88828901610b6f565b92509250509295509295909350565b610f86816112c6565b82525050565b610f95816112d8565b82525050565b6000610fa7838561129f565b9350610fb483858461132a565b82840190509392505050565b6000610fcb82611278565b610fd5818561128e565b9350610fe5818560208601611339565b610fee816113fe565b840191505092915050565b600061100482611283565b61100e81856112bb565b935061101e818560208601611339565b80840191505092915050565b60006110376016836112aa565b91506110428261140f565b602082019050919050565b600061105a6006836112bb565b915061106582611438565b600682019050919050565b61107981611320565b82525050565b600061108c828486610f9b565b91508190509392505050565b60006110a48284610ff9565b915081905092915050565b60006110ba8261104d565b9150819050919050565b60006020820190506110d96000830184610f7d565b92915050565b60006060820190506110f46000830186610f7d565b6111016020830185610f7d565b61110e6040830184611070565b949350505050565b600060208201905061112b6000830184610f8c565b92915050565b6000602082019050818103600083015261114b8184610fc0565b905092915050565b6000602082019050818103600083015261116c8161102a565b9050919050565b60006020820190506111886000830184611070565b92915050565b600080833560016020038436030381126111ab576111aa6113e0565b5b80840192508235915067ffffffffffffffff8211156111cd576111cc6113d6565b5b6020830192506001820236038313156111e9576111e86113ea565b5b509250929050565b60006111fb61120c565b9050611207828261136c565b919050565b6000604051905090565b600067ffffffffffffffff8211156112315761123061139d565b5b61123a826113fe565b9050602081019050919050565b600067ffffffffffffffff8211156112625761126161139d565b5b61126b826113fe565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006112d182611300565b9050919050565b60008115159050919050565b6000819050919050565b60006112f9826112c6565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561135757808201518184015260208101905061133c565b83811115611366576000848401525b50505050565b611375826113fe565b810181811067ffffffffffffffff821117156113945761139361139d565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f756e61757468656e746963617465642073656e64657200000000000000000000600082015250565b7f7265766572740000000000000000000000000000000000000000000000000000600082015250565b61146a816112c6565b811461147557600080fd5b50565b611481816112d8565b811461148c57600080fd5b50565b611498816112e4565b81146114a357600080fd5b50565b6114af816112ee565b81146114ba57600080fd5b50565b6114c681611320565b81146114d157600080fd5b5056fea2646970667358221220da9e50cb7b79ace99166ed06c9234f984bc9599fca79796389af6656411f73f964736f6c63430008070033" } diff --git a/pkg/contracts/testdappv2/TestDAppV2.sol b/pkg/contracts/testdappv2/TestDAppV2.sol index 5f301a08cf..7919d13b5d 100644 --- a/pkg/contracts/testdappv2/TestDAppV2.sol +++ b/pkg/contracts/testdappv2/TestDAppV2.sol @@ -20,7 +20,7 @@ contract TestDAppV2 { struct RevertContext { address sender; address asset; - uint64 amount; + uint256 amount; bytes revertMessage; } diff --git a/x/fungible/keeper/v2_evm.go b/x/fungible/keeper/v2_evm.go index 4f76606151..b2b76dc428 100644 --- a/x/fungible/keeper/v2_evm.go +++ b/x/fungible/keeper/v2_evm.go @@ -187,7 +187,7 @@ func (k Keeper) CallExecuteRevert( revert.RevertContext{ Sender: common.HexToAddress(inboundSender), Asset: zrc20, - Amount: amount.Uint64(), + Amount: amount, RevertMessage: message, }, ) @@ -241,7 +241,7 @@ func (k Keeper) CallDepositAndRevert( revert.RevertContext{ Sender: common.HexToAddress(inboundSender), Asset: zrc20, - Amount: amount.Uint64(), + Amount: amount, RevertMessage: message, }, ) diff --git a/zetaclient/chains/evm/signer/v2_sign.go b/zetaclient/chains/evm/signer/v2_sign.go index 510c0e2a4d..3a00a86c48 100644 --- a/zetaclient/chains/evm/signer/v2_sign.go +++ b/zetaclient/chains/evm/signer/v2_sign.go @@ -81,7 +81,7 @@ func (signer *Signer) signGatewayExecuteRevert( revert.RevertContext{ Sender: common.HexToAddress(inboundSender), Asset: txData.asset, - Amount: txData.amount.Uint64(), + Amount: txData.amount, RevertMessage: txData.revertOptions.RevertMessage, }, ) @@ -201,7 +201,7 @@ func (signer *Signer) signERC20CustodyWithdrawRevert( revert.RevertContext{ Sender: common.HexToAddress(inboundSender), Asset: txData.asset, - Amount: txData.amount.Uint64(), + Amount: txData.amount, RevertMessage: txData.revertOptions.RevertMessage, }, ) From 2146e4f1a2e007d788dfae018af15e52d8e658ee Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 15 Oct 2024 16:41:36 +0100 Subject: [PATCH 6/7] fix: fix admin e2e tests and bump protocol contracts (#3006) * bump protocol contracts * fix build and e2e tests * upgrade custody in upgrade tests * PR comments * fmt --- cmd/zetae2e/local/local.go | 12 +++--- .../localnet/orchestrator/start-zetae2e.sh | 4 +- e2e/runner/v2_setup_evm.go | 41 +++++++++++++------ e2e/runner/{v2_gateway.go => v2_upgrade.go} | 27 ++++++++++-- go.mod | 2 +- go.sum | 4 +- 6 files changed, 63 insertions(+), 27 deletions(-) rename e2e/runner/{v2_gateway.go => v2_upgrade.go} (62%) diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 588a74e367..2d404ba391 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -46,7 +46,7 @@ const ( flagTestV2Migration = "test-v2-migration" flagSkipTrackerCheck = "skip-tracker-check" flagSkipPrecompiles = "skip-precompiles" - flagUpgradeGateways = "upgrade-gateways" + flagUpgradeContracts = "upgrade-contracts" ) var ( @@ -84,7 +84,8 @@ func NewLocalCmd() *cobra.Command { cmd.Flags().Bool(flagTestV2Migration, false, "set to true to run tests for v2 contracts migration test") cmd.Flags().Bool(flagSkipTrackerCheck, false, "set to true to skip tracker check at the end of the tests") cmd.Flags().Bool(flagSkipPrecompiles, false, "set to true to skip stateful precompiled contracts test") - cmd.Flags().Bool(flagUpgradeGateways, false, "set to true to upgrade gateways during setup for ZEVM and EVM") + cmd.Flags(). + Bool(flagUpgradeContracts, false, "set to true to upgrade Gateways and ERC20Custody contracts during setup for ZEVM and EVM") return cmd } @@ -114,7 +115,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) { testV2 = must(cmd.Flags().GetBool(flagTestV2)) testV2Migration = must(cmd.Flags().GetBool(flagTestV2Migration)) skipPrecompiles = must(cmd.Flags().GetBool(flagSkipPrecompiles)) - upgradeGateways = must(cmd.Flags().GetBool(flagUpgradeGateways)) + upgradeContracts = must(cmd.Flags().GetBool(flagUpgradeContracts)) ) logger := runner.NewLogger(verbose, color.FgWhite, "setup") @@ -413,9 +414,8 @@ func localE2ETest(cmd *cobra.Command, _ []string) { eg.Go(tonTestRoutine(conf, deployerRunner, verbose, tonTests...)) } - // upgrade gateways - if upgradeGateways { - deployerRunner.UpgradeGateways() + if upgradeContracts { + deployerRunner.UpgradeGatewaysAndERC20Custody() } if testV2 || testV2Migration { diff --git a/contrib/localnet/orchestrator/start-zetae2e.sh b/contrib/localnet/orchestrator/start-zetae2e.sh index e7374216f3..33f0d4e956 100644 --- a/contrib/localnet/orchestrator/start-zetae2e.sh +++ b/contrib/localnet/orchestrator/start-zetae2e.sh @@ -258,9 +258,9 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then # When the upgrade height is greater than 100 for upgrade test, the Bitcoin tests have been run once, therefore the Bitcoin wallet is already set up # Use light flag to skip advanced tests if [ "$UPGRADE_HEIGHT" -lt 100 ]; then - zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light --test-v2 --upgrade-gateways ${COMMON_ARGS} + zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --light --test-v2 --upgrade-contracts ${COMMON_ARGS} else - zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light --test-v2 --upgrade-gateways ${COMMON_ARGS} + zetae2e local $E2E_ARGS --skip-setup --config "$deployed_config_path" --skip-bitcoin-setup --light --test-v2 --upgrade-contracts ${COMMON_ARGS} fi ZETAE2E_EXIT_CODE=$? diff --git a/e2e/runner/v2_setup_evm.go b/e2e/runner/v2_setup_evm.go index 37f6423f29..5b8e686d9b 100644 --- a/e2e/runner/v2_setup_evm.go +++ b/e2e/runner/v2_setup_evm.go @@ -48,8 +48,8 @@ func (r *E2ERunner) SetupEVMV2() { initializerData, err := gatewayEVMABI.Pack("initialize", r.TSSAddress, r.ZetaEthAddr, r.Account.EVMAddress()) require.NoError(r, err) - // Deploy the proxy contract - proxyAddress, txProxy, _, err := erc1967proxy.DeployERC1967Proxy( + // Deploy gateway proxy contract + gatewayProxyAddress, gatewayProxyTx, _, err := erc1967proxy.DeployERC1967Proxy( r.EVMAuth, r.EVMClient, gatewayEVMAddr, @@ -57,33 +57,47 @@ func (r *E2ERunner) SetupEVMV2() { ) require.NoError(r, err) - r.GatewayEVMAddr = proxyAddress - r.GatewayEVM, err = gatewayevm.NewGatewayEVM(proxyAddress, r.EVMClient) + r.GatewayEVMAddr = gatewayProxyAddress + r.GatewayEVM, err = gatewayevm.NewGatewayEVM(gatewayProxyAddress, r.EVMClient) require.NoError(r, err) r.Logger.Info("Gateway EVM contract address: %s, tx hash: %s", gatewayEVMAddr.Hex(), txGateway.Hash().Hex()) + // Deploy erc20custody proxy contract r.Logger.Info("Deploying ERC20Custody contract") - erc20CustodyNewAddr, txCustody, erc20CustodyNew, err := erc20custodyv2.DeployERC20Custody( + erc20CustodyAddr, txCustody, _, err := erc20custodyv2.DeployERC20Custody(r.EVMAuth, r.EVMClient) + require.NoError(r, err) + + ensureTxReceipt(txCustody, "ERC20Custody deployment failed") + + erc20CustodyABI, err := erc20custodyv2.ERC20CustodyMetaData.GetAbi() + require.NoError(r, err) + + // Encode the initializer data + initializerData, err = erc20CustodyABI.Pack("initialize", r.GatewayEVMAddr, r.TSSAddress, r.Account.EVMAddress()) + require.NoError(r, err) + + // Deploy erc20custody proxy contract + erc20CustodyProxyAddress, erc20ProxyTx, _, err := erc1967proxy.DeployERC1967Proxy( r.EVMAuth, r.EVMClient, - r.GatewayEVMAddr, - r.TSSAddress, - r.Account.EVMAddress(), + erc20CustodyAddr, + initializerData, ) require.NoError(r, err) - r.ERC20CustodyV2Addr = erc20CustodyNewAddr - r.ERC20CustodyV2 = erc20CustodyNew + r.ERC20CustodyV2Addr = erc20CustodyProxyAddress + r.ERC20CustodyV2, err = erc20custodyv2.NewERC20Custody(erc20CustodyProxyAddress, r.EVMClient) + require.NoError(r, err) r.Logger.Info( "ERC20CustodyV2 contract address: %s, tx hash: %s", - erc20CustodyNewAddr.Hex(), + erc20CustodyAddr.Hex(), txCustody.Hash().Hex(), ) ensureTxReceipt(txCustody, "ERC20CustodyV2 deployment failed") // set custody contract in gateway - txSetCustody, err := r.GatewayEVM.SetCustody(r.EVMAuth, erc20CustodyNewAddr) + txSetCustody, err := r.GatewayEVM.SetCustody(r.EVMAuth, erc20CustodyProxyAddress) require.NoError(r, err) // deploy test dapp v2 @@ -96,7 +110,8 @@ func (r *E2ERunner) SetupEVMV2() { // check contract deployment receipt ensureTxReceipt(txDonation, "EVM donation tx failed") - ensureTxReceipt(txProxy, "Gateway proxy deployment failed") + ensureTxReceipt(gatewayProxyTx, "Gateway proxy deployment failed") + ensureTxReceipt(erc20ProxyTx, "ERC20Custody proxy deployment failed") ensureTxReceipt(txSetCustody, "Set custody in Gateway failed") ensureTxReceipt(txTestDAppV2, "TestDAppV2 deployment failed") diff --git a/e2e/runner/v2_gateway.go b/e2e/runner/v2_upgrade.go similarity index 62% rename from e2e/runner/v2_gateway.go rename to e2e/runner/v2_upgrade.go index 2bede9e3fe..eb5af7f860 100644 --- a/e2e/runner/v2_gateway.go +++ b/e2e/runner/v2_upgrade.go @@ -3,17 +3,19 @@ package runner import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/v2/pkg/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayevm.sol" "github.com/zeta-chain/protocol-contracts/v2/pkg/gatewayzevm.sol" "github.com/zeta-chain/node/e2e/utils" ) -// UpgradeGateways upgrades the GatewayEVM and GatewayZEVM contracts -// It deploy new gateway contract implementation with the current imported artifacts and upgrade the gateway contract -func (r *E2ERunner) UpgradeGateways() { +// UpgradeGatewaysAndERC20Custody upgrades gateways and ERC20Custody contracts +// It deploys new contract implementation with the current imported artifacts and upgrades the contract +func (r *E2ERunner) UpgradeGatewaysAndERC20Custody() { r.UpgradeGatewayZEVM() r.UpgradeGatewayEVM() + r.UpgradeERC20Custody() } // UpgradeGatewayZEVM upgrades the GatewayZEVM contract @@ -53,3 +55,22 @@ func (r *E2ERunner) UpgradeGatewayEVM() { require.NoError(r, err) ensureTxReceipt(txUpgrade, "GatewayEVM upgrade failed") } + +// UpgradeERC20CustodyZEVM upgrades the ERC20Custody contract +func (r *E2ERunner) UpgradeERC20Custody() { + ensureTxReceipt := func(tx *ethtypes.Transaction, failMessage string) { + receipt := utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, tx, r.Logger, r.ReceiptTimeout) + r.requireTxSuccessful(receipt, failMessage+" tx hash: "+tx.Hash().Hex()) + } + + r.Logger.Info("Upgrading ERC20Custody contract") + // Deploy the new erc20Custody contract implementation + newImplementationAddress, txDeploy, _, err := erc20custody.DeployERC20Custody(r.EVMAuth, r.EVMClient) + require.NoError(r, err) + ensureTxReceipt(txDeploy, "New ERC20Custody implementation deployment failed") + + // Upgrade + txUpgrade, err := r.ERC20CustodyV2.UpgradeToAndCall(r.EVMAuth, newImplementationAddress, []byte{}) + require.NoError(r, err) + ensureTxReceipt(txUpgrade, "ERC20Custody upgrade failed") +} diff --git a/go.mod b/go.mod index 23dae42fae..cb746a49bf 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/zeta-chain/ethermint v0.0.0-20241010181243-044e22bdb7e7 github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 - github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef + github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241014093550-f7f6d9fd971a gitlab.com/thorchain/tss/go-tss v1.6.5 go.nhat.io/grpcmock v0.25.0 golang.org/x/crypto v0.23.0 diff --git a/go.sum b/go.sum index f5be31056c..8842365a96 100644 --- a/go.sum +++ b/go.sum @@ -4208,8 +4208,8 @@ github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f h1:XqUvw9a3EnDa2 github.com/zeta-chain/go-tss v0.0.0-20240916173049-89fee4b0ae7f/go.mod h1:B1FDE6kHs8hozKSX1/iXgCdvlFbS6+FeAupoBHDK0Cc= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138 h1:vck/FcIIpFOvpBUm0NO17jbEtmSz/W/a5Y4jRuSJl6I= github.com/zeta-chain/keystone/keys v0.0.0-20240826165841-3874f358c138/go.mod h1:U494OsZTWsU75hqoriZgMdSsgSGP1mUL1jX+wN/Aez8= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef h1:tfF31iib7rTeBLGrvWMbW2HM6omkzPDjsX8QM2VY6a4= -github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241009160411-475acfac26ef/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241014093550-f7f6d9fd971a h1:xsup+oupCrBtZT/jEaBGcL3k6KUlXWR7iXw/3RHBIpU= +github.com/zeta-chain/protocol-contracts v1.0.2-athens3.0.20241014093550-f7f6d9fd971a/go.mod h1:SjT7QirtJE8stnAe1SlNOanxtfSfijJm3MGJ+Ax7w7w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901 h1:9whtN5fjYHfk4yXIuAsYP2EHxImwDWDVUOnZJ2pfL3w= github.com/zeta-chain/tss-lib v0.0.0-20240916163010-2e6b438bd901/go.mod h1:d2iTC62s9JwKiCMPhcDDXbIZmuzAyJ4lwso0H5QyRbk= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= From ae6ab23ac732a5b0cfd92e4637f8ceb0441bfc1e Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Tue, 15 Oct 2024 19:41:00 +0200 Subject: [PATCH 7/7] fix: add legacy messages back to codec (#2909) * add supply field back * legacy messages * add to codec * add message definition * changelog * add MsgGasPriceVoter * add new message to codec * comments --- changelog.md | 1 + docs/spec/crosschain/messages.md | 1 + .../zetacore/crosschain/legacy_msgs.proto | 102 + proto/zetachain/zetacore/crosschain/tx.proto | 2 +- .../zetachain/zetacore/crosschain/index.d.ts | 1 + .../zetacore/crosschain/legacy_msgs_pb.d.ts | 389 +++ .../zetachain/zetacore/crosschain/tx_pb.d.ts | 6 + x/crosschain/types/codec.go | 16 + x/crosschain/types/legacy_msgs.go | 181 + x/crosschain/types/legacy_msgs.pb.go | 3002 +++++++++++++++++ x/crosschain/types/tx.pb.go | 281 +- 11 files changed, 3867 insertions(+), 115 deletions(-) create mode 100644 proto/zetachain/zetacore/crosschain/legacy_msgs.proto create mode 100644 typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.d.ts create mode 100644 x/crosschain/types/legacy_msgs.go create mode 100644 x/crosschain/types/legacy_msgs.pb.go diff --git a/changelog.md b/changelog.md index e25f46e129..8bfbae13f7 100644 --- a/changelog.md +++ b/changelog.md @@ -50,6 +50,7 @@ * [2842](https://github.com/zeta-chain/node/pull/2842) - fix: move interval assignment out of cctx loop in EVM outbound tx scheduler * [2853](https://github.com/zeta-chain/node/pull/2853) - calling precompile through sc with sc state update * [2925](https://github.com/zeta-chain/node/pull/2925) - add recover to init chainer to diplay informative message when starting a node from block 1 +* [2909](https://github.com/zeta-chain/node/pull/2909) - add legacy messages back to codec for querier backward compatibility ## v20.0.0 diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index c369443d27..b12149de9e 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -63,6 +63,7 @@ message MsgVoteGasPrice { uint64 price = 3; uint64 priority_fee = 6; uint64 block_number = 4; + string supply = 5; } ``` diff --git a/proto/zetachain/zetacore/crosschain/legacy_msgs.proto b/proto/zetachain/zetacore/crosschain/legacy_msgs.proto new file mode 100644 index 0000000000..452ce0d94d --- /dev/null +++ b/proto/zetachain/zetacore/crosschain/legacy_msgs.proto @@ -0,0 +1,102 @@ +syntax = "proto3"; +package zetachain.zetacore.crosschain; + +import "gogoproto/gogo.proto"; +import "zetachain/zetacore/pkg/chains/chains.proto"; +import "zetachain/zetacore/pkg/coin/coin.proto"; +import "zetachain/zetacore/pkg/proofs/proofs.proto"; +import "zetachain/zetacore/crosschain/rate_limiter_flags.proto"; +import "zetachain/zetacore/crosschain/cross_chain_tx.proto"; + +option go_package = "github.com/zeta-chain/node/x/crosschain/types"; + +// legacy MsgAddOutboundTracker +// defined to keep codec compatibility +message MsgAddToOutTxTracker { + string creator = 1; + int64 chain_id = 2; + uint64 nonce = 3; + string tx_hash = 4; + pkg.proofs.Proof proof = 5; + string block_hash = 6; + int64 tx_index = 7; +} + +// legacy MsgAddInboundTracker +// defined to keep codec compatibility +message MsgAddToInTxTracker { + string creator = 1; + int64 chain_id = 2; + string tx_hash = 3; + pkg.coin.CoinType coin_type = 4; + pkg.proofs.Proof proof = 5; + string block_hash = 6; + int64 tx_index = 7; +} + +// legacy MsgRemoveOutboundTracker +// defined to keep codec compatibility +message MsgRemoveFromOutTxTracker { + string creator = 1; + int64 chain_id = 2; + uint64 nonce = 3; +} + +// legacy MsgVoteOutbound +// defined to keep codec compatibility +message MsgVoteOnObservedOutboundTx { + string creator = 1; + string cctx_hash = 2; + string observed_outTx_hash = 3; + uint64 observed_outTx_blockHeight = 4; + uint64 observed_outTx_gas_used = 10; + string observed_outTx_effective_gas_price = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + uint64 observed_outTx_effective_gas_limit = 12; + string value_received = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"value_received\"" + ]; + pkg.chains.ReceiveStatus status = 6; + int64 outTx_chain = 7; + uint64 outTx_tss_nonce = 8; + pkg.coin.CoinType coin_type = 9; +} + +// legacy MsgVoteInbound +// defined to keep codec compatibility +message MsgVoteOnObservedInboundTx { + string creator = 1; + string sender = 2; + int64 sender_chain_id = 3; + string receiver = 4; + int64 receiver_chain = 5; + // string zeta_burnt = 6; + string amount = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", + (gogoproto.nullable) = false + ]; + // string mMint = 7; + string message = 8; + string in_tx_hash = 9; + uint64 in_block_height = 10; + uint64 gas_limit = 11; + pkg.coin.CoinType coin_type = 12; + string tx_origin = 13; + string asset = 14; + // event index of the sent asset in the observed tx + uint64 event_index = 15; +} + +// legacy MsgVoteGasPrice +// defined to keep codec compatibility +message MsgGasPriceVoter { + string creator = 1; + int64 chain_id = 2; + uint64 price = 3; + uint64 block_number = 4; + string supply = 5; +} diff --git a/proto/zetachain/zetacore/crosschain/tx.proto b/proto/zetachain/zetacore/crosschain/tx.proto index 59a449ddfc..9499a7c25c 100644 --- a/proto/zetachain/zetacore/crosschain/tx.proto +++ b/proto/zetachain/zetacore/crosschain/tx.proto @@ -119,7 +119,7 @@ message MsgVoteGasPrice { uint64 block_number = 4; - reserved 5; // deprecated `string supply` + string supply = 5 [ deprecated = true ]; } message MsgVoteGasPriceResponse {} diff --git a/typescript/zetachain/zetacore/crosschain/index.d.ts b/typescript/zetachain/zetacore/crosschain/index.d.ts index d5819411ec..8f9ae8e678 100644 --- a/typescript/zetachain/zetacore/crosschain/index.d.ts +++ b/typescript/zetachain/zetacore/crosschain/index.d.ts @@ -5,6 +5,7 @@ export * from "./genesis_pb"; export * from "./inbound_hash_to_cctx_pb"; export * from "./inbound_tracker_pb"; export * from "./last_block_height_pb"; +export * from "./legacy_msgs_pb"; export * from "./outbound_tracker_pb"; export * from "./query_pb"; export * from "./rate_limiter_flags_pb"; diff --git a/typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.d.ts b/typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.d.ts new file mode 100644 index 0000000000..fe99443d97 --- /dev/null +++ b/typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.d.ts @@ -0,0 +1,389 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file zetachain/zetacore/crosschain/legacy_msgs.proto (package zetachain.zetacore.crosschain, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Proof } from "../pkg/proofs/proofs_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; +import type { ReceiveStatus } from "../pkg/chains/chains_pb.js"; + +/** + * legacy MsgAddOutboundTracker + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgAddToOutTxTracker + */ +export declare class MsgAddToOutTxTracker extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + /** + * @generated from field: uint64 nonce = 3; + */ + nonce: bigint; + + /** + * @generated from field: string tx_hash = 4; + */ + txHash: string; + + /** + * @generated from field: zetachain.zetacore.pkg.proofs.Proof proof = 5; + */ + proof?: Proof; + + /** + * @generated from field: string block_hash = 6; + */ + blockHash: string; + + /** + * @generated from field: int64 tx_index = 7; + */ + txIndex: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgAddToOutTxTracker"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgAddToOutTxTracker; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgAddToOutTxTracker; + + static fromJsonString(jsonString: string, options?: Partial): MsgAddToOutTxTracker; + + static equals(a: MsgAddToOutTxTracker | PlainMessage | undefined, b: MsgAddToOutTxTracker | PlainMessage | undefined): boolean; +} + +/** + * legacy MsgAddInboundTracker + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgAddToInTxTracker + */ +export declare class MsgAddToInTxTracker extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + /** + * @generated from field: string tx_hash = 3; + */ + txHash: string; + + /** + * @generated from field: zetachain.zetacore.pkg.coin.CoinType coin_type = 4; + */ + coinType: CoinType; + + /** + * @generated from field: zetachain.zetacore.pkg.proofs.Proof proof = 5; + */ + proof?: Proof; + + /** + * @generated from field: string block_hash = 6; + */ + blockHash: string; + + /** + * @generated from field: int64 tx_index = 7; + */ + txIndex: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgAddToInTxTracker"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgAddToInTxTracker; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgAddToInTxTracker; + + static fromJsonString(jsonString: string, options?: Partial): MsgAddToInTxTracker; + + static equals(a: MsgAddToInTxTracker | PlainMessage | undefined, b: MsgAddToInTxTracker | PlainMessage | undefined): boolean; +} + +/** + * legacy MsgRemoveOutboundTracker + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgRemoveFromOutTxTracker + */ +export declare class MsgRemoveFromOutTxTracker extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + /** + * @generated from field: uint64 nonce = 3; + */ + nonce: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgRemoveFromOutTxTracker"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgRemoveFromOutTxTracker; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgRemoveFromOutTxTracker; + + static fromJsonString(jsonString: string, options?: Partial): MsgRemoveFromOutTxTracker; + + static equals(a: MsgRemoveFromOutTxTracker | PlainMessage | undefined, b: MsgRemoveFromOutTxTracker | PlainMessage | undefined): boolean; +} + +/** + * legacy MsgVoteOutbound + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgVoteOnObservedOutboundTx + */ +export declare class MsgVoteOnObservedOutboundTx extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: string cctx_hash = 2; + */ + cctxHash: string; + + /** + * @generated from field: string observed_outTx_hash = 3; + */ + observedOutTxHash: string; + + /** + * @generated from field: uint64 observed_outTx_blockHeight = 4; + */ + observedOutTxBlockHeight: bigint; + + /** + * @generated from field: uint64 observed_outTx_gas_used = 10; + */ + observedOutTxGasUsed: bigint; + + /** + * @generated from field: string observed_outTx_effective_gas_price = 11; + */ + observedOutTxEffectiveGasPrice: string; + + /** + * @generated from field: uint64 observed_outTx_effective_gas_limit = 12; + */ + observedOutTxEffectiveGasLimit: bigint; + + /** + * @generated from field: string value_received = 5; + */ + valueReceived: string; + + /** + * @generated from field: zetachain.zetacore.pkg.chains.ReceiveStatus status = 6; + */ + status: ReceiveStatus; + + /** + * @generated from field: int64 outTx_chain = 7; + */ + outTxChain: bigint; + + /** + * @generated from field: uint64 outTx_tss_nonce = 8; + */ + outTxTssNonce: bigint; + + /** + * @generated from field: zetachain.zetacore.pkg.coin.CoinType coin_type = 9; + */ + coinType: CoinType; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgVoteOnObservedOutboundTx"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgVoteOnObservedOutboundTx; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgVoteOnObservedOutboundTx; + + static fromJsonString(jsonString: string, options?: Partial): MsgVoteOnObservedOutboundTx; + + static equals(a: MsgVoteOnObservedOutboundTx | PlainMessage | undefined, b: MsgVoteOnObservedOutboundTx | PlainMessage | undefined): boolean; +} + +/** + * legacy MsgVoteInbound + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgVoteOnObservedInboundTx + */ +export declare class MsgVoteOnObservedInboundTx extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: string sender = 2; + */ + sender: string; + + /** + * @generated from field: int64 sender_chain_id = 3; + */ + senderChainId: bigint; + + /** + * @generated from field: string receiver = 4; + */ + receiver: string; + + /** + * @generated from field: int64 receiver_chain = 5; + */ + receiverChain: bigint; + + /** + * string zeta_burnt = 6; + * + * @generated from field: string amount = 6; + */ + amount: string; + + /** + * string mMint = 7; + * + * @generated from field: string message = 8; + */ + message: string; + + /** + * @generated from field: string in_tx_hash = 9; + */ + inTxHash: string; + + /** + * @generated from field: uint64 in_block_height = 10; + */ + inBlockHeight: bigint; + + /** + * @generated from field: uint64 gas_limit = 11; + */ + gasLimit: bigint; + + /** + * @generated from field: zetachain.zetacore.pkg.coin.CoinType coin_type = 12; + */ + coinType: CoinType; + + /** + * @generated from field: string tx_origin = 13; + */ + txOrigin: string; + + /** + * @generated from field: string asset = 14; + */ + asset: string; + + /** + * event index of the sent asset in the observed tx + * + * @generated from field: uint64 event_index = 15; + */ + eventIndex: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgVoteOnObservedInboundTx"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgVoteOnObservedInboundTx; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgVoteOnObservedInboundTx; + + static fromJsonString(jsonString: string, options?: Partial): MsgVoteOnObservedInboundTx; + + static equals(a: MsgVoteOnObservedInboundTx | PlainMessage | undefined, b: MsgVoteOnObservedInboundTx | PlainMessage | undefined): boolean; +} + +/** + * legacy MsgVoteGasPrice + * defined to keep codec compatibility + * + * @generated from message zetachain.zetacore.crosschain.MsgGasPriceVoter + */ +export declare class MsgGasPriceVoter extends Message { + /** + * @generated from field: string creator = 1; + */ + creator: string; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + /** + * @generated from field: uint64 price = 3; + */ + price: bigint; + + /** + * @generated from field: uint64 block_number = 4; + */ + blockNumber: bigint; + + /** + * @generated from field: string supply = 5; + */ + supply: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.MsgGasPriceVoter"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgGasPriceVoter; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgGasPriceVoter; + + static fromJsonString(jsonString: string, options?: Partial): MsgGasPriceVoter; + + static equals(a: MsgGasPriceVoter | PlainMessage | undefined, b: MsgGasPriceVoter | PlainMessage | undefined): boolean; +} + diff --git a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts index 751371fa03..caee83f0cc 100644 --- a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts +++ b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts @@ -430,6 +430,12 @@ export declare class MsgVoteGasPrice extends Message { */ blockNumber: bigint; + /** + * @generated from field: string supply = 5 [deprecated = true]; + * @deprecated + */ + supply: string; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/x/crosschain/types/codec.go b/x/crosschain/types/codec.go index f45f745f5f..b93795aa3a 100644 --- a/x/crosschain/types/codec.go +++ b/x/crosschain/types/codec.go @@ -19,6 +19,14 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgUpdateTssAddress{}, "crosschain/UpdateTssAddress", nil) cdc.RegisterConcrete(&MsgAbortStuckCCTX{}, "crosschain/AbortStuckCCTX", nil) cdc.RegisterConcrete(&MsgUpdateRateLimiterFlags{}, "crosschain/UpdateRateLimiterFlags", nil) + + // legacy messages defined for backward compatibility + cdc.RegisterConcrete(&MsgAddToInTxTracker{}, "crosschain/AddToInTxTracker", nil) + cdc.RegisterConcrete(&MsgAddToOutTxTracker{}, "crosschain/AddToOutTxTracker", nil) + cdc.RegisterConcrete(&MsgRemoveFromOutTxTracker{}, "crosschain/RemoveFromOutTxTracker", nil) + cdc.RegisterConcrete(&MsgVoteOnObservedOutboundTx{}, "crosschain/VoteOnObservedOutboundTx", nil) + cdc.RegisterConcrete(&MsgVoteOnObservedInboundTx{}, "crosschain/VoteOnObservedInboundTx", nil) + cdc.RegisterConcrete(&MsgGasPriceVoter{}, "crosschain/GasPriceVoter", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { @@ -34,6 +42,14 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateTssAddress{}, &MsgAbortStuckCCTX{}, &MsgUpdateRateLimiterFlags{}, + + // legacy messages defined for backward compatibility + &MsgAddToInTxTracker{}, + &MsgAddToOutTxTracker{}, + &MsgRemoveFromOutTxTracker{}, + &MsgVoteOnObservedOutboundTx{}, + &MsgVoteOnObservedInboundTx{}, + &MsgGasPriceVoter{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/crosschain/types/legacy_msgs.go b/x/crosschain/types/legacy_msgs.go new file mode 100644 index 0000000000..8b29ae9507 --- /dev/null +++ b/x/crosschain/types/legacy_msgs.go @@ -0,0 +1,181 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/zeta-chain/node/pkg/authz" +) + +// MsgVoteOnObservedInboundTx + +var _ sdk.Msg = &MsgVoteOnObservedInboundTx{} + +func (msg *MsgVoteOnObservedInboundTx) Route() string { + return RouterKey +} + +func (msg *MsgVoteOnObservedInboundTx) Type() string { + return authz.InboundVoter.String() +} + +func (msg *MsgVoteOnObservedInboundTx) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgVoteOnObservedInboundTx) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgVoteOnObservedInboundTx) ValidateBasic() error { + return nil +} + +// MsgVoteOnObservedOutboundTx + +var _ sdk.Msg = &MsgVoteOnObservedOutboundTx{} + +func (msg *MsgVoteOnObservedOutboundTx) Route() string { + return RouterKey +} + +func (msg *MsgVoteOnObservedOutboundTx) Type() string { + return authz.OutboundVoter.String() +} + +func (msg *MsgVoteOnObservedOutboundTx) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgVoteOnObservedOutboundTx) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgVoteOnObservedOutboundTx) ValidateBasic() error { + return nil +} + +// MsgAddToInTxTracker + +var _ sdk.Msg = &MsgAddToInTxTracker{} + +func (msg *MsgAddToInTxTracker) Route() string { + return RouterKey +} + +func (msg *MsgAddToInTxTracker) Type() string { + return "AddToInTxTracker" +} + +func (msg *MsgAddToInTxTracker) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgAddToInTxTracker) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgAddToInTxTracker) ValidateBasic() error { + return nil +} + +// MsgAddToOutTxTracker + +var _ sdk.Msg = &MsgAddToOutTxTracker{} + +func (msg *MsgAddToOutTxTracker) Route() string { + return RouterKey +} + +func (msg *MsgAddToOutTxTracker) Type() string { + return "AddToOutTxTracker" +} + +func (msg *MsgAddToOutTxTracker) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgAddToOutTxTracker) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgAddToOutTxTracker) ValidateBasic() error { + return nil +} + +// MsgRemoveFromOutTxTracker + +var _ sdk.Msg = &MsgRemoveFromOutTxTracker{} + +func (msg *MsgRemoveFromOutTxTracker) Route() string { + return RouterKey +} + +func (msg *MsgRemoveFromOutTxTracker) Type() string { + return "RemoveFromOutTxTracker" +} + +func (msg *MsgRemoveFromOutTxTracker) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgRemoveFromOutTxTracker) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgRemoveFromOutTxTracker) ValidateBasic() error { + return nil +} + +// MsgGasPriceVoter + +var _ sdk.Msg = &MsgGasPriceVoter{} + +func (msg *MsgGasPriceVoter) Route() string { + return RouterKey +} + +func (msg *MsgGasPriceVoter) Type() string { + return "GasPriceVoter" +} + +func (msg *MsgGasPriceVoter) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgGasPriceVoter) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgGasPriceVoter) ValidateBasic() error { + return nil +} diff --git a/x/crosschain/types/legacy_msgs.pb.go b/x/crosschain/types/legacy_msgs.pb.go new file mode 100644 index 0000000000..e5a6e67355 --- /dev/null +++ b/x/crosschain/types/legacy_msgs.pb.go @@ -0,0 +1,3002 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: zetachain/zetacore/crosschain/legacy_msgs.proto + +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" + chains "github.com/zeta-chain/node/pkg/chains" + coin "github.com/zeta-chain/node/pkg/coin" + proofs "github.com/zeta-chain/node/pkg/proofs" + io "io" + math "math" + math_bits "math/bits" +) + +// 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 + +// legacy MsgAddOutboundTracker +// defined to keep codec compatibility +type MsgAddToOutTxTracker struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` +} + +func (m *MsgAddToOutTxTracker) Reset() { *m = MsgAddToOutTxTracker{} } +func (m *MsgAddToOutTxTracker) String() string { return proto.CompactTextString(m) } +func (*MsgAddToOutTxTracker) ProtoMessage() {} +func (*MsgAddToOutTxTracker) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{0} +} +func (m *MsgAddToOutTxTracker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddToOutTxTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddToOutTxTracker.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 *MsgAddToOutTxTracker) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddToOutTxTracker.Merge(m, src) +} +func (m *MsgAddToOutTxTracker) XXX_Size() int { + return m.Size() +} +func (m *MsgAddToOutTxTracker) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddToOutTxTracker.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddToOutTxTracker proto.InternalMessageInfo + +func (m *MsgAddToOutTxTracker) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgAddToOutTxTracker) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *MsgAddToOutTxTracker) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +func (m *MsgAddToOutTxTracker) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *MsgAddToOutTxTracker) GetProof() *proofs.Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *MsgAddToOutTxTracker) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *MsgAddToOutTxTracker) GetTxIndex() int64 { + if m != nil { + return m.TxIndex + } + return 0 +} + +// legacy MsgAddInboundTracker +// defined to keep codec compatibility +type MsgAddToInTxTracker struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType coin.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=zetachain.zetacore.pkg.coin.CoinType" json:"coin_type,omitempty"` + Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` +} + +func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } +func (m *MsgAddToInTxTracker) String() string { return proto.CompactTextString(m) } +func (*MsgAddToInTxTracker) ProtoMessage() {} +func (*MsgAddToInTxTracker) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{1} +} +func (m *MsgAddToInTxTracker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddToInTxTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddToInTxTracker.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 *MsgAddToInTxTracker) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddToInTxTracker.Merge(m, src) +} +func (m *MsgAddToInTxTracker) XXX_Size() int { + return m.Size() +} +func (m *MsgAddToInTxTracker) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddToInTxTracker.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddToInTxTracker proto.InternalMessageInfo + +func (m *MsgAddToInTxTracker) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgAddToInTxTracker) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *MsgAddToInTxTracker) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *MsgAddToInTxTracker) GetCoinType() coin.CoinType { + if m != nil { + return m.CoinType + } + return coin.CoinType_Zeta +} + +func (m *MsgAddToInTxTracker) GetProof() *proofs.Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (m *MsgAddToInTxTracker) GetBlockHash() string { + if m != nil { + return m.BlockHash + } + return "" +} + +func (m *MsgAddToInTxTracker) GetTxIndex() int64 { + if m != nil { + return m.TxIndex + } + return 0 +} + +// legacy MsgRemoveOutboundTracker +// defined to keep codec compatibility +type MsgRemoveFromOutTxTracker struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *MsgRemoveFromOutTxTracker) Reset() { *m = MsgRemoveFromOutTxTracker{} } +func (m *MsgRemoveFromOutTxTracker) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveFromOutTxTracker) ProtoMessage() {} +func (*MsgRemoveFromOutTxTracker) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{2} +} +func (m *MsgRemoveFromOutTxTracker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveFromOutTxTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveFromOutTxTracker.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 *MsgRemoveFromOutTxTracker) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveFromOutTxTracker.Merge(m, src) +} +func (m *MsgRemoveFromOutTxTracker) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveFromOutTxTracker) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveFromOutTxTracker.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveFromOutTxTracker proto.InternalMessageInfo + +func (m *MsgRemoveFromOutTxTracker) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRemoveFromOutTxTracker) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *MsgRemoveFromOutTxTracker) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +// legacy MsgVoteOutbound +// defined to keep codec compatibility +type MsgVoteOnObservedOutboundTx struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + CctxHash string `protobuf:"bytes,2,opt,name=cctx_hash,json=cctxHash,proto3" json:"cctx_hash,omitempty"` + ObservedOutTxHash string `protobuf:"bytes,3,opt,name=observed_outTx_hash,json=observedOutTxHash,proto3" json:"observed_outTx_hash,omitempty"` + ObservedOutTxBlockHeight uint64 `protobuf:"varint,4,opt,name=observed_outTx_blockHeight,json=observedOutTxBlockHeight,proto3" json:"observed_outTx_blockHeight,omitempty"` + ObservedOutTxGasUsed uint64 `protobuf:"varint,10,opt,name=observed_outTx_gas_used,json=observedOutTxGasUsed,proto3" json:"observed_outTx_gas_used,omitempty"` + ObservedOutTxEffectiveGasPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=observed_outTx_effective_gas_price,json=observedOutTxEffectiveGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"observed_outTx_effective_gas_price"` + ObservedOutTxEffectiveGasLimit uint64 `protobuf:"varint,12,opt,name=observed_outTx_effective_gas_limit,json=observedOutTxEffectiveGasLimit,proto3" json:"observed_outTx_effective_gas_limit,omitempty"` + ValueReceived github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,5,opt,name=value_received,json=valueReceived,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"value_received" yaml:"value_received"` + Status chains.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=zetachain.zetacore.pkg.chains.ReceiveStatus" json:"status,omitempty"` + OutTxChain int64 `protobuf:"varint,7,opt,name=outTx_chain,json=outTxChain,proto3" json:"outTx_chain,omitempty"` + OutTxTssNonce uint64 `protobuf:"varint,8,opt,name=outTx_tss_nonce,json=outTxTssNonce,proto3" json:"outTx_tss_nonce,omitempty"` + CoinType coin.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=zetachain.zetacore.pkg.coin.CoinType" json:"coin_type,omitempty"` +} + +func (m *MsgVoteOnObservedOutboundTx) Reset() { *m = MsgVoteOnObservedOutboundTx{} } +func (m *MsgVoteOnObservedOutboundTx) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOnObservedOutboundTx) ProtoMessage() {} +func (*MsgVoteOnObservedOutboundTx) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{3} +} +func (m *MsgVoteOnObservedOutboundTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOnObservedOutboundTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOnObservedOutboundTx.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 *MsgVoteOnObservedOutboundTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOnObservedOutboundTx.Merge(m, src) +} +func (m *MsgVoteOnObservedOutboundTx) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOnObservedOutboundTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOnObservedOutboundTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOnObservedOutboundTx proto.InternalMessageInfo + +func (m *MsgVoteOnObservedOutboundTx) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgVoteOnObservedOutboundTx) GetCctxHash() string { + if m != nil { + return m.CctxHash + } + return "" +} + +func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxHash() string { + if m != nil { + return m.ObservedOutTxHash + } + return "" +} + +func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxBlockHeight() uint64 { + if m != nil { + return m.ObservedOutTxBlockHeight + } + return 0 +} + +func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxGasUsed() uint64 { + if m != nil { + return m.ObservedOutTxGasUsed + } + return 0 +} + +func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxEffectiveGasLimit() uint64 { + if m != nil { + return m.ObservedOutTxEffectiveGasLimit + } + return 0 +} + +func (m *MsgVoteOnObservedOutboundTx) GetStatus() chains.ReceiveStatus { + if m != nil { + return m.Status + } + return chains.ReceiveStatus_created +} + +func (m *MsgVoteOnObservedOutboundTx) GetOutTxChain() int64 { + if m != nil { + return m.OutTxChain + } + return 0 +} + +func (m *MsgVoteOnObservedOutboundTx) GetOutTxTssNonce() uint64 { + if m != nil { + return m.OutTxTssNonce + } + return 0 +} + +func (m *MsgVoteOnObservedOutboundTx) GetCoinType() coin.CoinType { + if m != nil { + return m.CoinType + } + return coin.CoinType_Zeta +} + +// legacy MsgVoteInbound +// defined to keep codec compatibility +type MsgVoteOnObservedInboundTx struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + SenderChainId int64 `protobuf:"varint,3,opt,name=sender_chain_id,json=senderChainId,proto3" json:"sender_chain_id,omitempty"` + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` + ReceiverChain int64 `protobuf:"varint,5,opt,name=receiver_chain,json=receiverChain,proto3" json:"receiver_chain,omitempty"` + // string zeta_burnt = 6; + Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` + // string mMint = 7; + Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` + InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` + InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` + GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + CoinType coin.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=zetachain.zetacore.pkg.coin.CoinType" json:"coin_type,omitempty"` + TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` + Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` + // event index of the sent asset in the observed tx + EventIndex uint64 `protobuf:"varint,15,opt,name=event_index,json=eventIndex,proto3" json:"event_index,omitempty"` +} + +func (m *MsgVoteOnObservedInboundTx) Reset() { *m = MsgVoteOnObservedInboundTx{} } +func (m *MsgVoteOnObservedInboundTx) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOnObservedInboundTx) ProtoMessage() {} +func (*MsgVoteOnObservedInboundTx) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{4} +} +func (m *MsgVoteOnObservedInboundTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOnObservedInboundTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOnObservedInboundTx.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 *MsgVoteOnObservedInboundTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOnObservedInboundTx.Merge(m, src) +} +func (m *MsgVoteOnObservedInboundTx) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOnObservedInboundTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOnObservedInboundTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOnObservedInboundTx proto.InternalMessageInfo + +func (m *MsgVoteOnObservedInboundTx) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetSenderChainId() int64 { + if m != nil { + return m.SenderChainId + } + return 0 +} + +func (m *MsgVoteOnObservedInboundTx) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetReceiverChain() int64 { + if m != nil { + return m.ReceiverChain + } + return 0 +} + +func (m *MsgVoteOnObservedInboundTx) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetInTxHash() string { + if m != nil { + return m.InTxHash + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetInBlockHeight() uint64 { + if m != nil { + return m.InBlockHeight + } + return 0 +} + +func (m *MsgVoteOnObservedInboundTx) GetGasLimit() uint64 { + if m != nil { + return m.GasLimit + } + return 0 +} + +func (m *MsgVoteOnObservedInboundTx) GetCoinType() coin.CoinType { + if m != nil { + return m.CoinType + } + return coin.CoinType_Zeta +} + +func (m *MsgVoteOnObservedInboundTx) GetTxOrigin() string { + if m != nil { + return m.TxOrigin + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetAsset() string { + if m != nil { + return m.Asset + } + return "" +} + +func (m *MsgVoteOnObservedInboundTx) GetEventIndex() uint64 { + if m != nil { + return m.EventIndex + } + return 0 +} + +// legacy MsgVoteGasPrice +// defined to keep codec compatibility +type MsgGasPriceVoter struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Price uint64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` + BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Supply string `protobuf:"bytes,5,opt,name=supply,proto3" json:"supply,omitempty"` +} + +func (m *MsgGasPriceVoter) Reset() { *m = MsgGasPriceVoter{} } +func (m *MsgGasPriceVoter) String() string { return proto.CompactTextString(m) } +func (*MsgGasPriceVoter) ProtoMessage() {} +func (*MsgGasPriceVoter) Descriptor() ([]byte, []int) { + return fileDescriptor_246a7cc819884e07, []int{5} +} +func (m *MsgGasPriceVoter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGasPriceVoter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGasPriceVoter.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 *MsgGasPriceVoter) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGasPriceVoter.Merge(m, src) +} +func (m *MsgGasPriceVoter) XXX_Size() int { + return m.Size() +} +func (m *MsgGasPriceVoter) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGasPriceVoter.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGasPriceVoter proto.InternalMessageInfo + +func (m *MsgGasPriceVoter) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgGasPriceVoter) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *MsgGasPriceVoter) GetPrice() uint64 { + if m != nil { + return m.Price + } + return 0 +} + +func (m *MsgGasPriceVoter) GetBlockNumber() uint64 { + if m != nil { + return m.BlockNumber + } + return 0 +} + +func (m *MsgGasPriceVoter) GetSupply() string { + if m != nil { + return m.Supply + } + return "" +} + +func init() { + proto.RegisterType((*MsgAddToOutTxTracker)(nil), "zetachain.zetacore.crosschain.MsgAddToOutTxTracker") + proto.RegisterType((*MsgAddToInTxTracker)(nil), "zetachain.zetacore.crosschain.MsgAddToInTxTracker") + proto.RegisterType((*MsgRemoveFromOutTxTracker)(nil), "zetachain.zetacore.crosschain.MsgRemoveFromOutTxTracker") + proto.RegisterType((*MsgVoteOnObservedOutboundTx)(nil), "zetachain.zetacore.crosschain.MsgVoteOnObservedOutboundTx") + proto.RegisterType((*MsgVoteOnObservedInboundTx)(nil), "zetachain.zetacore.crosschain.MsgVoteOnObservedInboundTx") + proto.RegisterType((*MsgGasPriceVoter)(nil), "zetachain.zetacore.crosschain.MsgGasPriceVoter") +} + +func init() { + proto.RegisterFile("zetachain/zetacore/crosschain/legacy_msgs.proto", fileDescriptor_246a7cc819884e07) +} + +var fileDescriptor_246a7cc819884e07 = []byte{ + // 979 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0xdb, 0x34, 0x8d, 0x5f, 0x9a, 0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 0x77, 0x03, + 0x36, 0x4f, 0x44, 0xf8, 0x59, 0x10, 0xf4, 0x78, 0x37, 0x91, 0xbd, 0xb4, 0x17, 0x7b, 0xfe, 0x88, + 0xc4, 0x96, 0x0d, 0x6b, 0x7e, 0x4c, 0x3c, 0xc9, 0x63, 0xdb, 0xd8, 0x35, 0xf6, 0x4d, 0x27, 0x17, + 0xad, 0x2d, 0x28, 0x29, 0x27, 0x34, 0xb0, 0x97, 0x77, 0x8d, 0xfd, 0x15, 0x67, 0x0d, 0xe5, 0x4e, + 0x60, 0x6d, 0xc2, 0x2a, 0xe3, 0xcc, 0x27, 0xf6, 0xca, 0xae, 0xb1, 0x5f, 0x70, 0x94, 0x60, 0x3d, + 0x84, 0x35, 0x99, 0xba, 0x43, 0x4f, 0x0c, 0xed, 0x02, 0xba, 0x2a, 0xca, 0xf4, 0xa9, 0x27, 0x86, + 0xd6, 0x13, 0x58, 0xc5, 0xc4, 0xed, 0xd5, 0x5d, 0x63, 0xbf, 0x7c, 0xf8, 0x5e, 0xf3, 0x9a, 0x6e, + 0x4d, 0x46, 0x61, 0x53, 0x57, 0xe7, 0x79, 0xf6, 0x70, 0x14, 0xc4, 0x7a, 0x04, 0xd0, 0x1f, 0x73, + 0x7f, 0xa4, 0xfc, 0x16, 0xd1, 0xaf, 0x89, 0x1a, 0x74, 0xbd, 0x05, 0x25, 0x99, 0xba, 0x94, 0x05, + 0x24, 0xb5, 0xd7, 0x54, 0x90, 0x32, 0xed, 0x64, 0x62, 0xe3, 0xe7, 0x65, 0x78, 0x90, 0xa7, 0xdc, + 0x61, 0xff, 0x32, 0xe3, 0xb9, 0xdc, 0x56, 0x16, 0x72, 0x6b, 0x83, 0x99, 0xb5, 0xdf, 0x95, 0xb3, + 0x09, 0xc1, 0xb4, 0xab, 0x87, 0x8f, 0x6f, 0xca, 0x0f, 0xe7, 0xe4, 0x88, 0x53, 0xd6, 0x9b, 0x4d, + 0x88, 0x53, 0xf2, 0xf5, 0xe9, 0x7f,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d2, 0x2f, 0xe7, 0xf5, 0xa5, 0xef, 0x0e, 0xe6, 0x5a, + 0x9f, 0x55, 0xee, 0x40, 0x7d, 0x7d, 0x30, 0x1e, 0x90, 0x56, 0x3a, 0xff, 0x3d, 0x82, 0x53, 0xd0, + 0x2f, 0xe2, 0x77, 0xc8, 0x47, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x59, 0xa5, 0x4e, 0x23, 0xdb, + 0x09, 0x00, 0x00, +} + +func (m *MsgAddToOutTxTracker) 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 *MsgAddToOutTxTracker) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddToOutTxTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TxIndex != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLegacyMsgs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x22 + } + if m.Nonce != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } + if m.ChainId != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddToInTxTracker) 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 *MsgAddToInTxTracker) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddToInTxTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TxIndex != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.TxIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.BlockHash) > 0 { + i -= len(m.BlockHash) + copy(dAtA[i:], m.BlockHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.BlockHash))) + i-- + dAtA[i] = 0x32 + } + if m.Proof != nil { + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLegacyMsgs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.CoinType != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.CoinType)) + i-- + dAtA[i] = 0x20 + } + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0x1a + } + if m.ChainId != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveFromOutTxTracker) 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 *MsgRemoveFromOutTxTracker) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveFromOutTxTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } + if m.ChainId != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteOnObservedOutboundTx) 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 *MsgVoteOnObservedOutboundTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOnObservedOutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ObservedOutTxEffectiveGasLimit != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ObservedOutTxEffectiveGasLimit)) + i-- + dAtA[i] = 0x60 + } + { + size := m.ObservedOutTxEffectiveGasPrice.Size() + i -= size + if _, err := m.ObservedOutTxEffectiveGasPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintLegacyMsgs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.ObservedOutTxGasUsed != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ObservedOutTxGasUsed)) + i-- + dAtA[i] = 0x50 + } + if m.CoinType != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.CoinType)) + i-- + dAtA[i] = 0x48 + } + if m.OutTxTssNonce != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.OutTxTssNonce)) + i-- + dAtA[i] = 0x40 + } + if m.OutTxChain != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.OutTxChain)) + i-- + dAtA[i] = 0x38 + } + if m.Status != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + { + size := m.ValueReceived.Size() + i -= size + if _, err := m.ValueReceived.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintLegacyMsgs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.ObservedOutTxBlockHeight != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ObservedOutTxBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(m.ObservedOutTxHash) > 0 { + i -= len(m.ObservedOutTxHash) + copy(dAtA[i:], m.ObservedOutTxHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.ObservedOutTxHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.CctxHash) > 0 { + i -= len(m.CctxHash) + copy(dAtA[i:], m.CctxHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.CctxHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteOnObservedInboundTx) 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 *MsgVoteOnObservedInboundTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOnObservedInboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EventIndex != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.EventIndex)) + i-- + dAtA[i] = 0x78 + } + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0x72 + } + if len(m.TxOrigin) > 0 { + i -= len(m.TxOrigin) + copy(dAtA[i:], m.TxOrigin) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.TxOrigin))) + i-- + dAtA[i] = 0x6a + } + if m.CoinType != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.CoinType)) + i-- + dAtA[i] = 0x60 + } + if m.GasLimit != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x58 + } + if m.InBlockHeight != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.InBlockHeight)) + i-- + dAtA[i] = 0x50 + } + if len(m.InTxHash) > 0 { + i -= len(m.InTxHash) + copy(dAtA[i:], m.InTxHash) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.InTxHash))) + i-- + dAtA[i] = 0x4a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x42 + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintLegacyMsgs(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.ReceiverChain != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ReceiverChain)) + i-- + dAtA[i] = 0x28 + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x22 + } + if m.SenderChainId != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.SenderChainId)) + i-- + dAtA[i] = 0x18 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGasPriceVoter) 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 *MsgGasPriceVoter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGasPriceVoter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Supply) > 0 { + i -= len(m.Supply) + copy(dAtA[i:], m.Supply) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Supply))) + i-- + dAtA[i] = 0x2a + } + if m.BlockNumber != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.BlockNumber)) + i-- + dAtA[i] = 0x20 + } + if m.Price != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.Price)) + i-- + dAtA[i] = 0x18 + } + if m.ChainId != 0 { + i = encodeVarintLegacyMsgs(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintLegacyMsgs(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintLegacyMsgs(dAtA []byte, offset int, v uint64) int { + offset -= sovLegacyMsgs(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgAddToOutTxTracker) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ChainId)) + } + if m.Nonce != 0 { + n += 1 + sovLegacyMsgs(uint64(m.Nonce)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovLegacyMsgs(uint64(m.TxIndex)) + } + return n +} + +func (m *MsgAddToInTxTracker) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ChainId)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.CoinType != 0 { + n += 1 + sovLegacyMsgs(uint64(m.CoinType)) + } + if m.Proof != nil { + l = m.Proof.Size() + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.BlockHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.TxIndex != 0 { + n += 1 + sovLegacyMsgs(uint64(m.TxIndex)) + } + return n +} + +func (m *MsgRemoveFromOutTxTracker) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ChainId)) + } + if m.Nonce != 0 { + n += 1 + sovLegacyMsgs(uint64(m.Nonce)) + } + return n +} + +func (m *MsgVoteOnObservedOutboundTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.CctxHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.ObservedOutTxHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ObservedOutTxBlockHeight != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ObservedOutTxBlockHeight)) + } + l = m.ValueReceived.Size() + n += 1 + l + sovLegacyMsgs(uint64(l)) + if m.Status != 0 { + n += 1 + sovLegacyMsgs(uint64(m.Status)) + } + if m.OutTxChain != 0 { + n += 1 + sovLegacyMsgs(uint64(m.OutTxChain)) + } + if m.OutTxTssNonce != 0 { + n += 1 + sovLegacyMsgs(uint64(m.OutTxTssNonce)) + } + if m.CoinType != 0 { + n += 1 + sovLegacyMsgs(uint64(m.CoinType)) + } + if m.ObservedOutTxGasUsed != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ObservedOutTxGasUsed)) + } + l = m.ObservedOutTxEffectiveGasPrice.Size() + n += 1 + l + sovLegacyMsgs(uint64(l)) + if m.ObservedOutTxEffectiveGasLimit != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ObservedOutTxEffectiveGasLimit)) + } + return n +} + +func (m *MsgVoteOnObservedInboundTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.SenderChainId != 0 { + n += 1 + sovLegacyMsgs(uint64(m.SenderChainId)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ReceiverChain != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ReceiverChain)) + } + l = m.Amount.Size() + n += 1 + l + sovLegacyMsgs(uint64(l)) + l = len(m.Message) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.InTxHash) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.InBlockHeight != 0 { + n += 1 + sovLegacyMsgs(uint64(m.InBlockHeight)) + } + if m.GasLimit != 0 { + n += 1 + sovLegacyMsgs(uint64(m.GasLimit)) + } + if m.CoinType != 0 { + n += 1 + sovLegacyMsgs(uint64(m.CoinType)) + } + l = len(m.TxOrigin) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.EventIndex != 0 { + n += 1 + sovLegacyMsgs(uint64(m.EventIndex)) + } + return n +} + +func (m *MsgGasPriceVoter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovLegacyMsgs(uint64(m.ChainId)) + } + if m.Price != 0 { + n += 1 + sovLegacyMsgs(uint64(m.Price)) + } + if m.BlockNumber != 0 { + n += 1 + sovLegacyMsgs(uint64(m.BlockNumber)) + } + l = len(m.Supply) + if l > 0 { + n += 1 + l + sovLegacyMsgs(uint64(l)) + } + return n +} + +func sovLegacyMsgs(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLegacyMsgs(x uint64) (n int) { + return sovLegacyMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAddToOutTxTracker) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgAddToOutTxTracker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddToOutTxTracker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &proofs.Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddToInTxTracker) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgAddToInTxTracker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddToInTxTracker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinType", wireType) + } + m.CoinType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CoinType |= coin.CoinType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proof == nil { + m.Proof = &proofs.Proof{} + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BlockHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) + } + m.TxIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxIndex |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveFromOutTxTracker) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgRemoveFromOutTxTracker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveFromOutTxTracker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteOnObservedOutboundTx) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgVoteOnObservedOutboundTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOnObservedOutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CctxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CctxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedOutTxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ObservedOutTxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedOutTxBlockHeight", wireType) + } + m.ObservedOutTxBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedOutTxBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueReceived", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ValueReceived.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= chains.ReceiveStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutTxChain", wireType) + } + m.OutTxChain = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutTxChain |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutTxTssNonce", wireType) + } + m.OutTxTssNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutTxTssNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinType", wireType) + } + m.CoinType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CoinType |= coin.CoinType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedOutTxGasUsed", wireType) + } + m.ObservedOutTxGasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedOutTxGasUsed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedOutTxEffectiveGasPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObservedOutTxEffectiveGasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedOutTxEffectiveGasLimit", wireType) + } + m.ObservedOutTxEffectiveGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedOutTxEffectiveGasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteOnObservedInboundTx) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgVoteOnObservedInboundTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOnObservedInboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderChainId", wireType) + } + m.SenderChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SenderChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverChain", wireType) + } + m.ReceiverChain = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReceiverChain |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InTxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InTxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InBlockHeight", wireType) + } + m.InBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinType", wireType) + } + m.CoinType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CoinType |= coin.CoinType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxOrigin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxOrigin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventIndex", wireType) + } + m.EventIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EventIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgGasPriceVoter) 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 ErrIntOverflowLegacyMsgs + } + 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: MsgGasPriceVoter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGasPriceVoter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + m.Price = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Price |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockNumber", wireType) + } + m.BlockNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLegacyMsgs + } + 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 ErrInvalidLengthLegacyMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLegacyMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Supply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLegacyMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLegacyMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLegacyMsgs(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, ErrIntOverflowLegacyMsgs + } + 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, ErrIntOverflowLegacyMsgs + } + 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, ErrIntOverflowLegacyMsgs + } + 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, ErrInvalidLengthLegacyMsgs + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLegacyMsgs + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLegacyMsgs + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLegacyMsgs = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLegacyMsgs = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLegacyMsgs = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 7496f74404..ad8b7cbd9d 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -719,6 +719,7 @@ type MsgVoteGasPrice struct { Price uint64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` PriorityFee uint64 `protobuf:"varint,6,opt,name=priority_fee,json=priorityFee,proto3" json:"priority_fee,omitempty"` BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + Supply string `protobuf:"bytes,5,opt,name=supply,proto3" json:"supply,omitempty"` // Deprecated: Do not use. } func (m *MsgVoteGasPrice) Reset() { *m = MsgVoteGasPrice{} } @@ -789,6 +790,14 @@ func (m *MsgVoteGasPrice) GetBlockNumber() uint64 { return 0 } +// Deprecated: Do not use. +func (m *MsgVoteGasPrice) GetSupply() string { + if m != nil { + return m.Supply + } + return "" +} + type MsgVoteGasPriceResponse struct { } @@ -1715,120 +1724,121 @@ func init() { } var fileDescriptor_15f0860550897740 = []byte{ - // 1807 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x6f, 0x23, 0x49, - 0x15, 0x4f, 0x6f, 0x1c, 0xc7, 0x7e, 0x4e, 0x9c, 0xa4, 0x37, 0x93, 0x38, 0x9d, 0x8d, 0x93, 0xf1, - 0x30, 0x21, 0x5a, 0x4d, 0xec, 0xe0, 0x59, 0x86, 0x25, 0x8b, 0x58, 0x26, 0xde, 0x9d, 0x6c, 0xd0, - 0x78, 0x26, 0xea, 0xcd, 0x2c, 0x7f, 0x2e, 0xad, 0x76, 0x77, 0xa5, 0xd3, 0x8a, 0xdd, 0x65, 0x75, - 0x95, 0xbd, 0xce, 0x08, 0x09, 0x84, 0x84, 0xc4, 0x11, 0x10, 0xa7, 0x3d, 0x70, 0x43, 0x82, 0x6f, - 0xc0, 0x47, 0xd8, 0xe3, 0x88, 0x13, 0xe2, 0x30, 0x42, 0x33, 0x5f, 0x00, 0xb8, 0x72, 0x41, 0xfd, - 0xaa, 0xba, 0x63, 0xb7, 0xff, 0xc6, 0x11, 0xe2, 0x92, 0xee, 0x7a, 0xfd, 0x7e, 0xef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8b, 0x45, 0x77, - 0x36, 0x26, 0x7a, 0xb2, 0xf1, 0xff, 0x93, 0x49, 0xdf, 0x87, 0xad, 0x81, 0x2e, 0x47, 0x81, 0xdd, - 0x02, 0x70, 0x99, 0xe1, 0x93, 0x06, 0x6d, 0x13, 0x1b, 0xbd, 0x4f, 0xe9, 0x69, 0x97, 0xe9, 0x82, - 0x50, 0x20, 0x90, 0xab, 0x32, 0x47, 0xac, 0xfe, 0x77, 0x51, 0x2b, 0x14, 0x60, 0x67, 0x98, 0x9a, - 0x28, 0xe9, 0xff, 0xa4, 0xc0, 0x52, 0x95, 0x39, 0x5f, 0x50, 0x4e, 0x8e, 0x4d, 0x76, 0xea, 0xbb, - 0x16, 0x99, 0xda, 0x84, 0x66, 0x80, 0x0e, 0x4d, 0xc0, 0x85, 0x7a, 0x17, 0x16, 0x9a, 0xbe, 0x4b, - 0x7d, 0x97, 0x5f, 0x19, 0xe7, 0x84, 0x60, 0x94, 0x13, 0x7a, 0x26, 0xa4, 0x3d, 0x21, 0xc8, 0x22, - 0xb6, 0xc1, 0x6b, 0x35, 0x6a, 0xc4, 0xc7, 0x0d, 0x4e, 0xe8, 0x19, 0xa4, 0x3d, 0x43, 0xd2, 0x0f, - 0x13, 0xa9, 0xb9, 0xe5, 0x64, 0x61, 0x03, 0xd6, 0x63, 0x96, 0x46, 0x5e, 0xfc, 0x31, 0x19, 0x79, - 0x11, 0x3a, 0x3a, 0xc2, 0x8b, 0x4d, 0xc0, 0xfc, 0x15, 0xfb, 0x2e, 0x12, 0x3a, 0x15, 0x10, 0x70, - 0xdb, 0x3f, 0x80, 0x35, 0x5a, 0x63, 0xc4, 0x6f, 0x13, 0xdb, 0xa0, 0x52, 0x56, 0xf7, 0x3d, 0xb8, - 0x1a, 0x7e, 0x0d, 0x15, 0x21, 0xaa, 0x02, 0xf9, 0x7e, 0x94, 0xcc, 0x2e, 0xe2, 0x3a, 0x17, 0x5c, - 0xba, 0xb5, 0x19, 0x47, 0x1f, 0x61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, 0x1f, 0x6f, 0xf2, 0xca, 0x6f, 0xde, 0xe6, 0x67, 0x5e, 0xbd, - 0xcd, 0xcf, 0xfc, 0xed, 0x6d, 0x7e, 0xe6, 0xa7, 0xfb, 0x5d, 0x8d, 0x4c, 0xa0, 0x62, 0x5f, 0xfc, - 0xc7, 0xc0, 0xa3, 0x36, 0x29, 0x75, 0x7a, 0xfe, 0xb1, 0x12, 0xf4, 0x34, 0xb5, 0x24, 0xce, 0x16, - 0x0f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x68, 0xfd, 0xc9, 0x86, 0x19, 0x00, 0x00, + // 1818 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x6f, 0xdb, 0xd8, + 0x11, 0x0f, 0x13, 0x59, 0x91, 0x46, 0xb6, 0x92, 0xbc, 0x75, 0x12, 0x9a, 0x5e, 0x2b, 0x8e, 0xd2, + 0xa4, 0xc6, 0x22, 0x91, 0x52, 0x65, 0x9b, 0x6e, 0xb3, 0x45, 0xb7, 0xb1, 0x76, 0xe3, 0x35, 0x10, + 0x25, 0x06, 0xd7, 0xd9, 0xfe, 0xb9, 0x10, 0x14, 0xf9, 0x4c, 0x13, 0x96, 0xf8, 0x04, 0xbe, 0x27, + 0xad, 0x14, 0x14, 0x68, 0x51, 0xa0, 0x40, 0x8f, 0x6d, 0xd1, 0xd3, 0x1e, 0x7a, 0xeb, 0xa1, 0xdf, + 0xa0, 0xa7, 0x9e, 0xf7, 0xb8, 0xe8, 0xa9, 0xe8, 0x21, 0x28, 0x92, 0x2f, 0xd0, 0xf6, 0xda, 0x4b, + 0xc1, 0x79, 0x8f, 0x8c, 0x44, 0xfd, 0xb5, 0x8c, 0x62, 0x2f, 0x26, 0xdf, 0x70, 0x7e, 0xf3, 0x66, + 0xe6, 0xcd, 0xbc, 0x99, 0x91, 0xe1, 0xce, 0x4b, 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0x19, 0xbb, 0x99, 0x46, 0xef, + 0x62, 0x14, 0x22, 0x0b, 0xf9, 0x10, 0x8c, 0x71, 0x21, 0x51, 0xc2, 0x77, 0x39, 0x75, 0x75, 0x40, + 0x01, 0xd7, 0xd3, 0x02, 0xf6, 0x6c, 0xfe, 0x82, 0x53, 0x97, 0xfc, 0x52, 0x83, 0xdb, 0xe3, 0x68, + 0x7a, 0x74, 0x44, 0x1d, 0xe1, 0xf7, 0x28, 0xca, 0x91, 0xc7, 0x56, 0x40, 0xcf, 0x56, 0x54, 0x29, + 0xbc, 0xb3, 0x40, 0x29, 0xdc, 0x0f, 0x84, 0x79, 0x33, 0xbd, 0xf1, 0x27, 0xb1, 0xe8, 0x24, 0x9a, + 0x0e, 0xe6, 0x6b, 0x20, 0xaf, 0xae, 0x55, 0x34, 0x65, 0xa6, 0x44, 0xbc, 0xd3, 0x08, 0x83, 0x62, + 0xcf, 0x6e, 0x75, 0xa9, 0x15, 0x52, 0x87, 0xfa, 0x51, 0x86, 0xc9, 0xb0, 0xf8, 0xf4, 0x94, 0x75, + 0xfc, 0x3f, 0xaf, 0x6e, 0x5c, 0x1d, 0xd8, 0xed, 0xd6, 0xa3, 0xf2, 0xa8, 0xb8, 0xb2, 0xb9, 0x86, + 0x04, 0x53, 0xad, 0xc9, 0xc7, 0x90, 0xe5, 0xc2, 0x16, 0x5d, 0x79, 0xf7, 0x16, 0x6b, 0x77, 0xa7, + 0x16, 0x3c, 0xd9, 0x72, 0x29, 0xe0, 0x67, 0x88, 0x31, 0x15, 0x96, 0xdc, 0x86, 0x62, 0x62, 0x3f, + 0x32, 0xaa, 0x6b, 0x65, 0x2d, 0xa6, 0xd6, 0x23, 0x22, 0xb9, 0x0b, 0x24, 0x61, 0x8b, 0xda, 0x01, + 0x99, 0xd8, 0x39, 0x74, 0xce, 0xe5, 0xf8, 0xcb, 0x21, 0xe7, 0xcf, 0xf0, 0x66, 0x1c, 0x29, 0xc7, + 0xf9, 0xa5, 0xca, 0xf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xfd, 0xba, 0xa4, 0xfd, + 0xf3, 0x75, 0x49, 0xfb, 0xed, 0x9b, 0xd2, 0xb9, 0xaf, 0xdf, 0x94, 0xce, 0xfd, 0xfd, 0x4d, 0xe9, + 0xdc, 0xcf, 0xee, 0x0d, 0x35, 0x32, 0xd1, 0x16, 0xf7, 0xe4, 0xff, 0x11, 0x02, 0xe6, 0xd2, 0x6a, + 0x7f, 0xe4, 0xdf, 0x2d, 0x51, 0x4f, 0xd3, 0xcc, 0xe2, 0x6c, 0xf1, 0xe0, 0x7f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x45, 0x32, 0x2c, 0x14, 0x9c, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2896,6 +2906,13 @@ func (m *MsgVoteGasPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } + if len(m.Supply) > 0 { + i -= len(m.Supply) + copy(dAtA[i:], m.Supply) + i = encodeVarintTx(dAtA, i, uint64(len(m.Supply))) + i-- + dAtA[i] = 0x2a + } if m.BlockNumber != 0 { i = encodeVarintTx(dAtA, i, uint64(m.BlockNumber)) i-- @@ -3839,6 +3856,10 @@ func (m *MsgVoteGasPrice) Size() (n int) { if m.BlockNumber != 0 { n += 1 + sovTx(uint64(m.BlockNumber)) } + l = len(m.Supply) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if m.PriorityFee != 0 { n += 1 + sovTx(uint64(m.PriorityFee)) } @@ -5725,6 +5746,38 @@ func (m *MsgVoteGasPrice) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", 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.Supply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PriorityFee", wireType)