From 7e7b52d4a76d265a7dbfd5ebb993e5fc91452058 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Tue, 10 Dec 2024 19:14:34 -0600 Subject: [PATCH 1/8] test(evm): more bank extension tests --- eth/rpc/backend/account_info.go | 6 +- go.mod | 2 +- x/common/testutil/testapp/testapp.go | 14 +++ x/evm/evmtest/tx.go | 29 ++++-- x/evm/evmtest/tx_test.go | 9 +- x/evm/keeper/bank_extension.go | 31 +++++- x/evm/keeper/bank_extension_test.go | 140 +++++++++++++++++++++++++++ x/evm/keeper/grpc_query_test.go | 3 +- x/evm/keeper/keeper_test.go | 7 ++ x/evm/keeper/msg_ethereum_tx_test.go | 2 +- x/evm/keeper/msg_server.go | 34 ++++--- x/evm/keeper/statedb_test.go | 12 ++- x/evm/precompile/funtoken_test.go | 5 + x/evm/statedb/journal_test.go | 2 +- 14 files changed, 258 insertions(+), 38 deletions(-) diff --git a/eth/rpc/backend/account_info.go b/eth/rpc/backend/account_info.go index 2a5de9245..a0c0caceb 100644 --- a/eth/rpc/backend/account_info.go +++ b/eth/rpc/backend/account_info.go @@ -83,7 +83,11 @@ func (b *Backend) GetProof( for i, key := range storageKeys { hexKey := gethcommon.HexToHash(key) - valueBz, proof, err := b.queryClient.GetProof(clientCtx, evm.StoreKey, evm.StateKey(address, hexKey.Bytes())) + valueBz, proof, err := b.queryClient.GetProof( + clientCtx, + evm.StoreKey, + evm.StateKey(address, hexKey.Bytes()), + ) if err != nil { return nil, err } diff --git a/go.mod b/go.mod index a081ef206..3d913d5d5 100644 --- a/go.mod +++ b/go.mod @@ -61,12 +61,12 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/gorilla/websocket v1.5.0 github.com/rs/cors v1.8.3 + github.com/rs/zerolog v1.32.0 github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 golang.org/x/crypto v0.21.0 golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/net v0.23.0 golang.org/x/text v0.14.0 - github.com/rs/zerolog v1.32.0 ) require ( diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index feb6e52b5..d8507b099 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -12,6 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + auth "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/NibiruChain/nibiru/v2/app" @@ -183,6 +184,19 @@ func FundModuleAccount( return bankKeeper.SendCoinsFromModuleToModule(ctx, inflationtypes.ModuleName, recipientMod, amounts) } +// FundFeeCollector funds the module account that collects gas fees with some +// amount of "unibi", the gas token. +func FundFeeCollector( + bk bankkeeper.Keeper, ctx sdk.Context, amount math.Int, +) error { + return FundModuleAccount( + bk, + ctx, + auth.FeeCollectorName, + sdk.NewCoins(sdk.NewCoin(appconst.BondDenom, amount)), + ) +} + // EnsureNibiruPrefix sets the account address prefix to Nibiru's rather than // the default from the Cosmos-SDK, guaranteeing that tests will work with nibi // addresses rather than cosmos ones (for Gaia). diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index 25bba83f6..e0aa1647c 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -209,11 +209,20 @@ func GenerateEthTxMsgAndSigner( return evmTxMsg, gethSigner, sender.KeyringSigner, nil } -func TransferWei( - deps *TestDeps, - to gethcommon.Address, - amountWei *big.Int, -) error { +type TxTransferWei struct { + Deps *TestDeps + To gethcommon.Address + AmountWei *big.Int + GasLimit uint64 +} + +func (tx TxTransferWei) Run() (evmResp *evm.MsgEthereumTxResponse, err error) { + gasLimit := tx.GasLimit + if tx.GasLimit == 0 { + gasLimit = gethparams.TxGas + } + deps, to, amountWei := tx.Deps, tx.To, tx.AmountWei + ethAcc := deps.Sender var innerTxData []byte = nil var accessList gethcore.AccessList = nil @@ -224,18 +233,18 @@ func TransferWei( deps.NewStateDB().GetNonce(ethAcc.EthAddr), &to, amountWei, - gethparams.TxGas, + gasLimit, accessList, ) if err != nil { - return fmt.Errorf("error while transferring wei: %w", err) + return evmResp, fmt.Errorf("error while transferring wei: %w", err) } - _, err = deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) + evmResp, err = deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) if err != nil { - return fmt.Errorf("error while transferring wei: %w", err) + err = fmt.Errorf("error while transferring wei: %w", err) } - return err + return evmResp, err } // -------------------------------------------------- diff --git a/x/evm/evmtest/tx_test.go b/x/evm/evmtest/tx_test.go index e9cc956c1..33e2e7140 100644 --- a/x/evm/evmtest/tx_test.go +++ b/x/evm/evmtest/tx_test.go @@ -77,8 +77,13 @@ func (s *Suite) TestTransferWei() { randomAcc := evmtest.NewEthPrivAcc() to := randomAcc.EthAddr - err := evmtest.TransferWei(&deps, to, evm.NativeToWei(big.NewInt(420))) - s.Require().NoError(err) + evmResp, err := evmtest.TxTransferWei{ + Deps: &deps, + To: to, + AmountWei: evm.NativeToWei(big.NewInt(420)), + }.Run() + s.Require().NoErrorf(err, "%#v", evmResp) + s.False(evmResp.Failed(), "%#v", evmResp) evmtest.AssertBankBalanceEqual( s.T(), deps, evm.EVMBankDenom, deps.Sender.EthAddr, big.NewInt(69_000), diff --git a/x/evm/keeper/bank_extension.go b/x/evm/keeper/bank_extension.go index 7bbbefb5a..d2622bd6d 100644 --- a/x/evm/keeper/bank_extension.go +++ b/x/evm/keeper/bank_extension.go @@ -90,21 +90,38 @@ func (bk NibiruBankKeeper) ForceGasInvariant( BaseOp func(ctx sdk.Context) error, AfterOp func(ctx sdk.Context), ) error { - gasMeterBefore := ctx.GasMeter() + // Assign vars for the tx gas meter + gasMeterBefore := ctx.GasMeter() // Tx gas meter MUST be defined gasConsumedBefore := gasMeterBefore.GasConsumed() + + // Assign vars for the block gas meter (can be nil) + blockGasMeterBefore := ctx.BlockGasMeter() // Block gas meter can be nil + var blockGasConsumedBefore uint64 + if blockGasMeterBefore != nil { + blockGasConsumedBefore = blockGasMeterBefore.GasConsumed() + } + // Start baseGasConsumed at 0 in case we panic before BaseOp completes and // baseGasConsumed gets a value assignment baseOpGasConsumed := uint64(0) + defer func() { gasMeterBefore.RefundGas(gasMeterBefore.GasConsumed(), "") gasMeterBefore.ConsumeGas(gasConsumedBefore+baseOpGasConsumed, "NibiruBankKeeper invariant") + + if blockGasMeterBefore != nil { + blockGasMeterBefore.RefundGas(blockGasMeterBefore.GasConsumed(), "") + blockGasMeterBefore.ConsumeGas(blockGasConsumedBefore+baseOpGasConsumed, "NibiruBankKeeper invariant") + } }() + // Note that because the ctx gas meter uses private variables to track gas, // we have to branch off with a new gas meter instance to avoid mutating the // "true" gas meter (called GasMeterBefore here). ctx = ctx. WithGasMeter(sdk.NewGasMeter(gasMeterBefore.Limit())). - WithKVGasConfig(store.GasConfig{}) + WithKVGasConfig(zeroCostGasConfig). + WithTransientKVGasConfig(zeroCostGasConfig) err := BaseOp(ctx) baseOpGasConsumed = ctx.GasMeter().GasConsumed() @@ -116,6 +133,16 @@ func (bk NibiruBankKeeper) ForceGasInvariant( return nil } +var zeroCostGasConfig store.GasConfig = store.GasConfig{ + HasCost: 0, + DeleteCost: 0, + ReadCostFlat: 0, + ReadCostPerByte: 0, + WriteCostFlat: 0, + WriteCostPerByte: 0, + IterNextCostFlat: 0, +} + func (bk NibiruBankKeeper) SendCoins( ctx sdk.Context, fromAddr sdk.AccAddress, diff --git a/x/evm/keeper/bank_extension_test.go b/x/evm/keeper/bank_extension_test.go index 64ae4dea9..378bb8546 100644 --- a/x/evm/keeper/bank_extension_test.go +++ b/x/evm/keeper/bank_extension_test.go @@ -1,14 +1,21 @@ package keeper_test import ( + "encoding/json" "fmt" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/ethereum/go-ethereum/common/hexutil" + gethparams "github.com/ethereum/go-ethereum/params" + "github.com/rs/zerolog/log" "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // TestGasConsumedInvariantSend: The "NibiruBankKeeper" is defined such that @@ -301,3 +308,136 @@ func (s *Suite) TestGasConsumedInvariantOther() { }.Run(s) }) } + +// TestStateDBReadonlyInvariant: The EVM Keeper's "ApplyEvmMsg" function is used +// in both queries and transaction messages. Queries such as "eth_call", +// "eth_estimateGas", "debug_traceTransaction", "debugTraceCall", and +// "debug_traceBlock" interact with the EVM StateDB inside of "ApplyEvmMsg". +// +// Queries MUST NOT result in lingering effects on the blockchain multistore or +// the keepers, as doing so would result in potential inconsistencies between +// nodes and consensus failures. This test adds cases to make sure that invariant +// is held. +func (s *Suite) TestStateDBReadonlyInvariant() { + deps := evmtest.NewTestDeps() + _, _, erc20Contract := evmtest.DeployAndExecuteERC20Transfer(&deps, s.T()) + to := evmtest.NewEthPrivAcc() + + type StateDBWithExplanation struct { + StateDB *statedb.StateDB + Explanation string + ExpectEqual bool + } + + var stateDBs []StateDBWithExplanation + stateDBs = append(stateDBs, StateDBWithExplanation{ + StateDB: deps.App.EvmKeeper.Bank.StateDB, + Explanation: "initial DB after some EthereumTx", + ExpectEqual: true, + }) + resetBank := func(deps *evmtest.TestDeps) { + deps.App.EvmKeeper.Bank.StateDB = stateDBs[0].StateDB + } + + s.T().Log("eth_call") + { + fungibleTokenContract := embeds.SmartContract_ERC20Minter + jsonTxArgs, err := json.Marshal(&evm.JsonTxArgs{ + From: &deps.Sender.EthAddr, + Data: (*hexutil.Bytes)(&fungibleTokenContract.Bytecode), + }) + s.Require().NoError(err) + req := &evm.EthCallRequest{Args: jsonTxArgs} + _, err = deps.EvmKeeper.EthCall(deps.GoCtx(), req) + s.Require().NoError(err) + stateDBs = append(stateDBs, StateDBWithExplanation{ + StateDB: deps.App.EvmKeeper.Bank.StateDB, + Explanation: "DB after eth_call query", + ExpectEqual: true, + }) + } + + s.T().Log(`EthereumTx success, err == nil, vmError="insufficient balance for transfer"`) + { + balOfSender := deps.App.BankKeeper.GetBalance( + deps.Ctx, deps.Sender.NibiruAddr, evm.EVMBankDenom) + tooManyTokensWei := evm.NativeToWei(balOfSender.Amount.AddRaw(420).BigInt()) + evmResp, err := evmtest.TxTransferWei{ + Deps: &deps, + To: to.EthAddr, + AmountWei: tooManyTokensWei, + }.Run() + s.Require().NoErrorf(err, "%#v", evmResp) + s.Require().Contains(evmResp.VmError, "insufficient balance for transfer") + stateDBs = append(stateDBs, StateDBWithExplanation{ + StateDB: deps.App.EvmKeeper.Bank.StateDB, + Explanation: "DB after EthereumTx with vmError", + ExpectEqual: false, + }) + } + + resetBank(&deps) + stateDBs = append(stateDBs, StateDBWithExplanation{ + StateDB: deps.App.EvmKeeper.Bank.StateDB, + Explanation: "sanity check with original ctx", + ExpectEqual: true, + }) + + s.T().Log(`EthereumTx success, err == nil, no vmError"`) + { + sendCoins := sdk.NewCoins(sdk.NewInt64Coin(evm.EVMBankDenom, 420)) + s.NoError( + testapp.FundAccount(deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sendCoins), + ) + + ctx := deps.Ctx + log.Log().Msgf("ctx.GasMeter().GasConsumed() %d", ctx.GasMeter().GasConsumed()) + log.Log().Msgf("ctx.GasMeter().Limit() %d", ctx.GasMeter().Limit()) + + wei := evm.NativeToWei(sendCoins[0].Amount.BigInt()) + evmResp, err := evmtest.TxTransferWei{ + Deps: &deps, + To: to.EthAddr, + AmountWei: wei, + }.Run() + + s.Require().NoErrorf(err, "%#v", evmResp) + s.Require().Falsef(evmResp.Failed(), "%#v", evmResp) + stateDBs = append(stateDBs, StateDBWithExplanation{ + StateDB: deps.App.EvmKeeper.Bank.StateDB, + Explanation: "DB after EthereumTx success", + ExpectEqual: false, + }) + + for _, err := range []error{ + testapp.FundAccount(deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sendCoins), + testapp.FundFeeCollector(deps.App.BankKeeper, deps.Ctx, + math.NewIntFromUint64(gethparams.TxGas), + ), + } { + s.NoError(err) + } + evmResp, err = evmtest.TxTransferWei{ + Deps: &deps, + To: erc20Contract, + AmountWei: wei, + GasLimit: gethparams.TxGas * 2, + }.Run() + s.Require().NoErrorf(err, "%#v", evmResp) + s.Require().Contains(evmResp.VmError, "execution reverted") + } + + s.T().Log("Verify that the NibiruBankKeeper.StateDB is unaffected") + var first *statedb.StateDB + for idx, db := range stateDBs { + if idx == 0 { + first = db.StateDB + continue + } + if db.ExpectEqual { + s.True(first == db.StateDB, db.Explanation) + continue + } + s.False(first == db.StateDB, db.Explanation) + } +} diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index b1d8e0515..c0a807fb7 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -489,10 +489,9 @@ func (s *Suite) TestQueryEthCall() { wantErr: "InvalidArgument", }, { - name: "happy: eth call for erc20 token transfer", + name: "happy: eth call to deploy erc20 contract", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { fungibleTokenContract := embeds.SmartContract_ERC20Minter - jsonTxArgs, err := json.Marshal(&evm.JsonTxArgs{ From: &deps.Sender.EthAddr, Data: (*hexutil.Bytes)(&fungibleTokenContract.Bytecode), diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 584ff21bf..0894e689d 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "testing" + "github.com/rs/zerolog/log" "github.com/stretchr/testify/suite" ) @@ -14,3 +15,9 @@ type Suite struct { func TestSuite(t *testing.T) { suite.Run(t, new(Suite)) } + +var _ suite.SetupTestSuite = (*Suite)(nil) + +func (s *Suite) SetupTest() { + log.Log().Msgf("SetupTest %v", s.T().Name()) +} diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index 4d9f16345..2c61a0af6 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -38,7 +38,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { deps.App.BankKeeper, deps.Ctx, authtypes.FeeCollectorName, - sdk.NewCoins(sdk.NewCoin("unibi", math.NewInt(1000_000))), + sdk.NewCoins(sdk.NewCoin("unibi", math.NewInt(1_000_000))), ) s.Require().NoError(err) s.T().Log("create eth tx msg, increase gas limit") diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index e1d9dccb7..6e11c07e8 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -67,7 +67,7 @@ func (k *Keeper) EthereumTx( // when a transaction contains multiple msg, as long as one of the msg fails // all gas will be deducted. so is not msg.Gas() k.ResetGasMeterAndConsumeGas(ctx, ctx.GasMeter().Limit()) - return nil, errors.Wrap(err, "EthereumTx: failed to apply ethereum core message") + return nil, errors.Wrap(err, "error applying ethereum core message") } if !evmResp.Failed() { @@ -77,7 +77,7 @@ func (k *Keeper) EthereumTx( blockGasUsed, err := k.AddToBlockGasUsed(ctx, evmResp.GasUsed) if err != nil { - return nil, errors.Wrap(err, "EthereumTx: error adding transient gas used to block") + return nil, errors.Wrap(err, "error adding transient gas used to block") } // refund gas in order to match the Ethereum gas consumption instead of the @@ -88,23 +88,21 @@ func (k *Keeper) EthereumTx( } weiPerGas := txMsg.EffectiveGasPriceWeiPerGas(evmConfig.BaseFeeWei) if err = k.RefundGas(ctx, evmMsg.From(), refundGas, weiPerGas); err != nil { - return nil, errors.Wrapf(err, "EthereumTx: error refunding leftover gas to sender %s", evmMsg.From()) + return nil, errors.Wrapf(err, "error refunding leftover gas to sender %s", evmMsg.From()) } - // reset the gas meter for current TxMsg (EthereumTx) - k.ResetGasMeterAndConsumeGas(ctx, blockGasUsed) - err = k.EmitEthereumTxEvents(ctx, tx.To(), tx.Type(), evmMsg, evmResp) if err != nil { - return nil, errors.Wrap(err, "EthereumTx: error emitting ethereum tx events") + return nil, errors.Wrap(err, "error emitting ethereum tx events") } err = k.EmitLogEvents(ctx, evmResp) if err != nil { - return nil, errors.Wrap(err, "EthereumTx: error emitting tx logs") + return nil, errors.Wrap(err, "error emitting tx logs") } blockTxIdx := uint64(txConfig.TxIndex) + 1 k.EvmState.BlockTxIndex.Set(ctx, blockTxIdx) + return evmResp, nil } @@ -210,18 +208,18 @@ func (k Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc { // will be returned to the client and the transaction won't be committed to the // store. // -// # Reverted state +// ## Reverted state // // The snapshot and rollback are supported by the `statedb.StateDB`. // -// # Different Callers +// ## Different Callers // // It's called in three scenarios: // 1. `ApplyTransaction`, in the transaction processing flow. // 2. `EthCall/EthEstimateGas` grpc query handler. // 3. Called by other native modules directly. // -// # Prechecks and Preprocessing +// ## Prechecks and Preprocessing // // All relevant state transition prechecks for the MsgEthereumTx are performed on the AnteHandler, // prior to running the transaction against the state. The prechecks run are the following: @@ -237,13 +235,17 @@ func (k Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc { // // 1. set up the initial access list // -// # Tracer parameter -// It should be a `vm.Tracer` object or nil, if pass `nil`, it'll create a default one based on keeper options. +// ## Tracer parameter +// +// It should be a `vm.Tracer` object or nil, if pass `nil`, it'll create a +// default one based on keeper options. +// +// ## Commit parameter // -// # Commit parameter // If commit is true, the `StateDB` will be committed, otherwise discarded. // -// # fullRefundLeftoverGas parameter +// ## fullRefundLeftoverGas parameter +// // For internal calls like funtokens, user does not specify gas limit explicitly. // In this case we don't apply any caps for refund and refund 100% func (k *Keeper) ApplyEvmMsg(ctx sdk.Context, @@ -269,7 +271,7 @@ func (k *Keeper) ApplyEvmMsg(ctx sdk.Context, ) defer func() { - if commit && err == nil && resp != nil && !resp.Failed() { + if commit && err == nil && resp != nil { k.Bank.StateDB = stateDB } else { k.Bank.StateDB = oldStateDB diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index a9fd8cede..3ed34c838 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -45,7 +45,11 @@ func (s *Suite) TestStateDBBalance() { s.T().Log("Send via EVM transfer. See expected wei amounts.") to := gethcommon.HexToAddress("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed") { - err := evmtest.TransferWei(&deps, to, evm.NativeToWei(big.NewInt(12))) + _, err := evmtest.TxTransferWei{ + Deps: &deps, + To: to, + AmountWei: evm.NativeToWei(big.NewInt(12)), + }.Run() s.Require().NoError(err) db := deps.NewStateDB() s.Equal( @@ -58,7 +62,11 @@ func (s *Suite) TestStateDBBalance() { ) s.T().Log("Send via EVM transfer with too little wei. Should error") - err = evmtest.TransferWei(&deps, to, big.NewInt(12)) + _, err = evmtest.TxTransferWei{ + Deps: &deps, + To: to, + AmountWei: big.NewInt(12), + }.Run() s.Require().ErrorContains(err, "wei amount is too small") } diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 7645a26e5..be5e5cab2 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -5,6 +5,7 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" @@ -223,6 +224,10 @@ func (s *FuntokenSuite) TestHappyPath() { s.NoError(err) deps.ResetGasMeter() + err = testapp.FundFeeCollector(deps.App.BankKeeper, deps.Ctx, + sdkmath.NewInt(70_000), + ) + s.NoError(err) _, ethTxResp, err := evmtest.CallContractTx( &deps, precompile.PrecompileAddr_FunToken, diff --git a/x/evm/statedb/journal_test.go b/x/evm/statedb/journal_test.go index 75fc9b6a0..e1260b819 100644 --- a/x/evm/statedb/journal_test.go +++ b/x/evm/statedb/journal_test.go @@ -107,7 +107,7 @@ func (s *Suite) TestComplexJournalChanges() { stateDB := evmObj.StateDB.(*statedb.StateDB) if stateDB.DebugDirtiesCount() != 2 { debugDirtiesCountMismatch(stateDB, s.T()) - s.FailNow("expected 2 dirty journal changes") + s.FailNowf("expected 2 dirty journal changes", "%#v", stateDB.Journal) } // The contract calling itself is invalid in this context. From c28b170f63008c1e18fe2802508c44db99008197 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Wed, 11 Dec 2024 16:20:00 -0600 Subject: [PATCH 2/8] chrore: changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee83562c..b1c4f14ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#2119](https://github.com/NibiruChain/nibiru/pull/2119) - fix(evm): Guarantee that gas consumed during any send operation of the "NibiruBankKeeper" depends only on the "bankkeeper.BaseKeeper"'s gas consumption. +- [#2122](https://github.com/NibiruChain/nibiru/pull/2122) - test(evm): more bank extension tests #### Nibiru EVM | Before Audit 2 - 2024-12-06 From 24917ddeddc0a2dcf967a218f10036731b9fe0c1 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Wed, 11 Dec 2024 16:21:23 -0600 Subject: [PATCH 3/8] chore: TODO comments and revert blockGasMeter changes --- x/evm/keeper/bank_extension.go | 14 ++------------ x/evm/precompile/funtoken.go | 1 + x/evm/precompile/wasm.go | 3 +++ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/x/evm/keeper/bank_extension.go b/x/evm/keeper/bank_extension.go index d2622bd6d..7a14b1db2 100644 --- a/x/evm/keeper/bank_extension.go +++ b/x/evm/keeper/bank_extension.go @@ -93,13 +93,8 @@ func (bk NibiruBankKeeper) ForceGasInvariant( // Assign vars for the tx gas meter gasMeterBefore := ctx.GasMeter() // Tx gas meter MUST be defined gasConsumedBefore := gasMeterBefore.GasConsumed() - - // Assign vars for the block gas meter (can be nil) - blockGasMeterBefore := ctx.BlockGasMeter() // Block gas meter can be nil - var blockGasConsumedBefore uint64 - if blockGasMeterBefore != nil { - blockGasConsumedBefore = blockGasMeterBefore.GasConsumed() - } + // Don't modify the "ctx.BlockGasMeter()" directly because this is + // handled in "BaseApp.runTx" // Start baseGasConsumed at 0 in case we panic before BaseOp completes and // baseGasConsumed gets a value assignment @@ -108,11 +103,6 @@ func (bk NibiruBankKeeper) ForceGasInvariant( defer func() { gasMeterBefore.RefundGas(gasMeterBefore.GasConsumed(), "") gasMeterBefore.ConsumeGas(gasConsumedBefore+baseOpGasConsumed, "NibiruBankKeeper invariant") - - if blockGasMeterBefore != nil { - blockGasMeterBefore.RefundGas(blockGasMeterBefore.GasConsumed(), "") - blockGasMeterBefore.ConsumeGas(blockGasConsumedBefore+baseOpGasConsumed, "NibiruBankKeeper invariant") - } }() // Note that because the ctx gas meter uses private variables to track gas, diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 4407b26d7..a987440c1 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -205,6 +205,7 @@ func (p precompileFunToken) sendToBank( } // TODO: UD-DEBUG: feat: Emit EVM events + // https://github.com/NibiruChain/nibiru/issues/2121 // TODO: emit event for balance change of sender // TODO: emit event for balance change of recipient diff --git a/x/evm/precompile/wasm.go b/x/evm/precompile/wasm.go index dfc5d5042..c7095a2c6 100644 --- a/x/evm/precompile/wasm.go +++ b/x/evm/precompile/wasm.go @@ -72,6 +72,9 @@ func (p precompileWasm) Run( return nil, err } + // TODO: Emit EVM events + // https://github.com/NibiruChain/nibiru/issues/2121 + // Gas consumed by a local gas meter // The reason it's unnecessary to check for a success value is because // GasConsumed is guaranteed to be less than the contract.Gas because the gas From d2f836bf7b7bb757dfa1a9d46a1cf46a8c611889 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Wed, 11 Dec 2024 16:23:23 -0600 Subject: [PATCH 4/8] start ABCI event solidity --- x/evm/embeds/contracts/AbciEvent.sol | 15 ++++ x/evm/embeds/contracts/Wasm.sol | 117 ++++++++++++++------------- 2 files changed, 74 insertions(+), 58 deletions(-) create mode 100644 x/evm/embeds/contracts/AbciEvent.sol diff --git a/x/evm/embeds/contracts/AbciEvent.sol b/x/evm/embeds/contracts/AbciEvent.sol new file mode 100644 index 000000000..5afd5f172 --- /dev/null +++ b/x/evm/embeds/contracts/AbciEvent.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.19; + +/// @notice Interface defining the AbciEvent for interoperability between +/// Ethereum and the ABCI (Application Blockchain Interface). +interface IAbciEventEmitter { + /// @notice Event emitted to in precompiled contracts to relay information + /// from the ABCI to the EVM logs and indexers. Consumers of this event should + /// decode the `attrs` parameter based on the `eventType` context. + /// + /// @param eventType The type of the event, used for categorization and indexing. + /// @param attrs Arbitrary data payload associated with the event, typically + /// encoding state changes or metadata. + event AbciEvent(string indexed eventType, bytes attrs); +} diff --git a/x/evm/embeds/contracts/Wasm.sol b/x/evm/embeds/contracts/Wasm.sol index 8a5842062..b29a08857 100644 --- a/x/evm/embeds/contracts/Wasm.sol +++ b/x/evm/embeds/contracts/Wasm.sol @@ -5,69 +5,70 @@ address constant WASM_PRECOMPILE_ADDRESS = 0x00000000000000000000000000000000000 IWasm constant WASM_PRECOMPILE = IWasm(WASM_PRECOMPILE_ADDRESS); -interface IWasm { - struct BankCoin { - string denom; - uint256 amount; - } +import "./AbciEvent.sol"; - /// @notice Invoke a contract's "ExecuteMsg", which corresponds to - /// "wasm/types/MsgExecuteContract". This enables arbitrary smart contract - /// execution using the Wasm VM from the EVM. - /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract - /// @param msgArgs JSON encoded wasm execute invocation - /// @param funds Optional funds to supply during the execute call. It's - /// uncommon to use this field, so you'll pass an empty array most of the time. - /// @dev The three non-struct arguments are more gas efficient than encoding a - /// single argument as a WasmExecuteMsg. - function execute( - string memory contractAddr, - bytes memory msgArgs, - BankCoin[] memory funds - ) payable external returns (bytes memory response); +interface IWasm is IAbciEventEmitter { + struct BankCoin { + string denom; + uint256 amount; + } - struct WasmExecuteMsg { - string contractAddr; - bytes msgArgs; - BankCoin[] funds; - } + /// @notice Invoke a contract's "ExecuteMsg", which corresponds to + /// "wasm/types/MsgExecuteContract". This enables arbitrary smart contract + /// execution using the Wasm VM from the EVM. + /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract + /// @param msgArgs JSON encoded wasm execute invocation + /// @param funds Optional funds to supply during the execute call. It's + /// uncommon to use this field, so you'll pass an empty array most of the time. + /// @dev The three non-struct arguments are more gas efficient than encoding a + /// single argument as a WasmExecuteMsg. + function execute( + string memory contractAddr, + bytes memory msgArgs, + BankCoin[] memory funds + ) external payable returns (bytes memory response); - /// @notice Identical to "execute", except for multiple contract calls. - function executeMulti( - WasmExecuteMsg[] memory executeMsgs - ) payable external returns (bytes[] memory responses); + struct WasmExecuteMsg { + string contractAddr; + bytes msgArgs; + BankCoin[] funds; + } - /// @notice Query the public API of another contract at a known address (with - /// known ABI). - /// Implements smart query, the "WasmQuery::Smart" variant from "cosmwas_std". - /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract - /// @param req JSON encoded query request - /// @return response Returns whatever type the contract returns (caller should - /// know), wrapped in a JSON encoded contract result. - function query( - string memory contractAddr, - bytes memory req - ) external view returns (bytes memory response); + /// @notice Identical to "execute", except for multiple contract calls. + function executeMulti( + WasmExecuteMsg[] memory executeMsgs + ) external payable returns (bytes[] memory responses); - /// @notice Query the raw kv-store of the contract. - /// Implements raw query, the "WasmQuery::Raw" variant from "cosmwas_std". - /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract - /// @param key contract state key. For example, a `cw_storage_plus::Item` of - /// value `Item::new("state")` creates prefix store with key, "state". - /// @return response JSON encoded, raw data stored at that key. - function queryRaw( - string memory contractAddr, - bytes memory key - ) external view returns (bytes memory response); + /// @notice Query the public API of another contract at a known address (with + /// known ABI). + /// Implements smart query, the "WasmQuery::Smart" variant from "cosmwas_std". + /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract + /// @param req JSON encoded query request + /// @return response Returns whatever type the contract returns (caller should + /// know), wrapped in a JSON encoded contract result. + function query( + string memory contractAddr, + bytes memory req + ) external view returns (bytes memory response); - /// @notice InstantiateContract creates a new smart contract instance for the - /// given code id. - function instantiate( - string memory admin, - uint64 codeID, - bytes memory msgArgs, - string memory label, - BankCoin[] memory funds - ) payable external returns (string memory contractAddr, bytes memory data); + /// @notice Query the raw kv-store of the contract. + /// Implements raw query, the "WasmQuery::Raw" variant from "cosmwas_std". + /// @param contractAddr nibi-prefixed Bech32 address of the wasm contract + /// @param key contract state key. For example, a `cw_storage_plus::Item` of + /// value `Item::new("state")` creates prefix store with key, "state". + /// @return response JSON encoded, raw data stored at that key. + function queryRaw( + string memory contractAddr, + bytes memory key + ) external view returns (bytes memory response); + /// @notice InstantiateContract creates a new smart contract instance for the + /// given code id. + function instantiate( + string memory admin, + uint64 codeID, + bytes memory msgArgs, + string memory label, + BankCoin[] memory funds + ) external payable returns (string memory contractAddr, bytes memory data); } From 0711426bedbd5ad3f0e38bbccc402e317af19e5d Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Fri, 13 Dec 2024 19:42:28 -0600 Subject: [PATCH 5/8] feat(evm-precompile):Emit EVM events created to reflect the ABCI events that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information. --- .nvmrc | 1 + CHANGELOG.md | 1 + contrib/bashlib.sh | 10 +- justfile | 24 +++- .../contracts/IFunToken.sol/IFunToken.json | 19 +++ .../NibiruEvmUtils.sol/INibiruEvm.json | 30 +++++ .../TestERC20TransferThenPrecompileSend.json | 4 +- .../TestFunTokenPrecompileLocalGas.json | 4 +- .../TestNativeSendThenPrecompileSend.json | 4 +- .../TestPrecompileSelfCallRevert.json | 4 +- .../artifacts/contracts/Wasm.sol/IWasm.json | 25 +++- x/evm/embeds/contracts/IFunToken.sol | 4 +- .../{AbciEvent.sol => NibiruEvmUtils.sol} | 13 +- x/evm/embeds/contracts/Wasm.sol | 15 +-- x/evm/precompile/funtoken.go | 13 ++ x/evm/precompile/funtoken_test.go | 1 + x/evm/precompile/nibiru_evm_utils.go | 87 +++++++++++++ x/evm/precompile/nibiru_evm_utils_test.go | 118 ++++++++++++++++++ x/evm/precompile/wasm.go | 12 +- 19 files changed, 353 insertions(+), 36 deletions(-) create mode 100644 .nvmrc create mode 100644 x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json rename x/evm/embeds/contracts/{AbciEvent.sol => NibiruEvmUtils.sol} (59%) create mode 100644 x/evm/precompile/nibiru_evm_utils.go create mode 100644 x/evm/precompile/nibiru_evm_utils_test.go diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..deed13c01 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/jod diff --git a/CHANGELOG.md b/CHANGELOG.md index efc5f45f4..314aa31da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ only on the "bankkeeper.BaseKeeper"'s gas consumption. Remove unnecessary argument in the `VerifyFee` function, which returns the token payment required based on the effective fee from the tx data. Improve documentation. +- [#2125](https://github.com/NibiruChain/nibiru/pull/2125) - feat(evm-precompile):Emit EVM events created to reflect the ABCI events that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information. #### Nibiru EVM | Before Audit 2 - 2024-12-06 diff --git a/contrib/bashlib.sh b/contrib/bashlib.sh index 2279cc456..98c68d899 100644 --- a/contrib/bashlib.sh +++ b/contrib/bashlib.sh @@ -29,26 +29,26 @@ export COLOR_BRIGHT_WHITE="\033[97m" # log_debug: Simple wrapper for `echo` with a DEBUG prefix. log_debug() { - echo "${COLOR_CYAN}DEBUG${COLOR_RESET}" "$@" + echo -e "${COLOR_CYAN}DEBUG${COLOR_RESET}" "$@" } # log_error: ERROR messages in red, output to stderr. log_error() { - echo "❌ ${COLOR_RED}ERROR:${COLOR_RESET}" "$@" >&2 + echo -e "❌ ${COLOR_RED}ERROR:${COLOR_RESET}" "$@" >&2 } log_success() { - echo "${COLOR_GREEN}✅ SUCCESS:${COLOR_RESET}" "$@" + echo -e "${COLOR_GREEN}✅ SUCCESS:${COLOR_RESET}" "$@" } # log_warning: WARNING messages represent non-critical issues that might not # require immediate action but should be noted as points of concern or failure. log_warning() { - echo "${COLOR_YELLOW}WARNING${COLOR_RESET}" "$@" >&2 + echo -e "${COLOR_YELLOW}WARNING${COLOR_RESET}" "$@" >&2 } log_info() { - echo "${COLOR_MAGENTA}INFO${COLOR_RESET}" "$@" + echo -e "${COLOR_MAGENTA}INFO${COLOR_RESET}" "$@" } # ————————————————————————————————————————————————— diff --git a/justfile b/justfile index bfdd90458..77b6e1aaf 100644 --- a/justfile +++ b/justfile @@ -20,17 +20,29 @@ build: clean-cache: go clean -cache -testcache -modcache -alias b := build - -# Generate protobuf code (Golang) for Nibiru +# Generate protobuf-based types in Golang proto-gen: #!/usr/bin/env bash make proto-gen -alias proto := proto-gen +# Generate Solidity artifacts for x/evm/embeds +gen-embeds: + #!/usr/bin/env bash + source contrib/bashlib.sh + + embeds_dir="x/evm/embeds" + log_info "Begin to compile Solidity in $embeds_dir" + which_ok npm + log_info "Using system node version: $(npm exec -- node -v)" + + cd "$embeds_dir" || (log_error "path $embeds_dir not found" && exit) + npx hardhat compile + log_success "Compiled Solidity in $embeds_dir" + +alias gen-proto := proto-gen -# Build protobuf types (Rust) -proto-rs: +# Generate protobuf-based types in Rust +gen-proto-rs: bash proto/buf.gen.rs.sh lint: diff --git a/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json b/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json index 5877e277b..3721c970c 100644 --- a/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json +++ b/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json @@ -3,6 +3,25 @@ "contractName": "IFunToken", "sourceName": "contracts/IFunToken.sol", "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "eventType", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "attrs", + "type": "bytes" + } + ], + "name": "AbciEvent", + "type": "event" + }, { "inputs": [ { diff --git a/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json b/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json new file mode 100644 index 000000000..f4393cd49 --- /dev/null +++ b/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "INibiruEvm", + "sourceName": "contracts/NibiruEvmUtils.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "eventType", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "attrs", + "type": "bytes" + } + ], + "name": "AbciEvent", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json b/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json index a01b550fc..cbd1a6efc 100644 --- a/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json +++ b/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json @@ -43,8 +43,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610c4c380380610c4c833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b35806101176000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f899f7461653cf1df35f26f5f40f53e56c43892fd0cebd16ecff8d5f83285464736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f899f7461653cf1df35f26f5f40f53e56c43892fd0cebd16ecff8d5f83285464736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610c4c380380610c4c833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b35806101176000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f92c5e87ddeb2fe0689c952f7ecdc116fb49b293bd6cf075e8725745318b378d64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f92c5e87ddeb2fe0689c952f7ecdc116fb49b293bd6cf075e8725745318b378d64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json b/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json index 83481bdd5..1a6b942eb 100644 --- a/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json +++ b/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json @@ -56,8 +56,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610b6a380380610b6a833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610a53806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220518cb8e0a44ff5f83545c95e1dbc30a25da8ee95d0d23b6fac02d6a4c47c4c5164736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220518cb8e0a44ff5f83545c95e1dbc30a25da8ee95d0d23b6fac02d6a4c47c4c5164736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610b6a380380610b6a833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610a53806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220600e08ed1d444be298a8756bddfeddc8f72f457f6be3211d77d005d9a5b156ce64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220600e08ed1d444be298a8756bddfeddc8f72f457f6be3211d77d005d9a5b156ce64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json b/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json index 60af0f4ee..b62a206c3 100644 --- a/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json +++ b/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json @@ -61,8 +61,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610ca1380380610ca1833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b8a806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212200d00fcf0f8c292ec663c93dd26e426953911b9d9cfb7f41829934866e308cbde64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212200d00fcf0f8c292ec663c93dd26e426953911b9d9cfb7f41829934866e308cbde64736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610ca1380380610ca1833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b8a806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212208e6843d651dc414419c7bd5853a64770826d44f54165f962ed4a75f7c092c0ec64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212208e6843d651dc414419c7bd5853a64770826d44f54165f962ed4a75f7c092c0ec64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json b/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json index 9f6f671d8..4a0beb9ef 100644 --- a/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json +++ b/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json @@ -71,8 +71,8 @@ "type": "function" } ], - "bytecode": "0x60806040526000600155604051610c8e380380610c8e833981810160405281019061002a91906100d3565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610100565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a082610075565b9050919050565b6100b081610095565b81146100bb57600080fd5b50565b6000815190506100cd816100a7565b92915050565b6000602082840312156100e9576100e8610070565b5b60006100f7848285016100be565b91505092915050565b610b7f8061010f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122025f19b0c686ff339bb4b68de727beee11bc2a0c2b9709bd82cc14c13e1eadbe064736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122025f19b0c686ff339bb4b68de727beee11bc2a0c2b9709bd82cc14c13e1eadbe064736f6c63430008180033", + "bytecode": "0x60806040526000600155604051610c8e380380610c8e833981810160405281019061002a91906100d3565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610100565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a082610075565b9050919050565b6100b081610095565b81146100bb57600080fd5b50565b6000815190506100cd816100a7565b92915050565b6000602082840312156100e9576100e8610070565b5b60006100f7848285016100be565b91505092915050565b610b7f8061010f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220b7d8d0f65057ba6dc424fa5f8d7a8b2fa3fae1a4c008059be642abb96f36904d64736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220b7d8d0f65057ba6dc424fa5f8d7a8b2fa3fae1a4c008059be642abb96f36904d64736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json b/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json index 61e38453f..4dcd8cab5 100644 --- a/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json +++ b/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json @@ -3,6 +3,25 @@ "contractName": "IWasm", "sourceName": "contracts/Wasm.sol", "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "eventType", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "attrs", + "type": "bytes" + } + ], + "name": "AbciEvent", + "type": "event" + }, { "inputs": [ { @@ -28,7 +47,7 @@ "type": "uint256" } ], - "internalType": "struct IWasm.BankCoin[]", + "internalType": "struct INibiruEvm.BankCoin[]", "name": "funds", "type": "tuple[]" } @@ -71,7 +90,7 @@ "type": "uint256" } ], - "internalType": "struct IWasm.BankCoin[]", + "internalType": "struct INibiruEvm.BankCoin[]", "name": "funds", "type": "tuple[]" } @@ -127,7 +146,7 @@ "type": "uint256" } ], - "internalType": "struct IWasm.BankCoin[]", + "internalType": "struct INibiruEvm.BankCoin[]", "name": "funds", "type": "tuple[]" } diff --git a/x/evm/embeds/contracts/IFunToken.sol b/x/evm/embeds/contracts/IFunToken.sol index 70b130638..7a943ef98 100644 --- a/x/evm/embeds/contracts/IFunToken.sol +++ b/x/evm/embeds/contracts/IFunToken.sol @@ -4,10 +4,12 @@ pragma solidity >=0.8.19; address constant FUNTOKEN_PRECOMPILE_ADDRESS = 0x0000000000000000000000000000000000000800; IFunToken constant FUNTOKEN_PRECOMPILE = IFunToken(FUNTOKEN_PRECOMPILE_ADDRESS); +import "./NibiruEvmUtils.sol"; + /// @dev Implements the functionality for sending ERC20 tokens and bank /// coins to various Nibiru accounts using either the Nibiru Bech32 address /// using the "FunToken" mapping between the ERC20 and bank. -interface IFunToken { +interface IFunToken is INibiruEvm { /// @dev sendToBank sends ERC20 tokens as coins to a Nibiru base account /// @param erc20 - the address of the ERC20 token contract /// @param amount - the amount of tokens to send diff --git a/x/evm/embeds/contracts/AbciEvent.sol b/x/evm/embeds/contracts/NibiruEvmUtils.sol similarity index 59% rename from x/evm/embeds/contracts/AbciEvent.sol rename to x/evm/embeds/contracts/NibiruEvmUtils.sol index 5afd5f172..87f83595e 100644 --- a/x/evm/embeds/contracts/AbciEvent.sol +++ b/x/evm/embeds/contracts/NibiruEvmUtils.sol @@ -3,12 +3,21 @@ pragma solidity >=0.8.19; /// @notice Interface defining the AbciEvent for interoperability between /// Ethereum and the ABCI (Application Blockchain Interface). -interface IAbciEventEmitter { +interface INibiruEvm { + struct BankCoin { + string denom; + uint256 amount; + } + /// @notice Event emitted to in precompiled contracts to relay information /// from the ABCI to the EVM logs and indexers. Consumers of this event should /// decode the `attrs` parameter based on the `eventType` context. /// - /// @param eventType The type of the event, used for categorization and indexing. + /// @param eventType An identifier type of the event, used for indexing. + /// Event types indexable with CometBFT indexer are in snake case like + /// "pending_ethereum_tx" or "message", while protobuf typed events use the + /// proto message name as their event type (e.g. + /// "eth.evm.v1.EventEthereumTx"). /// @param attrs Arbitrary data payload associated with the event, typically /// encoding state changes or metadata. event AbciEvent(string indexed eventType, bytes attrs); diff --git a/x/evm/embeds/contracts/Wasm.sol b/x/evm/embeds/contracts/Wasm.sol index b29a08857..37ea785df 100644 --- a/x/evm/embeds/contracts/Wasm.sol +++ b/x/evm/embeds/contracts/Wasm.sol @@ -5,14 +5,9 @@ address constant WASM_PRECOMPILE_ADDRESS = 0x00000000000000000000000000000000000 IWasm constant WASM_PRECOMPILE = IWasm(WASM_PRECOMPILE_ADDRESS); -import "./AbciEvent.sol"; - -interface IWasm is IAbciEventEmitter { - struct BankCoin { - string denom; - uint256 amount; - } +import "./NibiruEvmUtils.sol"; +interface IWasm is INibiruEvm { /// @notice Invoke a contract's "ExecuteMsg", which corresponds to /// "wasm/types/MsgExecuteContract". This enables arbitrary smart contract /// execution using the Wasm VM from the EVM. @@ -25,13 +20,13 @@ interface IWasm is IAbciEventEmitter { function execute( string memory contractAddr, bytes memory msgArgs, - BankCoin[] memory funds + INibiruEvm.BankCoin[] memory funds ) external payable returns (bytes memory response); struct WasmExecuteMsg { string contractAddr; bytes msgArgs; - BankCoin[] funds; + INibiruEvm.BankCoin[] funds; } /// @notice Identical to "execute", except for multiple contract calls. @@ -69,6 +64,6 @@ interface IWasm is IAbciEventEmitter { uint64 codeID, bytes memory msgArgs, string memory label, - BankCoin[] memory funds + INibiruEvm.BankCoin[] memory funds ) external payable returns (string memory contractAddr, bytes memory data); } diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index a987440c1..e4ae609ca 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -60,6 +60,8 @@ func (p precompileFunToken) Run( // Gracefully handles "out of gas" defer HandleOutOfGasPanic(&err)() + abciEventsStartIdx := len(startResult.CacheCtx.EventManager().Events()) + method := startResult.Method switch PrecompileMethod(method.Name) { case FunTokenMethod_sendToBank: @@ -80,6 +82,17 @@ func (p precompileFunToken) Run( return nil, err } + // Emit extra events for the EVM if this is a transaction + // https://github.com/NibiruChain/nibiru/issues/2121 + if !readonly { + EmitEventAbciEvents( + startResult.CacheCtx, + startResult.StateDB, + startResult.CacheCtx.EventManager().Events()[abciEventsStartIdx:], + p.Address(), + ) + } + // Gas consumed by a local gas meter contract.UseGas(startResult.CacheCtx.GasMeter().GasConsumed()) return bz, err diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index be5e5cab2..0e03f2870 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -22,6 +22,7 @@ import ( // TestSuite: Runs all the tests in the suite. func TestSuite(t *testing.T) { + suite.Run(t, new(UtilsSuite)) suite.Run(t, new(FuntokenSuite)) suite.Run(t, new(WasmSuite)) } diff --git a/x/evm/precompile/nibiru_evm_utils.go b/x/evm/precompile/nibiru_evm_utils.go new file mode 100644 index 000000000..967c46955 --- /dev/null +++ b/x/evm/precompile/nibiru_evm_utils.go @@ -0,0 +1,87 @@ +package precompile + +import ( + "bytes" + "fmt" + + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + gethcommon "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" +) + +const EvmEventAbciEvent = "AbciEvent" + +// EmitEventAbciEvents adds a sequence of ABCI events to the EVM state DB so that +// they can be emitted at the end of the "EthereumTx". These events are indexed +// by their ABCI event type and help communicate non-EVM events in Ethereum-based +// block explorers and indexers by saving the event attributes in JSON form. +func EmitEventAbciEvents( + ctx sdk.Context, + db *statedb.StateDB, + abciEvents []sdk.Event, + emittingAddr gethcommon.Address, +) { + blockNumber := uint64(ctx.BlockHeight()) + event := embeds.SmartContract_Wasm.ABI.Events[EvmEventAbciEvent] + for _, abciEvent := range abciEvents { + topics := make([]gethcommon.Hash, 2) + // Why 2? Because 2 = event ID + number of indexed event fields + topics[0] = event.ID + + // eventType is the first (and only) indexed event + topics[1] = EventTopicFromString(abciEvent.Type) + + attrsBz := AttrsToJSON(abciEvent.Attributes) + db.AddLog(&gethcore.Log{ + Address: emittingAddr, + Topics: topics, + Data: attrsBz, + BlockNumber: blockNumber, + }) + } +} + +// AttrsToJSON creates a deterministic JSON encoding for the +func AttrsToJSON(attrs []abci.EventAttribute) []byte { + if len(attrs) == 0 { + return []byte("") + } + keysSeen := set.New[string]() + + // Create JSON object from the key-value tuples + var buf bytes.Buffer + buf.WriteByte('{') + for i, attr := range attrs { + // Keys must be unique to guarantee valid JSON object + if keysSeen.Has(attr.Key) { + continue + } + keysSeen.Add(attr.Key) + + if i > 0 { + buf.WriteByte(',') + } + + // Quote key and value + _, _ = fmt.Fprintf(&buf, `"%s":"%s"`, attr.Key, attr.Value) + } + buf.WriteByte('}') + + return buf.Bytes() +} + +// EventTopicFromBytes creates an [abi.Event] +func EventTopicFromBytes(bz []byte) (topic gethcommon.Hash) { + hash := crypto.Keccak256Hash(bz) + copy(topic[:], hash[:]) + return topic +} +func EventTopicFromString(str string) (topic gethcommon.Hash) { + return EventTopicFromBytes([]byte(str)) +} diff --git a/x/evm/precompile/nibiru_evm_utils_test.go b/x/evm/precompile/nibiru_evm_utils_test.go new file mode 100644 index 000000000..555fe3ff3 --- /dev/null +++ b/x/evm/precompile/nibiru_evm_utils_test.go @@ -0,0 +1,118 @@ +package precompile_test + +import ( + "encoding/json" + "fmt" + + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + gethcommon "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/suite" + + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/precompile" +) + +type UtilsSuite struct { + suite.Suite +} + +// func abci.Event -> abi.Event + +func (s *UtilsSuite) TestAttrsToJSON() { + testCases := []struct { + name string + attrs []abci.EventAttribute + want string + }{ + { + name: "repeated key - last value wins", + attrs: []abci.EventAttribute{ + {Key: "action", Value: "first"}, + {Key: "action", Value: "second"}, + {Key: "amount", Value: "100"}, + }, + want: `{"action":"first","amount":"100"}`, + }, + { + name: "three unique attributes", + attrs: []abci.EventAttribute{ + {Key: "sender", Value: "addr1"}, + {Key: "recipient", Value: "addr2"}, + {Key: "amount", Value: "150"}, + }, + want: `{"sender":"addr1","recipient":"addr2","amount":"150"}`, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + got := string(precompile.AttrsToJSON(tc.attrs)) + s.Equal(tc.want, got) + }) + } +} + +func (s *UtilsSuite) TestEmitEventAbciEvent() { + abiEventName := precompile.EvmEventAbciEvent + event, some := embeds.SmartContract_FunToken.ABI.Events[abiEventName] + s.True(some, abiEventName) + eventId := event.ID + + deps := evmtest.NewTestDeps() + db := deps.NewStateDB() + + startIdx := len(deps.Ctx.EventManager().Events()) + dbStartIdx := len(db.Logs()) + err := deps.App.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, + sdk.NewCoins(sdk.NewInt64Coin(evm.EVMBankDenom, 420_000)), + ) + s.NoError(err) + + abciEvents := deps.Ctx.EventManager().Events()[startIdx:] + s.Lenf(abciEvents, 2, "%+s", abciEvents) + + emittingAddr := precompile.PrecompileAddr_Wasm + precompile.EmitEventAbciEvents(deps.Ctx, db, abciEvents, emittingAddr) + blockNumber := uint64(deps.Ctx.BlockHeight()) + evmAddrBech32 := eth.EthAddrToNibiruAddr(evm.EVM_MODULE_ADDRESS) + want := []*gethcore.Log{ + { + Address: emittingAddr, + Topics: []gethcommon.Hash{ + eventId, + precompile.EventTopicFromString(`coin_received`), + }, + Data: []byte(fmt.Sprintf( + `{"receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), + ), + BlockNumber: blockNumber, + Index: uint(dbStartIdx), + }, + { + Address: emittingAddr, + Topics: []gethcommon.Hash{ + eventId, + precompile.EventTopicFromString(`coinbase`), + }, + Data: []byte(fmt.Sprintf( + `{"minter":"%s","amount":"420000unibi"}`, evmAddrBech32), + ), + BlockNumber: blockNumber, + Index: uint(dbStartIdx + 1), + }, + } + + debugBz, _ := json.MarshalIndent(abciEvents, "", " ") + for idx, wantLog := range want { + s.EqualValuesf( + *wantLog, + *db.Logs()[dbStartIdx+idx], + "events:\n%#s", debugBz, + ) + } +} diff --git a/x/evm/precompile/wasm.go b/x/evm/precompile/wasm.go index c7095a2c6..21645dc97 100644 --- a/x/evm/precompile/wasm.go +++ b/x/evm/precompile/wasm.go @@ -46,6 +46,8 @@ func (p precompileWasm) Run( // Gracefully handles "out of gas" defer HandleOutOfGasPanic(&err)() + abciEventsStartIdx := len(startResult.CacheCtx.EventManager().Events()) + // NOTE: The NibiruBankKeeper needs to reference the current [vm.StateDB] before // any operation that has the potential to use Bank send methods. This will // guarantee that [evmkeeper.Keeper.SetAccBalance] journal changes are @@ -72,8 +74,16 @@ func (p precompileWasm) Run( return nil, err } - // TODO: Emit EVM events + // Emit extra events for the EVM if this is a transaction // https://github.com/NibiruChain/nibiru/issues/2121 + if !readonly { + EmitEventAbciEvents( + startResult.CacheCtx, + startResult.StateDB, + startResult.CacheCtx.EventManager().Events()[abciEventsStartIdx:], + p.Address(), + ) + } // Gas consumed by a local gas meter // The reason it's unnecessary to check for a success value is because From 6bddc5b75b9bafcaf8dcc56f1d4cf6105ce1c9c5 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Sat, 14 Dec 2024 10:16:31 -0600 Subject: [PATCH 6/8] fix: use event log parsing rules from geth/.../abi/bind Go bindings and fix msg_server gas --- x/evm/keeper/keeper_test.go | 7 -- x/evm/keeper/msg_server.go | 3 + x/evm/precompile/nibiru_evm_utils.go | 11 ++- x/evm/precompile/nibiru_evm_utils_test.go | 114 +++++++++++++++++----- 4 files changed, 102 insertions(+), 33 deletions(-) diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 0894e689d..584ff21bf 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "testing" - "github.com/rs/zerolog/log" "github.com/stretchr/testify/suite" ) @@ -15,9 +14,3 @@ type Suite struct { func TestSuite(t *testing.T) { suite.Run(t, new(Suite)) } - -var _ suite.SetupTestSuite = (*Suite)(nil) - -func (s *Suite) SetupTest() { - log.Log().Msgf("SetupTest %v", s.T().Name()) -} diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 7c3b88e25..1e946066f 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -88,6 +88,9 @@ func (k *Keeper) EthereumTx( return nil, errors.Wrapf(err, "error refunding leftover gas to sender %s", evmMsg.From()) } + // reset the gas meter for current TxMsg (EthereumTx) + k.ResetGasMeterAndConsumeGas(ctx, blockGasUsed) + err = k.EmitEthereumTxEvents(ctx, tx.To(), tx.Type(), evmMsg, evmResp) if err != nil { return nil, errors.Wrap(err, "error emitting ethereum tx events") diff --git a/x/evm/precompile/nibiru_evm_utils.go b/x/evm/precompile/nibiru_evm_utils.go index 967c46955..8f4925f76 100644 --- a/x/evm/precompile/nibiru_evm_utils.go +++ b/x/evm/precompile/nibiru_evm_utils.go @@ -21,6 +21,7 @@ const EvmEventAbciEvent = "AbciEvent" // they can be emitted at the end of the "EthereumTx". These events are indexed // by their ABCI event type and help communicate non-EVM events in Ethereum-based // block explorers and indexers by saving the event attributes in JSON form. +// Note that event parsing is handled [gethabi.UnpackIntoMap] func EmitEventAbciEvents( ctx sdk.Context, db *statedb.StateDB, @@ -30,18 +31,21 @@ func EmitEventAbciEvents( blockNumber := uint64(ctx.BlockHeight()) event := embeds.SmartContract_Wasm.ABI.Events[EvmEventAbciEvent] for _, abciEvent := range abciEvents { + // Why 2 topics? Because 2 = event ID + number of indexed event fields topics := make([]gethcommon.Hash, 2) - // Why 2? Because 2 = event ID + number of indexed event fields topics[0] = event.ID // eventType is the first (and only) indexed event topics[1] = EventTopicFromString(abciEvent.Type) - attrsBz := AttrsToJSON(abciEvent.Attributes) + attrsBz := AttrsToJSON(append([]abci.EventAttribute{ + {Key: "eventType", Value: abciEvent.Type}, + }, abciEvent.Attributes...)) + nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(attrsBz) db.AddLog(&gethcore.Log{ Address: emittingAddr, Topics: topics, - Data: attrsBz, + Data: nonIndexedArgs, BlockNumber: blockNumber, }) } @@ -82,6 +86,7 @@ func EventTopicFromBytes(bz []byte) (topic gethcommon.Hash) { copy(topic[:], hash[:]) return topic } + func EventTopicFromString(str string) (topic gethcommon.Hash) { return EventTopicFromBytes([]byte(str)) } diff --git a/x/evm/precompile/nibiru_evm_utils_test.go b/x/evm/precompile/nibiru_evm_utils_test.go index 555fe3ff3..c3cd347ab 100644 --- a/x/evm/precompile/nibiru_evm_utils_test.go +++ b/x/evm/precompile/nibiru_evm_utils_test.go @@ -6,6 +6,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" + abibind "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/suite" @@ -21,7 +22,13 @@ type UtilsSuite struct { suite.Suite } -// func abci.Event -> abi.Event +// These fields of the gethcore.Log have defaults. Look into how we populate them +// in EthereumTx. +// TODO: UD-DEBUG: Check about block hash +// TODO: UD-DEBUG: Check about tx hash +// TODO: UD-DEBUG: Check about tx index +// TODO: UD-DEBUG: Check about index +// TODO: UD-DEBUG: Check about block number func (s *UtilsSuite) TestAttrsToJSON() { testCases := []struct { @@ -80,39 +87,100 @@ func (s *UtilsSuite) TestEmitEventAbciEvent() { precompile.EmitEventAbciEvents(deps.Ctx, db, abciEvents, emittingAddr) blockNumber := uint64(deps.Ctx.BlockHeight()) evmAddrBech32 := eth.EthAddrToNibiruAddr(evm.EVM_MODULE_ADDRESS) - want := []*gethcore.Log{ + type Want struct { + EventLogDataJson func() (raw, abiForm []byte) + EventLog gethcore.Log + ContractAbiParsedData map[string]any + } + wants := []Want{ { - Address: emittingAddr, - Topics: []gethcommon.Hash{ - eventId, - precompile.EventTopicFromString(`coin_received`), + EventLogDataJson: func() (raw, abiForm []byte) { + dataJson := []byte(fmt.Sprintf( + `{"eventType":"coin_received","receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), + ) + nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(dataJson) + return dataJson, nonIndexedArgs + }, + // Log.Data will be filled from the Want.EventLogData fn + EventLog: gethcore.Log{ + Address: emittingAddr, + Topics: []gethcommon.Hash{ + eventId, + precompile.EventTopicFromString(`coin_received`), + }, + BlockNumber: blockNumber, + Index: uint(dbStartIdx), + }, + ContractAbiParsedData: map[string]any{ + "attrs": []byte(fmt.Sprintf( + `{"eventType":"coin_received","receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), + ), }, - Data: []byte(fmt.Sprintf( - `{"receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), - ), - BlockNumber: blockNumber, - Index: uint(dbStartIdx), }, { - Address: emittingAddr, - Topics: []gethcommon.Hash{ - eventId, - precompile.EventTopicFromString(`coinbase`), + EventLogDataJson: func() (raw, abiForm []byte) { + dataJson := []byte(fmt.Sprintf( + `{"eventType":"coinbase","minter":"%s","amount":"420000unibi"}`, evmAddrBech32), + ) + nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(dataJson) + return dataJson, nonIndexedArgs + }, + // Log.Data will be filled from the Want.EventLogData fn + EventLog: gethcore.Log{ + Address: emittingAddr, + Topics: []gethcommon.Hash{ + eventId, + precompile.EventTopicFromString(`coinbase`), + }, + BlockNumber: blockNumber, + Index: uint(dbStartIdx + 1), + }, + ContractAbiParsedData: map[string]any{ + "attrs": []byte(fmt.Sprintf( + `{"eventType":"coinbase","minter":"%s","amount":"420000unibi"}`, evmAddrBech32), + ), }, - Data: []byte(fmt.Sprintf( - `{"minter":"%s","amount":"420000unibi"}`, evmAddrBech32), - ), - BlockNumber: blockNumber, - Index: uint(dbStartIdx + 1), }, } + s.T().Log("Define the ABI and smart contract that will unpack the event data") + abi := embeds.SmartContract_FunToken.ABI + boundContract := abibind.NewBoundContract( + emittingAddr, + *abi, + // These interface fields are not need for this test + (abibind.ContractCaller)(nil), + (abibind.ContractTransactor)(nil), + (abibind.ContractFilterer)(nil), + ) + debugBz, _ := json.MarshalIndent(abciEvents, "", " ") - for idx, wantLog := range want { + dbLogs := db.Logs() + for idx, want := range wants { + _, want.EventLog.Data = want.EventLogDataJson() + gotEventLog := *dbLogs[dbStartIdx+idx] + + s.T().Log("event log.Data must unpack according to the ABI") + eventlogsNonIndexed := make(map[string]any) + err = abi.UnpackIntoMap( + eventlogsNonIndexed, + abiEventName, + gotEventLog.Data, + ) + s.NoErrorf(err, "eventlogsNonIndexed: %+s", eventlogsNonIndexed) + s.EqualValues(want.ContractAbiParsedData, eventlogsNonIndexed) + + s.T().Log("event must be unpackable by the BoundContract that emitted it.") + gotLogMap := make(map[string]any) + err := boundContract.UnpackLogIntoMap(gotLogMap, abiEventName, gotEventLog) + s.NoErrorf(err, "gotLogMap: %+s", gotLogMap) + s.EqualValuesf( - *wantLog, - *db.Logs()[dbStartIdx+idx], + want.EventLog, + gotEventLog, "events:\n%#s", debugBz, ) } + + s.Require().NoErrorf(err, "debugBz %T want %T", debugBz, wants) } From d0c8c9064e78ccebe59d2359c7e07696c251f0cd Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Mon, 25 Nov 2024 19:20:33 -0600 Subject: [PATCH 7/8] wip!: checkpoint on ABI-less data field in event log --- .../contracts/IFunToken.sol/IFunToken.json | 6 +- .../NibiruEvmUtils.sol/INibiruEvm.json | 6 +- .../TestERC20TransferThenPrecompileSend.json | 4 +- .../TestFunTokenPrecompileLocalGas.json | 4 +- .../TestNativeSendThenPrecompileSend.json | 4 +- .../TestPrecompileSelfCallRevert.json | 4 +- .../artifacts/contracts/Wasm.sol/IWasm.json | 6 +- x/evm/embeds/contracts/NibiruEvmUtils.sol | 6 +- x/evm/precompile/funtoken.go | 2 +- x/evm/precompile/nibiru_evm_utils.go | 23 +++-- x/evm/precompile/nibiru_evm_utils_test.go | 88 +++++-------------- x/evm/precompile/wasm.go | 2 +- x/evm/statedb/statedb.go | 6 +- 13 files changed, 68 insertions(+), 93 deletions(-) diff --git a/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json b/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json index 3721c970c..39c5d7aef 100644 --- a/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json +++ b/x/evm/embeds/artifacts/contracts/IFunToken.sol/IFunToken.json @@ -14,9 +14,9 @@ }, { "indexed": false, - "internalType": "bytes", - "name": "attrs", - "type": "bytes" + "internalType": "string", + "name": "abciEvent", + "type": "string" } ], "name": "AbciEvent", diff --git a/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json b/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json index f4393cd49..9704d7497 100644 --- a/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json +++ b/x/evm/embeds/artifacts/contracts/NibiruEvmUtils.sol/INibiruEvm.json @@ -14,9 +14,9 @@ }, { "indexed": false, - "internalType": "bytes", - "name": "attrs", - "type": "bytes" + "internalType": "string", + "name": "abciEvent", + "type": "string" } ], "name": "AbciEvent", diff --git a/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json b/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json index cbd1a6efc..7e02b8803 100644 --- a/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json +++ b/x/evm/embeds/artifacts/contracts/TestERC20TransferThenPrecompileSend.sol/TestERC20TransferThenPrecompileSend.json @@ -43,8 +43,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610c4c380380610c4c833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b35806101176000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f92c5e87ddeb2fe0689c952f7ecdc116fb49b293bd6cf075e8725745318b378d64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220f92c5e87ddeb2fe0689c952f7ecdc116fb49b293bd6cf075e8725745318b378d64736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610c4c380380610c4c833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b35806101176000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220ac87f92bb48cb96c0379f7c364f408a4b71d1e0ac35283db4a4b8e4963d94c4564736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063264c325814610030575b600080fd5b61004a6004803603810190610045919061065c565b61004c565b005b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040518363ffffffff1660e01b81526004016100a792919061074d565b6020604051808303816000875af11580156100c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ea91906107ae565b610129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012090610838565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b815260040161018a939291906108e7565b6020604051808303816000875af11580156101a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101cd919061093a565b90508181146101db8261024d565b6101e48461024d565b6040516020016101f5929190610a61565b60405160208183030381529060405290610245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023c9190610aae565b60405180910390fd5b505050505050565b60606000600161025c8461031b565b01905060008167ffffffffffffffff81111561027b5761027a610531565b5b6040519080825280601f01601f1916602001820160405280156102ad5781602001600182028036833780820191505090505b509050600082602001820190505b600115610310578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161030457610303610ad0565b5b049450600085036102bb575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310610379577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161036f5761036e610ad0565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106103b6576d04ee2d6d415b85acef810000000083816103ac576103ab610ad0565b5b0492506020810190505b662386f26fc1000083106103e557662386f26fc1000083816103db576103da610ad0565b5b0492506010810190505b6305f5e100831061040e576305f5e100838161040457610403610ad0565b5b0492506008810190505b612710831061043357612710838161042957610428610ad0565b5b0492506004810190505b60648310610456576064838161044c5761044b610ad0565b5b0492506002810190505b600a8310610465576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ad82610482565b9050919050565b6104bd816104a2565b81146104c857600080fd5b50565b6000813590506104da816104b4565b92915050565b6000819050919050565b6104f3816104e0565b81146104fe57600080fd5b50565b600081359050610510816104ea565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61056982610520565b810181811067ffffffffffffffff8211171561058857610587610531565b5b80604052505050565b600061059b61046e565b90506105a78282610560565b919050565b600067ffffffffffffffff8211156105c7576105c6610531565b5b6105d082610520565b9050602081019050919050565b82818337600083830152505050565b60006105ff6105fa846105ac565b610591565b90508281526020810184848401111561061b5761061a61051b565b5b6106268482856105dd565b509392505050565b600082601f83011261064357610642610516565b5b81356106538482602086016105ec565b91505092915050565b6000806000806080858703121561067657610675610478565b5b6000610684878288016104cb565b945050602061069587828801610501565b935050604085013567ffffffffffffffff8111156106b6576106b561047d565b5b6106c28782880161062e565b92505060606106d387828801610501565b91505092959194509250565b6000819050919050565b60006107046106ff6106fa84610482565b6106df565b610482565b9050919050565b6000610716826106e9565b9050919050565b60006107288261070b565b9050919050565b6107388161071d565b82525050565b610747816104e0565b82525050565b6000604082019050610762600083018561072f565b61076f602083018461073e565b9392505050565b60008115159050919050565b61078b81610776565b811461079657600080fd5b50565b6000815190506107a881610782565b92915050565b6000602082840312156107c4576107c3610478565b5b60006107d284828501610799565b91505092915050565b600082825260208201905092915050565b7f4552432d3230207472616e73666572206661696c656400000000000000000000600082015250565b60006108226016836107db565b915061082d826107ec565b602082019050919050565b6000602082019050818103600083015261085181610815565b9050919050565b600061086382610482565b9050919050565b61087381610858565b82525050565b600081519050919050565b60005b838110156108a2578082015181840152602081019050610887565b60008484015250505050565b60006108b982610879565b6108c381856107db565b93506108d3818560208601610884565b6108dc81610520565b840191505092915050565b60006060820190506108fc600083018661086a565b610909602083018561073e565b818103604083015261091b81846108ae565b9050949350505050565b600081519050610934816104ea565b92915050565b6000602082840312156109505761094f610478565b5b600061095e84828501610925565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109ce603f83610967565b91506109d982610972565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b6000610a1582610879565b610a1f8185610967565b9350610a2f818560208601610884565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a6c826109c1565b9150610a77826109e4565b600b82019150610a878285610a0a565b9150610a9282610a3b565b600982019150610aa28284610a0a565b91508190509392505050565b60006020820190508181036000830152610ac881846108ae565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220ac87f92bb48cb96c0379f7c364f408a4b71d1e0ac35283db4a4b8e4963d94c4564736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json b/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json index 1a6b942eb..95e833a22 100644 --- a/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json +++ b/x/evm/embeds/artifacts/contracts/TestFunTokenPrecompileLocalGas.sol/TestFunTokenPrecompileLocalGas.json @@ -56,8 +56,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610b6a380380610b6a833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610a53806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220600e08ed1d444be298a8756bddfeddc8f72f457f6be3211d77d005d9a5b156ce64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220600e08ed1d444be298a8756bddfeddc8f72f457f6be3211d77d005d9a5b156ce64736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610b6a380380610b6a833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610a53806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212201e8ad92ef8f92a3e60b70a83c52bfc446727e39e482a331186bfeb6a9b0b461964736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806359b6ed891461003b57806390d2b5e714610057575b600080fd5b6100556004803603810190610050919061066b565b610073565b005b610071600480360381019061006c91906106da565b610198565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf8360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1687876040518563ffffffff1660e01b81526004016100d593929190610805565b60206040518083038160008887f11580156100f4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906101199190610858565b9050838114610127826102ba565b610130866102ba565b60405160200161014192919061097f565b60405160208183030381529060405290610191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161018891906109cc565b60405180910390fd5b5050505050565b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685856040518463ffffffff1660e01b81526004016101f993929190610805565b6020604051808303816000875af1158015610218573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061023c9190610858565b905082811461024a826102ba565b610253856102ba565b60405160200161026492919061097f565b604051602081830303815290604052906102b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ab91906109cc565b60405180910390fd5b50505050565b6060600060016102c984610388565b01905060008167ffffffffffffffff8111156102e8576102e7610540565b5b6040519080825280601f01601f19166020018201604052801561031a5781602001600182028036833780820191505090505b509050600082602001820190505b60011561037d578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581610371576103706109ee565b5b04945060008503610328575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103e6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103dc576103db6109ee565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310610423576d04ee2d6d415b85acef81000000008381610419576104186109ee565b5b0492506020810190505b662386f26fc10000831061045257662386f26fc100008381610448576104476109ee565b5b0492506010810190505b6305f5e100831061047b576305f5e1008381610471576104706109ee565b5b0492506008810190505b61271083106104a0576127108381610496576104956109ee565b5b0492506004810190505b606483106104c357606483816104b9576104b86109ee565b5b0492506002810190505b600a83106104d2576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b610502816104ef565b811461050d57600080fd5b50565b60008135905061051f816104f9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105788261052f565b810181811067ffffffffffffffff8211171561059757610596610540565b5b80604052505050565b60006105aa6104db565b90506105b6828261056f565b919050565b600067ffffffffffffffff8211156105d6576105d5610540565b5b6105df8261052f565b9050602081019050919050565b82818337600083830152505050565b600061060e610609846105bb565b6105a0565b90508281526020810184848401111561062a5761062961052a565b5b6106358482856105ec565b509392505050565b600082601f83011261065257610651610525565b5b81356106628482602086016105fb565b91505092915050565b600080600060608486031215610684576106836104e5565b5b600061069286828701610510565b935050602084013567ffffffffffffffff8111156106b3576106b26104ea565b5b6106bf8682870161063d565b92505060406106d086828701610510565b9150509250925092565b600080604083850312156106f1576106f06104e5565b5b60006106ff85828601610510565b925050602083013567ffffffffffffffff8111156107205761071f6104ea565b5b61072c8582860161063d565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076182610736565b9050919050565b61077181610756565b82525050565b610780816104ef565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b838110156107c05780820151818401526020810190506107a5565b60008484015250505050565b60006107d782610786565b6107e18185610791565b93506107f18185602086016107a2565b6107fa8161052f565b840191505092915050565b600060608201905061081a6000830186610768565b6108276020830185610777565b818103604083015261083981846107cc565b9050949350505050565b600081519050610852816104f9565b92915050565b60006020828403121561086e5761086d6104e5565b5b600061087c84828501610843565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006108ec603f83610885565b91506108f782610890565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061093382610786565b61093d8185610885565b935061094d8185602086016107a2565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b600061098a826108df565b915061099582610902565b600b820191506109a58285610928565b91506109b082610959565b6009820191506109c08284610928565b91508190509392505050565b600060208201905081810360008301526109e681846107cc565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212201e8ad92ef8f92a3e60b70a83c52bfc446727e39e482a331186bfeb6a9b0b461964736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json b/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json index b62a206c3..7891904a1 100644 --- a/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json +++ b/x/evm/embeds/artifacts/contracts/TestNativeSendThenPrecompileSend.sol/TestNativeSendThenPrecompileSend.json @@ -61,8 +61,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b50604051610ca1380380610ca1833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b8a806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212208e6843d651dc414419c7bd5853a64770826d44f54165f962ed4a75f7c092c0ec64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea26469706673582212208e6843d651dc414419c7bd5853a64770826d44f54165f962ed4a75f7c092c0ec64736f6c63430008180033", + "bytecode": "0x608060405234801561001057600080fd5b50604051610ca1380380610ca1833981810160405281019061003291906100db565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610108565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a88261007d565b9050919050565b6100b88161009d565b81146100c357600080fd5b50565b6000815190506100d5816100af565b92915050565b6000602082840312156100f1576100f0610078565b5b60006100ff848285016100c6565b91505092915050565b610b8a806101176000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220537a99126d8c145114145f22552a791dfb3e2b30393022b159f7c2e0d8db2aa064736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80630a04fd4d1461003b578063a4de557414610057575b600080fd5b610055600480360381019061005091906106e4565b610073565b005b610071600480360381019061006c919061079e565b610195565b005b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016100d4939291906108d0565b6020604051808303816000875af11580156100f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101179190610923565b905081811461012582610333565b61012e84610333565b60405160200161013f929190610a4a565b6040516020818303038152906040529061018f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101869190610a97565b60405180910390fd5b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505090508061020e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020590610b05565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685876040518463ffffffff1660e01b815260040161026f939291906108d0565b6020604051808303816000875af115801561028e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b29190610923565b90508281146102c082610333565b6102c985610333565b6040516020016102da929190610a4a565b6040516020818303038152906040529061032a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103219190610a97565b60405180910390fd5b50505050505050565b60606000600161034284610401565b01905060008167ffffffffffffffff81111561036157610360610583565b5b6040519080825280601f01601f1916602001820160405280156103935781602001600182028036833780820191505090505b509050600082602001820190505b6001156103f6578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816103ea576103e9610b25565b5b049450600085036103a1575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061045f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161045557610454610b25565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061049c576d04ee2d6d415b85acef8100000000838161049257610491610b25565b5b0492506020810190505b662386f26fc1000083106104cb57662386f26fc1000083816104c1576104c0610b25565b5b0492506010810190505b6305f5e10083106104f4576305f5e10083816104ea576104e9610b25565b5b0492506008810190505b612710831061051957612710838161050f5761050e610b25565b5b0492506004810190505b6064831061053c576064838161053257610531610b25565b5b0492506002810190505b600a831061054b576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105bb82610572565b810181811067ffffffffffffffff821117156105da576105d9610583565b5b80604052505050565b60006105ed610554565b90506105f982826105b2565b919050565b600067ffffffffffffffff82111561061957610618610583565b5b61062282610572565b9050602081019050919050565b82818337600083830152505050565b600061065161064c846105fe565b6105e3565b90508281526020810184848401111561066d5761066c61056d565b5b61067884828561062f565b509392505050565b600082601f83011261069557610694610568565b5b81356106a584826020860161063e565b91505092915050565b6000819050919050565b6106c1816106ae565b81146106cc57600080fd5b50565b6000813590506106de816106b8565b92915050565b600080604083850312156106fb576106fa61055e565b5b600083013567ffffffffffffffff81111561071957610718610563565b5b61072585828601610680565b9250506020610736858286016106cf565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061076b82610740565b9050919050565b61077b81610760565b811461078657600080fd5b50565b60008135905061079881610772565b92915050565b600080600080608085870312156107b8576107b761055e565b5b60006107c687828801610789565b94505060206107d7878288016106cf565b935050604085013567ffffffffffffffff8111156107f8576107f7610563565b5b61080487828801610680565b9250506060610815878288016106cf565b91505092959194509250565b600061082c82610740565b9050919050565b61083c81610821565b82525050565b61084b816106ae565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088b578082015181840152602081019050610870565b60008484015250505050565b60006108a282610851565b6108ac818561085c565b93506108bc81856020860161086d565b6108c581610572565b840191505092915050565b60006060820190506108e56000830186610833565b6108f26020830185610842565b81810360408301526109048184610897565b9050949350505050565b60008151905061091d816106b8565b92915050565b6000602082840312156109395761093861055e565b5b60006109478482850161090e565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b60006109b7603f83610950565b91506109c28261095b565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b60006109fe82610851565b610a088185610950565b9350610a1881856020860161086d565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b6000610a55826109aa565b9150610a60826109cd565b600b82019150610a7082856109f3565b9150610a7b82610a24565b600982019150610a8b82846109f3565b91508190509392505050565b60006020820190508181036000830152610ab18184610897565b905092915050565b7f4661696c656420746f2073656e64206e617469766520746f6b656e0000000000600082015250565b6000610aef601b8361085c565b9150610afa82610ab9565b602082019050919050565b60006020820190508181036000830152610b1e81610ae2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220537a99126d8c145114145f22552a791dfb3e2b30393022b159f7c2e0d8db2aa064736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json b/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json index 4a0beb9ef..d71d6dfa1 100644 --- a/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json +++ b/x/evm/embeds/artifacts/contracts/TestPrecompileSelfCallRevert.sol/TestPrecompileSelfCallRevert.json @@ -71,8 +71,8 @@ "type": "function" } ], - "bytecode": "0x60806040526000600155604051610c8e380380610c8e833981810160405281019061002a91906100d3565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610100565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a082610075565b9050919050565b6100b081610095565b81146100bb57600080fd5b50565b6000815190506100cd816100a7565b92915050565b6000602082840312156100e9576100e8610070565b5b60006100f7848285016100be565b91505092915050565b610b7f8061010f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220b7d8d0f65057ba6dc424fa5f8d7a8b2fa3fae1a4c008059be642abb96f36904d64736f6c63430008180033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea2646970667358221220b7d8d0f65057ba6dc424fa5f8d7a8b2fa3fae1a4c008059be642abb96f36904d64736f6c63430008180033", + "bytecode": "0x60806040526000600155604051610c8e380380610c8e833981810160405281019061002a91906100d3565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610100565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006100a082610075565b9050919050565b6100b081610095565b81146100bb57600080fd5b50565b6000815190506100cd816100a7565b92915050565b6000602082840312156100e9576100e8610070565b5b60006100f7848285016100be565b91505092915050565b610b7f8061010f6000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122005e9d030e05589bcbd7f2b8c2c7891d3ff3059be6d273b8aa94f18f14212d30964736f6c63430008180033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80636ad4fe961461003b578063705964db14610057575b600080fd5b610055600480360381019061005091906106c1565b610073565b005b610071600480360381019061006c91906106c1565b610208565b005b8373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050506100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de906107a1565b60405180910390fd5b600061080073ffffffffffffffffffffffffffffffffffffffff1663e77a47bf60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684866040518463ffffffff1660e01b81526004016101489392919061085f565b6020604051808303816000875af1158015610167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061018b91906108b2565b9050818114610199856102b2565b6101a2846102b2565b6040516020016101b39291906109d9565b60405160208183030381529060405290610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa9190610a26565b60405180910390fd5b600080fd5b6001600081548092919061021b90610a77565b91905055503073ffffffffffffffffffffffffffffffffffffffff16636ad4fe96858585856040518563ffffffff1660e01b815260040161025f9493929190610ace565b600060405180830381600087803b15801561027957600080fd5b505af192505050801561028a575060015b6102ab57600160008154809291906102a190610a77565b91905055506102ac565b5b50505050565b6060600060016102c184610380565b01905060008167ffffffffffffffff8111156102e0576102df610596565b5b6040519080825280601f01601f1916602001820160405280156103125781602001600182028036833780820191505090505b509050600082602001820190505b600115610375578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161036957610368610b1a565b5b04945060008503610320575b819350505050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106103de577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816103d4576103d3610b1a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061041b576d04ee2d6d415b85acef8100000000838161041157610410610b1a565b5b0492506020810190505b662386f26fc10000831061044a57662386f26fc1000083816104405761043f610b1a565b5b0492506010810190505b6305f5e1008310610473576305f5e100838161046957610468610b1a565b5b0492506008810190505b612710831061049857612710838161048e5761048d610b1a565b5b0492506004810190505b606483106104bb57606483816104b1576104b0610b1a565b5b0492506002810190505b600a83106104ca576001810190505b80915050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610512826104e7565b9050919050565b61052281610507565b811461052d57600080fd5b50565b60008135905061053f81610519565b92915050565b6000819050919050565b61055881610545565b811461056357600080fd5b50565b6000813590506105758161054f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6105ce82610585565b810181811067ffffffffffffffff821117156105ed576105ec610596565b5b80604052505050565b60006106006104d3565b905061060c82826105c5565b919050565b600067ffffffffffffffff82111561062c5761062b610596565b5b61063582610585565b9050602081019050919050565b82818337600083830152505050565b600061066461065f84610611565b6105f6565b9050828152602081018484840111156106805761067f610580565b5b61068b848285610642565b509392505050565b600082601f8301126106a8576106a761057b565b5b81356106b8848260208601610651565b91505092915050565b600080600080608085870312156106db576106da6104dd565b5b60006106e987828801610530565b94505060206106fa87828801610566565b935050604085013567ffffffffffffffff81111561071b5761071a6104e2565b5b61072787828801610693565b925050606061073887828801610566565b91505092959194509250565b600082825260208201905092915050565b7f455448207472616e73666572206661696c656400000000000000000000000000600082015250565b600061078b601383610744565b915061079682610755565b602082019050919050565b600060208201905081810360008301526107ba8161077e565b9050919050565b60006107cc826104e7565b9050919050565b6107dc816107c1565b82525050565b6107eb81610545565b82525050565b600081519050919050565b60005b8381101561081a5780820151818401526020810190506107ff565b60008484015250505050565b6000610831826107f1565b61083b8185610744565b935061084b8185602086016107fc565b61085481610585565b840191505092915050565b600060608201905061087460008301866107d3565b61088160208301856107e2565b81810360408301526108938184610826565b9050949350505050565b6000815190506108ac8161054f565b92915050565b6000602082840312156108c8576108c76104dd565b5b60006108d68482850161089d565b91505092915050565b600081905092915050565b7f4946756e546f6b656e2e73656e64546f42616e6b20737563636565646564206260008201527f7574207472616e73666572726564207468652077726f6e6720616d6f756e7400602082015250565b6000610946603f836108df565b9150610951826108ea565b603f82019050919050565b7f73656e74416d6f756e7420000000000000000000000000000000000000000000815250565b600061098d826107f1565b61099781856108df565b93506109a78185602086016107fc565b80840191505092915050565b7f6578706563746564200000000000000000000000000000000000000000000000815250565b60006109e482610939565b91506109ef8261095c565b600b820191506109ff8285610982565b9150610a0a826109b3565b600982019150610a1a8284610982565b91508190509392505050565b60006020820190508181036000830152610a408184610826565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a8282610545565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ab457610ab3610a48565b5b600182019050919050565b610ac881610507565b82525050565b6000608082019050610ae36000830187610abf565b610af060208301866107e2565b8181036040830152610b028185610826565b9050610b1160608301846107e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122005e9d030e05589bcbd7f2b8c2c7891d3ff3059be6d273b8aa94f18f14212d30964736f6c63430008180033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json b/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json index 4dcd8cab5..a005bfcbb 100644 --- a/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json +++ b/x/evm/embeds/artifacts/contracts/Wasm.sol/IWasm.json @@ -14,9 +14,9 @@ }, { "indexed": false, - "internalType": "bytes", - "name": "attrs", - "type": "bytes" + "internalType": "string", + "name": "abciEvent", + "type": "string" } ], "name": "AbciEvent", diff --git a/x/evm/embeds/contracts/NibiruEvmUtils.sol b/x/evm/embeds/contracts/NibiruEvmUtils.sol index 87f83595e..6a3a5b524 100644 --- a/x/evm/embeds/contracts/NibiruEvmUtils.sol +++ b/x/evm/embeds/contracts/NibiruEvmUtils.sol @@ -18,7 +18,7 @@ interface INibiruEvm { /// "pending_ethereum_tx" or "message", while protobuf typed events use the /// proto message name as their event type (e.g. /// "eth.evm.v1.EventEthereumTx"). - /// @param attrs Arbitrary data payload associated with the event, typically - /// encoding state changes or metadata. - event AbciEvent(string indexed eventType, bytes attrs); + /// @param abciEvent JSON object string with the event type and fields of an + /// ABCI event. + event AbciEvent(string indexed eventType, string abciEvent); } diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index e4ae609ca..272d96b18 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -84,7 +84,7 @@ func (p precompileFunToken) Run( // Emit extra events for the EVM if this is a transaction // https://github.com/NibiruChain/nibiru/issues/2121 - if !readonly { + if isMutation[PrecompileMethod(startResult.Method.Name)] { EmitEventAbciEvents( startResult.CacheCtx, startResult.StateDB, diff --git a/x/evm/precompile/nibiru_evm_utils.go b/x/evm/precompile/nibiru_evm_utils.go index 8f4925f76..a6661de96 100644 --- a/x/evm/precompile/nibiru_evm_utils.go +++ b/x/evm/precompile/nibiru_evm_utils.go @@ -21,7 +21,13 @@ const EvmEventAbciEvent = "AbciEvent" // they can be emitted at the end of the "EthereumTx". These events are indexed // by their ABCI event type and help communicate non-EVM events in Ethereum-based // block explorers and indexers by saving the event attributes in JSON form. -// Note that event parsing is handled [gethabi.UnpackIntoMap] +// +// Instead of ABI packing the non-indexed argument, this function encodes the +// [gethcore.Log].Data as a JSON string directly to optimize readbility in +// explorers without requiring the reader to decode using an ABI. +// +// Simply use ["encoding/hex".DecodeString] with the "0x" prefix removed to read +// the ABCI event. func EmitEventAbciEvents( ctx sdk.Context, db *statedb.StateDB, @@ -35,13 +41,13 @@ func EmitEventAbciEvents( topics := make([]gethcommon.Hash, 2) topics[0] = event.ID - // eventType is the first (and only) indexed event + // eventType is the first (and only) indexed field topics[1] = EventTopicFromString(abciEvent.Type) attrsBz := AttrsToJSON(append([]abci.EventAttribute{ {Key: "eventType", Value: abciEvent.Type}, }, abciEvent.Attributes...)) - nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(attrsBz) + nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(string(attrsBz)) db.AddLog(&gethcore.Log{ Address: emittingAddr, Topics: topics, @@ -51,7 +57,7 @@ func EmitEventAbciEvents( } } -// AttrsToJSON creates a deterministic JSON encoding for the +// AttrsToJSON creates a deterministic JSON encoding for the key-value tuples. func AttrsToJSON(attrs []abci.EventAttribute) []byte { if len(attrs) == 0 { return []byte("") @@ -80,13 +86,20 @@ func AttrsToJSON(attrs []abci.EventAttribute) []byte { return buf.Bytes() } -// EventTopicFromBytes creates an [abi.Event] +// EventTopicFromBytes creates a "Topic" hash for an EVM event log. +// An event topic is a 32-byte field used to index specific fields in a smart +// contract event. Topics make it possible to efficiently filter for and search +// events in transaction logs. func EventTopicFromBytes(bz []byte) (topic gethcommon.Hash) { hash := crypto.Keccak256Hash(bz) copy(topic[:], hash[:]) return topic } +// EventTopicFromString creates a "Topic" hash for an EVM event log. +// An event topic is a 32-byte field used to index specific fields in a smart +// contract event. Topics make it possible to efficiently filter for and search +// events in transaction logs. func EventTopicFromString(str string) (topic gethcommon.Hash) { return EventTopicFromBytes([]byte(str)) } diff --git a/x/evm/precompile/nibiru_evm_utils_test.go b/x/evm/precompile/nibiru_evm_utils_test.go index c3cd347ab..c14da616a 100644 --- a/x/evm/precompile/nibiru_evm_utils_test.go +++ b/x/evm/precompile/nibiru_evm_utils_test.go @@ -6,8 +6,10 @@ import ( abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - abibind "github.com/ethereum/go-ethereum/accounts/abi/bind" + + // abibind "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/suite" @@ -22,14 +24,6 @@ type UtilsSuite struct { suite.Suite } -// These fields of the gethcore.Log have defaults. Look into how we populate them -// in EthereumTx. -// TODO: UD-DEBUG: Check about block hash -// TODO: UD-DEBUG: Check about tx hash -// TODO: UD-DEBUG: Check about tx index -// TODO: UD-DEBUG: Check about index -// TODO: UD-DEBUG: Check about block number - func (s *UtilsSuite) TestAttrsToJSON() { testCases := []struct { name string @@ -66,13 +60,15 @@ func (s *UtilsSuite) TestAttrsToJSON() { func (s *UtilsSuite) TestEmitEventAbciEvent() { abiEventName := precompile.EvmEventAbciEvent - event, some := embeds.SmartContract_FunToken.ABI.Events[abiEventName] + abi := embeds.SmartContract_FunToken.ABI + event, some := abi.Events[abiEventName] s.True(some, abiEventName) eventId := event.ID deps := evmtest.NewTestDeps() db := deps.NewStateDB() + s.T().Log("Mint coins to generate ABCI events") startIdx := len(deps.Ctx.EventManager().Events()) dbStartIdx := len(db.Logs()) err := deps.App.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, @@ -88,92 +84,58 @@ func (s *UtilsSuite) TestEmitEventAbciEvent() { blockNumber := uint64(deps.Ctx.BlockHeight()) evmAddrBech32 := eth.EthAddrToNibiruAddr(evm.EVM_MODULE_ADDRESS) type Want struct { - EventLogDataJson func() (raw, abiForm []byte) - EventLog gethcore.Log - ContractAbiParsedData map[string]any + EventLog gethcore.Log } wants := []Want{ { - EventLogDataJson: func() (raw, abiForm []byte) { - dataJson := []byte(fmt.Sprintf( - `{"eventType":"coin_received","receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), - ) - nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(dataJson) - return dataJson, nonIndexedArgs - }, - // Log.Data will be filled from the Want.EventLogData fn EventLog: gethcore.Log{ Address: emittingAddr, Topics: []gethcommon.Hash{ eventId, precompile.EventTopicFromString(`coin_received`), }, - BlockNumber: blockNumber, - Index: uint(dbStartIdx), - }, - ContractAbiParsedData: map[string]any{ - "attrs": []byte(fmt.Sprintf( + Data: []byte(fmt.Sprintf( `{"eventType":"coin_received","receiver":"%s","amount":"420000unibi"}`, evmAddrBech32), ), + BlockNumber: blockNumber, + Index: uint(dbStartIdx), }, }, { - EventLogDataJson: func() (raw, abiForm []byte) { - dataJson := []byte(fmt.Sprintf( - `{"eventType":"coinbase","minter":"%s","amount":"420000unibi"}`, evmAddrBech32), - ) - nonIndexedArgs, _ := event.Inputs.NonIndexed().Pack(dataJson) - return dataJson, nonIndexedArgs - }, - // Log.Data will be filled from the Want.EventLogData fn EventLog: gethcore.Log{ Address: emittingAddr, Topics: []gethcommon.Hash{ eventId, precompile.EventTopicFromString(`coinbase`), }, - BlockNumber: blockNumber, - Index: uint(dbStartIdx + 1), - }, - ContractAbiParsedData: map[string]any{ - "attrs": []byte(fmt.Sprintf( + Data: []byte(fmt.Sprintf( `{"eventType":"coinbase","minter":"%s","amount":"420000unibi"}`, evmAddrBech32), ), + BlockNumber: blockNumber, + Index: uint(dbStartIdx + 1), }, }, } s.T().Log("Define the ABI and smart contract that will unpack the event data") - abi := embeds.SmartContract_FunToken.ABI - boundContract := abibind.NewBoundContract( - emittingAddr, - *abi, - // These interface fields are not need for this test - (abibind.ContractCaller)(nil), - (abibind.ContractTransactor)(nil), - (abibind.ContractFilterer)(nil), - ) + + // boundContract := abibind.NewBoundContract( + // emittingAddr, *abi, nil, nil, nil, + // ) + // err := boundContract.UnpackLogIntoMap() debugBz, _ := json.MarshalIndent(abciEvents, "", " ") dbLogs := db.Logs() for idx, want := range wants { - _, want.EventLog.Data = want.EventLogDataJson() gotEventLog := *dbLogs[dbStartIdx+idx] - s.T().Log("event log.Data must unpack according to the ABI") - eventlogsNonIndexed := make(map[string]any) - err = abi.UnpackIntoMap( - eventlogsNonIndexed, - abiEventName, - gotEventLog.Data, - ) - s.NoErrorf(err, "eventlogsNonIndexed: %+s", eventlogsNonIndexed) - s.EqualValues(want.ContractAbiParsedData, eventlogsNonIndexed) + // logDataHex: Geth stores the bytes as a hex string (hexutil.Bytes) + logDataHex := hexutil.Bytes(gotEventLog.Data).String() + logDataHexDecoded, err := hexutil.Decode(logDataHex) + s.NoErrorf(err, "logDataHex: %s") + s.Equal(string(want.EventLog.Data), string(logDataHexDecoded)) - s.T().Log("event must be unpackable by the BoundContract that emitted it.") - gotLogMap := make(map[string]any) - err := boundContract.UnpackLogIntoMap(gotLogMap, abiEventName, gotEventLog) - s.NoErrorf(err, "gotLogMap: %+s", gotLogMap) + // TODO: UD-DEBUG: abibind import to test decoding s.EqualValuesf( want.EventLog, @@ -181,6 +143,4 @@ func (s *UtilsSuite) TestEmitEventAbciEvent() { "events:\n%#s", debugBz, ) } - - s.Require().NoErrorf(err, "debugBz %T want %T", debugBz, wants) } diff --git a/x/evm/precompile/wasm.go b/x/evm/precompile/wasm.go index 21645dc97..7d1da8729 100644 --- a/x/evm/precompile/wasm.go +++ b/x/evm/precompile/wasm.go @@ -76,7 +76,7 @@ func (p precompileWasm) Run( // Emit extra events for the EVM if this is a transaction // https://github.com/NibiruChain/nibiru/issues/2121 - if !readonly { + if isMutation[PrecompileMethod(startResult.Method.Name)] { EmitEventAbciEvents( startResult.CacheCtx, startResult.StateDB, diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index 4c729ef34..1306dfc7f 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -121,7 +121,9 @@ func (s *StateDB) GetCacheContext() *sdk.Context { return &s.cacheCtx } -// AddLog adds a log, called by evm. +// AddLog adds to the EVM's event log for the current transaction. +// [AddLog] uses the [TxConfig] to populate the tx hash, block hash, tx index, +// and event log index. func (s *StateDB) AddLog(log *gethcore.Log) { s.Journal.append(addLogChange{}) @@ -132,7 +134,7 @@ func (s *StateDB) AddLog(log *gethcore.Log) { s.logs = append(s.logs, log) } -// Logs returns the logs of current transaction. +// Logs returns the event logs of current transaction. func (s *StateDB) Logs() []*gethcore.Log { return s.logs } From 41de45e05c600588569222f8d1864162abcbc6d3 Mon Sep 17 00:00:00 2001 From: Unique-Divine Date: Sun, 29 Dec 2024 23:07:53 -0600 Subject: [PATCH 8/8] fix: use event log parsing rules from geth/.../abi/bind Go bindings --- x/evm/precompile/nibiru_evm_utils.go | 3 ++ x/evm/precompile/nibiru_evm_utils_test.go | 51 ++++++++++++++++------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/x/evm/precompile/nibiru_evm_utils.go b/x/evm/precompile/nibiru_evm_utils.go index a6661de96..08805481f 100644 --- a/x/evm/precompile/nibiru_evm_utils.go +++ b/x/evm/precompile/nibiru_evm_utils.go @@ -15,6 +15,9 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) +// EvmEventAbciEvent is the string key used to retrieve the "AbciEvent" Ethereum +// ABI event for a precompiled contract that implements the "INibiruEvm" +// interface from "Nibiru/x/evm/embeds/contracts/NibiruEvmUtils.sol". const EvmEventAbciEvent = "AbciEvent" // EmitEventAbciEvents adds a sequence of ABCI events to the EVM state DB so that diff --git a/x/evm/precompile/nibiru_evm_utils_test.go b/x/evm/precompile/nibiru_evm_utils_test.go index c14da616a..33348f281 100644 --- a/x/evm/precompile/nibiru_evm_utils_test.go +++ b/x/evm/precompile/nibiru_evm_utils_test.go @@ -7,7 +7,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - // abibind "github.com/ethereum/go-ethereum/accounts/abi/bind" + abibind "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" @@ -119,28 +119,51 @@ func (s *UtilsSuite) TestEmitEventAbciEvent() { s.T().Log("Define the ABI and smart contract that will unpack the event data") - // boundContract := abibind.NewBoundContract( - // emittingAddr, *abi, nil, nil, nil, - // ) - // err := boundContract.UnpackLogIntoMap() + boundContract := abibind.NewBoundContract( + emittingAddr, + *abi, + // verbose but descriptive to write out the interface implementations that are unused + (abibind.ContractCaller)(nil), + (abibind.ContractTransactor)(nil), + (abibind.ContractFilterer)(nil), + ) debugBz, _ := json.MarshalIndent(abciEvents, "", " ") dbLogs := db.Logs() for idx, want := range wants { gotEventLog := *dbLogs[dbStartIdx+idx] + s.T().Log("Check event log fields") // logDataHex: Geth stores the bytes as a hex string (hexutil.Bytes) logDataHex := hexutil.Bytes(gotEventLog.Data).String() logDataHexDecoded, err := hexutil.Decode(logDataHex) s.NoErrorf(err, "logDataHex: %s") - s.Equal(string(want.EventLog.Data), string(logDataHexDecoded)) - - // TODO: UD-DEBUG: abibind import to test decoding - - s.EqualValuesf( - want.EventLog, - gotEventLog, - "events:\n%#s", debugBz, - ) + s.Contains(string(logDataHexDecoded), string(want.EventLog.Data)) + { + w, g := want.EventLog.Topics, gotEventLog.Topics + s.Require().EqualValuesf(w, g, "events:\n%#s", debugBz) + } + { + w, g := want.EventLog.Address.Hex(), gotEventLog.Address.Hex() + s.Require().EqualValuesf(w, g, "events:\n%#s", debugBz) + } + { + w, g := string(want.EventLog.Data), string(gotEventLog.Data) + s.Require().Containsf(g, w, "events:\n%#s", debugBz) + } + + s.T().Log("Use geth/.../abi/bind Go bindings to test ABI event decoding") + eventMap := make(map[string]any) + err = boundContract.UnpackLogIntoMap(eventMap, abiEventName, gotEventLog) + s.Require().NoError(err) + + abciEventValUntyped, isSome := eventMap["abciEvent"] + s.Truef(isSome, "%+s", eventMap) + abciEventVal, ok := abciEventValUntyped.(string) + s.True(ok, "%+s\nttype of abciEventVal: %T", eventMap, abciEventValUntyped) + s.Equal(string(want.EventLog.Data), string(abciEventVal), "%+s", eventMap) + + _, isSome = eventMap["eventType"] + s.Truef(isSome, "%+s", eventMap) } }