forked from cerc-io/laconicd-deprecated
Sync from fork (#74)
* evm: update empty hash check for storage state (#1016) * imp: migrate JSON for feemarket (#1021) * imp: migrate JSON for feemarket * migrate JSON * types * fix * fix unmarshal JSON error * changelog * fix lint * fix test * fix: update feemarket REST endpoints (#1026) * fix: update feemarket REST endpoints * changelog * evm: PostTxProcessing hook - include the full message data (#1027) * x/evm - PostTxProcessing use message as callback input * Update CHANGELOG.md * Use core.Message for the PostTxProcessing hook (PR review) * fix: lint workflow (#1028) * fix lint workflow * fix comment * remove format * change checkout with setup-go * update comment * add checkout * add lint issue * revert lint error * deps: upgrade cosmos-sdk to v0.45.2 (#1029) Closes: #946 Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * evm: allow to append logs after a post processing hook (#1025) * add log after tx post processing hook add changelog fix tests rename variable minimum change version * Update x/evm/keeper/state_transition.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: remove proto message registration from legacy v09 types to fix conflict (#1023) with existing types Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump codecov/codecov-action from 2.1.0 to 3 (#1031) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests: add more dynamic fee tx tests (#1032) * types: add `ValidateNonZeroAddress` utility function (#1033) * Add ValidateNonZeroAddress validation utility * Update types/validation.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump actions/stale from 4 to 5 (#1041) Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump actions/setup-go from 2 to 3 (#1040) * build(deps): bump actions/setup-go from 2 to 3 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestions from code review Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * deps: bump SDK to v0.45.3 (#1046) * release: v0.13.0 (#1030) * release: v0.12.0 changelog * changelog: v0.12.1 (#1019) * evm: update empty hash check for storage state (#1016) * v0.12.1: changelog * changelog: v0.12.2 (#1022) * changelog: v0.12.2 * fix * fix * update changelog * deps: bump SDK to v0.45.3 * changelog * fixes * ci: cleanup (#1048) * tests: Increase coverage for msg.go and access_list_tx.go (#1044) * tests: Add tests for MsgEthereumTx getter methods * tests: Add nil data test for MsgEthereumTx buildTx * tests: Removed unnecessary sdk>big.Int conversions in MsgEthereumTx ValidateBasic test * tests: Replace deprecated ethtypes.NewTransaction * tests: Add AccessListTx tests * tests: Fix dropped LegacyTx coverage * Address PR comments Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.10.1 to 1.11.0 (#1054) * Context block height fix on `TraceTx` (#1051) * `eth_getBlockByNumber` fix on batch transactions (#1050) * fix: tests/solidity/package.json to reduce vulnerabilities (#1036) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908 Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: tests/solidity/suites/storage/package.json to reduce vulnerabilities (#1039) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-NODEFETCH-2342118 Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: tests/solidity/suites/eip1559/package.json to reduce vulnerabilities (#1038) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-NODEFETCH-2342118 Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: simulations don't generate EVM transactions (#996) * use SimAppChainId instead of the default cosmos-sdk simulation chainid * implement custom RandomGenesisAccounts for auth module simulation * use customized RandomGenesisAccounts * generate random ethereum txs operations * use sdk.DefaultBondDenom * implement WeightedOperations * fix self assignment * use customized RandomAccounts to generate accounts with ethsecp256k1 private key * RandomAccounts generate random accounts with ethsecp256k1 private key * implement SimulateEthSimpleTransfer * implement SimulateEthCreateContract * refactor and implement operationSimulateEthCallContract as future operations of SimulateEthCreateContract * Update app/app.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update app/test_helpers.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update app/test_helpers.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix r.Read return only 1 result * fix linter errors * change SimulateContext to private * return transferable amount immediately * fix linter errors * fix linter errors: append assign to different slice * fix linter error: remove else block * use gofumpt * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update x/evm/simulation/operations.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix recipient typo * add nosec comment to escape Potential hardcoded credentials check * add comments * use SimAppChainID as valid chainID * do not specify genesis.json to create random genesis state for simulation * sub estimateGas to avoid overflow * correct RandomGenesisAccounts comments Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * correct app/test_helpers.go comments Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * remove NewTxConfig * implement RegisterStoreDecoder * remove WeightMsgEthCallContract and adjust weights * use gofmt * update godoc * use types.DefaultEVMDenom in evm genesis params Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * use types.DefaultEVMDenom Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * update godoc * Update x/evm/simulation/genesis.go * replace evmdenom with bonddenom in AppStateFn * fix AppStateFn * fix lint error * add ParamChanges for RandomizedParams * rename app/test_helpers.go -> app/utils.go * testing for RandomGenesisAccounts * use cdc for marshaling * lint * changelog * changelog 2 Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com> Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com> * rpc: make json-rpc API namespaces extensible (#1056) * make jsonrpc api namespaces extensible Closes: #1052, #1037 * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * docs: update EVM spec * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.3 to 0.45.4 (#1065) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.3 to 0.45.4. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.4/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.3...v0.45.4) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github/codeql-action from 1 to 2 (#1064) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: update BaseFee JSON-RPC (#1059) * release: v0.14.0 changelog (#1057) * fix: update BaseFee JSON-RPC * typo * changelog * build(deps): bump github.com/btcsuite/btcd from 0.22.0-beta to 0.22.1 (#1069) * fix!: london hardfork check logic in json-rpc apis (#1068) * rpc: refactor rpc packages and backend to support cosmos namespace (#1070) * rpc: refactor rpc packages and backend to support cosmos namespace * changelog * typo * imp, ci: address pending issues from EVM simulation (#1063) * add note fix note * add TestAppStateFn TestRandomAccounts * marshal int slice to json * add paramschange for enableCreate and enableCall * AppStateFn -> StateFn * add TestDecodeStore * update github actions to run evm simulation * add TestParamChanges * add TestRandomizedGenState * use go install for runsim * resolve conflict * use random gasCap to estimate gas * use estimateGas to calculate max transferableAmount * update godoc * TestAppStateFn -> TestStateFn * Update x/evm/simulation/genesis.go * comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com> * remove unused bank keeper dependency from account verification decorator (#1074) The account verification decorator uses the evm keeper methods which already use the bank keeper, leaving the dependency unused. Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * ci: bump simulations timeout (#1073) * ante: check `EnableCreate`/`EnableCall` in ante handler (#1060) * Check EnableCreate/EnableCall in ante handler WIP: #1045 Reject tx early in ante handler, avoid deduct user fee for vain. * add unit tests * update changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com> * release: merge release branch changes back to main (#1079) * release: update CHANGELOG (#1078) * add unreleased section to changelog * Add cli rollback command (#1086) * fix: gas price value in `eth_getTransaction` JSON-RPC response (#1082) Solution: - pass the correct baseFee parameter Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: append `Log` in tx post processing response (#1088) * fix post processing log * update changelog * build(deps): bump cross-fetch from 2.2.5 to 2.2.6 in /tests/solidity (#1083) Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 2.2.5 to 2.2.6. - [Release notes](https://github.com/lquixada/cross-fetch/releases) - [Commits](https://github.com/lquixada/cross-fetch/compare/v2.2.5...v2.2.6) --- updated-dependencies: - dependency-name: cross-fetch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/spf13/cast from 1.4.1 to 1.5.0 (#1080) Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/spf13/cast/releases) - [Commits](https://github.com/spf13/cast/compare/v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: github.com/spf13/cast dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp: clean up the block fetch logic in json-rpc (#1081) * clean up the block fetch logic in json-rpc deduplicate some codes fix EthBlockFromTm fix latest block height * add bug fix changelog * imp(evm): define minimum GasUsed proportional to GasLimit (#1087) * min gas denominator implementation * update changelog * modify MinGasDenominator type to sdk.Dec * fix typo in comments * add comments * update comment * refactor logic * remove unnecesary test * fix typo on proto * rename param * fix tests * use truncate and run mod tidy * comment to default value * update changelog * rename temporary gas used * integration tests * add migrations * add default as var Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(evm): add query params to CLI (#1091) * add query params to evm * update changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * specs(evm): Add concepts (#1095) * specs(evm): Add concepts * specs(evm): Add geth and bytecode concepts * specs(evm): little fixes * fix typo * add CHANGELOG * impr(evm): add tx_type, gas and counter telemetry for ethereum txs (#1101) * impr(evm): add tx_type, gas and counter telemetry for ethereum txs * impr(evm): Add CHANGELOG * build(deps): bump alpine from 3.15 to 3.16.0 (#1094) Bumps alpine from 3.15 to 3.16.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#1100) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.11.0 to 1.12.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.11.0...v1.12.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/armon/go-metrics from 0.3.10 to 0.4.0 (#1103) Bumps [github.com/armon/go-metrics](https://github.com/armon/go-metrics) from 0.3.10 to 0.4.0. - [Release notes](https://github.com/armon/go-metrics/releases) - [Commits](https://github.com/armon/go-metrics/compare/v0.3.10...v0.4.0) --- updated-dependencies: - dependency-name: github.com/armon/go-metrics dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): avoid sleep with pending txs tests(#1098) * avoid pending tx get confirmed when sleep * fix install-tparse which need go >= 1.18 * fix strings.Cut in https://github.com/tharsis/ethermint/runs/6611646254?check_suite_focus=true * for more info, https://dev.to/hgsgtk/go-118-new-function-cut-added-to-stringsbytes-package-5c2f * Revert "fix install-tparse which need go >= 1.18" This reverts commit 5e39c2d7351ebbd6b789df214f2396e6c5dfb28e. Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(rpc, ante): Emit Ethereum tx hash in `AnteHandler` to support query failed transactions (#1062) * Emit eth tx hash in ante handler to support query failed transactions WIP: #1045 Solution: - emit eth tx hash in ante handler - modify rpc to use it fix ante handler support failed tx in receipt add unit tests need to patch cosmos-sdk to work update cosmos-sdk to v0.45.x release branch fix failed status fix unit tests add unit test cases cleanup dead code Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> fix lint fix review suggestions fix build fix gas used of failed tx add back the redundant events * fix get tx by index * add unit tests for events * Update rpc/types/events.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * update comments * refactoring * Update rpc/namespaces/ethereum/eth/api.go * fix lint * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * feemarket: global `MinGasPrice` parameter (#1104) * Add min_gas_price to feemarket params * Add MinGasPriceDecorators * feemarket integration tests for MinGasPrice * Restructure integration tests * Simplify integration tests context We use DeliverTx context to set up the app, otherwise not all settings are initialized. We test CheckTx with `s.app.BaseApp.CheckTx(req)`, which uses the `CheckTx` mode and context. * Update MinGasPrice spec in feemarket module * reorder ethermint module order for initializing genesis * feemarket migrations for adding MinGasPrice param * update changelog * Additional unit tests for MinGasPrice = 0, tx gas price > 0 (PR review) https://github.com/tharsis/ethermint/pull/1104#discussion_r884991661 * Use 0 MinGasPrice for transaction simulations * Fix duplicate registration of feemarket GenesisState and Params (PR review) https://github.com/tharsis/ethermint/pull/1104#issuecomment-1141893712 * analytics(app): update telemetry to Ethermint modules (#1106) * analytics(evm): replace telemetry gauges with counters and add gasUsed counter * analytics(feemarket): add telemetry gauges for base fee and block gas * analytics(feemarket): add telemetry gauges for gas_used per gas_limit * analytics(feemarket): remove refund telemetry * analytics(app): update CHANGELOG * remove unwanted change * address PR comments * update comment * build(deps): bump protobufjs from 6.11.2 to 6.11.3 in /tests/solidity (#1107) Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3. - [Release notes](https://github.com/protobufjs/protobuf.js/releases) - [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md) - [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3) --- updated-dependencies: - dependency-name: protobufjs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: Update `GetGasPrice` RPC endpoint with global `MinGasPrice` (#1108) * return MinGasPrice as minium on GetGasPrice api * update logic * update changelog * globalmingsprice comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Move CanTransfer decorator before GasConsume (#1111) * imp(feemarket): update `BaseFee` based on `GasWanted` (#1105) * add gasWanted transient store keys * add gasWanted transient store keeper functions * add gasWanted transient store tracker * add comment * remove unncesary comment * remove unnecesary function * fix tests * fix bad comment * remove unnecesary comment * update comment * update changelog * Update CHANGELOG.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * add GasWantedDecorator * remove unnecesary comments * gasWanted decorator test * fix tests * fix tests and build * fix lint * updated end block event * Update app/ante/fee_market.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix undeclared variable * Update app/ante/fee_market_test.go * remove unnecesary line * migrate MinGasMultiplier to FeeMarket module * set limited gas wanted * remove old newKeeper param * update proto comment * fix test * update comments * Update x/feemarket/keeper/abci.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * address comments from review * tidy * tests Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(types): avoid invalid account error on create vesting account (#1112) * avoid invalid account error on create vesting account * this change is related to https://github.com/cosmos/cosmos-sdk/pull/12154/files * for more info see https://github.com/crypto-org-chain/cronos/issues/471 * add change doc * add comment * change under unreleased * ante: refactor (#1113) * build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#1115) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests: update consensus params (#1117) * tests: update consensus params * fix * fix(types): account type method (#1118) * fix account type method * update changelog * imp(feemarket): min-gas-multiplier parameter should accept zero value (#1120) * min-gas-multiplier parameter should accept zero value update min-gas-multiplier validation logic * fix unit test * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * !feat(evm): Reject not replay-protected tx to prevent replay attack (#1124) * Reject not replay-protected tx to prevent replay attack Closes: #1122 - reject such txs in ante handler * add reject unprotected parameter * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * pr suggestions * add unit test case * Reject not replay-protected tx to prevent replay attack Closes: #1122 - reject such txs in ante handler add reject unprotected parameter Update CHANGELOG.md Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> pr suggestions add unit test case use var * add migrations * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * rename * update comments Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v3 from 3.0.0 to 3.1.0 (#1129) Bumps [github.com/cosmos/ibc-go/v3](https://github.com/cosmos/ibc-go) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v3.1.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: add ws log on read loop break (#1127) Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * all: rename go module to evmos/ethermint (#1137) * build(deps): bump technote-space/get-diff-action from 6.0.1 to 6.1.0 (#1139) Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 6.0.1 to 6.1.0. - [Release notes](https://github.com/technote-space/get-diff-action/releases) - [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc) - [Commits](https://github.com/technote-space/get-diff-action/compare/v6.0.1...v6.1.0) --- updated-dependencies: - dependency-name: technote-space/get-diff-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#1140) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): Fix `GasPrice` calculation with relation to `MinGasPrice` (#1138) * fix gasPrice minGasPrice comparison * update changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#1141) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(evm): clear logs if tx failed in post processing hooks (#1128) * Problem: clear logs if tx failed in post processing hooks * Update x/evm/keeper/state_transition.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(ci): buf makefile dependency, update semgrep workflow (#1144) * build(deps): bump bufbuild/buf-setup-action from 1.5.0 to 1.6.0 (#1145) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(rpc): restrict unprotected txs on the node RPC (#1143) * imp(rpc): restrict unprotected txs on the node RPC * lint * send raw transaction * c++ * imp(evm): rename `RejectUnprotectedTx` to `AllowUnprotectedTxs` (#1142) * imp(evm): rename RejectUnprotectedTx to AllowUnprotectedTxs * changelog * bug(feemarket): set lower bound of base fee to min gas price param (#1135) * bug(feemarket): set lower bound of base fee to min gas price param) * fix * bug(feemarket): flag necessary improvement to integration tests, as the baseFee changes for every test * bug(feemarket): add unit tests for CalculateBaseFee * bug(feemarket): move integration test setup out of Describe block * wip fix tests * bug(feemarket): fix integration tests * bug(feemarket): wip improve specs * bug(feemarket): add spec concepts * bug(feemarket): remove todo * bug(feemarket): remove changes used for debugging in params * bug(feemarket): remove todo in integration test * add changelog * address PR comments Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix!: fix json-rpc failures for pruned nodes (#1126) * fix json-rpc failures for pruned nodes Closes: #1123 Solution: - try to parse base fee from events if grpc query failed - use a `nil` base fee if failed to parse base fee from events - use zero address if query validator address failed - optimize some json-rpc apis by the way. * changelog * fix lint * use GetTendermintBlockResultByNumber * refactor Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#1148) * deps: Go 1.18 (#1147) * deps: Go 1.18 * changelog * update * evm: cleanup, remove atlas/ (#1152) * evm: cleanup, remove atlas/ * rm tparse action * fix lint issue * use cases.NoLower * tidy * release: backport v0.17.0 changelog (#1155) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * update mergify * fix(ci): fix semgrep issue (#1157) * fix goreleaser (#1160) * impr(init.sh): remove increase block time * bug(goreleaser): update docker image * build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#1163) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feemarket(specs): add hint on different gas terminology for gas in Cosmos and Ethereum (#1165) * imp(deps): Geth upgrade v1.10.19 (#1159) * upgrade geth and fix build * add support for * update EIPs * fix keeper tests * update traceTx function with latest geth changes * remove unnecessary comments * fix tests * update proto * add migrations * update module version * fix grpc test * fix lint * fix lint * update changelog * fix typo * remove unnecessary format logs * Update proto/ethermint/evm/v1/evm.proto Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * remove debug true on default * update comments * fixing ante tests * fixed cycle imports on migrate_test * fix wrong naming * update comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: TestAppStateDeterminism could fail owing to non-determinism in cosmos-sdk simulation (#1166) * update cosmos-sdk to latest commit to fix simulation failure * fix typo: 'staking genesis' -> 'evm genesis' Co-authored-by: Adu <foriteration@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(all): setup a validator in the test genesis (#1171) It's disabled in cosmos-sdk 0.46's InitGenesis to have zero validators, prepare for the upgrade of cosmos-sdk 0.46. * deps: upgrade ibc-go to v4-rc (#1167) changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(rpc): optimize `eth_getBalance` endpoint (#1169) * optimize get balance endpoint * add comment * add changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: traceTransaction returns zero gas used (#1179) * Problem: traceTransaction returns zero gas used Solution: - call CaptureTxStart and CaptureTxEnd * fix trace unit tests * add overflow check * add comment * check gas used is positive * Update x/evm/keeper/state_transition.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * impr(evm): add check msg.Validate check to prevent 0 gas txs (#1174) * impr(evm): add check msg.Validate check to prevent 0 gas txs * add changelog * impr(evm): add integration tests for zero gas txs * go mod tidy and proto swagger * fix comment * move changelog to state machine breaking * add ReadHeaderTimeout` * revert ReadHeaderTimeout config change Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp: NewAnteHandler returns error if input not valid (#1173) make NewAnteHandler safer too use, and closer to cosmos-sdk api. extracted from https://github.com/evmos/ethermint/pull/1168 * fix(rpc): fix panic on breaking EVM and feemarket params (#1188) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * fix(rpc): fix panic on breaking EVM and feemarket params * changelog * fix gosec * build(deps): bump alpine from 3.16.0 to 3.16.1 (#1192) Bumps alpine from 3.16.0 to 3.16.1. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * !fix(evm): Fix eth tx hashes in json-rpc responses (#1176) * Fix eth tx hashes in json-rpc responses Closes: #1175 - Remove Size_ field - Validate From/Hash fields in ante handler - Recompute tx hashes in json-rpc apis to cope with old blocks Update CHANGELOG.md remove Size_, validate Hash/From, add unit tests update spec Update CHANGELOG.md Update app/ante/eth.go populate From in SendRawTransaction Apply suggestions from code review keep Size_ field to avoid breaking tx format * move some validation to ValidateBasic * move validation to ValidateBasic * make ToTransaction returns a valid msg * restructure the protoTxProvider check * add comment * workaround tx hash issue in event parsing * fix integration test * fix unit test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(evm): `TxIndex` is wrong when trace is the first tx of a block (#1187) * Fix TxIndex wrongly when trace first Tx of a block If `Predecessors` is empty, `txConfig.TxIndex` originally = 0 and when it reachs line 401 `txConfig.TxIndex++`, it will becomes 1. It should be 0 * apply suggestion and add change-log * fix comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * testing(json rpc): Add backend test suite with mock grpc query client (#1199) * tests(json-rpc): wip evm_backend unit test setup * tests(json-rpc): wip evm_backend unit test setup * fix viper * wip query client mock * fix first backend test except error message * clean up * wip Context with Height * fix JSON RPC backend test setup * typo * refactor folder structure * Update rpc/backend/evm_backend_test.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/onsi/gomega from 1.19.0 to 1.20.0 (#1198) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.19.0 to 1.20.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.19.0...v1.20.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v4 (#1202) * imp(tests): integration tests setup (#1196) * first pass * latest * working tests * github actions * remove unnecessary change * remove unnecessary steps * remove unnecessary import * remove unnecessary change * Update .github/workflows/test.yml Co-authored-by: yihuang <huang@crypto.com> * update .gitignore * update github actions * change evm denomination * change evm denomination * send tests to tests folder * Delete result * update go version Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump @openzeppelin/contracts (#1205) Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.7.0 to 4.7.1. - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.7.0...v4.7.1) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump actions/upload-artifact from 2 to 3 (#1210) * build(deps): bump bufbuild/buf-setup-action from 1.6.0 to 1.7.0 (#1211) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump cachix/install-nix-action from 15 to 17 (#1209) Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 15 to 17. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v15...v17) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * !feat(deps): Upgrade cosmos-sdk to `v0.46.0` (#1168) * Reuse cosmos-sdk client library to create keyring Extracted from https://github.com/evmos/ethermint/pull/1168 Cleanup cmd code for easier to migration to cosmos-sdk 0.46 * Update cosmos-sdk v0.46 prepare for implementing cosmos-sdk feemarket and tx prioritization changelog refactor cmd use sdkmath fix lint fix unit tests fix unit test genesis fix unit tests fix unit test env setup fix unit tests fix unit tests register PrivKey impl fix extension options fix lint fix unit tests make HandlerOption.Validate private gofumpt fix msg response decoding fix sim test bump cosmos-sdk version fix sim test sdk 46 fix unit test fix unit tests update ibc-go * change default maxGasWanted (#1208) * ENG 119 json rpc unit tests (#1189) * tests(json-rpc): wip evm_backend unit test setup * tests(json-rpc): wip evm_backend unit test setup * fix viper * wip query client mock * fix first backend test except error message * clean up * wip Context with Height * fix JSON RPC backend test setup * typo * refactor folder structure * tests(json-rpc):add BlockBloom tests * tests(json-rpc): remove unused malleate * tests(json-rpc): add BaseFee tests * refactor query tests * add client mock * add GetTendermintBlockByNumber tests * refactor mock tests * refactor * wip backend EthBlockFromTendermint test * wip backend EthBlockFromTendermint test * refactor backend EthBlockFromTendermint test * add TestGetTendermintBlockResultByNumber * add GetBlockByNumber tests * refactor mocks * fix spelling * add more tests and address comments * build(deps): bump cosmossdk.io/math from 1.0.0-beta.2 to 1.0.0-beta.3 (#1216) Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.2 to 1.0.0-beta.3. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.0.0-beta.2...math/v1.0.0-beta.3) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/protobuf from 1.28.0 to 1.28.1 (#1215) Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.0 to 1.28.1. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.0...v1.28.1) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update CODEOWNERS (#1220) * fix: integration tests are not run in CI (#1221) Solution: - make it run - add python linter job for the python codes - fix nix expression to build ethermintd add file diff condition add gomod2nix check * fix pruned node integration test (#1223) closes: #1222 * chore(docs): update changelog (#1224) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * chore(docs): update changelog * feat(ante, evm): set priority for eth transactions (#1214) * Set priority for eth transactions Set the tx priority to the lowest priority in the messages. fix unit tests code cleanup and spec update spec fix go lint add priority integration test add python linter job add access list tx type fix gas limit remove ledger tag, so no need to replace hid dependency fix earlier check ibc-go v5.0.0-beta1 * fix pruned node integration test * Update x/feemarket/spec/09_antehandlers.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * feat: support dynamic app db backend flag (#1226) * support dynamic app db backend * address pr reviews * add comment * Update server/start.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(tests): prune node integration tests (#1212) * first pass * extra comment * fixed pruned node tests. Fix getBalance on pruned. Fix BaseFee on pruned. * fix tests execution * check logs on tests * address pr comments * address comments * Update rpc/namespaces/ethereum/eth/api.go * update error msg check * fix lint * fix linter * fix linter * fix py lint * test lint * fix lint * pin golangcli version * pin golanci version * pin lint to version 0.48 * fix linter * fix last linter last file Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump cachix/install-nix-action from 15 to 17 (#1228) Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 15 to 17. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v15...v17) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ENG-626] Rpc types integration tests (#1207) * types tests * cleanup * cleanup * fix differences in the rpc calls with geth * cleanup * fix linter. getProof future queries now behave as geth * fix spelling Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(rpc): restructure JSON-RPC APIs (#1218) * move non api methods from eth/api.go to evm_backend: ClientCtx, QueryClient, Ctx, getBlockNumber, getTransactionByBlockAndIndex, doCall * organize eth/api.go into sections and move backend logic to dedicated files * remove unnecesary comment * move resend to the backend * refractor eth api * refractor debug namespace * refactor miner namespace * refactor personal namespace * update transactionReceipt from upstream * update getBlockByNumber from upstream * update getBalance from upstream * update getProof from upstream * update getBalance from upstream * fix linter * remove duplicated import * remove duplicated import * fix backend tests * fix lint * fix duplicated imports * fix linter * reorganize blocks * backend folder refractor * remove unnecessary file * remove duplicate import Co-authored-by: Freddy Caceres <facs95@gmail.com> * Problem: feemarket's query cli has redundant height parameter (#1230) * build(deps): bump alpine from 3.16.1 to 3.16.2 (#1232) * Add support for `MaxOpenConnections` (#1229) * feat!: Apply feemarket to native cosmos tx (#1194) * Problem: feemarket's query cli has redundant height parameter Soluton: - remove the positional height parameter, since there's a flag already. Update CHANGELOG.md * Apply feemarket to native cosmos tx - add tx extension option for user to input tip price - apply feemarket's base fee to native tx comments and cleanup fallback to default sdk logic when london hardfork not enabled integration test cleanup feemarket query cli commands Update CHANGELOG.md update unit tests disable feemarket in simulation tests for now fix lint Update app/simulation_test.go fix python lint fix lint Update x/evm/types/extension_option.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> address review suggestions * fix unit tests * fix integration test * improve unit test coverage * fix go lint * refactor * fix integration test * fix simulation tests * fix go linter Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Merge pull request from GHSA-f92v-grc2-w2fg (#1234) * feat!: Store eth tx index separately (#1121) * Store eth tx index separately Closes: #1075 Solution: - run a optional indexer service - adapt the json-rpc to the more efficient query changelog changelog fix lint fix backward compatibility fix lint timeout better strconv fix linter fix package name add cli command to index old tx fix for loop indexer cmd don't have access to local rpc workaround exceed block gas limit situation add unit tests for indexer refactor polish the indexer module Update server/config/toml.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> improve comments share code between GetTxByEthHash and GetTxByIndex fix unit test Update server/indexer.go Co-authored-by: Freddy Caceres <facs95@gmail.com> * Apply suggestions from code review * test enable-indexer in integration test * fix go lint * address review suggestions * fix linter * address review suggestions - test indexer in backend unit test - add comments * fix build * fix test * service name Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: make get_proof integration tests more stable (#1236) * test: make get_proof integration tests more stable it could fail for error "proof queries at height <= 2 are not supported" if the latest block number <= 2 * Apply suggestions from code review * Add support for miner_setGasPrice API (#1237) * fix(rpc): get_proof test fail because block numbers are not high enough (#1239) * Problem: get_proof test fail because block numbers are not high enough Solution: - wait for app block height rather than tendermint block height * Update tests/integration_tests/test_types.py * keep get_proof response the same as geth Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * tests(rpc): add filter tests (#1233) * tests(rpc): add pending transaction filter test * tests(rpc): add block filter and event log test * tests(rpc): simplify to cluster instead of comparing types * tests(rpc): wip filter by address * tests(rpc): add get_logs test * fix flake8 linter * fix flake8 linter * add caching to readme * add caching to readme Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(docs): Update Changelog (#1249) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * chore(docs): Update Changelog * fix(test): priority test result affect by base fee dropping (#1238) * Problem: priority test result affect by base fee dropping Solution: - increase the scale of priority numbers to make it more stable. * Update tests/integration_tests/test_priority.py Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump @openzeppelin/contracts (#1268) Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.7.1 to 4.7.2. - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.7.1...v4.7.2) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump undici in /tests/integration_tests/contracts (#1282) Bumps [undici](https://github.com/nodejs/undici) from 5.8.0 to 5.9.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v5.8.0...v5.9.1) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump @openzeppelin/contracts (#1281) Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.7.2 to 4.7.3. - [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases) - [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md) - [Commits](https://github.com/OpenZeppelin/openzeppelin-contracts/compare/v4.7.2...v4.7.3) --- updated-dependencies: - dependency-name: "@openzeppelin/contracts" dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 (#1294) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.0-beta1 to 5.0.0-rc0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.0-beta1...v5.0.0-rc0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: Update cosmos-sdk to `v0.46.1` (#1300) * Update cosmos-sdk to 0.46.1 * update gomod2nix.toml * eth_sendTransaction returns internal trace on missing param (#1284) * added test, used get method for from param * gosec fixes * adding nosec v1 * added test to python tests, removed testing lines * fixing flake issues * test-unit-cover * changelog fix * changelog 2 * fix gomod2nix * integration tests Co-authored-by: Freddy Caceres <facs95@gmail.com> * chore: Gofumpt (#1298) * fumpt * golangci * Update keeper_test.go * Update keeper_test.go * Update handler_test.go * Update rpc_pending_test.go * lll * line length limits * Update CHANGELOG.md * fixes for 19.0.1 (#1305) * fixes for 19.0.1 * changelog * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.6 (#1318) * build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.6 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.4 to 2.1.6. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.1.4...v2.1.6) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump eth-account in /tests/integration_tests (#1317) Bumps [eth-account](https://github.com/ethereum/eth-account) from 0.5.7 to 0.5.9. - [Release notes](https://github.com/ethereum/eth-account/releases) - [Changelog](https://github.com/ethereum/eth-account/blob/master/docs/release_notes.rst) - [Commits](https://github.com/ethereum/eth-account/compare/v0.5.7...v0.5.9) --- updated-dependencies: - dependency-name: eth-account dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * test: add integration test for the rollback cmd (#1311) * test the fixed rollback cmd - check the rollback cmd works in integration tests * Apply suggestions from code review * upstream merged * add changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: improve x/evm/types coverage (#1302) * modifying x/evm/types tests v1 * modifying x/evm/types tests v2 * modifying x/evm/types test v3 Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump google.golang.org/grpc from 1.48.0 to 1.49.0 (#1295) * build(deps): bump google.golang.org/grpc from 1.48.0 to 1.49.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.48.0 to 1.49.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.48.0...v1.49.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Change the fallback priority mechanism to be based on gas price (#1289) * Change the fallback priority mechanism to be based on gas price * Update CHANGELOG.md Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/gomega from 1.20.1 to 1.20.2 (#1323) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.20.1 to 1.20.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.20.1...v1.20.2) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(rpc): add backend blocks tests (#1296) * wip * rename GetTendermintBlockByNumber to TendermintBlockByNumber * rename GetTendermintBlockResultByNumber to TendermintBlockResultByNumber * rename GetTendermintBlockByHash to TendermintBlockByHash * rename BlockByNumber to EthBlockByNumber * rename BlockByHash to EthBlockByHash * rename GetBlockNumberByHash to BlockNumberFromTendermintByHash * rename GetBlockNumber to BlockNumberFromTendermint * rename GetEthereumMsgsFromTendermintBlock to EthMsgsFromTendermintBlock * rename GetEthBlockFromTendermint to BlockFromTendermintBlock * rename EthBlockFromTendermint to EthBlockFromTendermintBlock * add TestEthBlockFromTendermintBlock with no transactions. Note that this endpoint is breaking when querying a block with transactions * add block transaction count tests * add TendermintBlockByHash test' * add TestBlockNumberFromTendermint tests * add HeaderByHash and HeaderByNumber tests * add EthBlockFromTendermintBlock test * add TestEthBlockByNumber tests * Specificy that the endpoints are getting Etherum transactions in comments * Refactor shared logic into GetBlockTransactionCount * rename BlockFromTendermintBlock to RPCBlockFromTendermintBlock * add CHangelog * build(deps): bump github.com/spf13/viper from 1.12.0 to 1.13.0 (#1328) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/armon/go-metrics from 0.4.0 to 0.4.1 (#1337) Bumps [github.com/armon/go-metrics](https://github.com/armon/go-metrics) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/armon/go-metrics/releases) - [Commits](https://github.com/armon/go-metrics/compare/v0.4.0...v0.4.1) --- updated-dependencies: - dependency-name: github.com/armon/go-metrics dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update CODEOWNERS * feat(eip712): Create LedgerPreprocessHook to reformat EIP-712 payloads (#1277) * Create ReformatLedgerTx to reformat EIP-712 payloads * Fix issue with public key; minor refactors * Refactor naming; add test case * Update preprocess_test * Add tests and fix lint * Refactor preprocess test * Implement minor fix and add changelog entry Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.0-rc0 to 5.0.0-rc1 (#1313) * build(deps): bump github.com/cosmos/ibc-go/v5 Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.0-rc0 to 5.0.0-rc1. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.0-rc0...v5.0.0-rc1) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(evm): stateless custom precompiles (#1272) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * imp(evm): EVM interface * fixes * fix lint * fix lint pt 2 * initial wiring for stateful contracts * Apply suggestions from code review Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * changelog * comments from review * lint Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix: upload nix binary for macOS (#1327) Solution: - add a workflow to upload cache for macos Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore: update changelog from v0.19 (#1347) * release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * changelog * update * build(deps): bump bufbuild/buf-setup-action from 1.7.0 to 1.8.0 (#1343) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): estimate gas error response (#1340) * format error on EstimateGas rpc call * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * !fix(erc712): support `MsgCreateValidator` (#1346) * fix for create validator msg and tests * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 (#1345) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.0-rc1 to 5.0.0-rc2. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.0-rc1...v5.0.0-rc2) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * test(rpc): Ethereum JSONRPC Websocket (#1342) * WIP! add Ethereum JSONRPC Websocket test * move to test-rpc * clean up * fix batch request with websocket * refactor * build(deps): bump github.com/holiman/uint256 from 1.2.0 to 1.2.1 (#1350) Bumps [github.com/holiman/uint256](https://github.com/holiman/uint256) from 1.2.0 to 1.2.1. - [Release notes](https://github.com/holiman/uint256/releases) - [Commits](https://github.com/holiman/uint256/compare/v1.2.0...v1.2.1) --- updated-dependencies: - dependency-name: github.com/holiman/uint256 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.1.6 to 2.2.0 (#1351) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.6 to 2.2.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.1.6...v2.2.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(rpc,server): concurrent gRPC queries (#1352) * Problem: grpc query is not run concurrently Solution: - Initiate the GRPCClient introduced in [sdk 0.46](https://github.com/cosmos/cosmos-sdk/pull/11234). * Update CHANGELOG.md * Update CHANGELOG.md * Update server/start.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * wrap error * Update server/start.go * more complete copy * fix grpc crash Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump actions/stale from 5 to 6 (#1357) Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): fix gRPC query failure on legacy blocks (#1354) * Problem: grpc query fail on legacy blocks `BaseFee` and `EthCall`. Solution: - since grpc query handlers are used for all versions of the blocks, it need to be compatible with legacy formats. debug fix basefee fetch Revert "debug" This reverts commit 50ebaf697fc06b0d6e26abd8de8f89717e8a219d. update gomod2nix Update CHANGELOG.md debug fix panic Revert "debug" This reverts commit e08af04b0776bd390c42706cc9ec978e00bcb3bb. * add upgrade integration test * Update tests/integration_tests/configs/upgrade-test-package.nix Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump protobuf from 3.20.0 to 3.20.2 in /tests/integration_tests (#1358) * build(deps): bump protobuf in /tests/integration_tests Bumps [protobuf](https://github.com/protocolbuffers/protobuf) from 3.20.0 to 3.20.2. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py) - [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.20.0...v3.20.2) --- updated-dependencies: - dependency-name: protobuf dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * change lock file to remove infinite recursion Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: adisaran64 <adisaran64@berkeley.edu> * deps: bump ibc-go to v5 (#1361) * deps: bump ibc-go to v5 * changelog * fix: `index-eth-tx` cmd fail on empty indexer db (#1362) * fix: `index-eth-tx` cmd fail on empty indexer db Solution: - start from latest height is db is empty * update gomod2nix * Update CHANGELOG.md Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: skip fee check on tx simulation (#1364) * fix: skip fee check on tx simulation * fix: update fees_tests to account for sim. change * build(deps): bump github.com/onsi/gomega from 1.20.2 to 1.21.1 (#1366) * build(deps): bump github.com/onsi/gomega from 1.20.2 to 1.21.1 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.20.2 to 1.21.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.20.2...v1.21.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump google.golang.org/grpc from 1.49.0 to 1.50.0 (#1365) * build(deps): bump google.golang.org/grpc from 1.49.0 to 1.50.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.49.0 to 1.50.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.49.0...v1.50.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests(rpc): Add account info unit tests (#1339) * tests(rpc): add GetCode pass test * tests(rpc): add GetCode failing tests * tests(rpc): wip StorageAt tests * tests(rpc): add StorageAt tests * wip * wip balance tests * add balance tests * add TestGetTransactionCount * fix TestGetProof * WIP GetTransactionCount * WIP GetTransactionCount with RegisterABCIQueryWithOptions * remove TODO * go mod tidy * build(deps): bump apollo-server from 2.25.3 to 2.26.0 in /tests/solidity (#1376) Bumps [apollo-server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server) from 2.25.3 to 2.26.0. - [Release notes](https://github.com/apollographql/apollo-server/releases) - [Changelog](https://github.com/apollographql/apollo-server/blob/apollo-server@2.26.0/CHANGELOG.md) - [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server@2.26.0/packages/apollo-server) --- updated-dependencies: - dependency-name: apollo-server dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 (#1374) * build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update go2modnix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * imp(rpc) Add support for EVM RPC metrics (#1378) * imp(rpc) Add support for EVM RPC metrics - Support --metrics flag - Add EVM rpc metrics server config * Update as per PR feedback Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0 (#1375) * build(deps): bump github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.2.0...v2.3.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update go2modnix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0 (#1373) * build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * fix(testutils): fix blank bank genesis params (#1379) Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#1383) * build(deps): bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.3.0...v2.3.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump golang.org/x/text from 0.3.8 to 0.4.0 (#1387) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.8 to 0.4.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.8...v0.4.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump technote-space/get-diff-action from 6.1.0 to 6.1.1 (#1385) Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 6.1.0 to 6.1.1. - [Release notes](https://github.com/technote-space/get-diff-action/releases) - [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc) - [Commits](https://github.com/technote-space/get-diff-action/compare/v6.1.0...v6.1.1) --- updated-dependencies: - dependency-name: technote-space/get-diff-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/gomega from 1.21.1 to 1.22.1 (#1372) * build(deps): bump github.com/onsi/gomega from 1.21.1 to 1.22.1 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.21.1 to 1.22.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.21.1...v1.22.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update go2modnix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Bump SDK to 0.46.2 (#1386) * bump sdk * undo go.sum * bump * build(deps): bump cachix/cachix-action from 10 to 11 (#1371) Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 10 to 11. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v10...v11) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump cachix/install-nix-action from 17 to 18 (#1380) Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 17 to 18. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v17...v18) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump google.golang.org/grpc from 1.50.0 to 1.50.1 (#1382) * build(deps): bump google.golang.org/grpc from 1.50.0 to 1.50.1 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.0 to 1.50.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.50.0...v1.50.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(server): Add query-only mode flag for gRPC (#1360) * add grpc only mode flag * add change log * add tmNode nil check * only flag to modes * fix close for query mode * fix hint * keep grpc-only & json-rpc-only * rm space * mv apiSrv close * mv cpuProfileCleanup * mv tmNode stop * disable indexer on query only which need tm client on start * update nix * revert json-rpc-only change * fix(evm): skip hash check when the code has been deleted (#1320) * evm.InitGenesis skip codehash check when the code has been deleted in the evm state * fix lint * just ignore all the codehash check when the evm account code is empty * update changelog * nit * add test * add test Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * refactor: optimize AnteHandler gas consumption (#1388) * refactor: antehandler order and params optimization * removed additional individual params for the feemarket module * typo fix * Apply suggestions from code review - Fede Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * typo fix * formatted using gofumpt * typo fix - missed negate operator * missed to negate conditions * added unit tests for the new param getter methods * updated changelog * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * moved to improvements * Converted unit tests into table-driven tests * added Require().Equal() to test case Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * [issue-#1389] add multisig tx support (#1390) * [issue-#1389] add multisig tx support * [issue-#1389] add changes in CHANGELOG improvements * [issue-#1389] fix style issue * [issue-#1389] fix style issue * [issue-#1389] add tests * imp(ante): refactor for increased `AnteHandler` performance (#1393) * build(deps): bump bufbuild/buf-setup-action from 1.8.0 to 1.9.0 (#1394) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.8.0 to 1.9.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.8.0...v1.9.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * feat: format protobuf files (#1395) * format protobuf files * go mod tidy * update gomod2nix * ime(evm): improve code coverage for EVM keeper (#1396) * [issue-1018] add new tests on evm module keeper * [issue-1018] add more new tests on evm module keeper * [issue-1018] add more new tests on evm module keeper (state_transition, statedb, utils) * [issue-1018] add more new tests on evm module keeper (msg_server) * [issue-1018] fix code style * [issue-1018] add changes in CHANGELOG * [issue-1018] add missing error check in grpc_query_test * [issue-1018] fix failing tests * [issue-1018] add changes based on review comments (grpc_query_test & abci_test) * [issue-1018] add GenerateAddress in TestEthCall (grpc_query_test) * [issue-1018] remove unnecessary SetupTest calls * [issue-1018] refactor SetupTest calls (grpc_query_test & statedb_test) * fix(evm,rpc): coinbase should not be the current one in traceTransaction execution (#1392) * add proposer address * make proto-all * update nix * fix test * keep default proposerAddress * add change doc * refine GetProposerAddress with test * include ProposerAddress for trace api * fix eth call req * wrap proposerAddress for eth call * allow proto translates to sdk.ConsAddress * Update rpc/backend/call_tx.go Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/cosmos-sdk from 0.46.2 to 0.46.3 (#1398) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.46.2 to 0.46.3 Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.46.2 to 0.46.3. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.46.2...v0.46.3) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 (#1399) * build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0 (#1400) * build(deps): bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.3.1 to 2.4.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.3.1...v2.4.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#1403) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(websocket): websocket integration tests (#1355) * skeleton websocket tests * update websocket tests * flake fixes * ignore line break issues * fix configuration file Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/onsi/gomega from 1.22.1 to 1.23.0 (#1406) * build(deps): bump github.com/onsi/gomega from 1.22.1 to 1.23.0 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.22.1 to 1.23.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.22.1...v1.23.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.0 to 5.0.1 (#1412) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.0.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump cachix/cachix-action from 11 to 12 (#1411) * build(deps): bump cachix/cachix-action from 11 to 12 Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 11 to 12. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v11...v12) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * update gomod2nix Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * chore(docs): update SECURITY.md (#1410) * chore(docs): update SECURITY.md * Update SECURITY.md Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * Update SECURITY.md Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * deps: bump go to v1.19 (#1416) * deps: bump go to v1.19 * deps: add dragonberry patch repalce in go.mod * deps: add ival bump to v0.19.4 * deps: remove unrelated version bumps to adress in differnet PR * go mod tidy * add changelog * fix typo in changelog * chore(cli): apply google CLI Syntax for required and optional args (#1417) * chore(cli): apply google CLI Syntax for required and optional args * chore(cli): add changes in CHANGELOG * chore(cli): fix link to PR in CHANGELOG * chore(cli): fix args in feemarket * chore(cli): update docs based on comments * chore(ci): update linters (#1418) * chore(ci): update linters * skip md link * backport: add v0.19.3 dragonberry changes to `main` and bump iavl to v0.19.4 (#1419) * backport: v0.19.3 dragonberry changes and iavl bump * add v0.19.3 changelog * update gomod2nix * fix linter * use latest for golangci github workflow Co-authored-by: Freddy Caceres <facs95@gmail.com> * release: v0.20.0-rc1 cherry pick and changelog (#1422) * Revert "feat(eip712): Create LedgerPreprocessHook to reformat EIP-712 payloads (#1277)" This reverts commit723443abc7. * release: upadte changelog * deps(sdk): bump to v0.46.4 (#1423) (#1426) * deps(sdk): bump to v0.46.4 * deps(sdk): add IAVLDisableFastNode flag with false default (cherry picked from commit457e25aabf) Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> * release: v0.20.0-rc2 upadte changelog (#1427) * release: v0.20-rc3 changelog (#1517) * deps(sdk): bump to v0.46.4 (#1423) * deps(sdk): bump to v0.46.4 * deps(sdk): add IAVLDisableFastNode flag with false default * imp: reduce integration test block time to 2s (#1428) * build(deps): bump github.com/onsi/gomega from 1.23.0 to 1.24.0 (#1429) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): different result from `eth_getProof` comparing with Ethereum (#1431) * align with eth_getProof for more info, see https://eips.ethereum.org/EIPS/eip-1186 * add GetHexProofs * add change doc * keep default res * fix lint * add e2e test * Apply suggestions from code review * fix lint * nix run -f ./nix gomod2nix * Refactor EIP-712 signature verification (#1397) * [WIP] EIP-712 Signature Refactor * Debug and add ante tests * Add tests for failure cases * Add changelog entry * Code cleanup * Add tests for MsgDelegate and MsgWithdrawDelegationReward * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Code cleanup * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Minor codefix * Update ethereum/eip712/encoding.go * Minor code revision updates * Refactor EIP712 unit tests to use test suite * Address import cycle and implement minor refactors * Fix lint issues * Add EIP712 unit suite test function * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Add minor refactors; increase test coverage * Correct ante_test for change in payload * Add single-signer util and tests * Update ethereum/eip712/encoding.go * Update ethereum/eip712/encoding.go * fix build Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: build test on mac by updating to python3.10 (#1437) * build(deps): bump loader-utils from 1.4.0 to 1.4.1 in /tests/solidity (#1445) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(evm): improve performance of EstimateGas (#1444) * imp(evm): improve performance of EstimateGas * changelog * fix(rpc): decode `finalized` block number (#1442) * fix(rpc): decode 'finalized' block number * changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/gomega from 1.24.0 to 1.24.1 (#1449) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1439) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: unstable tx_priority test (#1440) * fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.1 to 5.1.0 (#1450) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.1.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.1...v5.1.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#1454) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor(all): refactor errors import to use cosmossdk.io (#1456) * refactor (errors) refactor errors import to use cosmossdk.io instead of cosmos-sdk/types/errors * refactor (errors) refactor errors import in ethsecp256k1 file * refactor (errors) add changes to changelog * build(deps): bump alpine from 3.16.2 to 3.16.3 (#1453) Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Empty KV gas config (#1460) * update sdk version * setup empty gas config * fix lint * fix integration tests * add Ante unit test * update changelog * test: remove unused integration tests (#1462) * fix: remove e2e github action (#1463) * remove unused tests * imp: remove e2e github action * build(deps): bump loader-utils from 1.4.1 to 1.4.2 in /tests/solidity (#1464) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore (deps): Update geth version to v1.10.25 (#1413) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.19 to 1.10.25. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.19...v1.10.25) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * wip geth update * fix geth init flag order * add chainId to getTransaction. fix types comparison. update expected values on tests * wip add tracer config * tracers test * update tests * update to v1.10.25 * fix linter python * ignore error * fix lint * additional changes from diff * fix issues * solve lint issues * fix tests * fix flake * wrap types comparison in integration tests * fix integration tests * fix flake * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Add EIP-712 encoding support type for any array (#1430) * Add EIP-712 encoding support type for any array * Refactor implementation + add tests * Refactor unpacking implementation; refactor test case * Fix lint issue * Add MsgExec test case * Update comment for clarity * Add changelog entry * Refactor `sdkerrors` to `errorsmod` Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: extend geth config on integration tests (#1467) * changing git config and adding tests * removing print statements * remove unneccessary imports * fix flake * remove geth setup test Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: Add unit tests for rpc client endpoints (#1409) * test: add preliminary unit tests and additional mocks for chain_info, account_info and filters * tests: added additional mocked client calls * tests: bumped coverage of call_tx to 56% and chain_info to 77% * tests: bumped call_tx coverage to 70.2% and added additional mock client calls * tests: tx_info preliminary tests added for debugging. * tests: added test coverage for sign_tx and additional mocks * tests: tx_info test coverage bumped to 60.3% * test: coverage for tracing_tests now at 72% * tests: added fee makert query client mocks and bumped chain_info to 87.6% coverage. * tests: failing Cosmos auth module account query. * tests: added FeeMarket Params mock to call_tx_test * cleanup some unused code * tests: added helper function to test suite for signing a Tx and bumped coverage of tx_info to 71.2% * test: commented GetAccount error case and bumped chain_info to 90.3% coverage * test: cleanup of tests in node_info, sign_tx and account_info * Clean up print Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Apply suggestions from code review * fix import issues Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Refactor to omit empty optionals from EIP-712 type generation (#1459) * Refactor to omit empty values from type creation; add test for v1.vote * Add test for createValidator with optional fields left blank * Add changelog entry * Update changelog entry Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: protogen scripts were not correctly implemented (#1466) * Delete local copy of third party proto files * Update protocgen script and buf yaml files to mirror cosmos-sdk * Update makefile commands for proto-gen and proto-swagger-gen to correctly use docker * Commit changed .pb.go files after updating the protogen scripts * Adjust grep in proto-tools-installer script to look for correct gogoproto replacement * address reviews - remove unnecessary ignore in buf.yaml and cosmos-sdk download in the protocgen script * remove proto-update-deps from makefile as we don't store local copies of third party protofiles anymore * Add changelog entry * Update protoc-swagger-gen.sh * Remove third party queries from swagger-ui config (for now) * fix integrations tests * fix dead changelog links (markdown-link-check) Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * added gas consumption test (#1474) * build(deps): bump github.com/cosmos/cosmos-proto (#1475) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha7 to 1.0.0-alpha8. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha7...v1.0.0-alpha8) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: chain-id in grpc query is not initialized without abci event (#1405) * fix: chain-id in grpc query is not initialized without abci event Closes: #1404 Solution: - pass the chain-id from caller. * Update CHANGELOG.md * only override if input is not empty * add comment to chain id * pass chain-id to state transition * Update x/evm/keeper/grpc_query.go * Apply suggestions from code review * fix golang lint * update gomod2nix.toml * fix unit tests * update gomod2nix * api breaking changelog * add unit tests, and fix TraceBlock by the way * Update CHANGELOG.md * test --grpc-only mode in integration tests * remove tmp var * Update tests/integration_tests/test_grpc_only.py * Update x/evm/keeper/grpc_query_test.go Co-authored-by: mmsqe <tqd0800210105@gmail.com> * fix linters * fix nil pointer in tests * fix conflicts * fix conflicts * fixes * fix lint * fix unit test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(evm): Simplify Gas Math (#1452) * fix math * changelog * imp(ante): refactor `AnteHandler` (#1455) * fix(ante): block gas check * refactor * rename * use gas wanted * remove consume gas logic on ante handler * comment * c++ * move min gas price * comment * Update app/ante/eth.go Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix build * fix integration test script Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: add additional gas consumption tests (#1477) * split existing gas test * added contract call test * fix flake issues, update gomod2nix * isort imports * add stateful contract calls * chore: update proto make commands (#1471) * Update proto make commands to use cosmos docker image and add notes for possible problems * Apply make proto-all with new docker container * Remove stale DOCKER_BUF variable * Revert to using the tendermintdev/sdk-proto-gen docker image * remove '@' in proto-lint and proto-check-breaking for consistency with other commands * Remove unnecessary go get from protocgen.sh (only works after adding --network host to docker run) * Add --network host to docker run for compatibility on linux * use cosmos/proto-builder docker image for proto-format because clang-format is not installed on tendermintdev/sdk-proto-gen * update swagger docs after recent additions to evm.proto in #1413 Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * Remove unbound labels from added custom tendermint metrics (#1434) * Remove unbound labels from added custom tendermint metrics * Add entry to changelog * deps: bump SDK to v0.46.6 (#1486) * deps: bump SDK to v0.46.6 * changelog * Update CHANGELOG.md Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * fear(eip712): Add EIP-712 encoding for multiple messages of the same type (#1483) * Add EIP-712 encoding for multiple messages of the same type * Fix Protobuf encoding bug * Add ante tests * Refactor naming and minor implementation details * Test empty transaction coverage * Address revisions for code clarity * Move aminoMessage type definition * fix: enable `fixIssue172` flag for non-deterministic keyring test (#1447) * enable fixIssue172 flag for test for more info, https://github.com/btcsuite/btcutil/pull/182/files * fix import * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(tests): Delete inconsistent test (#1481) * Delete inconsistent test * delete test * build(deps): bump alpine from 3.16.3 to 3.17.0 (#1492) Bumps alpine from 3.16.3 to 3.17.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#1490) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.51.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.50.1...v1.51.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#1489) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: refactor imports naming for clarity (#1491) * chore: refactor imports naming for clarity * Merge main and fix conflicts * fix: align empty account result for old blocks as ethereum (#1484) * align result account as ethereum * add test_get_transaction_count * add change doc * sync gomod2nix * Apply suggestions from code review * crosscheck with ws & geth * sync gomod2nix * Update rpc/backend/utils.go * use session provider Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(ante): refactor AnteHandler (#1479) * imp(ante): refactor AnteHandler * fix test * test * Adjust deprecated sdkerrors import (#1493) * refactor test files * Apply suggestions from code review Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * lint * prioritization comment * fix test Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * chore: Update linter and protogen configuration (#1478) * add protolint yaml * Update .protolint.yml with Evmos settings * Add super-linter.yml for GH action * Copy .markdownlint.yml settings from Evmos * Sort proto imports * address protolint error in all Protobuf files * update Makefile to mirror Proto commands for Evmos * remove unnecessary go get command in protocgen.sh when using cosmos docker image * copy .clang-format from Evmos repo * apply make proto-format * Execute make proto-all after changes to config are complete * address last linter comment * fix(server): telemetry setup (#1497) * fix(server): telemetry setup * more fixes * fix * changelog * update standalone process * chore(evm) - Delete deprecated store migrations (#1498) * (fix): Delete deprecated migrations * Update x/evm/module.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(evm): Added Cancun and Shanghai blocks to ChainConfig (#1499) * (refactor): Added Cancun and Shanghai blocks to ChainConfig * (tests): Added test for invalid Shanghai and Cancun block * (fix): ran proto linter * Applied changes from code review * Added CHANGELOG entry Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(app): add store listener to Ethermint app (#1501) * add store listener to Ethermint app * add changelog entry * build(deps): bump cosmossdk.io/math from 1.0.0-beta.3 to 1.0.0-beta.4 (#1502) Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.3 to 1.0.0-beta.4. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.0.0-beta.3...math/v1.0.0-beta.4) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(app): register node service (#1505) * fix(app): register node service * changelog * fix(cmd): add missing GetAuxToFeeCommand (#1504) Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * chore(feemarket): Delete deprecated migration logic (#1508) * (refactor): Remove old migration code * (fix): Lint and add CHANGELOG entry * Remove simulation checks (#1507) * Add cli rollback command it's useful in app-hash mismatch situation. * Update CHANGELOG.md * (refactor): removed old sim tests logic * (fix): removed tests from CI * (fix): fix test.yml * (fix): format and lint * (fix): fix linter issue * (fix): fix linter issues v2 * (fix): linter * (fix): removed sim-test references * Applied changes from code review Co-authored-by: HuangYi <huang@crypto.com> * chore: verify fees refactor (#1496) * chore: verify fees refactor * adjust call structure in rest of repo after splitting up DeductTxCostsFromUserBalance * adjust test logic after splitting DeductTxCostsFromUserBalance up * remove outdated TODO * address PR comments - remove import name for evm keeper * remove misleading comment * address review comments - only handover boolean instead of context * remove TODO Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * json-rpc(filters) fix block hash on newBlock filter (#1503) * tests(filters) add block hash check on newBlock filter * tests(filters) fix linting errors * fix(filters): fix newBlock filter response * fix(filters): add changes on CHANGELOG file * fix(ci): add gitleaks config (#1513) * fix(ci): add gitleaks config to ignore init.sh * make ci lint init.sh Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * tests(filters): add/improve integration tests for JSON-RPC methods (#1480) * tests(filters) add block hash check on newBlock filter * tests(filters) add getLogs test cases * tests(filters) add eth_newFilter multiple filters test cases * tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case * tests(filters) fix linting errors * tests(filters) fix linting error on imports * tests(filters) add test case: register filter before contract deploy * tests(filters) refactor logs topics assertion * tests(filters) add topics filter test cases * tests(filters) fix linting errors * tests(filters) remove unnecessary package.json file * tests(filters) update based on PR comments * tests(filters) separate getNewBlocks failing test to a separate PR * tests(filters) add retry on send_tx to avoid Timeout error * tests(filters) add logs by topic and block range test case * update gomod2nix * tests(filters) remove test elapsed time log Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * add dragonberry update changelog entry again Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mmsqe <mavis@crypto.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Devon Bear <itsdevbear@berachain.com> Co-authored-by: v-homsi <110708931+v-homsi@users.noreply.github.com> * chore(release): merge main to v0.20 release branch (#1518) * deps(sdk): bump to v0.46.4 (#1423) * deps(sdk): bump to v0.46.4 * deps(sdk): add IAVLDisableFastNode flag with false default * imp: reduce integration test block time to 2s (#1428) * build(deps): bump github.com/onsi/gomega from 1.23.0 to 1.24.0 (#1429) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): different result from `eth_getProof` comparing with Ethereum (#1431) * align with eth_getProof for more info, see https://eips.ethereum.org/EIPS/eip-1186 * add GetHexProofs * add change doc * keep default res * fix lint * add e2e test * Apply suggestions from code review * fix lint * nix run -f ./nix gomod2nix * Refactor EIP-712 signature verification (#1397) * [WIP] EIP-712 Signature Refactor * Debug and add ante tests * Add tests for failure cases * Add changelog entry * Code cleanup * Add tests for MsgDelegate and MsgWithdrawDelegationReward * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Code cleanup * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Minor codefix * Update ethereum/eip712/encoding.go * Minor code revision updates * Refactor EIP712 unit tests to use test suite * Address import cycle and implement minor refactors * Fix lint issues * Add EIP712 unit suite test function * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Add minor refactors; increase test coverage * Correct ante_test for change in payload * Add single-signer util and tests * Update ethereum/eip712/encoding.go * Update ethereum/eip712/encoding.go * fix build Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: build test on mac by updating to python3.10 (#1437) * build(deps): bump loader-utils from 1.4.0 to 1.4.1 in /tests/solidity (#1445) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(evm): improve performance of EstimateGas (#1444) * imp(evm): improve performance of EstimateGas * changelog * fix(rpc): decode `finalized` block number (#1442) * fix(rpc): decode 'finalized' block number * changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/gomega from 1.24.0 to 1.24.1 (#1449) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1439) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: unstable tx_priority test (#1440) * fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.1 to 5.1.0 (#1450) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.1.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.1...v5.1.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#1454) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor(all): refactor errors import to use cosmossdk.io (#1456) * refactor (errors) refactor errors import to use cosmossdk.io instead of cosmos-sdk/types/errors * refactor (errors) refactor errors import in ethsecp256k1 file * refactor (errors) add changes to changelog * build(deps): bump alpine from 3.16.2 to 3.16.3 (#1453) Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Empty KV gas config (#1460) * update sdk version * setup empty gas config * fix lint * fix integration tests * add Ante unit test * update changelog * test: remove unused integration tests (#1462) * fix: remove e2e github action (#1463) * remove unused tests * imp: remove e2e github action * build(deps): bump loader-utils from 1.4.1 to 1.4.2 in /tests/solidity (#1464) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore (deps): Update geth version to v1.10.25 (#1413) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.19 to 1.10.25. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.19...v1.10.25) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * wip geth update * fix geth init flag order * add chainId to getTransaction. fix types comparison. update expected values on tests * wip add tracer config * tracers test * update tests * update to v1.10.25 * fix linter python * ignore error * fix lint * additional changes from diff * fix issues * solve lint issues * fix tests * fix flake * wrap types comparison in integration tests * fix integration tests * fix flake * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Add EIP-712 encoding support type for any array (#1430) * Add EIP-712 encoding support type for any array * Refactor implementation + add tests * Refactor unpacking implementation; refactor test case * Fix lint issue * Add MsgExec test case * Update comment for clarity * Add changelog entry * Refactor `sdkerrors` to `errorsmod` Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: extend geth config on integration tests (#1467) * changing git config and adding tests * removing print statements * remove unneccessary imports * fix flake * remove geth setup test Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: Add unit tests for rpc client endpoints (#1409) * test: add preliminary unit tests and additional mocks for chain_info, account_info and filters * tests: added additional mocked client calls * tests: bumped coverage of call_tx to 56% and chain_info to 77% * tests: bumped call_tx coverage to 70.2% and added additional mock client calls * tests: tx_info preliminary tests added for debugging. * tests: added test coverage for sign_tx and additional mocks * tests: tx_info test coverage bumped to 60.3% * test: coverage for tracing_tests now at 72% * tests: added fee makert query client mocks and bumped chain_info to 87.6% coverage. * tests: failing Cosmos auth module account query. * tests: added FeeMarket Params mock to call_tx_test * cleanup some unused code * tests: added helper function to test suite for signing a Tx and bumped coverage of tx_info to 71.2% * test: commented GetAccount error case and bumped chain_info to 90.3% coverage * test: cleanup of tests in node_info, sign_tx and account_info * Clean up print Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Apply suggestions from code review * fix import issues Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Refactor to omit empty optionals from EIP-712 type generation (#1459) * Refactor to omit empty values from type creation; add test for v1.vote * Add test for createValidator with optional fields left blank * Add changelog entry * Update changelog entry Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: protogen scripts were not correctly implemented (#1466) * Delete local copy of third party proto files * Update protocgen script and buf yaml files to mirror cosmos-sdk * Update makefile commands for proto-gen and proto-swagger-gen to correctly use docker * Commit changed .pb.go files after updating the protogen scripts * Adjust grep in proto-tools-installer script to look for correct gogoproto replacement * address reviews - remove unnecessary ignore in buf.yaml and cosmos-sdk download in the protocgen script * remove proto-update-deps from makefile as we don't store local copies of third party protofiles anymore * Add changelog entry * Update protoc-swagger-gen.sh * Remove third party queries from swagger-ui config (for now) * fix integrations tests * fix dead changelog links (markdown-link-check) Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * added gas consumption test (#1474) * build(deps): bump github.com/cosmos/cosmos-proto (#1475) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha7 to 1.0.0-alpha8. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha7...v1.0.0-alpha8) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: chain-id in grpc query is not initialized without abci event (#1405) * fix: chain-id in grpc query is not initialized without abci event Closes: #1404 Solution: - pass the chain-id from caller. * Update CHANGELOG.md * only override if input is not empty * add comment to chain id * pass chain-id to state transition * Update x/evm/keeper/grpc_query.go * Apply suggestions from code review * fix golang lint * update gomod2nix.toml * fix unit tests * update gomod2nix * api breaking changelog * add unit tests, and fix TraceBlock by the way * Update CHANGELOG.md * test --grpc-only mode in integration tests * remove tmp var * Update tests/integration_tests/test_grpc_only.py * Update x/evm/keeper/grpc_query_test.go Co-authored-by: mmsqe <tqd0800210105@gmail.com> * fix linters * fix nil pointer in tests * fix conflicts * fix conflicts * fixes * fix lint * fix unit test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(evm): Simplify Gas Math (#1452) * fix math * changelog * imp(ante): refactor `AnteHandler` (#1455) * fix(ante): block gas check * refactor * rename * use gas wanted * remove consume gas logic on ante handler * comment * c++ * move min gas price * comment * Update app/ante/eth.go Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix build * fix integration test script Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: add additional gas consumption tests (#1477) * split existing gas test * added contract call test * fix flake issues, update gomod2nix * isort imports * add stateful contract calls * chore: update proto make commands (#1471) * Update proto make commands to use cosmos docker image and add notes for possible problems * Apply make proto-all with new docker container * Remove stale DOCKER_BUF variable * Revert to using the tendermintdev/sdk-proto-gen docker image * remove '@' in proto-lint and proto-check-breaking for consistency with other commands * Remove unnecessary go get from protocgen.sh (only works after adding --network host to docker run) * Add --network host to docker run for compatibility on linux * use cosmos/proto-builder docker image for proto-format because clang-format is not installed on tendermintdev/sdk-proto-gen * update swagger docs after recent additions to evm.proto in #1413 Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * Remove unbound labels from added custom tendermint metrics (#1434) * Remove unbound labels from added custom tendermint metrics * Add entry to changelog * deps: bump SDK to v0.46.6 (#1486) * deps: bump SDK to v0.46.6 * changelog * Update CHANGELOG.md Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * fear(eip712): Add EIP-712 encoding for multiple messages of the same type (#1483) * Add EIP-712 encoding for multiple messages of the same type * Fix Protobuf encoding bug * Add ante tests * Refactor naming and minor implementation details * Test empty transaction coverage * Address revisions for code clarity * Move aminoMessage type definition * fix: enable `fixIssue172` flag for non-deterministic keyring test (#1447) * enable fixIssue172 flag for test for more info, https://github.com/btcsuite/btcutil/pull/182/files * fix import * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(tests): Delete inconsistent test (#1481) * Delete inconsistent test * delete test * build(deps): bump alpine from 3.16.3 to 3.17.0 (#1492) Bumps alpine from 3.16.3 to 3.17.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#1490) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.51.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.50.1...v1.51.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#1489) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: refactor imports naming for clarity (#1491) * chore: refactor imports naming for clarity * Merge main and fix conflicts * fix: align empty account result for old blocks as ethereum (#1484) * align result account as ethereum * add test_get_transaction_count * add change doc * sync gomod2nix * Apply suggestions from code review * crosscheck with ws & geth * sync gomod2nix * Update rpc/backend/utils.go * use session provider Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(ante): refactor AnteHandler (#1479) * imp(ante): refactor AnteHandler * fix test * test * Adjust deprecated sdkerrors import (#1493) * refactor test files * Apply suggestions from code review Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * lint * prioritization comment * fix test Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * chore: Update linter and protogen configuration (#1478) * add protolint yaml * Update .protolint.yml with Evmos settings * Add super-linter.yml for GH action * Copy .markdownlint.yml settings from Evmos * Sort proto imports * address protolint error in all Protobuf files * update Makefile to mirror Proto commands for Evmos * remove unnecessary go get command in protocgen.sh when using cosmos docker image * copy .clang-format from Evmos repo * apply make proto-format * Execute make proto-all after changes to config are complete * address last linter comment * fix(server): telemetry setup (#1497) * fix(server): telemetry setup * more fixes * fix * changelog * update standalone process * chore(evm) - Delete deprecated store migrations (#1498) * (fix): Delete deprecated migrations * Update x/evm/module.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(evm): Added Cancun and Shanghai blocks to ChainConfig (#1499) * (refactor): Added Cancun and Shanghai blocks to ChainConfig * (tests): Added test for invalid Shanghai and Cancun block * (fix): ran proto linter * Applied changes from code review * Added CHANGELOG entry Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(app): add store listener to Ethermint app (#1501) * add store listener to Ethermint app * add changelog entry * build(deps): bump cosmossdk.io/math from 1.0.0-beta.3 to 1.0.0-beta.4 (#1502) Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.3 to 1.0.0-beta.4. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.0.0-beta.3...math/v1.0.0-beta.4) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(app): register node service (#1505) * fix(app): register node service * changelog * fix(cmd): add missing GetAuxToFeeCommand (#1504) Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * chore(feemarket): Delete deprecated migration logic (#1508) * (refactor): Remove old migration code * (fix): Lint and add CHANGELOG entry * Remove simulation checks (#1507) * Add cli rollback command it's useful in app-hash mismatch situation. * Update CHANGELOG.md * (refactor): removed old sim tests logic * (fix): removed tests from CI * (fix): fix test.yml * (fix): format and lint * (fix): fix linter issue * (fix): fix linter issues v2 * (fix): linter * (fix): removed sim-test references * Applied changes from code review Co-authored-by: HuangYi <huang@crypto.com> * chore: verify fees refactor (#1496) * chore: verify fees refactor * adjust call structure in rest of repo after splitting up DeductTxCostsFromUserBalance * adjust test logic after splitting DeductTxCostsFromUserBalance up * remove outdated TODO * address PR comments - remove import name for evm keeper * remove misleading comment * address review comments - only handover boolean instead of context * remove TODO Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * json-rpc(filters) fix block hash on newBlock filter (#1503) * tests(filters) add block hash check on newBlock filter * tests(filters) fix linting errors * fix(filters): fix newBlock filter response * fix(filters): add changes on CHANGELOG file * fix(ci): add gitleaks config (#1513) * fix(ci): add gitleaks config to ignore init.sh * make ci lint init.sh Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * tests(filters): add/improve integration tests for JSON-RPC methods (#1480) * tests(filters) add block hash check on newBlock filter * tests(filters) add getLogs test cases * tests(filters) add eth_newFilter multiple filters test cases * tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case * tests(filters) fix linting errors * tests(filters) fix linting error on imports * tests(filters) add test case: register filter before contract deploy * tests(filters) refactor logs topics assertion * tests(filters) add topics filter test cases * tests(filters) fix linting errors * tests(filters) remove unnecessary package.json file * tests(filters) update based on PR comments * tests(filters) separate getNewBlocks failing test to a separate PR * tests(filters) add retry on send_tx to avoid Timeout error * tests(filters) add logs by topic and block range test case * update gomod2nix * tests(filters) remove test elapsed time log Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mmsqe <mavis@crypto.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Devon Bear <itsdevbear@berachain.com> Co-authored-by: v-homsi <110708931+v-homsi@users.noreply.github.com> Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> * chore: release `v0.20.0-rc3` (#1529) * deps(sdk): bump to v0.46.4 (#1423) * deps(sdk): bump to v0.46.4 * deps(sdk): add IAVLDisableFastNode flag with false default * imp: reduce integration test block time to 2s (#1428) * build(deps): bump github.com/onsi/gomega from 1.23.0 to 1.24.0 (#1429) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): different result from `eth_getProof` comparing with Ethereum (#1431) * align with eth_getProof for more info, see https://eips.ethereum.org/EIPS/eip-1186 * add GetHexProofs * add change doc * keep default res * fix lint * add e2e test * Apply suggestions from code review * fix lint * nix run -f ./nix gomod2nix * Refactor EIP-712 signature verification (#1397) * [WIP] EIP-712 Signature Refactor * Debug and add ante tests * Add tests for failure cases * Add changelog entry * Code cleanup * Add tests for MsgDelegate and MsgWithdrawDelegationReward * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Code cleanup * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Minor codefix * Update ethereum/eip712/encoding.go * Minor code revision updates * Refactor EIP712 unit tests to use test suite * Address import cycle and implement minor refactors * Fix lint issues * Add EIP712 unit suite test function * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Add minor refactors; increase test coverage * Correct ante_test for change in payload * Add single-signer util and tests * Update ethereum/eip712/encoding.go * Update ethereum/eip712/encoding.go * fix build Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: build test on mac by updating to python3.10 (#1437) * build(deps): bump loader-utils from 1.4.0 to 1.4.1 in /tests/solidity (#1445) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(evm): improve performance of EstimateGas (#1444) * imp(evm): improve performance of EstimateGas * changelog * fix(rpc): decode `finalized` block number (#1442) * fix(rpc): decode 'finalized' block number * changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/gomega from 1.24.0 to 1.24.1 (#1449) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1439) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: unstable tx_priority test (#1440) * fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.1 to 5.1.0 (#1450) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.1.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.1...v5.1.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#1454) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor(all): refactor errors import to use cosmossdk.io (#1456) * refactor (errors) refactor errors import to use cosmossdk.io instead of cosmos-sdk/types/errors * refactor (errors) refactor errors import in ethsecp256k1 file * refactor (errors) add changes to changelog * build(deps): bump alpine from 3.16.2 to 3.16.3 (#1453) Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Empty KV gas config (#1460) * update sdk version * setup empty gas config * fix lint * fix integration tests * add Ante unit test * update changelog * test: remove unused integration tests (#1462) * fix: remove e2e github action (#1463) * remove unused tests * imp: remove e2e github action * build(deps): bump loader-utils from 1.4.1 to 1.4.2 in /tests/solidity (#1464) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore (deps): Update geth version to v1.10.25 (#1413) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.19 to 1.10.25. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.19...v1.10.25) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * wip geth update * fix geth init flag order * add chainId to getTransaction. fix types comparison. update expected values on tests * wip add tracer config * tracers test * update tests * update to v1.10.25 * fix linter python * ignore error * fix lint * additional changes from diff * fix issues * solve lint issues * fix tests * fix flake * wrap types comparison in integration tests * fix integration tests * fix flake * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Add EIP-712 encoding support type for any array (#1430) * Add EIP-712 encoding support type for any array * Refactor implementation + add tests * Refactor unpacking implementation; refactor test case * Fix lint issue * Add MsgExec test case * Update comment for clarity * Add changelog entry * Refactor `sdkerrors` to `errorsmod` Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: extend geth config on integration tests (#1467) * changing git config and adding tests * removing print statements * remove unneccessary imports * fix flake * remove geth setup test Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: Add unit tests for rpc client endpoints (#1409) * test: add preliminary unit tests and additional mocks for chain_info, account_info and filters * tests: added additional mocked client calls * tests: bumped coverage of call_tx to 56% and chain_info to 77% * tests: bumped call_tx coverage to 70.2% and added additional mock client calls * tests: tx_info preliminary tests added for debugging. * tests: added test coverage for sign_tx and additional mocks * tests: tx_info test coverage bumped to 60.3% * test: coverage for tracing_tests now at 72% * tests: added fee makert query client mocks and bumped chain_info to 87.6% coverage. * tests: failing Cosmos auth module account query. * tests: added FeeMarket Params mock to call_tx_test * cleanup some unused code * tests: added helper function to test suite for signing a Tx and bumped coverage of tx_info to 71.2% * test: commented GetAccount error case and bumped chain_info to 90.3% coverage * test: cleanup of tests in node_info, sign_tx and account_info * Clean up print Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Apply suggestions from code review * fix import issues Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Refactor to omit empty optionals from EIP-712 type generation (#1459) * Refactor to omit empty values from type creation; add test for v1.vote * Add test for createValidator with optional fields left blank * Add changelog entry * Update changelog entry Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: protogen scripts were not correctly implemented (#1466) * Delete local copy of third party proto files * Update protocgen script and buf yaml files to mirror cosmos-sdk * Update makefile commands for proto-gen and proto-swagger-gen to correctly use docker * Commit changed .pb.go files after updating the protogen scripts * Adjust grep in proto-tools-installer script to look for correct gogoproto replacement * address reviews - remove unnecessary ignore in buf.yaml and cosmos-sdk download in the protocgen script * remove proto-update-deps from makefile as we don't store local copies of third party protofiles anymore * Add changelog entry * Update protoc-swagger-gen.sh * Remove third party queries from swagger-ui config (for now) * fix integrations tests * fix dead changelog links (markdown-link-check) Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * added gas consumption test (#1474) * build(deps): bump github.com/cosmos/cosmos-proto (#1475) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha7 to 1.0.0-alpha8. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha7...v1.0.0-alpha8) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: chain-id in grpc query is not initialized without abci event (#1405) * fix: chain-id in grpc query is not initialized without abci event Closes: #1404 Solution: - pass the chain-id from caller. * Update CHANGELOG.md * only override if input is not empty * add comment to chain id * pass chain-id to state transition * Update x/evm/keeper/grpc_query.go * Apply suggestions from code review * fix golang lint * update gomod2nix.toml * fix unit tests * update gomod2nix * api breaking changelog * add unit tests, and fix TraceBlock by the way * Update CHANGELOG.md * test --grpc-only mode in integration tests * remove tmp var * Update tests/integration_tests/test_grpc_only.py * Update x/evm/keeper/grpc_query_test.go Co-authored-by: mmsqe <tqd0800210105@gmail.com> * fix linters * fix nil pointer in tests * fix conflicts * fix conflicts * fixes * fix lint * fix unit test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(evm): Simplify Gas Math (#1452) * fix math * changelog * imp(ante): refactor `AnteHandler` (#1455) * fix(ante): block gas check * refactor * rename * use gas wanted * remove consume gas logic on ante handler * comment * c++ * move min gas price * comment * Update app/ante/eth.go Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix build * fix integration test script Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: add additional gas consumption tests (#1477) * split existing gas test * added contract call test * fix flake issues, update gomod2nix * isort imports * add stateful contract calls * chore: update proto make commands (#1471) * Update proto make commands to use cosmos docker image and add notes for possible problems * Apply make proto-all with new docker container * Remove stale DOCKER_BUF variable * Revert to using the tendermintdev/sdk-proto-gen docker image * remove '@' in proto-lint and proto-check-breaking for consistency with other commands * Remove unnecessary go get from protocgen.sh (only works after adding --network host to docker run) * Add --network host to docker run for compatibility on linux * use cosmos/proto-builder docker image for proto-format because clang-format is not installed on tendermintdev/sdk-proto-gen * update swagger docs after recent additions to evm.proto in #1413 Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * Remove unbound labels from added custom tendermint metrics (#1434) * Remove unbound labels from added custom tendermint metrics * Add entry to changelog * deps: bump SDK to v0.46.6 (#1486) * deps: bump SDK to v0.46.6 * changelog * Update CHANGELOG.md Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * fear(eip712): Add EIP-712 encoding for multiple messages of the same type (#1483) * Add EIP-712 encoding for multiple messages of the same type * Fix Protobuf encoding bug * Add ante tests * Refactor naming and minor implementation details * Test empty transaction coverage * Address revisions for code clarity * Move aminoMessage type definition * fix: enable `fixIssue172` flag for non-deterministic keyring test (#1447) * enable fixIssue172 flag for test for more info, https://github.com/btcsuite/btcutil/pull/182/files * fix import * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(tests): Delete inconsistent test (#1481) * Delete inconsistent test * delete test * build(deps): bump alpine from 3.16.3 to 3.17.0 (#1492) Bumps alpine from 3.16.3 to 3.17.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#1490) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.51.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.50.1...v1.51.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#1489) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: refactor imports naming for clarity (#1491) * chore: refactor imports naming for clarity * Merge main and fix conflicts * fix: align empty account result for old blocks as ethereum (#1484) * align result account as ethereum * add test_get_transaction_count * add change doc * sync gomod2nix * Apply suggestions from code review * crosscheck with ws & geth * sync gomod2nix * Update rpc/backend/utils.go * use session provider Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(ante): refactor AnteHandler (#1479) * imp(ante): refactor AnteHandler * fix test * test * Adjust deprecated sdkerrors import (#1493) * refactor test files * Apply suggestions from code review Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * lint * prioritization comment * fix test Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * chore: Update linter and protogen configuration (#1478) * add protolint yaml * Update .protolint.yml with Evmos settings * Add super-linter.yml for GH action * Copy .markdownlint.yml settings from Evmos * Sort proto imports * address protolint error in all Protobuf files * update Makefile to mirror Proto commands for Evmos * remove unnecessary go get command in protocgen.sh when using cosmos docker image * copy .clang-format from Evmos repo * apply make proto-format * Execute make proto-all after changes to config are complete * address last linter comment * fix(server): telemetry setup (#1497) * fix(server): telemetry setup * more fixes * fix * changelog * update standalone process * chore(evm) - Delete deprecated store migrations (#1498) * (fix): Delete deprecated migrations * Update x/evm/module.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(evm): Added Cancun and Shanghai blocks to ChainConfig (#1499) * (refactor): Added Cancun and Shanghai blocks to ChainConfig * (tests): Added test for invalid Shanghai and Cancun block * (fix): ran proto linter * Applied changes from code review * Added CHANGELOG entry Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(app): add store listener to Ethermint app (#1501) * add store listener to Ethermint app * add changelog entry * build(deps): bump cosmossdk.io/math from 1.0.0-beta.3 to 1.0.0-beta.4 (#1502) Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.3 to 1.0.0-beta.4. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.0.0-beta.3...math/v1.0.0-beta.4) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(app): register node service (#1505) * fix(app): register node service * changelog * fix(cmd): add missing GetAuxToFeeCommand (#1504) Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * chore(feemarket): Delete deprecated migration logic (#1508) * (refactor): Remove old migration code * (fix): Lint and add CHANGELOG entry * Remove simulation checks (#1507) * Add cli rollback command it's useful in app-hash mismatch situation. * Update CHANGELOG.md * (refactor): removed old sim tests logic * (fix): removed tests from CI * (fix): fix test.yml * (fix): format and lint * (fix): fix linter issue * (fix): fix linter issues v2 * (fix): linter * (fix): removed sim-test references * Applied changes from code review Co-authored-by: HuangYi <huang@crypto.com> * chore: verify fees refactor (#1496) * chore: verify fees refactor * adjust call structure in rest of repo after splitting up DeductTxCostsFromUserBalance * adjust test logic after splitting DeductTxCostsFromUserBalance up * remove outdated TODO * address PR comments - remove import name for evm keeper * remove misleading comment * address review comments - only handover boolean instead of context * remove TODO Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * json-rpc(filters) fix block hash on newBlock filter (#1503) * tests(filters) add block hash check on newBlock filter * tests(filters) fix linting errors * fix(filters): fix newBlock filter response * fix(filters): add changes on CHANGELOG file * fix(ci): add gitleaks config (#1513) * fix(ci): add gitleaks config to ignore init.sh * make ci lint init.sh Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * tests(filters): add/improve integration tests for JSON-RPC methods (#1480) * tests(filters) add block hash check on newBlock filter * tests(filters) add getLogs test cases * tests(filters) add eth_newFilter multiple filters test cases * tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case * tests(filters) fix linting errors * tests(filters) fix linting error on imports * tests(filters) add test case: register filter before contract deploy * tests(filters) refactor logs topics assertion * tests(filters) add topics filter test cases * tests(filters) fix linting errors * tests(filters) remove unnecessary package.json file * tests(filters) update based on PR comments * tests(filters) separate getNewBlocks failing test to a separate PR * tests(filters) add retry on send_tx to avoid Timeout error * tests(filters) add logs by topic and block range test case * update gomod2nix * tests(filters) remove test elapsed time log Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump minimist in /tests/integration_tests/hardhat (#1516) Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(filters): add logs by topic test case (#1515) * tests(filters) add logs by topic test case * fix(logs): add getLogs http call in test * tests(logs) add test case for getLogs by topic * tests(logs) fix lint errors * chore(all): markdownlint (#1522) * build(deps): bump github.com/cosmos/cosmos-proto (#1525) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha8 to 1.0.0-beta.1. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha8...v1.0.0-beta.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump decode-uri-component in /tests/solidity (#1526) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(integration): block gas limit tests (#1500) * added antehandler test * add integration tests * add back gas call test * added integration tests v2 * linters * Update tests/integration_tests/test_gas.py * Update tests/integration_tests/test_gas.py * update gomod2nix * Update tests/integration_tests/test_gas.py Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * chore(ante): deprecate legacy EIP-712 signature verification via AnteHandler (#1521) * fix: rename EIP-712 sig. verification to indicate Legacy status * Add changelog entry * Update changelog, refactor implementation, update comments * Apply suggestions from code review * address comments * changelog * Update CHANGELOG.md Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * feat(ci): add Golang dependency vulnerability check (#1528) * feat(ci): add Golang dependency vulnerability check * update * check run * c++ * chore(evm): add comment regarding RANDOM opcode (#1520) * fix: add random field to BlockContext using block header hash * add comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * update release date * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mmsqe <mavis@crypto.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Devon Bear <itsdevbear@berachain.com> Co-authored-by: v-homsi <110708931+v-homsi@users.noreply.github.com> Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> * chore(release): v0.20-rc4 (#1546) * deps(sdk): bump to v0.46.4 (#1423) * deps(sdk): bump to v0.46.4 * deps(sdk): add IAVLDisableFastNode flag with false default * imp: reduce integration test block time to 2s (#1428) * build(deps): bump github.com/onsi/gomega from 1.23.0 to 1.24.0 (#1429) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(rpc): different result from `eth_getProof` comparing with Ethereum (#1431) * align with eth_getProof for more info, see https://eips.ethereum.org/EIPS/eip-1186 * add GetHexProofs * add change doc * keep default res * fix lint * add e2e test * Apply suggestions from code review * fix lint * nix run -f ./nix gomod2nix * Refactor EIP-712 signature verification (#1397) * [WIP] EIP-712 Signature Refactor * Debug and add ante tests * Add tests for failure cases * Add changelog entry * Code cleanup * Add tests for MsgDelegate and MsgWithdrawDelegationReward * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Code cleanup * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Minor codefix * Update ethereum/eip712/encoding.go * Minor code revision updates * Refactor EIP712 unit tests to use test suite * Address import cycle and implement minor refactors * Fix lint issues * Add EIP712 unit suite test function * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Update ethereum/eip712/encoding.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Add minor refactors; increase test coverage * Correct ante_test for change in payload * Add single-signer util and tests * Update ethereum/eip712/encoding.go * Update ethereum/eip712/encoding.go * fix build Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: build test on mac by updating to python3.10 (#1437) * build(deps): bump loader-utils from 1.4.0 to 1.4.1 in /tests/solidity (#1445) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp(evm): improve performance of EstimateGas (#1444) * imp(evm): improve performance of EstimateGas * changelog * fix(rpc): decode `finalized` block number (#1442) * fix(rpc): decode 'finalized' block number * changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump github.com/onsi/gomega from 1.24.0 to 1.24.1 (#1449) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.24.0 to 1.24.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.24.0...v1.24.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0 (#1439) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: unstable tx_priority test (#1440) * fix unstable tx_priority test * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> * Update tests/integration_tests/test_priority.py Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.0.1 to 5.1.0 (#1450) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.1.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.0.1...v5.1.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#1454) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor(all): refactor errors import to use cosmossdk.io (#1456) * refactor (errors) refactor errors import to use cosmossdk.io instead of cosmos-sdk/types/errors * refactor (errors) refactor errors import in ethsecp256k1 file * refactor (errors) add changes to changelog * build(deps): bump alpine from 3.16.2 to 3.16.3 (#1453) Bumps alpine from 3.16.2 to 3.16.3. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Empty KV gas config (#1460) * update sdk version * setup empty gas config * fix lint * fix integration tests * add Ante unit test * update changelog * test: remove unused integration tests (#1462) * fix: remove e2e github action (#1463) * remove unused tests * imp: remove e2e github action * build(deps): bump loader-utils from 1.4.1 to 1.4.2 in /tests/solidity (#1464) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore (deps): Update geth version to v1.10.25 (#1413) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.19 to 1.10.25. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.19...v1.10.25) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * wip geth update * fix geth init flag order * add chainId to getTransaction. fix types comparison. update expected values on tests * wip add tracer config * tracers test * update tests * update to v1.10.25 * fix linter python * ignore error * fix lint * additional changes from diff * fix issues * solve lint issues * fix tests * fix flake * wrap types comparison in integration tests * fix integration tests * fix flake * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Add EIP-712 encoding support type for any array (#1430) * Add EIP-712 encoding support type for any array * Refactor implementation + add tests * Refactor unpacking implementation; refactor test case * Fix lint issue * Add MsgExec test case * Update comment for clarity * Add changelog entry * Refactor `sdkerrors` to `errorsmod` Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: extend geth config on integration tests (#1467) * changing git config and adding tests * removing print statements * remove unneccessary imports * fix flake * remove geth setup test Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: Add unit tests for rpc client endpoints (#1409) * test: add preliminary unit tests and additional mocks for chain_info, account_info and filters * tests: added additional mocked client calls * tests: bumped coverage of call_tx to 56% and chain_info to 77% * tests: bumped call_tx coverage to 70.2% and added additional mock client calls * tests: tx_info preliminary tests added for debugging. * tests: added test coverage for sign_tx and additional mocks * tests: tx_info test coverage bumped to 60.3% * test: coverage for tracing_tests now at 72% * tests: added fee makert query client mocks and bumped chain_info to 87.6% coverage. * tests: failing Cosmos auth module account query. * tests: added FeeMarket Params mock to call_tx_test * cleanup some unused code * tests: added helper function to test suite for signing a Tx and bumped coverage of tx_info to 71.2% * test: commented GetAccount error case and bumped chain_info to 90.3% coverage * test: cleanup of tests in node_info, sign_tx and account_info * Clean up print Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Apply suggestions from code review * fix import issues Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * Refactor to omit empty optionals from EIP-712 type generation (#1459) * Refactor to omit empty values from type creation; add test for v1.vote * Add test for createValidator with optional fields left blank * Add changelog entry * Update changelog entry Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix: protogen scripts were not correctly implemented (#1466) * Delete local copy of third party proto files * Update protocgen script and buf yaml files to mirror cosmos-sdk * Update makefile commands for proto-gen and proto-swagger-gen to correctly use docker * Commit changed .pb.go files after updating the protogen scripts * Adjust grep in proto-tools-installer script to look for correct gogoproto replacement * address reviews - remove unnecessary ignore in buf.yaml and cosmos-sdk download in the protocgen script * remove proto-update-deps from makefile as we don't store local copies of third party protofiles anymore * Add changelog entry * Update protoc-swagger-gen.sh * Remove third party queries from swagger-ui config (for now) * fix integrations tests * fix dead changelog links (markdown-link-check) Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * added gas consumption test (#1474) * build(deps): bump github.com/cosmos/cosmos-proto (#1475) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha7 to 1.0.0-alpha8. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha7...v1.0.0-alpha8) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: chain-id in grpc query is not initialized without abci event (#1405) * fix: chain-id in grpc query is not initialized without abci event Closes: #1404 Solution: - pass the chain-id from caller. * Update CHANGELOG.md * only override if input is not empty * add comment to chain id * pass chain-id to state transition * Update x/evm/keeper/grpc_query.go * Apply suggestions from code review * fix golang lint * update gomod2nix.toml * fix unit tests * update gomod2nix * api breaking changelog * add unit tests, and fix TraceBlock by the way * Update CHANGELOG.md * test --grpc-only mode in integration tests * remove tmp var * Update tests/integration_tests/test_grpc_only.py * Update x/evm/keeper/grpc_query_test.go Co-authored-by: mmsqe <tqd0800210105@gmail.com> * fix linters * fix nil pointer in tests * fix conflicts * fix conflicts * fixes * fix lint * fix unit test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(evm): Simplify Gas Math (#1452) * fix math * changelog * imp(ante): refactor `AnteHandler` (#1455) * fix(ante): block gas check * refactor * rename * use gas wanted * remove consume gas logic on ante handler * comment * c++ * move min gas price * comment * Update app/ante/eth.go Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix build * fix integration test script Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * tests: add additional gas consumption tests (#1477) * split existing gas test * added contract call test * fix flake issues, update gomod2nix * isort imports * add stateful contract calls * chore: update proto make commands (#1471) * Update proto make commands to use cosmos docker image and add notes for possible problems * Apply make proto-all with new docker container * Remove stale DOCKER_BUF variable * Revert to using the tendermintdev/sdk-proto-gen docker image * remove '@' in proto-lint and proto-check-breaking for consistency with other commands * Remove unnecessary go get from protocgen.sh (only works after adding --network host to docker run) * Add --network host to docker run for compatibility on linux * use cosmos/proto-builder docker image for proto-format because clang-format is not installed on tendermintdev/sdk-proto-gen * update swagger docs after recent additions to evm.proto in #1413 Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * Remove unbound labels from added custom tendermint metrics (#1434) * Remove unbound labels from added custom tendermint metrics * Add entry to changelog * deps: bump SDK to v0.46.6 (#1486) * deps: bump SDK to v0.46.6 * changelog * Update CHANGELOG.md Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * fear(eip712): Add EIP-712 encoding for multiple messages of the same type (#1483) * Add EIP-712 encoding for multiple messages of the same type * Fix Protobuf encoding bug * Add ante tests * Refactor naming and minor implementation details * Test empty transaction coverage * Address revisions for code clarity * Move aminoMessage type definition * fix: enable `fixIssue172` flag for non-deterministic keyring test (#1447) * enable fixIssue172 flag for test for more info, https://github.com/btcsuite/btcutil/pull/182/files * fix import * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * fix(tests): Delete inconsistent test (#1481) * Delete inconsistent test * delete test * build(deps): bump alpine from 3.16.3 to 3.17.0 (#1492) Bumps alpine from 3.16.3 to 3.17.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#1490) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.50.1 to 1.51.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.50.1...v1.51.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#1489) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: refactor imports naming for clarity (#1491) * chore: refactor imports naming for clarity * Merge main and fix conflicts * fix: align empty account result for old blocks as ethereum (#1484) * align result account as ethereum * add test_get_transaction_count * add change doc * sync gomod2nix * Apply suggestions from code review * crosscheck with ws & geth * sync gomod2nix * Update rpc/backend/utils.go * use session provider Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * imp(ante): refactor AnteHandler (#1479) * imp(ante): refactor AnteHandler * fix test * test * Adjust deprecated sdkerrors import (#1493) * refactor test files * Apply suggestions from code review Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * lint * prioritization comment * fix test Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * chore: Update linter and protogen configuration (#1478) * add protolint yaml * Update .protolint.yml with Evmos settings * Add super-linter.yml for GH action * Copy .markdownlint.yml settings from Evmos * Sort proto imports * address protolint error in all Protobuf files * update Makefile to mirror Proto commands for Evmos * remove unnecessary go get command in protocgen.sh when using cosmos docker image * copy .clang-format from Evmos repo * apply make proto-format * Execute make proto-all after changes to config are complete * address last linter comment * fix(server): telemetry setup (#1497) * fix(server): telemetry setup * more fixes * fix * changelog * update standalone process * chore(evm) - Delete deprecated store migrations (#1498) * (fix): Delete deprecated migrations * Update x/evm/module.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix(evm): Added Cancun and Shanghai blocks to ChainConfig (#1499) * (refactor): Added Cancun and Shanghai blocks to ChainConfig * (tests): Added test for invalid Shanghai and Cancun block * (fix): ran proto linter * Applied changes from code review * Added CHANGELOG entry Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * chore(app): add store listener to Ethermint app (#1501) * add store listener to Ethermint app * add changelog entry * build(deps): bump cosmossdk.io/math from 1.0.0-beta.3 to 1.0.0-beta.4 (#1502) Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.3 to 1.0.0-beta.4. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/math/v1.0.0-beta.3...math/v1.0.0-beta.4) --- updated-dependencies: - dependency-name: cosmossdk.io/math dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(app): register node service (#1505) * fix(app): register node service * changelog * fix(cmd): add missing GetAuxToFeeCommand (#1504) Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * chore(feemarket): Delete deprecated migration logic (#1508) * (refactor): Remove old migration code * (fix): Lint and add CHANGELOG entry * Remove simulation checks (#1507) * Add cli rollback command it's useful in app-hash mismatch situation. * Update CHANGELOG.md * (refactor): removed old sim tests logic * (fix): removed tests from CI * (fix): fix test.yml * (fix): format and lint * (fix): fix linter issue * (fix): fix linter issues v2 * (fix): linter * (fix): removed sim-test references * Applied changes from code review Co-authored-by: HuangYi <huang@crypto.com> * chore: verify fees refactor (#1496) * chore: verify fees refactor * adjust call structure in rest of repo after splitting up DeductTxCostsFromUserBalance * adjust test logic after splitting DeductTxCostsFromUserBalance up * remove outdated TODO * address PR comments - remove import name for evm keeper * remove misleading comment * address review comments - only handover boolean instead of context * remove TODO Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * json-rpc(filters) fix block hash on newBlock filter (#1503) * tests(filters) add block hash check on newBlock filter * tests(filters) fix linting errors * fix(filters): fix newBlock filter response * fix(filters): add changes on CHANGELOG file * fix(ci): add gitleaks config (#1513) * fix(ci): add gitleaks config to ignore init.sh * make ci lint init.sh Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * tests(filters): add/improve integration tests for JSON-RPC methods (#1480) * tests(filters) add block hash check on newBlock filter * tests(filters) add getLogs test cases * tests(filters) add eth_newFilter multiple filters test cases * tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case * tests(filters) fix linting errors * tests(filters) fix linting error on imports * tests(filters) add test case: register filter before contract deploy * tests(filters) refactor logs topics assertion * tests(filters) add topics filter test cases * tests(filters) fix linting errors * tests(filters) remove unnecessary package.json file * tests(filters) update based on PR comments * tests(filters) separate getNewBlocks failing test to a separate PR * tests(filters) add retry on send_tx to avoid Timeout error * tests(filters) add logs by topic and block range test case * update gomod2nix * tests(filters) remove test elapsed time log Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump minimist in /tests/integration_tests/hardhat (#1516) Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(filters): add logs by topic test case (#1515) * tests(filters) add logs by topic test case * fix(logs): add getLogs http call in test * tests(logs) add test case for getLogs by topic * tests(logs) fix lint errors * chore(all): markdownlint (#1522) * build(deps): bump github.com/cosmos/cosmos-proto (#1525) Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-alpha8 to 1.0.0-beta.1. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-alpha8...v1.0.0-beta.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump decode-uri-component in /tests/solidity (#1526) Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * tests(integration): block gas limit tests (#1500) * added antehandler test * add integration tests * add back gas call test * added integration tests v2 * linters * Update tests/integration_tests/test_gas.py * Update tests/integration_tests/test_gas.py * update gomod2nix * Update tests/integration_tests/test_gas.py Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> * chore(ante): deprecate legacy EIP-712 signature verification via AnteHandler (#1521) * fix: rename EIP-712 sig. verification to indicate Legacy status * Add changelog entry * Update changelog, refactor implementation, update comments * Apply suggestions from code review * address comments * changelog * Update CHANGELOG.md Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * fix test Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> * feat(ci): add Golang dependency vulnerability check (#1528) * feat(ci): add Golang dependency vulnerability check * update * check run * c++ * chore(evm): add comment regarding RANDOM opcode (#1520) * fix: add random field to BlockContext using block header hash * add comment Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * fix: Bump Go-Ethereum dependency to 1.10.26 (#1532) * fix: Bump Go-Ethereum dependency to 1.10.26 * Add changelog entry * build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 (#1534) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump qs from 6.5.2 to 6.5.3 in /tests/solidity (#1537) Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golang.org/x/net from 0.2.0 to 0.3.0 (#1535) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.2.0 to 0.3.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.2.0...v0.3.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golang.org/x/net from 0.3.0 to 0.4.0 (#1542) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.3.0 to 0.4.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump technote-space/get-diff-action from 6.1.1 to 6.1.2 (#1541) Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 6.1.1 to 6.1.2. - [Release notes](https://github.com/technote-space/get-diff-action/releases) - [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc) - [Commits](https://github.com/technote-space/get-diff-action/compare/v6.1.1...v6.1.2) --- updated-dependencies: - dependency-name: technote-space/get-diff-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * imp (docs): Point to Evmos mempool docs for tx prioritization (#1536) * Adjust priority tip docs to point to Evmos mempool docs * remove some typos and out of place commas in feemarket concepts * add missing "in" Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Skip undeterministic integration test (#1531) * skip undeterministic integration test * fix flake * update gomod2nix * Rename getEIP712Hash to Bytes to clarity method intent (#1539) * Rename getEIP712Hash to Bytes to clarity method intent * Update comments and revert unrelated code * Fix variable naming in tests * Fix to use raw data rather than hash from Go-Ethereum interface * Update eip712_test to detect EIP-712 hash vs bytes * Update TypedData conversion error message Co-authored-by: Freddy Caceres <facs95@gmail.com> * build(deps): bump certifi in /tests/integration_tests (#1545) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://github.com/certifi/python-certifi/releases) - [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: improve error handling for EIP-712 encoding config init (#1543) * Improve error handling for EIP-712 encoding config init * changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mmsqe <mavis@crypto.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Adi Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Ramiro Carlucho <ramirocarlucho@gmail.com> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: Devon Bear <itsdevbear@berachain.com> Co-authored-by: v-homsi <110708931+v-homsi@users.noreply.github.com> Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de> * Release `v0.20-rc5` (#1569) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.46.6 to 0.46.7 (#1551) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.46.6 to 0.46.7. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.46.6...v0.46.7) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/cosmos/ibc-go/v5 from 5.1.0 to 5.2.0 (#1564) Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v5.2.0/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * make missing key error message during SendTransaction more verbose (#1563) Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> * debug(app): add flag to disable optimized build for remote debugging (#1549) Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * Problem: personal_newAccount don't work (#1561) fix the internal parameter. * fix(ante): fix reCheckTx gas wanted (#1566) * fix(abci): fix reCheckTx gas wanted' * fix(ante): add changelog entry * fix(cli): fix Ledger signature algorithm verification (#1550) * fix: update Ledger default algorithm to `EthSecp256k1` * fix ledger signing algo validation * changelog Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: Freddy Caceres <facs95@gmail.com> * test(ante): add test case for `gasWanted` on ReCheckTx mode (#1570) (#1571) * fix(abci): fix reCheckTx gas wanted' * fix(ante): add changelog entry * fix(ante): add test case (cherry picked from commitd3a60a02ea) Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> * update changelog (#1578) * fix upgrade * remove TxFeeChecker * fix lint errors * remove super linter * nix open issue remove integration test * semgrep fix * ignore semgrep * remove semgrep ignore * run godmod2nix locally and ignore lint check * fix lint error Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Loredana Cirstea <loredana.cirstea@gmail.com> Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com> Co-authored-by: yihuang <huang@crypto.com> Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Co-authored-by: Snyk bot <snyk-bot@snyk.io> Co-authored-by: Adu <foriteration@gmail.com> Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com> Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com> Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com> Co-authored-by: mmsqe <tqd0800210105@gmail.com> Co-authored-by: mmsqe <mavis@crypto.com> Co-authored-by: Aditya Saravanan <59209660+adisaran64@users.noreply.github.com> Co-authored-by: adu-crypto <94821467+adu-crypto@users.noreply.github.com> Co-authored-by: Victor Pham <me@victortrusty.dev> Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com> Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com> Co-authored-by: Austin Chandra <austinchandra@berkeley.edu> Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com> Co-authored-by: Tuan Pham Anh <baabeetaa@gmail.com> Co-authored-by: adisaran64 <adisaran64@berkeley.edu> Co-authored-by: v-homsi <110708931+v-homsi@users.noreply.github.com> Co-authored-by: Devon Bear <itsdevbear@berachain.com> Co-authored-by: JayT106 <JayT106@users.noreply.github.com> Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> Co-authored-by: Vladislav Varadinov <vlad@evmos.org> Co-authored-by: MalteHerrmann <malteherrmann.mail@web.de>
This commit is contained in:
co-authored by
dependabot[bot]
4rgon4ut
MalteHerrmann
Federico Kunze Küllmer
Freddy Caceres
Tomas Guerra
yihuang
Austin Chandra
Loredana Cirstea
Thomas Nguy
Nick DeLuca
crypto-facs
Snyk bot
Adu
Freddy Caceres
Federico Kunze Küllmer
Daniel Burckhardt
mmsqe
mmsqe
Aditya Saravanan
adu-crypto
Victor Pham
ramacarlucho
Jacob Gadikian
Vladislav Varadinov
Tuan Pham Anh
adisaran64
v-homsi
Devon Bear
JayT106
mergify[bot]
Vladislav Varadinov
MalteHerrmann
parent
fac5a95679
commit
cb104e0b10
@@ -3,7 +3,7 @@ package cli
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -134,7 +134,7 @@ func GetCmdCommitBid() *cobra.Command {
|
||||
}
|
||||
|
||||
// Save reveal file.
|
||||
err = ioutil.WriteFile(fmt.Sprintf("%s-%s.json", clientCtx.GetFromName(), commitHash), content, 0o600)
|
||||
err = os.WriteFile(fmt.Sprintf("%s-%s.json", clientCtx.GetFromName(), commitHash), content, 0o600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -169,7 +169,7 @@ func GetCmdRevealBid() *cobra.Command {
|
||||
auctionID := args[0]
|
||||
revealFilePath := args[1]
|
||||
|
||||
revealBytes, err := ioutil.ReadFile(revealFilePath) // #nosec G304
|
||||
revealBytes, err := os.ReadFile(revealFilePath) // #nosec G304
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ func (s *IntegrationTestSuite) createAccountWithBalance(accountName string, acco
|
||||
val := s.network.Validators[0]
|
||||
sr := s.Require()
|
||||
|
||||
info, _, err := val.ClientCtx.Keyring.NewMnemonic(accountName, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.EthSecp256k1)
|
||||
info, _, err := val.ClientCtx.Keyring.NewMnemonic(accountName, keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.EthSecp256k1) //nolint:lll
|
||||
sr.NoError(err)
|
||||
|
||||
newAddr, _ := info.GetAddress()
|
||||
|
||||
@@ -58,7 +58,12 @@ type AuctionClientKeeper interface {
|
||||
}
|
||||
|
||||
// NewKeeper creates new instances of the auction Keeper
|
||||
func NewKeeper(accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ps params.Subspace) Keeper {
|
||||
func NewKeeper(accountKeeper auth.AccountKeeper,
|
||||
bankKeeper bank.Keeper,
|
||||
storeKey storetypes.StoreKey,
|
||||
cdc codec.BinaryCodec,
|
||||
ps params.Subspace,
|
||||
) Keeper {
|
||||
if !ps.HasKeyTable() {
|
||||
ps = ps.WithKeyTable(types.ParamKeyTable())
|
||||
}
|
||||
@@ -585,11 +590,9 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *types.Auction) {
|
||||
if secondHighestBid != nil {
|
||||
auction.WinningPrice = secondHighestBid.BidAmount
|
||||
}
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("Auction %s winner %s.", auction.Id, auction.WinnerAddress))
|
||||
ctx.Logger().Info(fmt.Sprintf("Auction %s winner bid %s.", auction.Id, auction.WinningBid.String()))
|
||||
ctx.Logger().Info(fmt.Sprintf("Auction %s winner price %s.", auction.Id, auction.WinningPrice.String()))
|
||||
|
||||
} else {
|
||||
ctx.Logger().Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id))
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
Generated
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
fmt "fmt"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
Generated
+35
-9
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_Query_Auctions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
@@ -398,12 +400,14 @@ func local_request_Query_Balance_0(ctx context.Context, marshaler runtime.Marsha
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Auctions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -411,6 +415,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Auctions_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -424,6 +429,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetAuction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -431,6 +438,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetAuction_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -444,6 +452,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -451,6 +461,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetBid_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -464,6 +475,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetBids_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -471,6 +484,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetBids_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -484,6 +498,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_AuctionsByBidder_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -491,6 +507,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_AuctionsByBidder_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -504,6 +521,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_AuctionsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -511,6 +530,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_AuctionsByOwner_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -524,6 +544,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -531,6 +553,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -544,6 +567,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -551,6 +576,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -766,21 +792,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Auctions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "auctions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Auctions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "auctions"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "auctions", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "auctions", "id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"vulcanize", "auction", "v1beta1", "bids", "auction_id", "bidder"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"vulcanize", "auction", "v1beta1", "bids", "auction_id", "bidder"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "bids", "auction_id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetBids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "bids", "auction_id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_AuctionsByBidder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "by-bidder", "bidder_address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_AuctionsByBidder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "by-bidder", "bidder_address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_AuctionsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "by-owner", "owner_address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_AuctionsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "auction", "v1beta1", "by-owner", "owner_address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Generated
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
|
||||
Generated
+2
-2
@@ -6,11 +6,11 @@ package types
|
||||
import (
|
||||
fmt "fmt"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
_ "google.golang.org/protobuf/types/known/durationpb"
|
||||
_ "google.golang.org/protobuf/types/known/timestamppb"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
|
||||
@@ -46,7 +46,9 @@ func (q Querier) GetBondsByOwner(c context.Context, req *types.QueryGetBondsByOw
|
||||
return &types.QueryGetBondsByOwnerResponse{Bonds: bonds}, nil
|
||||
}
|
||||
|
||||
func (q Querier) GetBondsModuleBalance(c context.Context, _ *types.QueryGetBondModuleBalanceRequest) (*types.QueryGetBondModuleBalanceResponse, error) {
|
||||
func (q Querier) GetBondsModuleBalance(c context.Context,
|
||||
_ *types.QueryGetBondModuleBalanceRequest,
|
||||
) (*types.QueryGetBondModuleBalanceResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
balance := q.Keeper.GetBondModuleBalances(ctx)
|
||||
return &types.QueryGetBondModuleBalanceResponse{Balance: balance}, nil
|
||||
|
||||
@@ -39,7 +39,13 @@ type Keeper struct {
|
||||
}
|
||||
|
||||
// NewKeeper creates new instances of the bond Keeper
|
||||
func NewKeeper(cdc codec.BinaryCodec, accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper, usageKeepers []types.BondUsageKeeper, storeKey storetypes.StoreKey, ps paramtypes.Subspace) Keeper {
|
||||
func NewKeeper(cdc codec.BinaryCodec,
|
||||
accountKeeper auth.AccountKeeper,
|
||||
bankKeeper bank.Keeper,
|
||||
usageKeepers []types.BondUsageKeeper,
|
||||
storeKey storetypes.StoreKey,
|
||||
ps paramtypes.Subspace,
|
||||
) Keeper {
|
||||
// set KeyTable if it has not already been set
|
||||
if !ps.HasKeyTable() {
|
||||
ps = ps.WithKeyTable(types.ParamKeyTable())
|
||||
|
||||
Generated
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
Generated
+1
-1
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
Generated
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
Generated
+23
-6
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryParamsRequest
|
||||
@@ -232,12 +234,14 @@ func local_request_Query_GetBondsModuleBalance_0(ctx context.Context, marshaler
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -245,6 +249,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -258,6 +263,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Bonds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -265,6 +272,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Bonds_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -278,6 +286,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetBondByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -285,6 +295,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetBondByID_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -298,6 +309,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetBondsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -305,6 +318,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetBondsByOwner_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -318,6 +332,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetBondsModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -325,6 +341,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetBondsModuleBalance_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -480,15 +497,15 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Bonds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "bonds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Bonds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "bonds"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetBondByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "bonds", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetBondByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "bonds", "id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetBondsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "by-owner", "owner"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetBondsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "by-owner", "owner"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetBondsModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetBondsModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Generated
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
@@ -31,7 +31,7 @@ func GetQueryCmd() *cobra.Command {
|
||||
// GetStorageCmd queries a key in an accounts storage
|
||||
func GetStorageCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "storage [address] [key]",
|
||||
Use: "storage ADDRESS KEY",
|
||||
Short: "Gets storage for an account with a given key and height",
|
||||
Long: "Gets storage for an account with a given key and height. If the height is not provided, it will use the latest height from context.", //nolint:lll
|
||||
Args: cobra.ExactArgs(2),
|
||||
@@ -71,7 +71,7 @@ func GetStorageCmd() *cobra.Command {
|
||||
// GetCodeCmd queries the code field of a given address
|
||||
func GetCodeCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "code [address]",
|
||||
Use: "code ADDRESS",
|
||||
Short: "Gets code from an account",
|
||||
Long: "Gets code from an account. If the height is not provided, it will use the latest height from context.",
|
||||
Args: cobra.ExactArgs(1),
|
||||
|
||||
@@ -32,7 +32,7 @@ func GetTxCmd() *cobra.Command {
|
||||
// NewRawTxCmd command build cosmos transaction from raw ethereum transaction
|
||||
func NewRawTxCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "raw [tx-hex]",
|
||||
Use: "raw TX_HEX",
|
||||
Short: "Build cosmos transaction from raw ethereum transaction",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
+6
-3
@@ -48,11 +48,14 @@ func InitGenesis(
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
code := common.Hex2Bytes(account.Code)
|
||||
codeHash := crypto.Keccak256Hash(code)
|
||||
if !bytes.Equal(ethAcct.GetCodeHash().Bytes(), codeHash.Bytes()) {
|
||||
panic("code don't match codeHash")
|
||||
|
||||
// we ignore the empty Code hash checking, see ethermint PR#1234
|
||||
if len(account.Code) != 0 && !bytes.Equal(ethAcct.GetCodeHash().Bytes(), codeHash.Bytes()) {
|
||||
s := "the evm state code doesn't match with the codehash\n"
|
||||
panic(fmt.Sprintf("%s account: %s , evm state codehash: %v, ethAccount codehash: %v, evm state code: %s\n",
|
||||
s, account.Address, codeHash, ethAcct.GetCodeHash(), account.Code))
|
||||
}
|
||||
|
||||
k.SetCode(ctx, codeHash.Bytes(), code)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/cerc-io/laconicd/crypto/ethsecp256k1"
|
||||
etherminttypes "github.com/cerc-io/laconicd/types"
|
||||
"github.com/cerc-io/laconicd/x/evm"
|
||||
"github.com/cerc-io/laconicd/x/evm/statedb"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
@@ -96,6 +97,45 @@ func (suite *EvmTestSuite) TestInitGenesis() {
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"ignore empty account code checking",
|
||||
func() {
|
||||
acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, address.Bytes())
|
||||
|
||||
suite.app.AccountKeeper.SetAccount(suite.ctx, acc)
|
||||
},
|
||||
&types.GenesisState{
|
||||
Params: types.DefaultParams(),
|
||||
Accounts: []types.GenesisAccount{
|
||||
{
|
||||
Address: address.String(),
|
||||
Code: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"ignore empty account code checking with non-empty codehash",
|
||||
func() {
|
||||
ethAcc := ðerminttypes.EthAccount{
|
||||
BaseAccount: authtypes.NewBaseAccount(address.Bytes(), nil, 0, 0),
|
||||
CodeHash: common.BytesToHash([]byte{1, 2, 3}).Hex(),
|
||||
}
|
||||
|
||||
suite.app.AccountKeeper.SetAccount(suite.ctx, ethAcc)
|
||||
},
|
||||
&types.GenesisState{
|
||||
Params: types.DefaultParams(),
|
||||
Accounts: []types.GenesisAccount{
|
||||
{
|
||||
Address: address.String(),
|
||||
Code: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package evm
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
)
|
||||
@@ -19,7 +20,7 @@ func NewHandler(server types.MsgServer) sdk.Handler {
|
||||
return sdk.WrapServiceResult(ctx, res, err)
|
||||
|
||||
default:
|
||||
err := sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg)
|
||||
err := errorsmod.Wrapf(errortypes.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/keeper"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
|
||||
@@ -594,9 +596,14 @@ func (suite *EvmTestSuite) TestERC20TransferReverted() {
|
||||
|
||||
before := k.GetBalance(suite.ctx, suite.from)
|
||||
|
||||
ethCfg := suite.app.EvmKeeper.GetChainConfig(suite.ctx).EthereumConfig(nil)
|
||||
baseFee := suite.app.EvmKeeper.GetBaseFee(suite.ctx, ethCfg)
|
||||
|
||||
txData, err := types.UnpackTxData(tx.Data)
|
||||
suite.Require().NoError(err)
|
||||
_, _, err = k.DeductTxCostsFromUserBalance(suite.ctx, *tx, txData, "aphoton", true, true, true)
|
||||
fees, err := keeper.VerifyFee(txData, "aphoton", baseFee, true, true, suite.ctx.IsCheckTx())
|
||||
suite.Require().NoError(err)
|
||||
err = k.DeductTxCostsFromUserBalance(suite.ctx, fees, common.HexToAddress(tx.From))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
res, err := k.EthereumTx(sdk.WrapSDKContext(suite.ctx), tx)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
evmtypes "github.com/cerc-io/laconicd/x/evm/types"
|
||||
"github.com/tendermint/tendermint/abci/types"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestEndBlock() {
|
||||
em := suite.ctx.EventManager()
|
||||
suite.Require().Equal(0, len(em.Events()))
|
||||
|
||||
res := suite.app.EvmKeeper.EndBlock(suite.ctx, types.RequestEndBlock{})
|
||||
suite.Require().Equal([]types.ValidatorUpdate{}, res)
|
||||
|
||||
// should emit 1 EventTypeBlockBloom event on EndBlock
|
||||
suite.Require().Equal(1, len(em.Events()))
|
||||
suite.Require().Equal(evmtypes.EventTypeBlockBloom, em.Events()[0].Type)
|
||||
}
|
||||
+72
-27
@@ -8,9 +8,8 @@ import (
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/eth/tracers/logger"
|
||||
|
||||
"github.com/ethereum/go-ethereum/eth/tracers"
|
||||
"github.com/ethereum/go-ethereum/eth/tracers/logger"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@@ -223,8 +222,11 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
chainID, err := getChainID(ctx, req.ChainId)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
@@ -256,13 +258,17 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
|
||||
}
|
||||
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
chainID, err := getChainID(ctx, req.ChainId)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
||||
if req.GasCap < ethparams.TxGas {
|
||||
return nil, status.Error(codes.InvalidArgument, "gas cap cannot be lower than 21,000")
|
||||
}
|
||||
|
||||
var args types.TransactionArgs
|
||||
err := json.Unmarshal(req.Args, &args)
|
||||
err = json.Unmarshal(req.Args, &args)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
@@ -294,8 +300,7 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
|
||||
hi = req.GasCap
|
||||
}
|
||||
cap = hi
|
||||
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, "failed to load evm config")
|
||||
}
|
||||
@@ -306,14 +311,31 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
|
||||
|
||||
txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))
|
||||
|
||||
// Create a helper to check if a gas allowance results in an executable transaction
|
||||
executable := func(gas uint64) (vmerror bool, rsp *types.MsgEthereumTxResponse, err error) {
|
||||
args.Gas = (*hexutil.Uint64)(&gas)
|
||||
// convert the tx args to an ethereum message
|
||||
msg, err := args.ToMessage(req.GasCap, cfg.BaseFee)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
msg, err := args.ToMessage(req.GasCap, cfg.BaseFee)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
// NOTE: the errors from the executable below should be consistent with go-ethereum,
|
||||
// so we don't wrap them with the gRPC status code
|
||||
|
||||
// Create a helper to check if a gas allowance results in an executable transaction
|
||||
executable := func(gas uint64) (vmError bool, rsp *types.MsgEthereumTxResponse, err error) {
|
||||
// update the message with the new gas value
|
||||
msg = ethtypes.NewMessage(
|
||||
msg.From(),
|
||||
msg.To(),
|
||||
msg.Nonce(),
|
||||
msg.Value(),
|
||||
gas,
|
||||
msg.GasPrice(),
|
||||
msg.GasFeeCap(),
|
||||
msg.GasTipCap(),
|
||||
msg.Data(),
|
||||
msg.AccessList(),
|
||||
msg.IsFake(),
|
||||
)
|
||||
|
||||
// pass false to not commit StateDB
|
||||
rsp, err = k.ApplyMessageWithConfig(ctx, msg, nil, false, cfg, txConfig)
|
||||
@@ -329,24 +351,25 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
|
||||
// Execute the binary search and hone in on an executable gas limit
|
||||
hi, err = types.BinSearch(lo, hi, executable)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Reject the transaction as invalid if it still fails at the highest allowance
|
||||
if hi == cap {
|
||||
failed, result, err := executable(hi)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if failed {
|
||||
if result != nil && result.VmError != vm.ErrOutOfGas.Error() {
|
||||
if result.VmError == vm.ErrExecutionReverted.Error() {
|
||||
return nil, types.NewExecErrorWithReason(result.Ret)
|
||||
}
|
||||
return nil, status.Error(codes.Internal, result.VmError)
|
||||
return nil, errors.New(result.VmError)
|
||||
}
|
||||
// Otherwise, the specified gas cap is too low
|
||||
return nil, status.Error(codes.Internal, fmt.Sprintf("gas required exceeds allowance (%d)", cap))
|
||||
return nil, fmt.Errorf("gas required exceeds allowance (%d)", cap)
|
||||
}
|
||||
}
|
||||
return &types.EstimateGasResponse{Gas: hi}, nil
|
||||
@@ -375,8 +398,11 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ
|
||||
ctx = ctx.WithBlockHeight(contextHeight)
|
||||
ctx = ctx.WithBlockTime(req.BlockTime)
|
||||
ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash))
|
||||
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
chainID, err := getChainID(ctx, req.ChainId)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to load evm config: %s", err.Error())
|
||||
}
|
||||
@@ -404,7 +430,13 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ
|
||||
txConfig.TxIndex++
|
||||
}
|
||||
|
||||
result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false)
|
||||
var tracerConfig json.RawMessage
|
||||
if req.TraceConfig != nil && req.TraceConfig.TracerJsonConfig != "" {
|
||||
// ignore error. default to no traceConfig
|
||||
_ = json.Unmarshal([]byte(req.TraceConfig.TracerJsonConfig), &tracerConfig)
|
||||
}
|
||||
|
||||
result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false, tracerConfig)
|
||||
if err != nil {
|
||||
// error will be returned with detail status from traceTx
|
||||
return nil, err
|
||||
@@ -443,8 +475,12 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest)
|
||||
ctx = ctx.WithBlockHeight(contextHeight)
|
||||
ctx = ctx.WithBlockTime(req.BlockTime)
|
||||
ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash))
|
||||
chainID, err := getChainID(ctx, req.ChainId)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, "failed to load evm config")
|
||||
}
|
||||
@@ -458,13 +494,13 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest)
|
||||
ethTx := tx.AsTransaction()
|
||||
txConfig.TxHash = ethTx.Hash()
|
||||
txConfig.TxIndex = uint(i)
|
||||
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true)
|
||||
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true, nil)
|
||||
if err != nil {
|
||||
result.Error = err.Error()
|
||||
continue
|
||||
} else {
|
||||
txConfig.LogIndex = logIndex
|
||||
result.Result = traceResult
|
||||
}
|
||||
txConfig.LogIndex = logIndex
|
||||
result.Result = traceResult
|
||||
results = append(results, &result)
|
||||
}
|
||||
|
||||
@@ -487,6 +523,7 @@ func (k *Keeper) traceTx(
|
||||
tx *ethtypes.Transaction,
|
||||
traceConfig *types.TraceConfig,
|
||||
commitMessage bool,
|
||||
tracerJSONConfig json.RawMessage,
|
||||
) (*interface{}, uint, error) {
|
||||
// Assemble the structured logger or the JavaScript tracer
|
||||
var (
|
||||
@@ -527,7 +564,7 @@ func (k *Keeper) traceTx(
|
||||
}
|
||||
|
||||
if traceConfig.Tracer != "" {
|
||||
if tracer, err = tracers.New(traceConfig.Tracer, tCtx); err != nil {
|
||||
if tracer, err = tracers.New(traceConfig.Tracer, tCtx, tracerJSONConfig); err != nil {
|
||||
return nil, 0, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
}
|
||||
@@ -580,3 +617,11 @@ func (k Keeper) BaseFee(c context.Context, _ *types.QueryBaseFeeRequest) (*types
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// getChainID parse chainID from current context if not provided
|
||||
func getChainID(ctx sdk.Context, chainID int64) (*big.Int, error) {
|
||||
if chainID == 0 {
|
||||
return ethermint.ParseChainID(ctx.ChainID())
|
||||
}
|
||||
return big.NewInt(chainID), nil
|
||||
}
|
||||
|
||||
+512
-79
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
"github.com/cerc-io/laconicd/tests"
|
||||
"github.com/cerc-io/laconicd/x/evm/statedb"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
@@ -17,7 +18,6 @@ import (
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
"github.com/cerc-io/laconicd/crypto/ethsecp256k1"
|
||||
"github.com/cerc-io/laconicd/server/config"
|
||||
ethermint "github.com/cerc-io/laconicd/types"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
@@ -491,9 +491,11 @@ func (suite *KeeperTestSuite) TestQueryValidatorAccount() {
|
||||
|
||||
func (suite *KeeperTestSuite) TestEstimateGas() {
|
||||
gasHelper := hexutil.Uint64(20000)
|
||||
higherGas := hexutil.Uint64(25000)
|
||||
hexBigInt := hexutil.Big(*big.NewInt(1))
|
||||
|
||||
var (
|
||||
args types.TransactionArgs
|
||||
args interface{}
|
||||
gasCap uint64
|
||||
)
|
||||
testCases := []struct {
|
||||
@@ -504,78 +506,223 @@ func (suite *KeeperTestSuite) TestEstimateGas() {
|
||||
enableFeemarket bool
|
||||
}{
|
||||
// should success, because transfer value is zero
|
||||
{"default args", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
}, true, 21000, false},
|
||||
{
|
||||
"default args - special case for ErrIntrinsicGas on contract creation, raise gas limit",
|
||||
func() {
|
||||
args = types.TransactionArgs{}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGasContractCreation,
|
||||
false,
|
||||
},
|
||||
// should success, because transfer value is zero
|
||||
{
|
||||
"default args with 'to' address",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
false,
|
||||
},
|
||||
// should fail, because the default From address(zero address) don't have fund
|
||||
{"not enough balance", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
}, false, 0, false},
|
||||
{
|
||||
"not enough balance",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
},
|
||||
false,
|
||||
0,
|
||||
false,
|
||||
},
|
||||
// should success, enough balance now
|
||||
{"enough balance", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, From: &suite.address, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
}, false, 0, false},
|
||||
{
|
||||
"enough balance",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, From: &suite.address, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
}, false, 0, false},
|
||||
// should success, because gas limit lower than 21000 is ignored
|
||||
{"gas exceed allowance", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Gas: &gasHelper}
|
||||
}, true, 21000, false},
|
||||
{
|
||||
"gas exceed allowance",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Gas: &gasHelper}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
false,
|
||||
},
|
||||
// should fail, invalid gas cap
|
||||
{"gas exceed global allowance", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
gasCap = 20000
|
||||
}, false, 0, false},
|
||||
{
|
||||
"gas exceed global allowance",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
gasCap = 20000
|
||||
},
|
||||
false,
|
||||
0,
|
||||
false,
|
||||
},
|
||||
// estimate gas of an erc20 contract deployment, the exact gas number is checked with geth
|
||||
{"contract deployment", func() {
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", &suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Require().NoError(err)
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args = types.TransactionArgs{
|
||||
From: &suite.address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
}
|
||||
}, true, 1186778, false},
|
||||
{
|
||||
"contract deployment",
|
||||
func() {
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", &suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Require().NoError(err)
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args = types.TransactionArgs{
|
||||
From: &suite.address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
}
|
||||
},
|
||||
true,
|
||||
1186778,
|
||||
false,
|
||||
},
|
||||
// estimate gas of an erc20 transfer, the exact gas number is checked with geth
|
||||
{"erc20 transfer", func() {
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Commit()
|
||||
transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000))
|
||||
suite.Require().NoError(err)
|
||||
args = types.TransactionArgs{To: &contractAddr, From: &suite.address, Data: (*hexutil.Bytes)(&transferData)}
|
||||
}, true, 51880, false},
|
||||
|
||||
{
|
||||
"erc20 transfer",
|
||||
func() {
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Commit()
|
||||
transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000))
|
||||
suite.Require().NoError(err)
|
||||
args = types.TransactionArgs{To: &contractAddr, From: &suite.address, Data: (*hexutil.Bytes)(&transferData)}
|
||||
},
|
||||
true,
|
||||
51880,
|
||||
false,
|
||||
},
|
||||
// repeated tests with enableFeemarket
|
||||
{"default args w/ enableFeemarket", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
}, true, 21000, true},
|
||||
{"not enough balance w/ enableFeemarket", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
}, false, 0, true},
|
||||
{"enough balance w/ enableFeemarket", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, From: &suite.address, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
}, false, 0, true},
|
||||
{"gas exceed allowance w/ enableFeemarket", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Gas: &gasHelper}
|
||||
}, true, 21000, true},
|
||||
{"gas exceed global allowance w/ enableFeemarket", func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
gasCap = 20000
|
||||
}, false, 0, true},
|
||||
{"contract deployment w/ enableFeemarket", func() {
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", &suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Require().NoError(err)
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args = types.TransactionArgs{
|
||||
From: &suite.address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
}
|
||||
}, true, 1186778, true},
|
||||
{"erc20 transfer w/ enableFeemarket", func() {
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Commit()
|
||||
transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000))
|
||||
suite.Require().NoError(err)
|
||||
args = types.TransactionArgs{To: &contractAddr, From: &suite.address, Data: (*hexutil.Bytes)(&transferData)}
|
||||
}, true, 51880, true},
|
||||
{
|
||||
"default args w/ enableFeemarket",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"not enough balance w/ enableFeemarket",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
},
|
||||
false,
|
||||
0,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"enough balance w/ enableFeemarket",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, From: &suite.address, Value: (*hexutil.Big)(big.NewInt(100))}
|
||||
},
|
||||
false,
|
||||
0,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"gas exceed allowance w/ enableFeemarket",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}, Gas: &gasHelper}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"gas exceed global allowance w/ enableFeemarket",
|
||||
func() {
|
||||
args = types.TransactionArgs{To: &common.Address{}}
|
||||
gasCap = 20000
|
||||
},
|
||||
false,
|
||||
0,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"contract deployment w/ enableFeemarket",
|
||||
func() {
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", &suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Require().NoError(err)
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args = types.TransactionArgs{
|
||||
From: &suite.address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
}
|
||||
},
|
||||
true,
|
||||
1186778,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"erc20 transfer w/ enableFeemarket",
|
||||
func() {
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Commit()
|
||||
transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000))
|
||||
suite.Require().NoError(err)
|
||||
args = types.TransactionArgs{To: &contractAddr, From: &suite.address, Data: (*hexutil.Bytes)(&transferData)}
|
||||
},
|
||||
true,
|
||||
51880,
|
||||
true,
|
||||
},
|
||||
{
|
||||
"contract creation but 'create' param disabled",
|
||||
func() {
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", &suite.address, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
suite.Require().NoError(err)
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args = types.TransactionArgs{
|
||||
From: &suite.address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
}
|
||||
params := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
params.EnableCreate = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
},
|
||||
false,
|
||||
0,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"specified gas in args higher than ethparams.TxGas (21,000)",
|
||||
func() {
|
||||
args = types.TransactionArgs{
|
||||
To: &common.Address{},
|
||||
Gas: &higherGas,
|
||||
}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"specified gas in args higher than request gasCap",
|
||||
func() {
|
||||
gasCap = 22_000
|
||||
args = types.TransactionArgs{
|
||||
To: &common.Address{},
|
||||
Gas: &higherGas,
|
||||
}
|
||||
},
|
||||
true,
|
||||
ethparams.TxGas,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"invalid args - specified both gasPrice and maxFeePerGas",
|
||||
func() {
|
||||
args = types.TransactionArgs{
|
||||
To: &common.Address{},
|
||||
GasPrice: &hexBigInt,
|
||||
MaxFeePerGas: &hexBigInt,
|
||||
}
|
||||
},
|
||||
false,
|
||||
0,
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
@@ -588,8 +735,9 @@ func (suite *KeeperTestSuite) TestEstimateGas() {
|
||||
args, err := json.Marshal(&args)
|
||||
suite.Require().NoError(err)
|
||||
req := types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: gasCap,
|
||||
Args: args,
|
||||
GasCap: gasCap,
|
||||
ProposerAddress: suite.ctx.BlockHeader().ProposerAddress,
|
||||
}
|
||||
|
||||
rsp, err := suite.queryClient.EstimateGas(sdk.WrapSDKContext(suite.ctx), &req)
|
||||
@@ -610,6 +758,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
txMsg *types.MsgEthereumTx
|
||||
traceConfig *types.TraceConfig
|
||||
predecessors []*types.MsgEthereumTx
|
||||
chainID *sdkmath.Int
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
@@ -702,6 +851,86 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
||||
enableFeemarket: false,
|
||||
},
|
||||
{
|
||||
msg: "invalid trace config - Negative Limit",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Limit: -1,
|
||||
}
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "invalid trace config - Invalid Tracer",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Tracer: "invalid_tracer",
|
||||
}
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "invalid trace config - Invalid Timeout",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Timeout: "wrong_time",
|
||||
}
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "default tracer with contract creation tx as predecessor but 'create' param disabled",
|
||||
malleate: func() {
|
||||
traceConfig = nil
|
||||
|
||||
// increase nonce to avoid address collision
|
||||
vmdb := suite.StateDB()
|
||||
vmdb.SetNonce(suite.address, vmdb.GetNonce(suite.address)+1)
|
||||
suite.Require().NoError(vmdb.Commit())
|
||||
|
||||
chainID := suite.app.EvmKeeper.ChainID()
|
||||
nonce := suite.app.EvmKeeper.GetNonce(suite.ctx, suite.address)
|
||||
data := types.ERC20Contract.Bin
|
||||
contractTx := types.NewTxContract(
|
||||
chainID,
|
||||
nonce,
|
||||
nil, // amount
|
||||
ethparams.TxGasContractCreation, // gasLimit
|
||||
nil, // gasPrice
|
||||
nil, nil,
|
||||
data, // input
|
||||
nil, // accesses
|
||||
)
|
||||
|
||||
predecessors = append(predecessors, contractTx)
|
||||
suite.Commit()
|
||||
|
||||
params := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
params.EnableCreate = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
},
|
||||
expPass: true,
|
||||
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
||||
},
|
||||
{
|
||||
msg: "invalid chain id",
|
||||
malleate: func() {
|
||||
traceConfig = nil
|
||||
predecessors = []*types.MsgEthereumTx{}
|
||||
tmp := sdkmath.NewInt(1)
|
||||
chainID = &tmp
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
@@ -721,8 +950,11 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
TraceConfig: traceConfig,
|
||||
Predecessors: predecessors,
|
||||
}
|
||||
|
||||
if chainID != nil {
|
||||
traceReq.ChainId = chainID.Int64()
|
||||
}
|
||||
res, err := suite.queryClient.TraceTx(sdk.WrapSDKContext(suite.ctx), &traceReq)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
if tc.expPass {
|
||||
suite.Require().NoError(err)
|
||||
@@ -740,6 +972,8 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
// Reset for next test case
|
||||
chainID = nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -750,6 +984,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
var (
|
||||
txs []*types.MsgEthereumTx
|
||||
traceConfig *types.TraceConfig
|
||||
chainID *sdkmath.Int
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
@@ -836,6 +1071,41 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
traceResponse: "[{\"result\":{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PU",
|
||||
enableFeemarket: false,
|
||||
},
|
||||
{
|
||||
msg: "invalid trace config - Negative Limit",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Limit: -1,
|
||||
}
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "invalid trace config - Invalid Tracer",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Tracer: "invalid_tracer",
|
||||
}
|
||||
},
|
||||
expPass: true,
|
||||
traceResponse: "[{\"error\":\"rpc error: code = Internal desc = tracer not found\"}]",
|
||||
},
|
||||
{
|
||||
msg: "invalid chain id",
|
||||
malleate: func() {
|
||||
traceConfig = nil
|
||||
tmp := sdkmath.NewInt(1)
|
||||
chainID = &tmp
|
||||
},
|
||||
expPass: true,
|
||||
traceResponse: "[{\"error\":\"rpc error: code = Internal desc = invalid chain id for signer\"}]",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
@@ -857,6 +1127,11 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
Txs: txs,
|
||||
TraceConfig: traceConfig,
|
||||
}
|
||||
|
||||
if chainID != nil {
|
||||
traceReq.ChainId = chainID.Int64()
|
||||
}
|
||||
|
||||
res, err := suite.queryClient.TraceBlock(sdk.WrapSDKContext(suite.ctx), &traceReq)
|
||||
|
||||
if tc.expPass {
|
||||
@@ -870,6 +1145,8 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
// Reset for next case
|
||||
chainID = nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -877,10 +1154,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestNonceInQuery() {
|
||||
suite.SetupTest()
|
||||
priv, err := ethsecp256k1.GenerateKey()
|
||||
suite.Require().NoError(err)
|
||||
address := common.BytesToAddress(priv.PubKey().Address().Bytes())
|
||||
address := tests.GenerateAddress()
|
||||
suite.Require().Equal(uint64(0), suite.app.EvmKeeper.GetNonce(suite.ctx, address))
|
||||
supply := sdkmath.NewIntWithDecimal(1000, 18).BigInt()
|
||||
|
||||
@@ -889,22 +1163,26 @@ func (suite *KeeperTestSuite) TestNonceInQuery() {
|
||||
|
||||
// do an EthCall/EstimateGas with nonce 0
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", address, supply)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
args, err := json.Marshal(&types.TransactionArgs{
|
||||
From: &address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
})
|
||||
suite.Require().NoError(err)
|
||||
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
_, err = suite.queryClient.EstimateGas(sdk.WrapSDKContext(suite.ctx), &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
ProposerAddress: proposerAddress,
|
||||
})
|
||||
suite.Require().NoError(err)
|
||||
|
||||
_, err = suite.queryClient.EthCall(sdk.WrapSDKContext(suite.ctx), &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
ProposerAddress: proposerAddress,
|
||||
})
|
||||
suite.Require().NoError(err)
|
||||
}
|
||||
@@ -981,3 +1259,158 @@ func (suite *KeeperTestSuite) TestQueryBaseFee() {
|
||||
suite.enableFeemarket = false
|
||||
suite.enableLondonHF = true
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestEthCall() {
|
||||
var (
|
||||
req *types.EthCallRequest
|
||||
)
|
||||
|
||||
address := tests.GenerateAddress()
|
||||
suite.Require().Equal(uint64(0), suite.app.EvmKeeper.GetNonce(suite.ctx, address))
|
||||
supply := sdkmath.NewIntWithDecimal(1000, 18).BigInt()
|
||||
|
||||
hexBigInt := hexutil.Big(*big.NewInt(1))
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", address, supply)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
data := append(types.ERC20Contract.Bin, ctorArgs...)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
malleate func()
|
||||
expPass bool
|
||||
}{
|
||||
{
|
||||
"invalid args",
|
||||
func() {
|
||||
req = &types.EthCallRequest{Args: []byte("invalid args"), GasCap: uint64(config.DefaultGasCap)}
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"invalid args - specified both gasPrice and maxFeePerGas",
|
||||
func() {
|
||||
args, err := json.Marshal(&types.TransactionArgs{
|
||||
From: &address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
GasPrice: &hexBigInt,
|
||||
MaxFeePerGas: &hexBigInt,
|
||||
})
|
||||
|
||||
suite.Require().NoError(err)
|
||||
req = &types.EthCallRequest{Args: args, GasCap: uint64(config.DefaultGasCap)}
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"set param EnableCreate = false",
|
||||
func() {
|
||||
args, err := json.Marshal(&types.TransactionArgs{
|
||||
From: &address,
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
})
|
||||
|
||||
suite.Require().NoError(err)
|
||||
req = &types.EthCallRequest{Args: args, GasCap: uint64(config.DefaultGasCap)}
|
||||
|
||||
params := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
params.EnableCreate = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
tc.malleate()
|
||||
|
||||
res, err := suite.queryClient.EthCall(suite.ctx, req)
|
||||
if tc.expPass {
|
||||
suite.Require().NotNil(res)
|
||||
suite.Require().NoError(err)
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestEmptyRequest() {
|
||||
k := suite.app.EvmKeeper
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
queryFunc func() (interface{}, error)
|
||||
}{
|
||||
{
|
||||
"Account method",
|
||||
func() (interface{}, error) {
|
||||
return k.Account(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"CosmosAccount method",
|
||||
func() (interface{}, error) {
|
||||
return k.CosmosAccount(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"ValidatorAccount method",
|
||||
func() (interface{}, error) {
|
||||
return k.ValidatorAccount(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"Balance method",
|
||||
func() (interface{}, error) {
|
||||
return k.Balance(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"Storage method",
|
||||
func() (interface{}, error) {
|
||||
return k.Storage(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"Code method",
|
||||
func() (interface{}, error) {
|
||||
return k.Code(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"EthCall method",
|
||||
func() (interface{}, error) {
|
||||
return k.EthCall(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"EstimateGas method",
|
||||
func() (interface{}, error) {
|
||||
return k.EstimateGas(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"TraceTx method",
|
||||
func() (interface{}, error) {
|
||||
return k.TraceTx(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
{
|
||||
"TraceBlock method",
|
||||
func() (interface{}, error) {
|
||||
return k.TraceBlock(suite.ctx, nil)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(fmt.Sprintf("Case %s", tc.name), func() {
|
||||
suite.SetupTest()
|
||||
_, err := tc.queryFunc()
|
||||
suite.Require().Error(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
@@ -22,7 +22,7 @@ func NewMultiEvmHooks(hooks ...types.EvmHooks) MultiEvmHooks {
|
||||
func (mh MultiEvmHooks) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
|
||||
for i := range mh {
|
||||
if err := mh[i].PostTxProcessing(ctx, msg, receipt); err != nil {
|
||||
return sdkerrors.Wrapf(err, "EVM hook %T failed", mh[i])
|
||||
return errorsmod.Wrapf(err, "EVM hook %T failed", mh[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -3,11 +3,11 @@ package keeper
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
@@ -237,7 +237,7 @@ func (k *Keeper) SetHooks(eh types.EvmHooks) *Keeper {
|
||||
|
||||
// PostTxProcessing delegate the call to the hooks. If no hook has been registered, this function returns with a `nil` error
|
||||
func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
|
||||
if k.hooks == types.EvmHooks(nil) {
|
||||
if k.hooks == nil {
|
||||
return nil
|
||||
}
|
||||
return k.hooks.PostTxProcessing(ctx, msg, receipt)
|
||||
@@ -364,7 +364,7 @@ func (k Keeper) SetTransientGasUsed(ctx sdk.Context, gasUsed uint64) {
|
||||
func (k Keeper) AddTransientGasUsed(ctx sdk.Context, gasUsed uint64) (uint64, error) {
|
||||
result := k.GetTransientGasUsed(ctx) + gasUsed
|
||||
if result < gasUsed {
|
||||
return 0, sdkerrors.Wrap(types.ErrGasOverflow, "transient gas used")
|
||||
return 0, errorsmod.Wrap(types.ErrGasOverflow, "transient gas used")
|
||||
}
|
||||
k.SetTransientGasUsed(ctx, result)
|
||||
return result, nil
|
||||
|
||||
@@ -126,6 +126,8 @@ func (suite *KeeperTestSuite) SetupApp(checkTx bool) {
|
||||
evmGenesis.Params.ChainConfig.ArrowGlacierBlock = &maxInt
|
||||
evmGenesis.Params.ChainConfig.GrayGlacierBlock = &maxInt
|
||||
evmGenesis.Params.ChainConfig.MergeNetsplitBlock = &maxInt
|
||||
evmGenesis.Params.ChainConfig.ShanghaiBlock = &maxInt
|
||||
evmGenesis.Params.ChainConfig.CancunBlock = &maxInt
|
||||
genesis[types.ModuleName] = app.AppCodec().MustMarshalJSON(evmGenesis)
|
||||
}
|
||||
return genesis
|
||||
@@ -200,6 +202,7 @@ func (suite *KeeperTestSuite) SetupApp(checkTx bool) {
|
||||
|
||||
valAddr := sdk.ValAddress(suite.address.Bytes())
|
||||
validator, err := stakingtypes.NewValidator(valAddr, priv.PubKey(), stakingtypes.Description{})
|
||||
require.NoError(t, err)
|
||||
err = suite.app.StakingKeeper.SetValidatorByConsAddr(suite.ctx, validator)
|
||||
require.NoError(t, err)
|
||||
err = suite.app.StakingKeeper.SetValidatorByConsAddr(suite.ctx, validator)
|
||||
@@ -256,10 +259,10 @@ func (suite *KeeperTestSuite) DeployTestContract(t require.TestingT, owner commo
|
||||
Data: (*hexutil.Bytes)(&data),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
ProposerAddress: suite.ctx.BlockHeader().ProposerAddress,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -307,8 +310,9 @@ func (suite *KeeperTestSuite) TransferERC20Token(t require.TestingT, contractAdd
|
||||
args, err := json.Marshal(&types.TransactionArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)})
|
||||
require.NoError(t, err)
|
||||
res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: 25_000_000,
|
||||
Args: args,
|
||||
GasCap: 25_000_000,
|
||||
ProposerAddress: suite.ctx.BlockHeader().ProposerAddress,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -364,8 +368,9 @@ func (suite *KeeperTestSuite) DeployTestMessageCall(t require.TestingT) common.A
|
||||
require.NoError(t, err)
|
||||
|
||||
res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
Args: args,
|
||||
GasCap: uint64(config.DefaultGasCap),
|
||||
ProposerAddress: suite.ctx.BlockHeader().ProposerAddress,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -434,3 +439,88 @@ func (suite *KeeperTestSuite) TestBaseFee() {
|
||||
suite.enableFeemarket = false
|
||||
suite.enableLondonHF = true
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestGetAccountStorage() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
malleate func()
|
||||
expRes []int
|
||||
}{
|
||||
{
|
||||
"Only one account that's not a contract (no storage)",
|
||||
func() {},
|
||||
[]int{0},
|
||||
},
|
||||
{
|
||||
"Two accounts - one contract (with storage), one wallet",
|
||||
func() {
|
||||
supply := big.NewInt(100)
|
||||
suite.DeployTestContract(suite.T(), suite.address, supply)
|
||||
},
|
||||
[]int{2, 0},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
tc.malleate()
|
||||
i := 0
|
||||
suite.app.AccountKeeper.IterateAccounts(suite.ctx, func(account authtypes.AccountI) bool {
|
||||
ethAccount, ok := account.(ethermint.EthAccountI)
|
||||
if !ok {
|
||||
// ignore non EthAccounts
|
||||
return false
|
||||
}
|
||||
|
||||
addr := ethAccount.EthAddress()
|
||||
storage := suite.app.EvmKeeper.GetAccountStorage(suite.ctx, addr)
|
||||
|
||||
suite.Require().Equal(tc.expRes[i], len(storage))
|
||||
i++
|
||||
return false
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestGetAccountOrEmpty() {
|
||||
empty := statedb.Account{
|
||||
Balance: new(big.Int),
|
||||
CodeHash: types.EmptyCodeHash,
|
||||
}
|
||||
|
||||
supply := big.NewInt(100)
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, supply)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
addr common.Address
|
||||
expEmpty bool
|
||||
}{
|
||||
{
|
||||
"unexisting account - get empty",
|
||||
common.Address{},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"existing contract account",
|
||||
contractAddr,
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
res := suite.app.EvmKeeper.GetAccountOrEmpty(suite.ctx, tc.addr)
|
||||
if tc.expEmpty {
|
||||
suite.Require().Equal(empty, res)
|
||||
} else {
|
||||
suite.Require().NotEqual(empty, res)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
tmbytes "github.com/tendermint/tendermint/libs/bytes"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/cosmos/cosmos-sdk/telemetry"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
)
|
||||
@@ -32,20 +32,16 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t
|
||||
|
||||
labels := []metrics.Label{
|
||||
telemetry.NewLabel("tx_type", fmt.Sprintf("%d", tx.Type())),
|
||||
telemetry.NewLabel("from", sender),
|
||||
}
|
||||
if tx.To() == nil {
|
||||
labels = []metrics.Label{telemetry.NewLabel("execution", "create")}
|
||||
labels = append(labels, telemetry.NewLabel("execution", "create"))
|
||||
} else {
|
||||
labels = []metrics.Label{
|
||||
telemetry.NewLabel("execution", "call"),
|
||||
telemetry.NewLabel("to", tx.To().Hex()), // recipient address (contract or account)
|
||||
}
|
||||
labels = append(labels, telemetry.NewLabel("execution", "call"))
|
||||
}
|
||||
|
||||
response, err := k.ApplyTransaction(ctx, tx)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to apply transaction")
|
||||
return nil, errorsmod.Wrap(err, "failed to apply transaction")
|
||||
}
|
||||
|
||||
defer func() {
|
||||
@@ -104,7 +100,7 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t
|
||||
for i, log := range response.Logs {
|
||||
value, err := json.Marshal(log)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to encode log")
|
||||
return nil, errorsmod.Wrap(err, "failed to encode log")
|
||||
}
|
||||
txLogAttrs[i] = sdk.NewAttribute(types.AttributeKeyTxLog, string(value))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/statedb"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestEthereumTx() {
|
||||
var (
|
||||
err error
|
||||
msg *types.MsgEthereumTx
|
||||
signer ethtypes.Signer
|
||||
vmdb *statedb.StateDB
|
||||
chainCfg *params.ChainConfig
|
||||
expectedGasUsed uint64
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
malleate func()
|
||||
expErr bool
|
||||
}{
|
||||
{
|
||||
"Deploy contract tx - insufficient gas",
|
||||
func() {
|
||||
msg, err = suite.createContractMsgTx(
|
||||
vmdb.GetNonce(suite.address),
|
||||
signer,
|
||||
chainCfg,
|
||||
big.NewInt(1),
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"Transfer funds tx",
|
||||
func() {
|
||||
msg, _, err = newEthMsgTx(
|
||||
vmdb.GetNonce(suite.address),
|
||||
suite.ctx.BlockHeight(),
|
||||
suite.address,
|
||||
chainCfg,
|
||||
suite.signer,
|
||||
signer,
|
||||
ethtypes.AccessListTxType,
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
expectedGasUsed = params.TxGas
|
||||
},
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
chainCfg = keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID())
|
||||
signer = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID())
|
||||
vmdb = suite.StateDB()
|
||||
|
||||
tc.malleate()
|
||||
res, err := suite.app.EvmKeeper.EthereumTx(suite.ctx, msg)
|
||||
if tc.expErr {
|
||||
suite.Require().Error(err)
|
||||
return
|
||||
}
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(expectedGasUsed, res.GasUsed)
|
||||
suite.Require().False(res.Failed())
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -21,3 +21,38 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
|
||||
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
||||
k.paramSpace.SetParamSet(ctx, ¶ms)
|
||||
}
|
||||
|
||||
// GetChainConfig returns the chain configuration parameter.
|
||||
func (k Keeper) GetChainConfig(ctx sdk.Context) types.ChainConfig {
|
||||
var chainCfg types.ChainConfig
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyChainConfig, &chainCfg)
|
||||
return chainCfg
|
||||
}
|
||||
|
||||
// GetEVMDenom returns the EVM denom.
|
||||
func (k Keeper) GetEVMDenom(ctx sdk.Context) string {
|
||||
var evmDenom string
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEVMDenom, &evmDenom)
|
||||
return evmDenom
|
||||
}
|
||||
|
||||
// GetEnableCall returns true if the EVM Call operation is enabled.
|
||||
func (k Keeper) GetEnableCall(ctx sdk.Context) bool {
|
||||
var enableCall bool
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCall, &enableCall)
|
||||
return enableCall
|
||||
}
|
||||
|
||||
// GetEnableCreate returns true if the EVM Create contract operation is enabled.
|
||||
func (k Keeper) GetEnableCreate(ctx sdk.Context) bool {
|
||||
var enableCreate bool
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCreate, &enableCreate)
|
||||
return enableCreate
|
||||
}
|
||||
|
||||
// GetAllowUnprotectedTxs returns true if unprotected txs (i.e non-replay protected as per EIP-155) are supported by the chain.
|
||||
func (k Keeper) GetAllowUnprotectedTxs(ctx sdk.Context) bool {
|
||||
var allowUnprotectedTx bool
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyAllowUnprotectedTxs, &allowUnprotectedTx)
|
||||
return allowUnprotectedTx
|
||||
}
|
||||
|
||||
@@ -1,14 +1,96 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestParams() {
|
||||
params := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
suite.Require().Equal(types.DefaultParams(), params)
|
||||
params.EvmDenom = "inj"
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
newParams := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
suite.Require().Equal(newParams, params)
|
||||
testCases := []struct {
|
||||
name string
|
||||
paramsFun func() interface{}
|
||||
getFun func() interface{}
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
"success - Checks if the default params are set correctly",
|
||||
func() interface{} {
|
||||
return types.DefaultParams()
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - EvmDenom param is set to \"inj\" and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.EvmDenom = "inj"
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
return params.EvmDenom
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetEVMDenom(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check EnableCreate param is set to false and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.EnableCreate = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
return params.EnableCreate
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetEnableCreate(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check EnableCall param is set to false and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.EnableCall = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
return params.EnableCall
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetEnableCall(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check AllowUnprotectedTxs param is set to false and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.AllowUnprotectedTxs = false
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
return params.AllowUnprotectedTxs
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetAllowUnprotectedTxs(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check ChainConfig param is set to the default value and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.ChainConfig = types.DefaultChainConfig()
|
||||
suite.app.EvmKeeper.SetParams(suite.ctx, params)
|
||||
return params.ChainConfig
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.EvmKeeper.GetChainConfig(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
outcome := reflect.DeepEqual(tc.paramsFun(), tc.getFun())
|
||||
suite.Require().Equal(tc.expected, outcome)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
|
||||
@@ -39,14 +39,14 @@ func GasToRefund(availableRefund, gasConsumed, refundQuotient uint64) uint64 {
|
||||
}
|
||||
|
||||
// EVMConfig creates the EVMConfig based on current state
|
||||
func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) {
|
||||
func (k *Keeper) EVMConfig(ctx sdk.Context, proposerAddress sdk.ConsAddress, chainID *big.Int) (*types.EVMConfig, error) {
|
||||
params := k.GetParams(ctx)
|
||||
ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID)
|
||||
ethCfg := params.ChainConfig.EthereumConfig(chainID)
|
||||
|
||||
// get the coinbase address from the block proposer
|
||||
coinbase, err := k.GetCoinbaseAddress(ctx)
|
||||
coinbase, err := k.GetCoinbaseAddress(ctx, proposerAddress)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address")
|
||||
return nil, errorsmod.Wrap(err, "failed to obtain coinbase address")
|
||||
}
|
||||
|
||||
baseFee := k.GetBaseFee(ctx, ethCfg)
|
||||
@@ -72,6 +72,11 @@ func (k *Keeper) TxConfig(ctx sdk.Context, txHash common.Hash) statedb.TxConfig
|
||||
// (ChainConfig and module Params). It additionally sets the validator operator address as the
|
||||
// coinbase address to make it available for the COINBASE opcode, even though there is no
|
||||
// beneficiary of the coinbase transaction (since we're not mining).
|
||||
//
|
||||
// NOTE: the RANDOM opcode is currently not supported since it requires
|
||||
// RANDAO implementation. See https://github.com/cerc-io/laconicd/pull/1520#pullrequestreview-1200504697
|
||||
// for more information.
|
||||
|
||||
func (k *Keeper) NewEVM(
|
||||
ctx sdk.Context,
|
||||
msg core.Message,
|
||||
@@ -89,6 +94,7 @@ func (k *Keeper) NewEVM(
|
||||
Time: big.NewInt(ctx.BlockHeader().Time.Unix()),
|
||||
Difficulty: big.NewInt(0), // unused. Only required in PoW context
|
||||
BaseFee: cfg.BaseFee,
|
||||
Random: nil, // not supported
|
||||
}
|
||||
|
||||
txCtx := core.NewEVMTxContext(msg)
|
||||
@@ -199,9 +205,9 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
bloomReceipt ethtypes.Bloom
|
||||
)
|
||||
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
cfg, err := k.EVMConfig(ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress), k.eip155ChainID)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to load evm config")
|
||||
return nil, errorsmod.Wrap(err, "failed to load evm config")
|
||||
}
|
||||
txConfig := k.TxConfig(ctx, tx.Hash())
|
||||
|
||||
@@ -209,7 +215,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight()))
|
||||
msg, err := tx.AsMessage(signer, cfg.BaseFee)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to return ethereum transaction as core message")
|
||||
return nil, errorsmod.Wrap(err, "failed to return ethereum transaction as core message")
|
||||
}
|
||||
|
||||
// snapshot to contain the tx processing and post processing in same scope
|
||||
@@ -226,7 +232,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
// pass true to commit the StateDB
|
||||
res, err := k.ApplyMessageWithConfig(tmpCtx, msg, nil, true, cfg, txConfig)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to apply ethereum core message")
|
||||
return nil, errorsmod.Wrap(err, "failed to apply ethereum core message")
|
||||
}
|
||||
|
||||
logs := types.LogsToEthereum(res.Logs)
|
||||
@@ -241,8 +247,10 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
cumulativeGasUsed := res.GasUsed
|
||||
if ctx.BlockGasMeter() != nil {
|
||||
limit := ctx.BlockGasMeter().Limit()
|
||||
consumed := ctx.BlockGasMeter().GasConsumed()
|
||||
cumulativeGasUsed = uint64(math.Min(float64(cumulativeGasUsed+consumed), float64(limit)))
|
||||
cumulativeGasUsed += ctx.BlockGasMeter().GasConsumed()
|
||||
if cumulativeGasUsed > limit {
|
||||
cumulativeGasUsed = limit
|
||||
}
|
||||
}
|
||||
|
||||
var contractAddr common.Address
|
||||
@@ -285,7 +293,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
|
||||
// refund gas in order to match the Ethereum gas consumption instead of the default SDK one.
|
||||
if err = k.RefundGas(ctx, msg, msg.Gas()-res.GasUsed, cfg.Params.EvmDenom); err != nil {
|
||||
return nil, sdkerrors.Wrapf(err, "failed to refund gas leftover gas to sender %s", msg.From())
|
||||
return nil, errorsmod.Wrapf(err, "failed to refund gas leftover gas to sender %s", msg.From())
|
||||
}
|
||||
|
||||
if len(receipt.Logs) > 0 {
|
||||
@@ -298,7 +306,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
|
||||
totalGasUsed, err := k.AddTransientGasUsed(ctx, res.GasUsed)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to add transient gas used")
|
||||
return nil, errorsmod.Wrap(err, "failed to add transient gas used")
|
||||
}
|
||||
|
||||
// reset the gas meter for current cosmos transaction
|
||||
@@ -358,9 +366,9 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
|
||||
// return error if contract creation or call are disabled through governance
|
||||
if !cfg.Params.EnableCreate && msg.To() == nil {
|
||||
return nil, sdkerrors.Wrap(types.ErrCreateDisabled, "failed to create new contract")
|
||||
return nil, errorsmod.Wrap(types.ErrCreateDisabled, "failed to create new contract")
|
||||
} else if !cfg.Params.EnableCall && msg.To() != nil {
|
||||
return nil, sdkerrors.Wrap(types.ErrCallDisabled, "failed to call contract")
|
||||
return nil, errorsmod.Wrap(types.ErrCallDisabled, "failed to call contract")
|
||||
}
|
||||
|
||||
stateDB := statedb.New(ctx, k, txConfig)
|
||||
@@ -384,13 +392,13 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
intrinsicGas, err := k.GetEthIntrinsicGas(ctx, msg, cfg.ChainConfig, contractCreation)
|
||||
if err != nil {
|
||||
// should have already been checked on Ante Handler
|
||||
return nil, sdkerrors.Wrap(err, "intrinsic gas failed")
|
||||
return nil, errorsmod.Wrap(err, "intrinsic gas failed")
|
||||
}
|
||||
|
||||
// Should check again even if it is checked on Ante Handler, because eth_call don't go through Ante Handler.
|
||||
if leftoverGas < intrinsicGas {
|
||||
// eth_estimateGas will check for this exact error
|
||||
return nil, sdkerrors.Wrap(core.ErrIntrinsicGas, "apply message")
|
||||
return nil, errorsmod.Wrap(core.ErrIntrinsicGas, "apply message")
|
||||
}
|
||||
leftoverGas -= intrinsicGas
|
||||
|
||||
@@ -420,10 +428,11 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
|
||||
// calculate gas refund
|
||||
if msg.Gas() < leftoverGas {
|
||||
return nil, sdkerrors.Wrap(types.ErrGasOverflow, "apply message")
|
||||
return nil, errorsmod.Wrap(types.ErrGasOverflow, "apply message")
|
||||
}
|
||||
// refund gas
|
||||
leftoverGas += GasToRefund(stateDB.GetRefund(), msg.Gas()-leftoverGas, refundQuotient)
|
||||
temporaryGasUsed := msg.Gas() - leftoverGas
|
||||
leftoverGas += GasToRefund(stateDB.GetRefund(), temporaryGasUsed, refundQuotient)
|
||||
|
||||
// EVM execution error needs to be available for the JSON-RPC client
|
||||
var vmError string
|
||||
@@ -434,7 +443,7 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
// The dirty states in `StateDB` is either committed or discarded after return
|
||||
if commit {
|
||||
if err := stateDB.Commit(); err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to commit stateDB")
|
||||
return nil, errorsmod.Wrap(err, "failed to commit stateDB")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,9 +455,9 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
minimumGasUsed := gasLimit.Mul(minGasMultiplier)
|
||||
|
||||
if msg.Gas() < leftoverGas {
|
||||
return nil, sdkerrors.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.Gas(), leftoverGas)
|
||||
return nil, errorsmod.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.Gas(), leftoverGas)
|
||||
}
|
||||
temporaryGasUsed := msg.Gas() - leftoverGas
|
||||
|
||||
gasUsed := sdk.MaxDec(minimumGasUsed, sdk.NewDec(int64(temporaryGasUsed))).TruncateInt().Uint64()
|
||||
// reset leftoverGas, to be used by the tracer
|
||||
leftoverGas = msg.Gas() - gasUsed
|
||||
@@ -464,9 +473,9 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
|
||||
// ApplyMessage calls ApplyMessageWithConfig with default EVMConfig
|
||||
func (k *Keeper) ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*types.MsgEthereumTxResponse, error) {
|
||||
cfg, err := k.EVMConfig(ctx)
|
||||
cfg, err := k.EVMConfig(ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress), k.eip155ChainID)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to load evm config")
|
||||
return nil, errorsmod.Wrap(err, "failed to load evm config")
|
||||
}
|
||||
txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash()))
|
||||
return k.ApplyMessageWithConfig(ctx, msg, tracer, commit, cfg, txConfig)
|
||||
@@ -492,7 +501,7 @@ func (k *Keeper) RefundGas(ctx sdk.Context, msg core.Message, leftoverGas uint64
|
||||
switch remaining.Sign() {
|
||||
case -1:
|
||||
// negative refund errors
|
||||
return sdkerrors.Wrapf(types.ErrInvalidRefund, "refunded amount value cannot be negative %d", remaining.Int64())
|
||||
return errorsmod.Wrapf(types.ErrInvalidRefund, "refunded amount value cannot be negative %d", remaining.Int64())
|
||||
case 1:
|
||||
// positive amount refund
|
||||
refundedCoins := sdk.Coins{sdk.NewCoin(denom, sdkmath.NewIntFromBigInt(remaining))}
|
||||
@@ -501,8 +510,8 @@ func (k *Keeper) RefundGas(ctx sdk.Context, msg core.Message, leftoverGas uint64
|
||||
|
||||
err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, authtypes.FeeCollectorName, msg.From().Bytes(), refundedCoins)
|
||||
if err != nil {
|
||||
err = sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "fee collector account failed to refund fees: %s", err.Error())
|
||||
return sdkerrors.Wrapf(err, "failed to refund %d leftover gas (%s)", leftoverGas, refundedCoins.String())
|
||||
err = errorsmod.Wrapf(errortypes.ErrInsufficientFunds, "fee collector account failed to refund fees: %s", err.Error())
|
||||
return errorsmod.Wrapf(err, "failed to refund %d leftover gas (%s)", leftoverGas, refundedCoins.String())
|
||||
}
|
||||
default:
|
||||
// no refund, consume gas and update the tx gas meter
|
||||
@@ -519,15 +528,22 @@ func (k *Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64) {
|
||||
ctx.GasMeter().ConsumeGas(gasUsed, "apply evm transaction")
|
||||
}
|
||||
|
||||
// GetProposerAddress returns current block proposer's address when provided proposer address is empty.
|
||||
func GetProposerAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) sdk.ConsAddress {
|
||||
if len(proposerAddress) == 0 {
|
||||
proposerAddress = ctx.BlockHeader().ProposerAddress
|
||||
}
|
||||
return proposerAddress
|
||||
}
|
||||
|
||||
// GetCoinbaseAddress returns the block proposer's validator operator address.
|
||||
func (k Keeper) GetCoinbaseAddress(ctx sdk.Context) (common.Address, error) {
|
||||
consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress)
|
||||
validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr)
|
||||
func (k Keeper) GetCoinbaseAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) (common.Address, error) {
|
||||
validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, GetProposerAddress(ctx, proposerAddress))
|
||||
if !found {
|
||||
return common.Address{}, sdkerrors.Wrapf(
|
||||
return common.Address{}, errorsmod.Wrapf(
|
||||
stakingtypes.ErrNoValidatorFound,
|
||||
"failed to retrieve validator from block proposer address %s",
|
||||
consAddr.String(),
|
||||
proposerAddress.String(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ func newSignedEthTx(
|
||||
return ethTx, nil
|
||||
}
|
||||
|
||||
func newNativeMessage(
|
||||
func newEthMsgTx(
|
||||
nonce uint64,
|
||||
blockHeight int64,
|
||||
address common.Address,
|
||||
@@ -85,14 +85,11 @@ func newNativeMessage(
|
||||
txType byte,
|
||||
data []byte,
|
||||
accessList ethtypes.AccessList,
|
||||
) (core.Message, error) {
|
||||
msgSigner := ethtypes.MakeSigner(cfg, big.NewInt(blockHeight))
|
||||
|
||||
) (*evmtypes.MsgEthereumTx, *big.Int, error) {
|
||||
var (
|
||||
ethTx *ethtypes.Transaction
|
||||
baseFee *big.Int
|
||||
)
|
||||
|
||||
switch txType {
|
||||
case ethtypes.LegacyTxType:
|
||||
templateLegacyTx.Nonce = nonce
|
||||
@@ -122,14 +119,32 @@ func newNativeMessage(
|
||||
ethTx = ethtypes.NewTx(templateDynamicFeeTx)
|
||||
baseFee = big.NewInt(3)
|
||||
default:
|
||||
return nil, errors.New("unsupport tx type")
|
||||
return nil, baseFee, errors.New("unsupport tx type")
|
||||
}
|
||||
|
||||
msg := &evmtypes.MsgEthereumTx{}
|
||||
msg.FromEthereumTx(ethTx)
|
||||
msg.From = address.Hex()
|
||||
|
||||
if err := msg.Sign(ethSigner, krSigner); err != nil {
|
||||
return msg, baseFee, msg.Sign(ethSigner, krSigner)
|
||||
}
|
||||
|
||||
func newNativeMessage(
|
||||
nonce uint64,
|
||||
blockHeight int64,
|
||||
address common.Address,
|
||||
cfg *params.ChainConfig,
|
||||
krSigner keyring.Signer,
|
||||
ethSigner ethtypes.Signer,
|
||||
txType byte,
|
||||
data []byte,
|
||||
accessList ethtypes.AccessList,
|
||||
) (core.Message, error) {
|
||||
msgSigner := ethtypes.MakeSigner(cfg, big.NewInt(blockHeight))
|
||||
|
||||
msg, baseFee, err := newEthMsgTx(nonce, blockHeight, address, cfg, krSigner, ethSigner, txType, data, accessList)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@ import (
|
||||
|
||||
"github.com/cerc-io/laconicd/tests"
|
||||
"github.com/cerc-io/laconicd/x/evm/keeper"
|
||||
"github.com/cerc-io/laconicd/x/evm/statedb"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
@@ -157,8 +159,8 @@ func (suite *KeeperTestSuite) TestGetCoinbaseAddress() {
|
||||
suite.SetupTest() // reset
|
||||
|
||||
tc.malleate()
|
||||
|
||||
coinbase, err := suite.app.EvmKeeper.GetCoinbaseAddress(suite.ctx)
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
coinbase, err := suite.app.EvmKeeper.GetCoinbaseAddress(suite.ctx, sdk.ConsAddress(proposerAddress))
|
||||
if tc.expPass {
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(valOpAddr, coinbase)
|
||||
@@ -346,40 +348,63 @@ func (suite *KeeperTestSuite) TestGasToRefund() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestRefundGas() {
|
||||
var (
|
||||
m core.Message
|
||||
err error
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
leftoverGas uint64
|
||||
refundQuotient uint64
|
||||
noError bool
|
||||
expGasRefund uint64
|
||||
malleate func()
|
||||
}{
|
||||
{
|
||||
"leftoverGas more than tx gas limit",
|
||||
params.TxGas + 1,
|
||||
params.RefundQuotient,
|
||||
false,
|
||||
params.TxGas + 1,
|
||||
name: "leftoverGas more than tx gas limit",
|
||||
leftoverGas: params.TxGas + 1,
|
||||
refundQuotient: params.RefundQuotient,
|
||||
noError: false,
|
||||
expGasRefund: params.TxGas + 1,
|
||||
},
|
||||
{
|
||||
"leftoverGas equal to tx gas limit, insufficient fee collector account",
|
||||
params.TxGas,
|
||||
params.RefundQuotient,
|
||||
true,
|
||||
0,
|
||||
name: "leftoverGas equal to tx gas limit, insufficient fee collector account",
|
||||
leftoverGas: params.TxGas,
|
||||
refundQuotient: params.RefundQuotient,
|
||||
noError: true,
|
||||
expGasRefund: 0,
|
||||
},
|
||||
{
|
||||
"leftoverGas less than to tx gas limit",
|
||||
params.TxGas - 1,
|
||||
params.RefundQuotient,
|
||||
true,
|
||||
0,
|
||||
name: "leftoverGas less than to tx gas limit",
|
||||
leftoverGas: params.TxGas - 1,
|
||||
refundQuotient: params.RefundQuotient,
|
||||
noError: true,
|
||||
expGasRefund: 0,
|
||||
},
|
||||
{
|
||||
"no leftoverGas, refund half used gas ",
|
||||
0,
|
||||
params.RefundQuotient,
|
||||
true,
|
||||
params.TxGas / params.RefundQuotient,
|
||||
name: "no leftoverGas, refund half used gas ",
|
||||
leftoverGas: 0,
|
||||
refundQuotient: params.RefundQuotient,
|
||||
noError: true,
|
||||
expGasRefund: params.TxGas / params.RefundQuotient,
|
||||
},
|
||||
{
|
||||
name: "invalid Gas value in msg",
|
||||
leftoverGas: 0,
|
||||
refundQuotient: params.RefundQuotient,
|
||||
noError: false,
|
||||
expGasRefund: params.TxGas,
|
||||
malleate: func() {
|
||||
keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
m, err = suite.createContractGethMsg(
|
||||
suite.StateDB().GetNonce(suite.address),
|
||||
ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()),
|
||||
keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID()),
|
||||
big.NewInt(-100),
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -393,7 +418,7 @@ func (suite *KeeperTestSuite) TestRefundGas() {
|
||||
signer := ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID())
|
||||
vmdb := suite.StateDB()
|
||||
|
||||
m, err := newNativeMessage(
|
||||
m, err = newNativeMessage(
|
||||
vmdb.GetNonce(suite.address),
|
||||
suite.ctx.BlockHeight(),
|
||||
suite.address,
|
||||
@@ -411,6 +436,11 @@ func (suite *KeeperTestSuite) TestRefundGas() {
|
||||
if tc.leftoverGas > m.Gas() {
|
||||
return
|
||||
}
|
||||
|
||||
if tc.malleate != nil {
|
||||
tc.malleate()
|
||||
}
|
||||
|
||||
gasUsed := m.Gas() - tc.leftoverGas
|
||||
refund := keeper.GasToRefund(vmdb.GetRefund(), gasUsed, tc.refundQuotient)
|
||||
suite.Require().Equal(tc.expGasRefund, refund)
|
||||
@@ -486,8 +516,8 @@ func (suite *KeeperTestSuite) TestResetGasMeterAndConsumeGas() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestEVMConfig() {
|
||||
suite.SetupTest()
|
||||
cfg, err := suite.app.EvmKeeper.EVMConfig(suite.ctx)
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
cfg, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress, big.NewInt(9000))
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(types.DefaultParams(), cfg.Params)
|
||||
// london hardfork is enabled by default
|
||||
@@ -497,8 +527,199 @@ func (suite *KeeperTestSuite) TestEVMConfig() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestContractDeployment() {
|
||||
suite.SetupTest()
|
||||
contractAddress := suite.DeployTestContract(suite.T(), suite.address, big.NewInt(10000000000000))
|
||||
db := suite.StateDB()
|
||||
suite.Require().Greater(db.GetCodeSize(contractAddress), 0)
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestApplyMessage() {
|
||||
expectedGasUsed := params.TxGas
|
||||
var msg core.Message
|
||||
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
config, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress, big.NewInt(9000))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
chainCfg := keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID())
|
||||
signer := ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID())
|
||||
tracer := suite.app.EvmKeeper.Tracer(suite.ctx, msg, config.ChainConfig)
|
||||
vmdb := suite.StateDB()
|
||||
|
||||
msg, err = newNativeMessage(
|
||||
vmdb.GetNonce(suite.address),
|
||||
suite.ctx.BlockHeight(),
|
||||
suite.address,
|
||||
chainCfg,
|
||||
suite.signer,
|
||||
signer,
|
||||
ethtypes.AccessListTxType,
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
res, err := suite.app.EvmKeeper.ApplyMessage(suite.ctx, msg, tracer, true)
|
||||
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(expectedGasUsed, res.GasUsed)
|
||||
suite.Require().False(res.Failed())
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestApplyMessageWithConfig() {
|
||||
var (
|
||||
msg core.Message
|
||||
err error
|
||||
expectedGasUsed uint64
|
||||
config *types.EVMConfig
|
||||
keeperParams types.Params
|
||||
signer ethtypes.Signer
|
||||
vmdb *statedb.StateDB
|
||||
txConfig statedb.TxConfig
|
||||
chainCfg *params.ChainConfig
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
malleate func()
|
||||
expErr bool
|
||||
}{
|
||||
{
|
||||
"messsage applied ok",
|
||||
func() {
|
||||
msg, err = newNativeMessage(
|
||||
vmdb.GetNonce(suite.address),
|
||||
suite.ctx.BlockHeight(),
|
||||
suite.address,
|
||||
chainCfg,
|
||||
suite.signer,
|
||||
signer,
|
||||
ethtypes.AccessListTxType,
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"call contract tx with config param EnableCall = false",
|
||||
func() {
|
||||
config.Params.EnableCall = false
|
||||
msg, err = newNativeMessage(
|
||||
vmdb.GetNonce(suite.address),
|
||||
suite.ctx.BlockHeight(),
|
||||
suite.address,
|
||||
chainCfg,
|
||||
suite.signer,
|
||||
signer,
|
||||
ethtypes.AccessListTxType,
|
||||
nil,
|
||||
nil,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"create contract tx with config param EnableCreate = false",
|
||||
func() {
|
||||
msg, err = suite.createContractGethMsg(vmdb.GetNonce(suite.address), signer, chainCfg, big.NewInt(1))
|
||||
suite.Require().NoError(err)
|
||||
config.Params.EnableCreate = false
|
||||
},
|
||||
true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(fmt.Sprintf("Case %s", tc.name), func() {
|
||||
suite.SetupTest()
|
||||
expectedGasUsed = params.TxGas
|
||||
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
config, err = suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress, big.NewInt(9000))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
keeperParams = suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
chainCfg = keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID())
|
||||
signer = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID())
|
||||
vmdb = suite.StateDB()
|
||||
txConfig = suite.app.EvmKeeper.TxConfig(suite.ctx, common.Hash{})
|
||||
|
||||
tc.malleate()
|
||||
res, err := suite.app.EvmKeeper.ApplyMessageWithConfig(suite.ctx, msg, nil, true, config, txConfig)
|
||||
|
||||
if tc.expErr {
|
||||
suite.Require().Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().False(res.Failed())
|
||||
suite.Require().Equal(expectedGasUsed, res.GasUsed)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) createContractGethMsg(nonce uint64, signer ethtypes.Signer, cfg *params.ChainConfig, gasPrice *big.Int) (core.Message, error) {
|
||||
|
||||
ethMsg, err := suite.createContractMsgTx(nonce, signer, cfg, gasPrice)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
msgSigner := ethtypes.MakeSigner(cfg, big.NewInt(suite.ctx.BlockHeight()))
|
||||
return ethMsg.AsMessage(msgSigner, nil)
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) createContractMsgTx(nonce uint64, signer ethtypes.Signer, cfg *params.ChainConfig, gasPrice *big.Int) (*types.MsgEthereumTx, error) {
|
||||
|
||||
contractCreateTx := ðtypes.AccessListTx{
|
||||
GasPrice: gasPrice,
|
||||
Gas: params.TxGasContractCreation,
|
||||
To: nil,
|
||||
Data: []byte("contract_data"),
|
||||
Nonce: nonce,
|
||||
}
|
||||
ethTx := ethtypes.NewTx(contractCreateTx)
|
||||
ethMsg := &types.MsgEthereumTx{}
|
||||
ethMsg.FromEthereumTx(ethTx)
|
||||
ethMsg.From = suite.address.Hex()
|
||||
|
||||
return ethMsg, ethMsg.Sign(signer, suite.signer)
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestGetProposerAddress() {
|
||||
var a sdk.ConsAddress
|
||||
address := sdk.ConsAddress(suite.address.Bytes())
|
||||
proposerAddress := sdk.ConsAddress(suite.ctx.BlockHeader().ProposerAddress)
|
||||
testCases := []struct {
|
||||
msg string
|
||||
adr sdk.ConsAddress
|
||||
expAdr sdk.ConsAddress
|
||||
}{
|
||||
{
|
||||
"proposer address provided",
|
||||
address,
|
||||
address,
|
||||
},
|
||||
{
|
||||
"nil proposer address provided",
|
||||
nil,
|
||||
proposerAddress,
|
||||
},
|
||||
{
|
||||
"typed nil proposer address provided",
|
||||
a,
|
||||
proposerAddress,
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
|
||||
suite.Require().Equal(tc.expAdr, keeper.GetProposerAddress(suite.ctx, tc.adr))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
ethermint "github.com/cerc-io/laconicd/types"
|
||||
"github.com/cerc-io/laconicd/x/evm/statedb"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
@@ -189,7 +189,7 @@ func (k *Keeper) DeleteAccount(ctx sdk.Context, addr common.Address) error {
|
||||
// NOTE: only Ethereum accounts (contracts) can be selfdestructed
|
||||
_, ok := acct.(ethermint.EthAccountI)
|
||||
if !ok {
|
||||
return sdkerrors.Wrapf(types.ErrInvalidAccount, "type %T, address %s", acct, addr)
|
||||
return errorsmod.Wrapf(types.ErrInvalidAccount, "type %T, address %s", acct, addr)
|
||||
}
|
||||
|
||||
// clear balance
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
|
||||
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
@@ -317,6 +318,40 @@ func (suite *KeeperTestSuite) TestSetCode() {
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestKeeperSetCode() {
|
||||
addr := tests.GenerateAddress()
|
||||
baseAcc := &authtypes.BaseAccount{Address: sdk.AccAddress(addr.Bytes()).String()}
|
||||
suite.app.AccountKeeper.SetAccount(suite.ctx, baseAcc)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
codeHash []byte
|
||||
code []byte
|
||||
}{
|
||||
{
|
||||
"set code",
|
||||
[]byte("codeHash"),
|
||||
[]byte("this is the code"),
|
||||
},
|
||||
{
|
||||
"delete code",
|
||||
[]byte("codeHash"),
|
||||
nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.app.EvmKeeper.SetCode(suite.ctx, tc.codeHash, tc.code)
|
||||
key := suite.app.GetKey(types.StoreKey)
|
||||
store := prefix.NewStore(suite.ctx.KVStore(key), types.KeyPrefixCode)
|
||||
code := store.Get(tc.codeHash)
|
||||
|
||||
suite.Require().Equal(tc.code, code)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestRefund() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
@@ -384,8 +419,6 @@ func (suite *KeeperTestSuite) TestState() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestCommittedState() {
|
||||
suite.SetupTest()
|
||||
|
||||
key := common.BytesToHash([]byte("key"))
|
||||
value1 := common.BytesToHash([]byte("value1"))
|
||||
value2 := common.BytesToHash([]byte("value2"))
|
||||
@@ -487,8 +520,6 @@ func (suite *KeeperTestSuite) TestExist() {
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestEmpty() {
|
||||
suite.SetupTest()
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
address common.Address
|
||||
@@ -507,6 +538,7 @@ func (suite *KeeperTestSuite) TestEmpty() {
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
vmdb := suite.StateDB()
|
||||
tc.malleate(vmdb)
|
||||
|
||||
@@ -811,3 +843,102 @@ func (suite *KeeperTestSuite) _TestForEachStorage() {
|
||||
storage = types.Storage{}
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestSetBalance() {
|
||||
amount := big.NewInt(-10)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
addr common.Address
|
||||
malleate func()
|
||||
expErr bool
|
||||
}{
|
||||
{
|
||||
"address without funds - invalid amount",
|
||||
suite.address,
|
||||
func() {},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"mint to address",
|
||||
suite.address,
|
||||
func() {
|
||||
amount = big.NewInt(100)
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"burn from address",
|
||||
suite.address,
|
||||
func() {
|
||||
amount = big.NewInt(60)
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
"address with funds - invalid amount",
|
||||
suite.address,
|
||||
func() {
|
||||
amount = big.NewInt(-10)
|
||||
},
|
||||
true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
tc.malleate()
|
||||
err := suite.app.EvmKeeper.SetBalance(suite.ctx, tc.addr, amount)
|
||||
if tc.expErr {
|
||||
suite.Require().Error(err)
|
||||
} else {
|
||||
balance := suite.app.EvmKeeper.GetBalance(suite.ctx, tc.addr)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(amount, balance)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestDeleteAccount() {
|
||||
supply := big.NewInt(100)
|
||||
contractAddr := suite.DeployTestContract(suite.T(), suite.address, supply)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
addr common.Address
|
||||
expErr bool
|
||||
}{
|
||||
{
|
||||
"remove address",
|
||||
suite.address,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"remove unexistent address - returns nil error",
|
||||
common.HexToAddress("unexistent_address"),
|
||||
false,
|
||||
},
|
||||
{
|
||||
"remove deployed contract",
|
||||
contractAddr,
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
suite.SetupTest()
|
||||
err := suite.app.EvmKeeper.DeleteAccount(suite.ctx, tc.addr)
|
||||
if tc.expErr {
|
||||
suite.Require().Error(err)
|
||||
} else {
|
||||
suite.Require().NoError(err)
|
||||
balance := suite.app.EvmKeeper.GetBalance(suite.ctx, tc.addr)
|
||||
suite.Require().Equal(new(big.Int), balance)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
+42
-53
@@ -1,37 +1,53 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
|
||||
|
||||
evmtypes "github.com/cerc-io/laconicd/x/evm/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
|
||||
// DeductTxCostsFromUserBalance it calculates the tx costs and deducts the fees
|
||||
// returns (effectiveFee, priority, error)
|
||||
func (k Keeper) DeductTxCostsFromUserBalance(
|
||||
// DeductTxCostsFromUserBalance deducts the fees from the user balance. Returns an
|
||||
// error if the specified sender address does not exist or the account balance is not sufficient.
|
||||
func (k *Keeper) DeductTxCostsFromUserBalance(
|
||||
ctx sdk.Context,
|
||||
msgEthTx evmtypes.MsgEthereumTx,
|
||||
fees sdk.Coins,
|
||||
from common.Address,
|
||||
) error {
|
||||
// fetch sender account
|
||||
signerAcc, err := authante.GetSignerAcc(ctx, k.accountKeeper, from.Bytes())
|
||||
if err != nil {
|
||||
return errorsmod.Wrapf(err, "account not found for sender %s", from)
|
||||
}
|
||||
|
||||
// deduct the full gas cost from the user balance
|
||||
if err := authante.DeductFees(k.bankKeeper, ctx, signerAcc, fees); err != nil {
|
||||
return errorsmod.Wrapf(err, "failed to deduct full gas cost %s from the user %s balance", fees, from)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// VerifyFee is used to return the fee for the given transaction data in sdk.Coins. It checks that the
|
||||
// gas limit is not reached, the gas limit is higher than the intrinsic gas and that the
|
||||
// base fee is higher than the gas fee cap.
|
||||
func VerifyFee(
|
||||
txData evmtypes.TxData,
|
||||
denom string,
|
||||
homestead, istanbul, london bool,
|
||||
) (fees sdk.Coins, priority int64, err error) {
|
||||
baseFee *big.Int,
|
||||
homestead, istanbul, isCheckTx bool,
|
||||
) (sdk.Coins, error) {
|
||||
isContractCreation := txData.GetTo() == nil
|
||||
|
||||
// fetch sender account from signature
|
||||
signerAcc, err := authante.GetSignerAcc(ctx, k.accountKeeper, msgEthTx.GetFrom())
|
||||
if err != nil {
|
||||
return nil, 0, sdkerrors.Wrapf(err, "account not found for sender %s", msgEthTx.From)
|
||||
}
|
||||
|
||||
gasLimit := txData.GetGas()
|
||||
|
||||
var accessList ethtypes.AccessList
|
||||
@@ -41,7 +57,7 @@ func (k Keeper) DeductTxCostsFromUserBalance(
|
||||
|
||||
intrinsicGas, err := core.IntrinsicGas(txData.GetData(), accessList, isContractCreation, homestead, istanbul)
|
||||
if err != nil {
|
||||
return nil, 0, sdkerrors.Wrapf(
|
||||
return nil, errorsmod.Wrapf(
|
||||
err,
|
||||
"failed to retrieve intrinsic gas, contract creation = %t; homestead = %t, istanbul = %t",
|
||||
isContractCreation, homestead, istanbul,
|
||||
@@ -49,54 +65,27 @@ func (k Keeper) DeductTxCostsFromUserBalance(
|
||||
}
|
||||
|
||||
// intrinsic gas verification during CheckTx
|
||||
if ctx.IsCheckTx() && gasLimit < intrinsicGas {
|
||||
return nil, 0, sdkerrors.Wrapf(
|
||||
sdkerrors.ErrOutOfGas,
|
||||
if isCheckTx && gasLimit < intrinsicGas {
|
||||
return nil, errorsmod.Wrapf(
|
||||
errortypes.ErrOutOfGas,
|
||||
"gas limit too low: %d (gas limit) < %d (intrinsic gas)", gasLimit, intrinsicGas,
|
||||
)
|
||||
}
|
||||
|
||||
var feeAmt *big.Int
|
||||
|
||||
baseFee := k.getBaseFee(ctx, london)
|
||||
if baseFee != nil && txData.GetGasFeeCap().Cmp(baseFee) < 0 {
|
||||
return nil, 0, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee,
|
||||
return nil, errorsmod.Wrapf(errortypes.ErrInsufficientFee,
|
||||
"the tx gasfeecap is lower than the tx baseFee: %s (gasfeecap), %s (basefee) ",
|
||||
txData.GetGasFeeCap(),
|
||||
baseFee)
|
||||
}
|
||||
|
||||
feeAmt = txData.EffectiveFee(baseFee)
|
||||
feeAmt := txData.EffectiveFee(baseFee)
|
||||
if feeAmt.Sign() == 0 {
|
||||
// zero fee, no need to deduct
|
||||
return sdk.Coins{}, 0, nil
|
||||
return sdk.Coins{}, nil
|
||||
}
|
||||
|
||||
fees = sdk.Coins{sdk.NewCoin(denom, sdkmath.NewIntFromBigInt(feeAmt))}
|
||||
|
||||
// deduct the full gas cost from the user balance
|
||||
if err := authante.DeductFees(k.bankKeeper, ctx, signerAcc, fees); err != nil {
|
||||
return nil, 0, sdkerrors.Wrapf(
|
||||
err,
|
||||
"failed to deduct full gas cost %s from the user %s balance",
|
||||
fees, msgEthTx.From,
|
||||
)
|
||||
}
|
||||
|
||||
// calculate priority based on effective gas price
|
||||
tipPrice := txData.EffectiveGasPrice(baseFee)
|
||||
// if london hardfork is not enabled, tipPrice is the gasPrice
|
||||
if baseFee != nil {
|
||||
tipPrice = new(big.Int).Sub(tipPrice, baseFee)
|
||||
}
|
||||
priorityBig := new(big.Int).Quo(tipPrice, evmtypes.DefaultPriorityReduction.BigInt())
|
||||
if !priorityBig.IsInt64() {
|
||||
priority = math.MaxInt64
|
||||
} else {
|
||||
priority = priorityBig.Int64()
|
||||
}
|
||||
|
||||
return fees, priority, nil
|
||||
return sdk.Coins{{Denom: denom, Amount: sdkmath.NewIntFromBigInt(feeAmt)}}, nil
|
||||
}
|
||||
|
||||
// CheckSenderBalance validates that the tx cost value is positive and that the
|
||||
@@ -108,15 +97,15 @@ func CheckSenderBalance(
|
||||
cost := txData.Cost()
|
||||
|
||||
if cost.Sign() < 0 {
|
||||
return sdkerrors.Wrapf(
|
||||
sdkerrors.ErrInvalidCoins,
|
||||
return errorsmod.Wrapf(
|
||||
errortypes.ErrInvalidCoins,
|
||||
"tx cost (%s) is negative and invalid", cost,
|
||||
)
|
||||
}
|
||||
|
||||
if balance.IsNegative() || balance.BigInt().Cmp(cost) < 0 {
|
||||
return sdkerrors.Wrapf(
|
||||
sdkerrors.ErrInsufficientFunds,
|
||||
return errorsmod.Wrapf(
|
||||
errortypes.ErrInsufficientFunds,
|
||||
"sender balance < tx cost (%s < %s)", balance, txData.Cost(),
|
||||
)
|
||||
}
|
||||
|
||||
+171
-97
@@ -4,7 +4,7 @@ import (
|
||||
"math/big"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
evmkeeper "github.com/cerc-io/laconicd/x/evm/keeper"
|
||||
"github.com/cerc-io/laconicd/x/evm/keeper"
|
||||
evmtypes "github.com/cerc-io/laconicd/x/evm/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
@@ -207,7 +207,8 @@ func (suite *KeeperTestSuite) TestCheckSenderBalance() {
|
||||
vmdb.AddBalance(suite.address, hundredInt.BigInt())
|
||||
balance := vmdb.GetBalance(suite.address)
|
||||
suite.Require().Equal(balance, hundredInt.BigInt())
|
||||
vmdb.Commit()
|
||||
err := vmdb.Commit()
|
||||
suite.Require().NoError(err, "Unexpected error while committing to vmdb: %d", err)
|
||||
|
||||
for i, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
@@ -237,7 +238,7 @@ func (suite *KeeperTestSuite) TestCheckSenderBalance() {
|
||||
txData, _ := evmtypes.UnpackTxData(tx.Data)
|
||||
|
||||
acct := suite.app.EvmKeeper.GetAccountOrEmpty(suite.ctx, suite.address)
|
||||
err := evmkeeper.CheckSenderBalance(
|
||||
err := keeper.CheckSenderBalance(
|
||||
sdkmath.NewIntFromBigInt(acct.Balance),
|
||||
txData,
|
||||
)
|
||||
@@ -251,7 +252,13 @@ func (suite *KeeperTestSuite) TestCheckSenderBalance() {
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
// TestVerifyFeeAndDeductTxCostsFromUserBalance is a test method for both the VerifyFee
|
||||
// function and the DeductTxCostsFromUserBalance method.
|
||||
//
|
||||
// NOTE: This method combines testing for both functions, because these used to be
|
||||
// in one function and share a lot of the same setup.
|
||||
// In practice, the two tested functions will also be sequentially executed.
|
||||
func (suite *KeeperTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() {
|
||||
hundredInt := sdkmath.NewInt(100)
|
||||
zeroInt := sdk.ZeroInt()
|
||||
oneInt := sdkmath.NewInt(1)
|
||||
@@ -262,105 +269,166 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
initBalance := sdkmath.NewInt((ethparams.InitialBaseFee + 10) * 105)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
gasLimit uint64
|
||||
gasPrice *sdkmath.Int
|
||||
gasFeeCap *big.Int
|
||||
gasTipCap *big.Int
|
||||
cost *sdkmath.Int
|
||||
accessList *ethtypes.AccessList
|
||||
expectPass bool
|
||||
enableFeemarket bool
|
||||
name string
|
||||
gasLimit uint64
|
||||
gasPrice *sdkmath.Int
|
||||
gasFeeCap *big.Int
|
||||
gasTipCap *big.Int
|
||||
cost *sdkmath.Int
|
||||
accessList *ethtypes.AccessList
|
||||
expectPassVerify bool
|
||||
expectPassDeduct bool
|
||||
enableFeemarket bool
|
||||
from string
|
||||
malleate func()
|
||||
}{
|
||||
{
|
||||
name: "Enough balance",
|
||||
gasLimit: 10,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
name: "Enough balance",
|
||||
gasLimit: 10,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Equal balance",
|
||||
gasLimit: 100,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
name: "Equal balance",
|
||||
gasLimit: 100,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Higher gas limit, not enough balance",
|
||||
gasLimit: 105,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: false,
|
||||
name: "Higher gas limit, not enough balance",
|
||||
gasLimit: 105,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: false,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Higher gas price, enough balance",
|
||||
gasLimit: 20,
|
||||
gasPrice: &fiveInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
name: "Higher gas price, enough balance",
|
||||
gasLimit: 20,
|
||||
gasPrice: &fiveInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Higher gas price, not enough balance",
|
||||
gasLimit: 20,
|
||||
gasPrice: &fiftyInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: false,
|
||||
name: "Higher gas price, not enough balance",
|
||||
gasLimit: 20,
|
||||
gasPrice: &fiftyInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: false,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
// This case is expected to be true because the fees can be deducted, but the tx
|
||||
// execution is going to fail because there is no more balance to pay the cost
|
||||
{
|
||||
name: "Higher cost, enough balance",
|
||||
gasLimit: 100,
|
||||
gasPrice: &oneInt,
|
||||
cost: &fiftyInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
name: "Higher cost, enough balance",
|
||||
gasLimit: 100,
|
||||
gasPrice: &oneInt,
|
||||
cost: &fiftyInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
// testcases with enableFeemarket enabled.
|
||||
{
|
||||
name: "Invalid gasFeeCap w/ enableFeemarket",
|
||||
gasLimit: 10,
|
||||
gasFeeCap: big.NewInt(1),
|
||||
gasTipCap: big.NewInt(1),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: false,
|
||||
enableFeemarket: true,
|
||||
name: "Invalid gasFeeCap w/ enableFeemarket",
|
||||
gasLimit: 10,
|
||||
gasFeeCap: big.NewInt(1),
|
||||
gasTipCap: big.NewInt(1),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: false,
|
||||
expectPassDeduct: true,
|
||||
enableFeemarket: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "empty tip fee is valid to deduct",
|
||||
gasLimit: 10,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee),
|
||||
gasTipCap: big.NewInt(1),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
enableFeemarket: true,
|
||||
name: "empty tip fee is valid to deduct",
|
||||
gasLimit: 10,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee),
|
||||
gasTipCap: big.NewInt(1),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
enableFeemarket: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "effectiveTip equal to gasTipCap",
|
||||
gasLimit: 100,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee + 2),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
enableFeemarket: true,
|
||||
name: "effectiveTip equal to gasTipCap",
|
||||
gasLimit: 100,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee + 2),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
enableFeemarket: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "effectiveTip equal to (gasFeeCap - baseFee)",
|
||||
gasLimit: 105,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee + 1),
|
||||
gasTipCap: big.NewInt(2),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: true,
|
||||
enableFeemarket: true,
|
||||
name: "effectiveTip equal to (gasFeeCap - baseFee)",
|
||||
gasLimit: 105,
|
||||
gasFeeCap: big.NewInt(ethparams.InitialBaseFee + 1),
|
||||
gasTipCap: big.NewInt(2),
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
enableFeemarket: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Invalid from address",
|
||||
gasLimit: 10,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: false,
|
||||
from: "abcdef",
|
||||
},
|
||||
{
|
||||
name: "Enough balance - with access list",
|
||||
gasLimit: 10,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{
|
||||
ethtypes.AccessTuple{
|
||||
Address: suite.address,
|
||||
StorageKeys: []common.Hash{},
|
||||
},
|
||||
},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "gasLimit < intrinsicGas during IsCheckTx",
|
||||
gasLimit: 1,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPassVerify: false,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
malleate: func() {
|
||||
suite.ctx = suite.ctx.WithIsCheckTx(true)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -370,6 +438,9 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
suite.SetupTest()
|
||||
vmdb := suite.StateDB()
|
||||
|
||||
if tc.malleate != nil {
|
||||
tc.malleate()
|
||||
}
|
||||
var amount, gasPrice, gasFeeCap, gasTipCap *big.Int
|
||||
if tc.cost != nil {
|
||||
amount = tc.cost.BigInt()
|
||||
@@ -396,25 +467,21 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
balance := vmdb.GetBalance(suite.address)
|
||||
suite.Require().Equal(balance, hundredInt.BigInt())
|
||||
}
|
||||
vmdb.Commit()
|
||||
err := vmdb.Commit()
|
||||
suite.Require().NoError(err, "Unexpected error while committing to vmdb: %d", err)
|
||||
|
||||
tx := evmtypes.NewTx(zeroInt.BigInt(), 1, &suite.address, amount, tc.gasLimit, gasPrice, gasFeeCap, gasTipCap, nil, tc.accessList)
|
||||
tx.From = suite.address.String()
|
||||
tx.From = tc.from
|
||||
|
||||
txData, _ := evmtypes.UnpackTxData(tx.Data)
|
||||
|
||||
fees, priority, err := suite.app.EvmKeeper.DeductTxCostsFromUserBalance(
|
||||
suite.ctx,
|
||||
*tx,
|
||||
txData,
|
||||
evmtypes.DefaultEVMDenom,
|
||||
false,
|
||||
false,
|
||||
suite.enableFeemarket, // london
|
||||
)
|
||||
ethCfg := suite.app.EvmKeeper.GetChainConfig(suite.ctx).EthereumConfig(nil)
|
||||
baseFee := suite.app.EvmKeeper.GetBaseFee(suite.ctx, ethCfg)
|
||||
priority := evmtypes.GetTxPriority(txData, baseFee)
|
||||
|
||||
if tc.expectPass {
|
||||
suite.Require().NoError(err, "valid test %d failed", i)
|
||||
fees, err := keeper.VerifyFee(txData, evmtypes.DefaultEVMDenom, baseFee, false, false, suite.ctx.IsCheckTx())
|
||||
if tc.expectPassVerify {
|
||||
suite.Require().NoError(err, "valid test %d failed - '%s'", i, tc.name)
|
||||
if tc.enableFeemarket {
|
||||
baseFee := suite.app.FeeMarketKeeper.GetBaseFee(suite.ctx)
|
||||
suite.Require().Equal(
|
||||
@@ -422,7 +489,7 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
sdk.NewCoins(
|
||||
sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewIntFromBigInt(txData.EffectiveFee(baseFee))),
|
||||
),
|
||||
"valid test %d failed, fee value is wrong ", i,
|
||||
"valid test %d failed, fee value is wrong - '%s'", i, tc.name,
|
||||
)
|
||||
suite.Require().Equal(int64(0), priority)
|
||||
} else {
|
||||
@@ -431,12 +498,19 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
sdk.NewCoins(
|
||||
sdk.NewCoin(evmtypes.DefaultEVMDenom, tc.gasPrice.Mul(sdkmath.NewIntFromUint64(tc.gasLimit))),
|
||||
),
|
||||
"valid test %d failed, fee value is wrong ", i,
|
||||
"valid test %d failed, fee value is wrong - '%s'", i, tc.name,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
suite.Require().Error(err, "invalid test %d passed", i)
|
||||
suite.Require().Nil(fees, "invalid test %d passed. fees value must be nil", i)
|
||||
suite.Require().Error(err, "invalid test %d passed - '%s'", i, tc.name)
|
||||
suite.Require().Nil(fees, "invalid test %d passed. fees value must be nil - '%s'", i, tc.name)
|
||||
}
|
||||
|
||||
err = suite.app.EvmKeeper.DeductTxCostsFromUserBalance(suite.ctx, fees, common.HexToAddress(tx.From))
|
||||
if tc.expectPassDeduct {
|
||||
suite.Require().NoError(err, "valid test %d failed - '%s'", i, tc.name)
|
||||
} else {
|
||||
suite.Require().Error(err, "invalid test %d passed - '%s'", i, tc.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+10
-25
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/client/cli"
|
||||
"github.com/cerc-io/laconicd/x/evm/keeper"
|
||||
"github.com/cerc-io/laconicd/x/evm/simulation"
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
)
|
||||
|
||||
@@ -65,7 +64,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo
|
||||
|
||||
// RegisterRESTRoutes performs a no-op as the EVM module doesn't expose REST
|
||||
// endpoints
|
||||
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
|
||||
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {
|
||||
}
|
||||
|
||||
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(c client.Context, serveMux *runtime.ServeMux) {
|
||||
@@ -114,7 +113,7 @@ func (AppModule) Name() string {
|
||||
|
||||
// RegisterInvariants interface for registering invariants. Performs a no-op
|
||||
// as the evm module doesn't expose invariants.
|
||||
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
|
||||
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {
|
||||
}
|
||||
|
||||
// RegisterServices registers a GRPC query service to respond to the
|
||||
@@ -122,16 +121,6 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
|
||||
func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||
types.RegisterMsgServer(cfg.MsgServer(), am.keeper)
|
||||
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
|
||||
|
||||
m := keeper.NewMigrator(*am.keeper)
|
||||
err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Route returns the message routing key for the evm module.
|
||||
@@ -144,7 +133,7 @@ func (AppModule) QuerierRoute() string { return types.RouterKey }
|
||||
|
||||
// LegacyQuerierHandler returns nil as the evm module doesn't expose a legacy
|
||||
// Querier.
|
||||
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
|
||||
func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -177,28 +166,24 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
|
||||
}
|
||||
|
||||
// RandomizedParams creates randomized evm param changes for the simulator.
|
||||
func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange {
|
||||
return simulation.ParamChanges(r)
|
||||
func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for evm module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore()
|
||||
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {
|
||||
}
|
||||
|
||||
// ProposalContents doesn't return any content functions for governance proposals.
|
||||
func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent {
|
||||
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GenerateGenesisState creates a randomized GenState of the evm module.
|
||||
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
|
||||
simulation.RandomizedGenState(simState)
|
||||
func (AppModule) GenerateGenesisState(_ *module.SimulationState) {
|
||||
}
|
||||
|
||||
// WeightedOperations returns the all the evm module operations with their respective weights.
|
||||
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
|
||||
return simulation.WeightedOperations(
|
||||
simState.AppParams, simState.Cdc, am.ak, am.keeper,
|
||||
)
|
||||
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ The `query` commands allow users to query `evm` state.
|
||||
Allows users to query the smart contract code at a given address.
|
||||
|
||||
```go
|
||||
ethermintd query evm code [address] [flags]
|
||||
ethermintd query evm code ADDRESS [flags]
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -35,7 +35,7 @@ code: "0xef616c92f3cfc9e92dc270d6acff9cea213cecc7020a76ee4395af09bdceb4837a1ebdb
|
||||
Allows users to query storage for an account with a given key and height.
|
||||
|
||||
```bash
|
||||
ethermintd query evm storage [address] [key] [flags]
|
||||
ethermintd query evm storage ADDRESS KEY [flags]
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -55,7 +55,7 @@ The `tx` commands allow users to interact with the `evm` module.
|
||||
Allows users to build cosmos transactions from raw ethereum transaction.
|
||||
|
||||
```bash
|
||||
ethermintd tx evm raw [tx-hex] [flags]
|
||||
ethermintd tx evm raw TX_HEX [flags]
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"math/big"
|
||||
"sort"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
@@ -440,14 +440,14 @@ func (s *StateDB) Commit() error {
|
||||
obj := s.stateObjects[addr]
|
||||
if obj.suicided {
|
||||
if err := s.keeper.DeleteAccount(s.ctx, obj.Address()); err != nil {
|
||||
return sdkerrors.Wrap(err, "failed to delete account")
|
||||
return errorsmod.Wrap(err, "failed to delete account")
|
||||
}
|
||||
} else {
|
||||
if obj.code != nil && obj.dirtyCode {
|
||||
s.keeper.SetCode(s.ctx, obj.CodeHash(), obj.code)
|
||||
}
|
||||
if err := s.keeper.SetAccount(s.ctx, obj.Address(), obj.account); err != nil {
|
||||
return sdkerrors.Wrap(err, "failed to set account")
|
||||
return errorsmod.Wrap(err, "failed to set account")
|
||||
}
|
||||
for _, key := range obj.dirtyStorage.SortedKeys() {
|
||||
value := obj.dirtyStorage[key]
|
||||
|
||||
@@ -3,8 +3,9 @@ package types
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
@@ -183,38 +184,38 @@ func (tx *AccessListTx) SetSignatureValues(chainID, v, r, s *big.Int) {
|
||||
func (tx AccessListTx) Validate() error {
|
||||
gasPrice := tx.GetGasPrice()
|
||||
if gasPrice == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidGasPrice, "cannot be nil")
|
||||
return errorsmod.Wrap(ErrInvalidGasPrice, "cannot be nil")
|
||||
}
|
||||
if !types.IsValidInt256(gasPrice) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasPrice, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound")
|
||||
}
|
||||
|
||||
if gasPrice.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice)
|
||||
return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice)
|
||||
}
|
||||
|
||||
amount := tx.GetValue()
|
||||
// Amount can be 0
|
||||
if amount != nil && amount.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
}
|
||||
if !types.IsValidInt256(amount) {
|
||||
return sdkerrors.Wrap(ErrInvalidAmount, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidAmount, "out of bound")
|
||||
}
|
||||
|
||||
if !types.IsValidInt256(tx.Fee()) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
}
|
||||
|
||||
if tx.To != "" {
|
||||
if err := types.ValidateAddress(tx.To); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid to address")
|
||||
return errorsmod.Wrap(err, "invalid to address")
|
||||
}
|
||||
}
|
||||
|
||||
if tx.GetChainID() == nil {
|
||||
return sdkerrors.Wrap(
|
||||
sdkerrors.ErrInvalidChainID,
|
||||
return errorsmod.Wrap(
|
||||
errortypes.ErrInvalidChainID,
|
||||
"chain ID must be present on AccessList txs",
|
||||
)
|
||||
}
|
||||
|
||||
+31
-20
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
@@ -35,6 +35,8 @@ func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
|
||||
ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock),
|
||||
GrayGlacierBlock: getBlockValue(cc.GrayGlacierBlock),
|
||||
MergeNetsplitBlock: getBlockValue(cc.MergeNetsplitBlock),
|
||||
ShanghaiBlock: getBlockValue(cc.ShanghaiBlock),
|
||||
CancunBlock: getBlockValue(cc.CancunBlock),
|
||||
TerminalTotalDifficulty: nil,
|
||||
Ethash: nil,
|
||||
Clique: nil,
|
||||
@@ -58,6 +60,8 @@ func DefaultChainConfig() ChainConfig {
|
||||
arrowGlacierBlock := sdk.ZeroInt()
|
||||
grayGlacierBlock := sdk.ZeroInt()
|
||||
mergeNetsplitBlock := sdk.ZeroInt()
|
||||
shanghaiBlock := sdk.ZeroInt()
|
||||
cancunBlock := sdk.ZeroInt()
|
||||
|
||||
return ChainConfig{
|
||||
HomesteadBlock: &homesteadBlock,
|
||||
@@ -77,6 +81,8 @@ func DefaultChainConfig() ChainConfig {
|
||||
ArrowGlacierBlock: &arrowGlacierBlock,
|
||||
GrayGlacierBlock: &grayGlacierBlock,
|
||||
MergeNetsplitBlock: &mergeNetsplitBlock,
|
||||
ShanghaiBlock: &shanghaiBlock,
|
||||
CancunBlock: &cancunBlock,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,64 +98,69 @@ func getBlockValue(block *sdkmath.Int) *big.Int {
|
||||
// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
|
||||
func (cc ChainConfig) Validate() error {
|
||||
if err := validateBlock(cc.HomesteadBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "homesteadBlock")
|
||||
return errorsmod.Wrap(err, "homesteadBlock")
|
||||
}
|
||||
if err := validateBlock(cc.DAOForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "daoForkBlock")
|
||||
return errorsmod.Wrap(err, "daoForkBlock")
|
||||
}
|
||||
if err := validateBlock(cc.EIP150Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip150Block")
|
||||
return errorsmod.Wrap(err, "eip150Block")
|
||||
}
|
||||
if err := validateHash(cc.EIP150Hash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateBlock(cc.EIP155Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip155Block")
|
||||
return errorsmod.Wrap(err, "eip155Block")
|
||||
}
|
||||
if err := validateBlock(cc.EIP158Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip158Block")
|
||||
return errorsmod.Wrap(err, "eip158Block")
|
||||
}
|
||||
if err := validateBlock(cc.ByzantiumBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "byzantiumBlock")
|
||||
return errorsmod.Wrap(err, "byzantiumBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "constantinopleBlock")
|
||||
return errorsmod.Wrap(err, "constantinopleBlock")
|
||||
}
|
||||
if err := validateBlock(cc.PetersburgBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "petersburgBlock")
|
||||
return errorsmod.Wrap(err, "petersburgBlock")
|
||||
}
|
||||
if err := validateBlock(cc.IstanbulBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "istanbulBlock")
|
||||
return errorsmod.Wrap(err, "istanbulBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "muirGlacierBlock")
|
||||
return errorsmod.Wrap(err, "muirGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.BerlinBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "berlinBlock")
|
||||
return errorsmod.Wrap(err, "berlinBlock")
|
||||
}
|
||||
if err := validateBlock(cc.LondonBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "londonBlock")
|
||||
return errorsmod.Wrap(err, "londonBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "arrowGlacierBlock")
|
||||
return errorsmod.Wrap(err, "arrowGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.GrayGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "GrayGlacierBlock")
|
||||
return errorsmod.Wrap(err, "GrayGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MergeNetsplitBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "MergeNetsplitBlock")
|
||||
return errorsmod.Wrap(err, "MergeNetsplitBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ShanghaiBlock); err != nil {
|
||||
return errorsmod.Wrap(err, "ShanghaiBlock")
|
||||
}
|
||||
if err := validateBlock(cc.CancunBlock); err != nil {
|
||||
return errorsmod.Wrap(err, "CancunBlock")
|
||||
}
|
||||
|
||||
// NOTE: chain ID is not needed to check config order
|
||||
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid config fork order")
|
||||
return errorsmod.Wrap(err, "invalid config fork order")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateHash(hex string) error {
|
||||
if hex != "" && strings.TrimSpace(hex) == "" {
|
||||
return sdkerrors.Wrap(ErrInvalidChainConfig, "hash cannot be blank")
|
||||
return errorsmod.Wrap(ErrInvalidChainConfig, "hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -162,7 +173,7 @@ func validateBlock(block *sdkmath.Int) error {
|
||||
}
|
||||
|
||||
if block.IsNegative() {
|
||||
return sdkerrors.Wrapf(
|
||||
return errorsmod.Wrapf(
|
||||
ErrInvalidChainConfig, "block value cannot be negative: %s", block,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ func TestChainConfigValidate(t *testing.T) {
|
||||
MuirGlacierBlock: newIntPtr(0),
|
||||
BerlinBlock: newIntPtr(0),
|
||||
LondonBlock: newIntPtr(0),
|
||||
CancunBlock: newIntPtr(0),
|
||||
ShanghaiBlock: newIntPtr(0),
|
||||
},
|
||||
false,
|
||||
},
|
||||
@@ -58,6 +60,8 @@ func TestChainConfigValidate(t *testing.T) {
|
||||
MuirGlacierBlock: nil,
|
||||
BerlinBlock: nil,
|
||||
LondonBlock: nil,
|
||||
CancunBlock: nil,
|
||||
ShanghaiBlock: nil,
|
||||
},
|
||||
false,
|
||||
},
|
||||
@@ -316,6 +320,53 @@ func TestChainConfigValidate(t *testing.T) {
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"invalid ShanghaiBlock",
|
||||
ChainConfig{
|
||||
HomesteadBlock: newIntPtr(0),
|
||||
DAOForkBlock: newIntPtr(0),
|
||||
EIP150Block: newIntPtr(0),
|
||||
EIP150Hash: defaultEIP150Hash,
|
||||
EIP155Block: newIntPtr(0),
|
||||
EIP158Block: newIntPtr(0),
|
||||
ByzantiumBlock: newIntPtr(0),
|
||||
ConstantinopleBlock: newIntPtr(0),
|
||||
PetersburgBlock: newIntPtr(0),
|
||||
IstanbulBlock: newIntPtr(0),
|
||||
MuirGlacierBlock: newIntPtr(0),
|
||||
BerlinBlock: newIntPtr(0),
|
||||
LondonBlock: newIntPtr(0),
|
||||
ArrowGlacierBlock: newIntPtr(0),
|
||||
GrayGlacierBlock: newIntPtr(0),
|
||||
MergeNetsplitBlock: newIntPtr(0),
|
||||
ShanghaiBlock: newIntPtr(-1),
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"invalid CancunBlock",
|
||||
ChainConfig{
|
||||
HomesteadBlock: newIntPtr(0),
|
||||
DAOForkBlock: newIntPtr(0),
|
||||
EIP150Block: newIntPtr(0),
|
||||
EIP150Hash: defaultEIP150Hash,
|
||||
EIP155Block: newIntPtr(0),
|
||||
EIP158Block: newIntPtr(0),
|
||||
ByzantiumBlock: newIntPtr(0),
|
||||
ConstantinopleBlock: newIntPtr(0),
|
||||
PetersburgBlock: newIntPtr(0),
|
||||
IstanbulBlock: newIntPtr(0),
|
||||
MuirGlacierBlock: newIntPtr(0),
|
||||
BerlinBlock: newIntPtr(0),
|
||||
LondonBlock: newIntPtr(0),
|
||||
ArrowGlacierBlock: newIntPtr(0),
|
||||
GrayGlacierBlock: newIntPtr(0),
|
||||
MergeNetsplitBlock: newIntPtr(0),
|
||||
ShanghaiBlock: newIntPtr(0),
|
||||
CancunBlock: newIntPtr(-1),
|
||||
},
|
||||
true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
"github.com/cosmos/cosmos-sdk/types/tx"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
@@ -39,12 +40,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
|
||||
func PackTxData(txData TxData) (*codectypes.Any, error) {
|
||||
msg, ok := txData.(proto.Message)
|
||||
if !ok {
|
||||
return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", txData)
|
||||
return nil, errorsmod.Wrapf(errortypes.ErrPackAny, "cannot proto marshal %T", txData)
|
||||
}
|
||||
|
||||
anyTxData, err := codectypes.NewAnyWithValue(msg)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error())
|
||||
return nil, errorsmod.Wrap(errortypes.ErrPackAny, err.Error())
|
||||
}
|
||||
|
||||
return anyTxData, nil
|
||||
@@ -54,12 +55,12 @@ func PackTxData(txData TxData) (*codectypes.Any, error) {
|
||||
// client state can't be unpacked into a TxData.
|
||||
func UnpackTxData(any *codectypes.Any) (TxData, error) {
|
||||
if any == nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil")
|
||||
return nil, errorsmod.Wrap(errortypes.ErrUnpackAny, "protobuf Any message cannot be nil")
|
||||
}
|
||||
|
||||
txData, ok := any.GetCachedValue().(TxData)
|
||||
if !ok {
|
||||
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into TxData %T", any)
|
||||
return nil, errorsmod.Wrapf(errortypes.ErrUnpackAny, "cannot unpack Any into TxData %T", any)
|
||||
}
|
||||
|
||||
return txData, nil
|
||||
|
||||
@@ -3,8 +3,9 @@ package types
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
@@ -195,58 +196,58 @@ func (tx *DynamicFeeTx) SetSignatureValues(chainID, v, r, s *big.Int) {
|
||||
// Validate performs a stateless validation of the tx fields.
|
||||
func (tx DynamicFeeTx) Validate() error {
|
||||
if tx.GasTipCap == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidGasCap, "gas tip cap cannot nil")
|
||||
return errorsmod.Wrap(ErrInvalidGasCap, "gas tip cap cannot nil")
|
||||
}
|
||||
|
||||
if tx.GasFeeCap == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidGasCap, "gas fee cap cannot nil")
|
||||
return errorsmod.Wrap(ErrInvalidGasCap, "gas fee cap cannot nil")
|
||||
}
|
||||
|
||||
if tx.GasTipCap.IsNegative() {
|
||||
return sdkerrors.Wrapf(ErrInvalidGasCap, "gas tip cap cannot be negative %s", tx.GasTipCap)
|
||||
return errorsmod.Wrapf(ErrInvalidGasCap, "gas tip cap cannot be negative %s", tx.GasTipCap)
|
||||
}
|
||||
|
||||
if tx.GasFeeCap.IsNegative() {
|
||||
return sdkerrors.Wrapf(ErrInvalidGasCap, "gas fee cap cannot be negative %s", tx.GasFeeCap)
|
||||
return errorsmod.Wrapf(ErrInvalidGasCap, "gas fee cap cannot be negative %s", tx.GasFeeCap)
|
||||
}
|
||||
|
||||
if !types.IsValidInt256(tx.GetGasTipCap()) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasCap, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasCap, "out of bound")
|
||||
}
|
||||
|
||||
if !types.IsValidInt256(tx.GetGasFeeCap()) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasCap, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasCap, "out of bound")
|
||||
}
|
||||
|
||||
if tx.GasFeeCap.LT(*tx.GasTipCap) {
|
||||
return sdkerrors.Wrapf(
|
||||
return errorsmod.Wrapf(
|
||||
ErrInvalidGasCap, "max priority fee per gas higher than max fee per gas (%s > %s)",
|
||||
tx.GasTipCap, tx.GasFeeCap,
|
||||
)
|
||||
}
|
||||
|
||||
if !types.IsValidInt256(tx.Fee()) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
}
|
||||
|
||||
amount := tx.GetValue()
|
||||
// Amount can be 0
|
||||
if amount != nil && amount.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
}
|
||||
if !types.IsValidInt256(amount) {
|
||||
return sdkerrors.Wrap(ErrInvalidAmount, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidAmount, "out of bound")
|
||||
}
|
||||
|
||||
if tx.To != "" {
|
||||
if err := types.ValidateAddress(tx.To); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid to address")
|
||||
return errorsmod.Wrap(err, "invalid to address")
|
||||
}
|
||||
}
|
||||
|
||||
if tx.GetChainID() == nil {
|
||||
return sdkerrors.Wrap(
|
||||
sdkerrors.ErrInvalidChainID,
|
||||
return errorsmod.Wrap(
|
||||
errortypes.ErrInvalidChainID,
|
||||
"chain ID must be present on AccessList txs",
|
||||
)
|
||||
}
|
||||
|
||||
+22
-22
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
||||
"github.com/ethereum/go-ethereum/accounts/abi"
|
||||
@@ -40,67 +40,67 @@ var ErrPostTxProcessing = errors.New("failed to execute post processing")
|
||||
|
||||
var (
|
||||
// ErrInvalidState returns an error resulting from an invalid Storage State.
|
||||
ErrInvalidState = sdkerrors.Register(ModuleName, codeErrInvalidState, "invalid storage state")
|
||||
ErrInvalidState = errorsmod.Register(ModuleName, codeErrInvalidState, "invalid storage state")
|
||||
|
||||
// ErrExecutionReverted returns an error resulting from an error in EVM execution.
|
||||
ErrExecutionReverted = sdkerrors.Register(ModuleName, codeErrExecutionReverted, vm.ErrExecutionReverted.Error())
|
||||
ErrExecutionReverted = errorsmod.Register(ModuleName, codeErrExecutionReverted, vm.ErrExecutionReverted.Error())
|
||||
|
||||
// ErrChainConfigNotFound returns an error if the chain config cannot be found on the store.
|
||||
ErrChainConfigNotFound = sdkerrors.Register(ModuleName, codeErrChainConfigNotFound, "chain configuration not found")
|
||||
ErrChainConfigNotFound = errorsmod.Register(ModuleName, codeErrChainConfigNotFound, "chain configuration not found")
|
||||
|
||||
// ErrInvalidChainConfig returns an error resulting from an invalid ChainConfig.
|
||||
ErrInvalidChainConfig = sdkerrors.Register(ModuleName, codeErrInvalidChainConfig, "invalid chain configuration")
|
||||
ErrInvalidChainConfig = errorsmod.Register(ModuleName, codeErrInvalidChainConfig, "invalid chain configuration")
|
||||
|
||||
// ErrZeroAddress returns an error resulting from an zero (empty) ethereum Address.
|
||||
ErrZeroAddress = sdkerrors.Register(ModuleName, codeErrZeroAddress, "invalid zero address")
|
||||
ErrZeroAddress = errorsmod.Register(ModuleName, codeErrZeroAddress, "invalid zero address")
|
||||
|
||||
// ErrEmptyHash returns an error resulting from an empty ethereum Hash.
|
||||
ErrEmptyHash = sdkerrors.Register(ModuleName, codeErrEmptyHash, "empty hash")
|
||||
ErrEmptyHash = errorsmod.Register(ModuleName, codeErrEmptyHash, "empty hash")
|
||||
|
||||
// ErrBloomNotFound returns an error if the block bloom cannot be found on the store.
|
||||
ErrBloomNotFound = sdkerrors.Register(ModuleName, codeErrBloomNotFound, "block bloom not found")
|
||||
ErrBloomNotFound = errorsmod.Register(ModuleName, codeErrBloomNotFound, "block bloom not found")
|
||||
|
||||
// ErrTxReceiptNotFound returns an error if the transaction receipt could not be found
|
||||
ErrTxReceiptNotFound = sdkerrors.Register(ModuleName, codeErrTxReceiptNotFound, "transaction receipt not found")
|
||||
ErrTxReceiptNotFound = errorsmod.Register(ModuleName, codeErrTxReceiptNotFound, "transaction receipt not found")
|
||||
|
||||
// ErrCreateDisabled returns an error if the EnableCreate parameter is false.
|
||||
ErrCreateDisabled = sdkerrors.Register(ModuleName, codeErrCreateDisabled, "EVM Create operation is disabled")
|
||||
ErrCreateDisabled = errorsmod.Register(ModuleName, codeErrCreateDisabled, "EVM Create operation is disabled")
|
||||
|
||||
// ErrCallDisabled returns an error if the EnableCall parameter is false.
|
||||
ErrCallDisabled = sdkerrors.Register(ModuleName, codeErrCallDisabled, "EVM Call operation is disabled")
|
||||
ErrCallDisabled = errorsmod.Register(ModuleName, codeErrCallDisabled, "EVM Call operation is disabled")
|
||||
|
||||
// ErrInvalidAmount returns an error if a tx contains an invalid amount.
|
||||
ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid transaction amount")
|
||||
ErrInvalidAmount = errorsmod.Register(ModuleName, codeErrInvalidAmount, "invalid transaction amount")
|
||||
|
||||
// ErrInvalidGasPrice returns an error if an invalid gas price is provided to the tx.
|
||||
ErrInvalidGasPrice = sdkerrors.Register(ModuleName, codeErrInvalidGasPrice, "invalid gas price")
|
||||
ErrInvalidGasPrice = errorsmod.Register(ModuleName, codeErrInvalidGasPrice, "invalid gas price")
|
||||
|
||||
// ErrInvalidGasFee returns an error if the tx gas fee is out of bound.
|
||||
ErrInvalidGasFee = sdkerrors.Register(ModuleName, codeErrInvalidGasFee, "invalid gas fee")
|
||||
ErrInvalidGasFee = errorsmod.Register(ModuleName, codeErrInvalidGasFee, "invalid gas fee")
|
||||
|
||||
// ErrVMExecution returns an error resulting from an error in EVM execution.
|
||||
ErrVMExecution = sdkerrors.Register(ModuleName, codeErrVMExecution, "evm transaction execution failed")
|
||||
ErrVMExecution = errorsmod.Register(ModuleName, codeErrVMExecution, "evm transaction execution failed")
|
||||
|
||||
// ErrInvalidRefund returns an error if a the gas refund value is invalid.
|
||||
ErrInvalidRefund = sdkerrors.Register(ModuleName, codeErrInvalidRefund, "invalid gas refund amount")
|
||||
ErrInvalidRefund = errorsmod.Register(ModuleName, codeErrInvalidRefund, "invalid gas refund amount")
|
||||
|
||||
// ErrInconsistentGas returns an error if a the gas differs from the expected one.
|
||||
ErrInconsistentGas = sdkerrors.Register(ModuleName, codeErrInconsistentGas, "inconsistent gas")
|
||||
ErrInconsistentGas = errorsmod.Register(ModuleName, codeErrInconsistentGas, "inconsistent gas")
|
||||
|
||||
// ErrInvalidGasCap returns an error if a the gas cap value is negative or invalid
|
||||
ErrInvalidGasCap = sdkerrors.Register(ModuleName, codeErrInvalidGasCap, "invalid gas cap")
|
||||
ErrInvalidGasCap = errorsmod.Register(ModuleName, codeErrInvalidGasCap, "invalid gas cap")
|
||||
|
||||
// ErrInvalidBaseFee returns an error if a the base fee cap value is invalid
|
||||
ErrInvalidBaseFee = sdkerrors.Register(ModuleName, codeErrInvalidBaseFee, "invalid base fee")
|
||||
ErrInvalidBaseFee = errorsmod.Register(ModuleName, codeErrInvalidBaseFee, "invalid base fee")
|
||||
|
||||
// ErrGasOverflow returns an error if gas computation overlow/underflow
|
||||
ErrGasOverflow = sdkerrors.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow")
|
||||
ErrGasOverflow = errorsmod.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow")
|
||||
|
||||
// ErrInvalidAccount returns an error if the account is not an EVM compatible account
|
||||
ErrInvalidAccount = sdkerrors.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account")
|
||||
ErrInvalidAccount = errorsmod.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account")
|
||||
|
||||
// ErrInvalidGasLimit returns an error if gas limit value is invalid
|
||||
ErrInvalidGasLimit = sdkerrors.Register(ModuleName, codeErrInvalidGasLimit, "invalid gas limit")
|
||||
ErrInvalidGasLimit = errorsmod.Register(ModuleName, codeErrInvalidGasLimit, "invalid gas limit")
|
||||
)
|
||||
|
||||
// NewExecErrorWithReason unpacks the revert return bytes and returns a wrapped error
|
||||
|
||||
Generated
+317
-142
@@ -6,7 +6,7 @@ package types
|
||||
import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
@@ -26,18 +26,18 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Params defines the EVM module parameters
|
||||
type Params struct {
|
||||
// evm denom represents the token denomination used to run the EVM state
|
||||
// evm_denom represents the token denomination used to run the EVM state
|
||||
// transitions.
|
||||
EvmDenom string `protobuf:"bytes,1,opt,name=evm_denom,json=evmDenom,proto3" json:"evm_denom,omitempty" yaml:"evm_denom"`
|
||||
// enable create toggles state transitions that use the vm.Create function
|
||||
// enable_create toggles state transitions that use the vm.Create function
|
||||
EnableCreate bool `protobuf:"varint,2,opt,name=enable_create,json=enableCreate,proto3" json:"enable_create,omitempty" yaml:"enable_create"`
|
||||
// enable call toggles state transitions that use the vm.Call function
|
||||
// enable_call toggles state transitions that use the vm.Call function
|
||||
EnableCall bool `protobuf:"varint,3,opt,name=enable_call,json=enableCall,proto3" json:"enable_call,omitempty" yaml:"enable_call"`
|
||||
// extra eips defines the additional EIPs for the vm.Config
|
||||
// extra_eips defines the additional EIPs for the vm.Config
|
||||
ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"`
|
||||
// chain config defines the EVM chain configuration parameters
|
||||
// chain_config defines the EVM chain configuration parameters
|
||||
ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"`
|
||||
// Allow unprotected transactions defines if replay-protected (i.e non EIP155
|
||||
// allow_unprotected_txs defines if replay-protected (i.e non EIP155
|
||||
// signed) transactions can be executed on the state machine.
|
||||
AllowUnprotectedTxs bool `protobuf:"varint,6,opt,name=allow_unprotected_txs,json=allowUnprotectedTxs,proto3" json:"allow_unprotected_txs,omitempty"`
|
||||
}
|
||||
@@ -120,41 +120,45 @@ func (m *Params) GetAllowUnprotectedTxs() bool {
|
||||
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
|
||||
// instead of *big.Int.
|
||||
type ChainConfig struct {
|
||||
// Homestead switch block (nil no fork, 0 = already homestead)
|
||||
// homestead_block switch (nil no fork, 0 = already homestead)
|
||||
HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"`
|
||||
// TheDAO hard-fork switch block (nil no fork)
|
||||
// dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork)
|
||||
DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"`
|
||||
// Whether the nodes supports or opposes the DAO hard-fork
|
||||
// dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork
|
||||
DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"`
|
||||
// EIP150 implements the Gas price changes
|
||||
// eip150_block: EIP150 implements the Gas price changes
|
||||
// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
|
||||
EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip150_block,omitempty" yaml:"eip150_block"`
|
||||
// EIP150 HF hash (needed for header only clients as only gas pricing changed)
|
||||
// eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed)
|
||||
EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"`
|
||||
// EIP155Block HF block
|
||||
// eip155_block: EIP155Block HF block
|
||||
EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip155_block,omitempty" yaml:"eip155_block"`
|
||||
// EIP158 HF block
|
||||
// eip158_block: EIP158 HF block
|
||||
EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip158_block,omitempty" yaml:"eip158_block"`
|
||||
// Byzantium switch block (nil no fork, 0 = already on byzantium)
|
||||
// byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium)
|
||||
ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"`
|
||||
// Constantinople switch block (nil no fork, 0 = already activated)
|
||||
// constantinople_block: Constantinople switch block (nil no fork, 0 = already activated)
|
||||
ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"`
|
||||
// Petersburg switch block (nil same as Constantinople)
|
||||
// petersburg_block: Petersburg switch block (nil same as Constantinople)
|
||||
PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"`
|
||||
// Istanbul switch block (nil no fork, 0 = already on istanbul)
|
||||
// istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul)
|
||||
IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"`
|
||||
// Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
|
||||
// muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
|
||||
MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"`
|
||||
// Berlin switch block (nil = no fork, 0 = already on berlin)
|
||||
// berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin)
|
||||
BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"berlin_block,omitempty" yaml:"berlin_block"`
|
||||
// London switch block (nil = no fork, 0 = already on london)
|
||||
// london_block: London switch block (nil = no fork, 0 = already on london)
|
||||
LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"london_block,omitempty" yaml:"london_block"`
|
||||
// Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
||||
// arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
||||
ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"`
|
||||
// EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
||||
// gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)
|
||||
GrayGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"`
|
||||
// Virtual fork after The Merge to use as a network splitter
|
||||
// merge_netsplit_block: Virtual fork after The Merge to use as a network splitter
|
||||
MergeNetsplitBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"`
|
||||
// shanghai_block switch block (nil = no fork, 0 = already on shanghai)
|
||||
ShanghaiBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"`
|
||||
// cancun_block switch block (nil = no fork, 0 = already on cancun)
|
||||
CancunBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cancun_block,omitempty" yaml:"cancun_block"`
|
||||
}
|
||||
|
||||
func (m *ChainConfig) Reset() { *m = ChainConfig{} }
|
||||
@@ -206,7 +210,9 @@ func (m *ChainConfig) GetEIP150Hash() string {
|
||||
|
||||
// State represents a single Storage key value pair item.
|
||||
type State struct {
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
// key is the stored key
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
// value is the stored value for the given key
|
||||
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
@@ -261,7 +267,9 @@ func (m *State) GetValue() string {
|
||||
// with a given hash. It it used for import/export data as transactions are not
|
||||
// persisted on blockchain state after an upgrade.
|
||||
type TransactionLogs struct {
|
||||
// hash of the transaction
|
||||
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
// logs is an array of Logs for the given transaction hash
|
||||
Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"`
|
||||
}
|
||||
|
||||
@@ -315,24 +323,27 @@ func (m *TransactionLogs) GetLogs() []*Log {
|
||||
// Log represents an protobuf compatible Ethereum Log that defines a contract
|
||||
// log event. These events are generated by the LOG opcode and stored/indexed by
|
||||
// the node.
|
||||
//
|
||||
// NOTE: address, topics and data are consensus fields. The rest of the fields
|
||||
// are derived, i.e. filled in by the nodes, but not secured by consensus.
|
||||
type Log struct {
|
||||
// address of the contract that generated the event
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
// list of topics provided by the contract.
|
||||
// topics is a list of topics provided by the contract.
|
||||
Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
|
||||
// supplied by the contract, usually ABI-encoded
|
||||
// data which is supplied by the contract, usually ABI-encoded
|
||||
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// block in which the transaction was included
|
||||
// block_number of the block in which the transaction was included
|
||||
BlockNumber uint64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"blockNumber"`
|
||||
// hash of the transaction
|
||||
// tx_hash is the transaction hash
|
||||
TxHash string `protobuf:"bytes,5,opt,name=tx_hash,json=txHash,proto3" json:"transactionHash"`
|
||||
// index of the transaction in the block
|
||||
// tx_index of the transaction in the block
|
||||
TxIndex uint64 `protobuf:"varint,6,opt,name=tx_index,json=txIndex,proto3" json:"transactionIndex"`
|
||||
// hash of the block in which the transaction was included
|
||||
// block_hash of the block in which the transaction was included
|
||||
BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"blockHash"`
|
||||
// index of the log in the block
|
||||
Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"logIndex"`
|
||||
// The Removed field is true if this log was reverted due to a chain
|
||||
// removed is true if this log was reverted due to a chain
|
||||
// reorganisation. You must pay attention to this field if you receive logs
|
||||
// through a filter query.
|
||||
Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"`
|
||||
@@ -488,9 +499,9 @@ var xxx_messageInfo_TxResult proto.InternalMessageInfo
|
||||
|
||||
// AccessTuple is the element type of an access list.
|
||||
type AccessTuple struct {
|
||||
// hex formatted ethereum address
|
||||
// address is a hex formatted ethereum address
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
// hex formatted hashes of the storage keys
|
||||
// storage_keys are hex formatted hashes of the storage keys
|
||||
StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"`
|
||||
}
|
||||
|
||||
@@ -529,27 +540,29 @@ var xxx_messageInfo_AccessTuple proto.InternalMessageInfo
|
||||
|
||||
// TraceConfig holds extra parameters to trace functions.
|
||||
type TraceConfig struct {
|
||||
// custom javascript tracer
|
||||
// tracer is a custom javascript tracer
|
||||
Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"`
|
||||
// overrides the default timeout of 5 seconds for JavaScript-based tracing
|
||||
// timeout overrides the default timeout of 5 seconds for JavaScript-based tracing
|
||||
// calls
|
||||
Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||||
// number of blocks the tracer is willing to go back
|
||||
// reexec defines the number of blocks the tracer is willing to go back
|
||||
Reexec uint64 `protobuf:"varint,3,opt,name=reexec,proto3" json:"reexec,omitempty"`
|
||||
// disable stack capture
|
||||
// disable_stack switches stack capture
|
||||
DisableStack bool `protobuf:"varint,5,opt,name=disable_stack,json=disableStack,proto3" json:"disableStack"`
|
||||
// disable storage capture
|
||||
// disable_storage switches storage capture
|
||||
DisableStorage bool `protobuf:"varint,6,opt,name=disable_storage,json=disableStorage,proto3" json:"disableStorage"`
|
||||
// print output during capture end
|
||||
// debug can be used to print output during capture end
|
||||
Debug bool `protobuf:"varint,8,opt,name=debug,proto3" json:"debug,omitempty"`
|
||||
// maximum length of output, but zero means unlimited
|
||||
// limit defines the maximum length of output, but zero means unlimited
|
||||
Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Chain overrides, can be used to execute a trace using future fork rules
|
||||
// overrides can be used to execute a trace using future fork rules
|
||||
Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"`
|
||||
// enable memory capture
|
||||
// enable_memory switches memory capture
|
||||
EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"`
|
||||
// enable return data capture
|
||||
// enable_return_data switches the capture of return data
|
||||
EnableReturnData bool `protobuf:"varint,12,opt,name=enable_return_data,json=enableReturnData,proto3" json:"enableReturnData"`
|
||||
// tracer_json_config configures the tracer using a JSON string
|
||||
TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"`
|
||||
}
|
||||
|
||||
func (m *TraceConfig) Reset() { *m = TraceConfig{} }
|
||||
@@ -655,6 +668,13 @@ func (m *TraceConfig) GetEnableReturnData() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *TraceConfig) GetTracerJsonConfig() string {
|
||||
if m != nil {
|
||||
return m.TracerJsonConfig
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params")
|
||||
proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig")
|
||||
@@ -669,104 +689,108 @@ func init() {
|
||||
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
|
||||
|
||||
var fileDescriptor_d21ecc92c8c8583e = []byte{
|
||||
// 1543 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x4f, 0xdc, 0xc6,
|
||||
0x1b, 0x07, 0x76, 0x01, 0xef, 0xec, 0xb2, 0x6b, 0x86, 0x85, 0xff, 0x86, 0xe8, 0x8f, 0xa9, 0x0f,
|
||||
0x2d, 0x95, 0x12, 0x36, 0x10, 0xa1, 0x46, 0x89, 0x7a, 0x60, 0x81, 0x24, 0xd0, 0x34, 0x45, 0x03,
|
||||
0x51, 0xa5, 0x4a, 0x95, 0x35, 0x6b, 0x4f, 0x8c, 0x8b, 0xed, 0x59, 0xcd, 0x8c, 0x37, 0xbb, 0x6d,
|
||||
0x3f, 0x40, 0xab, 0x5e, 0xfa, 0x11, 0xfa, 0x71, 0xa2, 0xaa, 0x87, 0x1c, 0xab, 0x1e, 0xac, 0x88,
|
||||
0xdc, 0x38, 0xee, 0x27, 0xa8, 0x3c, 0x33, 0xfb, 0x0a, 0x6a, 0x0b, 0x27, 0xcf, 0xef, 0x79, 0xf9,
|
||||
0xfd, 0xe6, 0xe5, 0xb1, 0x9f, 0x31, 0x58, 0x25, 0xe2, 0x8c, 0xb0, 0x28, 0x88, 0x45, 0x9d, 0xb4,
|
||||
0xa3, 0x7a, 0x7b, 0x2b, 0x7b, 0x6c, 0xb6, 0x18, 0x15, 0x14, 0x9a, 0x03, 0xdf, 0x66, 0x66, 0x6c,
|
||||
0x6f, 0xad, 0x56, 0x7d, 0xea, 0x53, 0xe9, 0xac, 0x67, 0x23, 0x15, 0x67, 0xff, 0x9c, 0x03, 0x73,
|
||||
0xc7, 0x98, 0xe1, 0x88, 0xc3, 0x2d, 0x50, 0x20, 0xed, 0xc8, 0xf1, 0x48, 0x4c, 0xa3, 0xda, 0xf4,
|
||||
0xfa, 0xf4, 0x46, 0xa1, 0x51, 0xed, 0xa5, 0x96, 0xd9, 0xc5, 0x51, 0xf8, 0xd8, 0x1e, 0xb8, 0x6c,
|
||||
0x64, 0x90, 0x76, 0xb4, 0x9f, 0x0d, 0xe1, 0xe7, 0x60, 0x81, 0xc4, 0xb8, 0x19, 0x12, 0xc7, 0x65,
|
||||
0x04, 0x0b, 0x52, 0x9b, 0x59, 0x9f, 0xde, 0x30, 0x1a, 0xb5, 0x5e, 0x6a, 0x55, 0x75, 0xda, 0xa8,
|
||||
0xdb, 0x46, 0x25, 0x85, 0xf7, 0x24, 0x84, 0x9f, 0x81, 0x62, 0xdf, 0x8f, 0xc3, 0xb0, 0x96, 0x93,
|
||||
0xc9, 0x2b, 0xbd, 0xd4, 0x82, 0xe3, 0xc9, 0x38, 0x0c, 0x6d, 0x04, 0x74, 0x2a, 0x0e, 0x43, 0xb8,
|
||||
0x0b, 0x00, 0xe9, 0x08, 0x86, 0x1d, 0x12, 0xb4, 0x78, 0x2d, 0xbf, 0x9e, 0xdb, 0xc8, 0x35, 0xec,
|
||||
0x8b, 0xd4, 0x2a, 0x1c, 0x64, 0xd6, 0x83, 0xc3, 0x63, 0xde, 0x4b, 0xad, 0x45, 0x4d, 0x32, 0x08,
|
||||
0xb4, 0x51, 0x41, 0x82, 0x83, 0xa0, 0xc5, 0xe1, 0xb7, 0xa0, 0xe4, 0x9e, 0xe1, 0x20, 0x76, 0x5c,
|
||||
0x1a, 0xbf, 0x0e, 0xfc, 0xda, 0xec, 0xfa, 0xf4, 0x46, 0x71, 0xfb, 0xff, 0x9b, 0x93, 0xfb, 0xb6,
|
||||
0xb9, 0x97, 0x45, 0xed, 0xc9, 0xa0, 0xc6, 0xdd, 0xb7, 0xa9, 0x35, 0xd5, 0x4b, 0xad, 0x25, 0x45,
|
||||
0x3d, 0x4a, 0x60, 0xa3, 0xa2, 0x3b, 0x8c, 0x84, 0xdb, 0x60, 0x19, 0x87, 0x21, 0x7d, 0xe3, 0x24,
|
||||
0x71, 0xb6, 0xd1, 0xc4, 0x15, 0xc4, 0x73, 0x44, 0x87, 0xd7, 0xe6, 0xb2, 0x45, 0xa2, 0x25, 0xe9,
|
||||
0x7c, 0x35, 0xf4, 0x9d, 0x76, 0xb8, 0xfd, 0x47, 0x05, 0x14, 0x47, 0xd4, 0x60, 0x04, 0x2a, 0x67,
|
||||
0x34, 0x22, 0x5c, 0x10, 0xec, 0x39, 0xcd, 0x90, 0xba, 0xe7, 0xfa, 0x58, 0xf6, 0xff, 0x4a, 0xad,
|
||||
0x8f, 0xfd, 0x40, 0x9c, 0x25, 0xcd, 0x4d, 0x97, 0x46, 0x75, 0x97, 0xf2, 0x88, 0x72, 0xfd, 0xb8,
|
||||
0xcf, 0xbd, 0xf3, 0xba, 0xe8, 0xb6, 0x08, 0xdf, 0x3c, 0x8c, 0x45, 0x2f, 0xb5, 0x56, 0xd4, 0x64,
|
||||
0x27, 0xa8, 0x6c, 0x54, 0x1e, 0x58, 0x1a, 0x99, 0x01, 0x76, 0x41, 0xd9, 0xc3, 0xd4, 0x79, 0x4d,
|
||||
0xd9, 0xb9, 0x56, 0x9b, 0x91, 0x6a, 0x27, 0xff, 0x5d, 0xed, 0x22, 0xb5, 0x4a, 0xfb, 0xbb, 0x5f,
|
||||
0x3d, 0xa5, 0xec, 0x5c, 0x72, 0xf6, 0x52, 0x6b, 0x59, 0xa9, 0x8f, 0x33, 0xdb, 0xa8, 0xe4, 0x61,
|
||||
0x3a, 0x08, 0x83, 0x5f, 0x03, 0x73, 0x10, 0xc0, 0x93, 0x56, 0x8b, 0x32, 0xa1, 0xab, 0xe1, 0xfe,
|
||||
0x45, 0x6a, 0x95, 0x35, 0xe5, 0x89, 0xf2, 0xf4, 0x52, 0xeb, 0x7f, 0x13, 0xa4, 0x3a, 0xc7, 0x46,
|
||||
0x65, 0x4d, 0xab, 0x43, 0x21, 0x07, 0x25, 0x12, 0xb4, 0xb6, 0x76, 0x1e, 0xe8, 0x15, 0xe5, 0xe5,
|
||||
0x8a, 0x8e, 0x6f, 0xb4, 0xa2, 0xe2, 0xc1, 0xe1, 0xf1, 0xd6, 0xce, 0x83, 0xfe, 0x82, 0xf4, 0xd9,
|
||||
0x8f, 0xd2, 0xda, 0xa8, 0xa8, 0xa0, 0x5a, 0xcd, 0x21, 0xd0, 0xd0, 0x39, 0xc3, 0xfc, 0x4c, 0x56,
|
||||
0x56, 0xa1, 0xb1, 0x71, 0x91, 0x5a, 0x40, 0x31, 0x3d, 0xc7, 0xfc, 0x6c, 0x78, 0x2e, 0xcd, 0xee,
|
||||
0xf7, 0x38, 0x16, 0x41, 0x12, 0xf5, 0xb9, 0x80, 0x4a, 0xce, 0xa2, 0x06, 0xf3, 0xdf, 0xd1, 0xf3,
|
||||
0x9f, 0xbb, 0xf5, 0xfc, 0x77, 0xae, 0x9b, 0xff, 0xce, 0xf8, 0xfc, 0x55, 0xcc, 0x40, 0xf4, 0x91,
|
||||
0x16, 0x9d, 0xbf, 0xb5, 0xe8, 0xa3, 0xeb, 0x44, 0x1f, 0x8d, 0x8b, 0xaa, 0x98, 0xac, 0xd8, 0x27,
|
||||
0x76, 0xa2, 0x66, 0xdc, 0xbe, 0xd8, 0xaf, 0x6c, 0x6a, 0x79, 0x60, 0x51, 0x72, 0x3f, 0x82, 0xaa,
|
||||
0x4b, 0x63, 0x2e, 0x32, 0x5b, 0x4c, 0x5b, 0x21, 0xd1, 0x9a, 0x05, 0xa9, 0x79, 0x78, 0x23, 0xcd,
|
||||
0xbb, 0xfa, 0x6b, 0x70, 0x0d, 0x9f, 0x8d, 0x96, 0xc6, 0xcd, 0x4a, 0xbd, 0x05, 0xcc, 0x16, 0x11,
|
||||
0x84, 0xf1, 0x66, 0xc2, 0x7c, 0xad, 0x0c, 0xa4, 0xf2, 0xc1, 0x8d, 0x94, 0xf5, 0x7b, 0x30, 0xc9,
|
||||
0x65, 0xa3, 0xca, 0xd0, 0xa4, 0x14, 0xbf, 0x03, 0xe5, 0x20, 0x9b, 0x46, 0x33, 0x09, 0xb5, 0x5e,
|
||||
0x51, 0xea, 0xed, 0xdd, 0x48, 0x4f, 0xbf, 0xcc, 0xe3, 0x4c, 0x36, 0x5a, 0xe8, 0x1b, 0x94, 0x56,
|
||||
0x02, 0x60, 0x94, 0x04, 0xcc, 0xf1, 0x43, 0xec, 0x06, 0x84, 0x69, 0xbd, 0x92, 0xd4, 0x7b, 0x76,
|
||||
0x23, 0xbd, 0x3b, 0x4a, 0xef, 0x2a, 0x9b, 0x8d, 0xcc, 0xcc, 0xf8, 0x4c, 0xd9, 0x94, 0xac, 0x07,
|
||||
0x4a, 0x4d, 0xc2, 0xc2, 0x20, 0xd6, 0x82, 0x0b, 0x52, 0x70, 0xf7, 0x46, 0x82, 0xba, 0x4e, 0x47,
|
||||
0x79, 0x6c, 0x54, 0x54, 0x70, 0xa0, 0x12, 0xd2, 0xd8, 0xa3, 0x7d, 0x95, 0xc5, 0xdb, 0xab, 0x8c,
|
||||
0xf2, 0xd8, 0xa8, 0xa8, 0xa0, 0x52, 0xe9, 0x80, 0x25, 0xcc, 0x18, 0x7d, 0x33, 0xb1, 0x87, 0x50,
|
||||
0x8a, 0x3d, 0xbf, 0x91, 0xd8, 0xaa, 0x12, 0xbb, 0x86, 0xce, 0x46, 0x8b, 0xd2, 0x3a, 0xb6, 0x8b,
|
||||
0x09, 0x80, 0x3e, 0xc3, 0xdd, 0x09, 0xe1, 0xea, 0xed, 0x0f, 0xef, 0x2a, 0x9b, 0x8d, 0xcc, 0xcc,
|
||||
0x38, 0x26, 0xfb, 0x03, 0xa8, 0x46, 0x84, 0xf9, 0xc4, 0x89, 0x89, 0xe0, 0xad, 0x30, 0x10, 0x5a,
|
||||
0x78, 0xf9, 0xf6, 0xef, 0xe3, 0x75, 0x7c, 0x36, 0x82, 0xd2, 0xfc, 0x52, 0x5b, 0xa5, 0xf8, 0x51,
|
||||
0xde, 0x28, 0x9b, 0x95, 0xa3, 0xbc, 0x51, 0x31, 0xcd, 0xa3, 0xbc, 0x61, 0x9a, 0x8b, 0x47, 0x79,
|
||||
0x63, 0xc9, 0xac, 0xa2, 0x85, 0x2e, 0x0d, 0xa9, 0xd3, 0x7e, 0xa8, 0x72, 0x51, 0x91, 0xbc, 0xc1,
|
||||
0x5c, 0x7f, 0x51, 0x50, 0xd9, 0xc5, 0x02, 0x87, 0x5d, 0xae, 0x89, 0x91, 0xa9, 0xe4, 0x46, 0x7a,
|
||||
0x5c, 0x1d, 0xcc, 0x9e, 0x88, 0xec, 0x9a, 0x63, 0x82, 0xdc, 0x39, 0xe9, 0xaa, 0xde, 0x8d, 0xb2,
|
||||
0x21, 0xac, 0x82, 0xd9, 0x36, 0x0e, 0x13, 0x75, 0x5f, 0x2a, 0x20, 0x05, 0xec, 0x63, 0x50, 0x39,
|
||||
0x65, 0x38, 0xe6, 0xd8, 0x15, 0x01, 0x8d, 0x5f, 0x50, 0x9f, 0x43, 0x08, 0xf2, 0xb2, 0x87, 0xa8,
|
||||
0x5c, 0x39, 0x86, 0x9f, 0x82, 0x7c, 0x48, 0x7d, 0x5e, 0x9b, 0x59, 0xcf, 0x6d, 0x14, 0xb7, 0x97,
|
||||
0xaf, 0xde, 0x58, 0x5e, 0x50, 0x1f, 0xc9, 0x10, 0xfb, 0xf7, 0x19, 0x90, 0x7b, 0x41, 0x7d, 0x58,
|
||||
0x03, 0xf3, 0xd8, 0xf3, 0x18, 0xe1, 0x5c, 0x33, 0xf5, 0x21, 0x5c, 0x01, 0x73, 0x82, 0xb6, 0x02,
|
||||
0x57, 0xd1, 0x15, 0x90, 0x46, 0x99, 0xb0, 0x87, 0x05, 0x96, 0x5d, 0xb8, 0x84, 0xe4, 0x18, 0x6e,
|
||||
0x83, 0x92, 0x5c, 0x99, 0x13, 0x27, 0x51, 0x93, 0x30, 0xd9, 0x4c, 0xf3, 0x8d, 0xca, 0x65, 0x6a,
|
||||
0x15, 0xa5, 0xfd, 0xa5, 0x34, 0xa3, 0x51, 0x00, 0xef, 0x81, 0x79, 0xd1, 0x19, 0xed, 0x83, 0x4b,
|
||||
0x97, 0xa9, 0x55, 0x11, 0xc3, 0x65, 0x66, 0x6d, 0x0e, 0xcd, 0x89, 0x8e, 0x6c, 0x77, 0x75, 0x60,
|
||||
0x88, 0x8e, 0x13, 0xc4, 0x1e, 0xe9, 0xc8, 0x56, 0x97, 0x6f, 0x54, 0x2f, 0x53, 0xcb, 0x1c, 0x09,
|
||||
0x3f, 0xcc, 0x7c, 0x68, 0x5e, 0x74, 0xe4, 0x00, 0xde, 0x03, 0x40, 0x4d, 0x49, 0x2a, 0xa8, 0x46,
|
||||
0xb5, 0x70, 0x99, 0x5a, 0x05, 0x69, 0x95, 0xdc, 0xc3, 0x21, 0xb4, 0xc1, 0xac, 0xe2, 0x36, 0x24,
|
||||
0x77, 0xe9, 0x32, 0xb5, 0x8c, 0x90, 0xfa, 0x8a, 0x53, 0xb9, 0xb2, 0xad, 0x62, 0x24, 0xa2, 0x6d,
|
||||
0xe2, 0xc9, 0x5e, 0x60, 0xa0, 0x3e, 0xb4, 0x7f, 0x99, 0x01, 0xc6, 0x69, 0x07, 0x11, 0x9e, 0x84,
|
||||
0x02, 0x3e, 0x05, 0xa6, 0x4b, 0x63, 0xc1, 0xb0, 0x2b, 0x9c, 0xb1, 0xad, 0x6d, 0xdc, 0x1d, 0x7e,
|
||||
0x97, 0x27, 0x23, 0x6c, 0x54, 0xe9, 0x9b, 0x76, 0xf5, 0xfe, 0x57, 0xc1, 0x6c, 0x33, 0xa4, 0x34,
|
||||
0x92, 0x95, 0x50, 0x42, 0x0a, 0x40, 0x24, 0x77, 0x4d, 0x9e, 0x72, 0x4e, 0xde, 0x4b, 0x3f, 0xba,
|
||||
0x7a, 0xca, 0x13, 0xa5, 0xd2, 0x58, 0xd1, 0x77, 0xd3, 0xb2, 0xd2, 0xd6, 0xf9, 0x76, 0xb6, 0xb7,
|
||||
0xb2, 0x94, 0x4c, 0x90, 0x63, 0x44, 0xc8, 0x43, 0x2b, 0xa1, 0x6c, 0x08, 0x57, 0x81, 0xc1, 0x48,
|
||||
0x9b, 0x30, 0x41, 0x3c, 0x79, 0x38, 0x06, 0x1a, 0x60, 0x78, 0x07, 0x18, 0x3e, 0xe6, 0x4e, 0xc2,
|
||||
0x89, 0xa7, 0x4e, 0x02, 0xcd, 0xfb, 0x98, 0xbf, 0xe2, 0xc4, 0x7b, 0x9c, 0xff, 0xe9, 0x37, 0x6b,
|
||||
0xca, 0xc6, 0xa0, 0xb8, 0xeb, 0xba, 0x84, 0xf3, 0xd3, 0xa4, 0x15, 0x92, 0x7f, 0xa8, 0xb0, 0x6d,
|
||||
0x50, 0xe2, 0x82, 0x32, 0xec, 0x13, 0xe7, 0x9c, 0x74, 0x75, 0x9d, 0xa9, 0xaa, 0xd1, 0xf6, 0x2f,
|
||||
0x48, 0x97, 0xa3, 0x51, 0xa0, 0x25, 0xde, 0xe7, 0x40, 0xf1, 0x94, 0x61, 0x97, 0xe8, 0xfb, 0x70,
|
||||
0x56, 0xab, 0x19, 0x64, 0x5a, 0x42, 0xa3, 0x4c, 0x5b, 0x04, 0x11, 0xa1, 0x89, 0xd0, 0xef, 0x53,
|
||||
0x1f, 0x66, 0x19, 0x8c, 0x90, 0x0e, 0x71, 0xe5, 0x36, 0xe6, 0x91, 0x46, 0x70, 0x07, 0x2c, 0x78,
|
||||
0x01, 0x97, 0x3f, 0x17, 0x5c, 0x60, 0xf7, 0x5c, 0x2d, 0xbf, 0x61, 0x5e, 0xa6, 0x56, 0x49, 0x3b,
|
||||
0x4e, 0x32, 0x3b, 0x1a, 0x43, 0xf0, 0x09, 0xa8, 0x0c, 0xd3, 0xe4, 0x6c, 0xd5, 0x75, 0xbe, 0x01,
|
||||
0x2f, 0x53, 0xab, 0x3c, 0x08, 0x95, 0x1e, 0x34, 0x81, 0xb3, 0x93, 0xf6, 0x48, 0x33, 0xf1, 0x65,
|
||||
0xf1, 0x19, 0x48, 0x81, 0xcc, 0x1a, 0x06, 0x51, 0x20, 0x64, 0xb1, 0xcd, 0x22, 0x05, 0xe0, 0x13,
|
||||
0x50, 0xa0, 0x6d, 0xc2, 0x58, 0xe0, 0x11, 0x2e, 0x2f, 0x06, 0xff, 0xf6, 0x67, 0x82, 0x86, 0xf1,
|
||||
0xd9, 0xe2, 0xf4, 0x8f, 0x53, 0x44, 0x22, 0xca, 0xba, 0xb2, 0xd3, 0xeb, 0xc5, 0x29, 0xc7, 0x97,
|
||||
0xd2, 0x8e, 0xc6, 0x10, 0x6c, 0x00, 0xa8, 0xd3, 0x18, 0x11, 0x09, 0x8b, 0x1d, 0xf9, 0xfe, 0x97,
|
||||
0x64, 0xae, 0x7c, 0x0b, 0x95, 0x17, 0x49, 0xe7, 0x3e, 0x16, 0x18, 0x5d, 0xb1, 0x1c, 0xe5, 0x8d,
|
||||
0xbc, 0x39, 0x7b, 0x94, 0x37, 0xe6, 0x4d, 0x63, 0xb0, 0x7e, 0x3d, 0x0b, 0xb4, 0xd4, 0xc7, 0x23,
|
||||
0xf4, 0x8d, 0xdd, 0xb7, 0x17, 0x6b, 0xd3, 0xef, 0x2e, 0xd6, 0xa6, 0xdf, 0x5f, 0xac, 0x4d, 0xff,
|
||||
0xfa, 0x61, 0x6d, 0xea, 0xdd, 0x87, 0xb5, 0xa9, 0x3f, 0x3f, 0xac, 0x4d, 0x7d, 0xf3, 0xc9, 0xe8,
|
||||
0xe7, 0x9e, 0x30, 0xf7, 0x7e, 0x40, 0xeb, 0x21, 0x76, 0x69, 0x1c, 0xb8, 0x5e, 0xbd, 0x23, 0x7f,
|
||||
0x78, 0xe5, 0x37, 0xbf, 0x39, 0x27, 0x7f, 0x64, 0x1f, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x33,
|
||||
0x1c, 0x76, 0xa8, 0x0e, 0x0f, 0x00, 0x00,
|
||||
// 1614 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x6e, 0xe3, 0xc6,
|
||||
0x15, 0xb6, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x8e, 0xb2, 0x8b, 0x9a, 0x2e, 0x2f,
|
||||
0x5a, 0x17, 0xc8, 0x5a, 0xb1, 0x03, 0xa3, 0x8b, 0x04, 0x2d, 0x60, 0xed, 0x3a, 0x89, 0xdd, 0x6d,
|
||||
0x6a, 0x8c, 0x1d, 0x14, 0x28, 0x50, 0x10, 0x23, 0x72, 0x42, 0x31, 0x26, 0x39, 0xc2, 0xcc, 0x50,
|
||||
0x2b, 0xb5, 0x7d, 0x80, 0x16, 0xbd, 0xe9, 0x13, 0x14, 0x79, 0x9c, 0xa0, 0x57, 0xb9, 0x2c, 0x7a,
|
||||
0x41, 0x14, 0xde, 0x3b, 0x5f, 0xfa, 0x09, 0x8a, 0xf9, 0x11, 0xf5, 0x63, 0xa3, 0xad, 0x75, 0xe5,
|
||||
0xf9, 0xce, 0x39, 0xf3, 0x7d, 0x33, 0x67, 0xce, 0x68, 0x0e, 0x0d, 0x9e, 0x13, 0xd1, 0x27, 0x2c,
|
||||
0x8d, 0x33, 0xd1, 0x21, 0xc3, 0xb4, 0x33, 0x3c, 0x92, 0x7f, 0x0e, 0x07, 0x8c, 0x0a, 0x0a, 0x9d,
|
||||
0xd2, 0x77, 0x28, 0x8d, 0xc3, 0xa3, 0xe7, 0xad, 0x88, 0x46, 0x54, 0x39, 0x3b, 0x72, 0xa4, 0xe3,
|
||||
0xbc, 0xbf, 0x54, 0xc0, 0xc6, 0x25, 0x66, 0x38, 0xe5, 0xf0, 0x08, 0x54, 0xc9, 0x30, 0xf5, 0x43,
|
||||
0x92, 0xd1, 0xb4, 0xbd, 0xba, 0xbf, 0x7a, 0x50, 0xed, 0xb6, 0xee, 0x0b, 0xd7, 0x19, 0xe3, 0x34,
|
||||
0xf9, 0xd4, 0x2b, 0x5d, 0x1e, 0xb2, 0xc9, 0x30, 0x7d, 0x23, 0x87, 0xf0, 0x17, 0x60, 0x8b, 0x64,
|
||||
0xb8, 0x97, 0x10, 0x3f, 0x60, 0x04, 0x0b, 0xd2, 0x5e, 0xdb, 0x5f, 0x3d, 0xb0, 0xbb, 0xed, 0xfb,
|
||||
0xc2, 0x6d, 0x99, 0x69, 0xb3, 0x6e, 0x0f, 0xd5, 0x35, 0x7e, 0xad, 0x20, 0xfc, 0x39, 0xa8, 0x4d,
|
||||
0xfc, 0x38, 0x49, 0xda, 0x15, 0x35, 0x79, 0xf7, 0xbe, 0x70, 0xe1, 0xfc, 0x64, 0x9c, 0x24, 0x1e,
|
||||
0x02, 0x66, 0x2a, 0x4e, 0x12, 0x78, 0x0a, 0x00, 0x19, 0x09, 0x86, 0x7d, 0x12, 0x0f, 0x78, 0xdb,
|
||||
0xda, 0xaf, 0x1c, 0x54, 0xba, 0xde, 0x6d, 0xe1, 0x56, 0xcf, 0xa4, 0xf5, 0xec, 0xfc, 0x92, 0xdf,
|
||||
0x17, 0xee, 0xb6, 0x21, 0x29, 0x03, 0x3d, 0x54, 0x55, 0xe0, 0x2c, 0x1e, 0x70, 0xf8, 0x7b, 0x50,
|
||||
0x0f, 0xfa, 0x38, 0xce, 0xfc, 0x80, 0x66, 0xdf, 0xc4, 0x51, 0x7b, 0x7d, 0x7f, 0xf5, 0xa0, 0x76,
|
||||
0xfc, 0xa3, 0xc3, 0xc5, 0xbc, 0x1d, 0xbe, 0x96, 0x51, 0xaf, 0x55, 0x50, 0xf7, 0xc5, 0xf7, 0x85,
|
||||
0xbb, 0x72, 0x5f, 0xb8, 0x3b, 0x9a, 0x7a, 0x96, 0xc0, 0x43, 0xb5, 0x60, 0x1a, 0x09, 0x8f, 0xc1,
|
||||
0x33, 0x9c, 0x24, 0xf4, 0x9d, 0x9f, 0x67, 0x32, 0xd1, 0x24, 0x10, 0x24, 0xf4, 0xc5, 0x88, 0xb7,
|
||||
0x37, 0xe4, 0x26, 0xd1, 0x8e, 0x72, 0x7e, 0x3d, 0xf5, 0x5d, 0x8f, 0xb8, 0xf7, 0xf7, 0x6d, 0x50,
|
||||
0x9b, 0x51, 0x83, 0x29, 0x68, 0xf6, 0x69, 0x4a, 0xb8, 0x20, 0x38, 0xf4, 0x7b, 0x09, 0x0d, 0x6e,
|
||||
0xcc, 0xb1, 0xbc, 0xf9, 0x57, 0xe1, 0xfe, 0x24, 0x8a, 0x45, 0x3f, 0xef, 0x1d, 0x06, 0x34, 0xed,
|
||||
0x04, 0x94, 0xa7, 0x94, 0x9b, 0x3f, 0x2f, 0x79, 0x78, 0xd3, 0x11, 0xe3, 0x01, 0xe1, 0x87, 0xe7,
|
||||
0x99, 0xb8, 0x2f, 0xdc, 0x5d, 0xbd, 0xd8, 0x05, 0x2a, 0x0f, 0x35, 0x4a, 0x4b, 0x57, 0x1a, 0xe0,
|
||||
0x18, 0x34, 0x42, 0x4c, 0xfd, 0x6f, 0x28, 0xbb, 0x31, 0x6a, 0x6b, 0x4a, 0xed, 0xea, 0xff, 0x57,
|
||||
0xbb, 0x2d, 0xdc, 0xfa, 0x9b, 0xd3, 0xdf, 0x7c, 0x4e, 0xd9, 0x8d, 0xe2, 0xbc, 0x2f, 0xdc, 0x67,
|
||||
0x5a, 0x7d, 0x9e, 0xd9, 0x43, 0xf5, 0x10, 0xd3, 0x32, 0x0c, 0xfe, 0x16, 0x38, 0x65, 0x00, 0xcf,
|
||||
0x07, 0x03, 0xca, 0x84, 0xa9, 0x86, 0x97, 0xb7, 0x85, 0xdb, 0x30, 0x94, 0x57, 0xda, 0x73, 0x5f,
|
||||
0xb8, 0x1f, 0x2c, 0x90, 0x9a, 0x39, 0x1e, 0x6a, 0x18, 0x5a, 0x13, 0x0a, 0x39, 0xa8, 0x93, 0x78,
|
||||
0x70, 0x74, 0xf2, 0xb1, 0xd9, 0x91, 0xa5, 0x76, 0x74, 0xf9, 0xa4, 0x1d, 0xd5, 0xce, 0xce, 0x2f,
|
||||
0x8f, 0x4e, 0x3e, 0x9e, 0x6c, 0xc8, 0x9c, 0xfd, 0x2c, 0xad, 0x87, 0x6a, 0x1a, 0xea, 0xdd, 0x9c,
|
||||
0x03, 0x03, 0xfd, 0x3e, 0xe6, 0x7d, 0x55, 0x59, 0xd5, 0xee, 0xc1, 0x6d, 0xe1, 0x02, 0xcd, 0xf4,
|
||||
0x25, 0xe6, 0xfd, 0xe9, 0xb9, 0xf4, 0xc6, 0x7f, 0xc0, 0x99, 0x88, 0xf3, 0x74, 0xc2, 0x05, 0xf4,
|
||||
0x64, 0x19, 0x55, 0xae, 0xff, 0xc4, 0xac, 0x7f, 0x63, 0xe9, 0xf5, 0x9f, 0x3c, 0xb6, 0xfe, 0x93,
|
||||
0xf9, 0xf5, 0xeb, 0x98, 0x52, 0xf4, 0x95, 0x11, 0xdd, 0x5c, 0x5a, 0xf4, 0xd5, 0x63, 0xa2, 0xaf,
|
||||
0xe6, 0x45, 0x75, 0x8c, 0x2c, 0xf6, 0x85, 0x4c, 0xb4, 0xed, 0xe5, 0x8b, 0xfd, 0x41, 0x52, 0x1b,
|
||||
0xa5, 0x45, 0xcb, 0xfd, 0x09, 0xb4, 0x02, 0x9a, 0x71, 0x21, 0x6d, 0x19, 0x1d, 0x24, 0xc4, 0x68,
|
||||
0x56, 0x95, 0xe6, 0xf9, 0x93, 0x34, 0x5f, 0x98, 0x5f, 0x83, 0x47, 0xf8, 0x3c, 0xb4, 0x33, 0x6f,
|
||||
0xd6, 0xea, 0x03, 0xe0, 0x0c, 0x88, 0x20, 0x8c, 0xf7, 0x72, 0x16, 0x19, 0x65, 0xa0, 0x94, 0xcf,
|
||||
0x9e, 0xa4, 0x6c, 0xee, 0xc1, 0x22, 0x97, 0x87, 0x9a, 0x53, 0x93, 0x56, 0xfc, 0x16, 0x34, 0x62,
|
||||
0xb9, 0x8c, 0x5e, 0x9e, 0x18, 0xbd, 0x9a, 0xd2, 0x7b, 0xfd, 0x24, 0x3d, 0x73, 0x99, 0xe7, 0x99,
|
||||
0x3c, 0xb4, 0x35, 0x31, 0x68, 0xad, 0x1c, 0xc0, 0x34, 0x8f, 0x99, 0x1f, 0x25, 0x38, 0x88, 0x09,
|
||||
0x33, 0x7a, 0x75, 0xa5, 0xf7, 0xc5, 0x93, 0xf4, 0x3e, 0xd4, 0x7a, 0x0f, 0xd9, 0x3c, 0xe4, 0x48,
|
||||
0xe3, 0x17, 0xda, 0xa6, 0x65, 0x43, 0x50, 0xef, 0x11, 0x96, 0xc4, 0x99, 0x11, 0xdc, 0x52, 0x82,
|
||||
0xa7, 0x4f, 0x12, 0x34, 0x75, 0x3a, 0xcb, 0xe3, 0xa1, 0x9a, 0x86, 0xa5, 0x4a, 0x42, 0xb3, 0x90,
|
||||
0x4e, 0x54, 0xb6, 0x97, 0x57, 0x99, 0xe5, 0xf1, 0x50, 0x4d, 0x43, 0xad, 0x32, 0x02, 0x3b, 0x98,
|
||||
0x31, 0xfa, 0x6e, 0x21, 0x87, 0x50, 0x89, 0x7d, 0xf9, 0x24, 0xb1, 0xe7, 0x5a, 0xec, 0x11, 0x3a,
|
||||
0x0f, 0x6d, 0x2b, 0xeb, 0x5c, 0x16, 0x73, 0x00, 0x23, 0x86, 0xc7, 0x0b, 0xc2, 0xad, 0xe5, 0x0f,
|
||||
0xef, 0x21, 0x9b, 0x87, 0x1c, 0x69, 0x9c, 0x93, 0xfd, 0x23, 0x68, 0xa5, 0x84, 0x45, 0xc4, 0xcf,
|
||||
0x88, 0xe0, 0x83, 0x24, 0x16, 0x46, 0xf8, 0xd9, 0xf2, 0xf7, 0xf1, 0x31, 0x3e, 0x0f, 0x41, 0x65,
|
||||
0xfe, 0xca, 0x58, 0xcb, 0xcb, 0xc1, 0xfb, 0x38, 0x8b, 0xfa, 0x38, 0x36, 0xb2, 0xbb, 0xcb, 0x5f,
|
||||
0x8e, 0x79, 0x26, 0x0f, 0x6d, 0x4d, 0x0c, 0x65, 0xfd, 0x04, 0x38, 0x0b, 0xf2, 0x49, 0xfd, 0x7c,
|
||||
0xb0, 0x7c, 0xfd, 0xcc, 0xf2, 0xc8, 0xf6, 0x43, 0x41, 0xa5, 0x72, 0x61, 0xd9, 0x0d, 0xa7, 0x79,
|
||||
0x61, 0xd9, 0x4d, 0xc7, 0xb9, 0xb0, 0x6c, 0xc7, 0xd9, 0xbe, 0xb0, 0xec, 0x1d, 0xa7, 0x85, 0xb6,
|
||||
0xc6, 0x34, 0xa1, 0xfe, 0xf0, 0x13, 0x3d, 0x09, 0xd5, 0xc8, 0x3b, 0xcc, 0xcd, 0x6f, 0x24, 0x6a,
|
||||
0x04, 0x58, 0xe0, 0x64, 0xcc, 0x4d, 0xaa, 0x90, 0xa3, 0x13, 0x38, 0xf3, 0x6a, 0x77, 0xc0, 0xfa,
|
||||
0x95, 0x90, 0x8d, 0x9b, 0x03, 0x2a, 0x37, 0x64, 0xac, 0xbb, 0x11, 0x24, 0x87, 0xb0, 0x05, 0xd6,
|
||||
0x87, 0x38, 0xc9, 0x75, 0x07, 0x58, 0x45, 0x1a, 0x78, 0x97, 0xa0, 0x79, 0xcd, 0x70, 0xc6, 0x71,
|
||||
0x20, 0x62, 0x9a, 0xbd, 0xa5, 0x11, 0x87, 0x10, 0x58, 0xea, 0x55, 0xd4, 0x73, 0xd5, 0x18, 0xfe,
|
||||
0x0c, 0x58, 0x09, 0x8d, 0x78, 0x7b, 0x6d, 0xbf, 0x72, 0x50, 0x3b, 0x7e, 0xf6, 0xb0, 0x07, 0x7b,
|
||||
0x4b, 0x23, 0xa4, 0x42, 0xbc, 0x7f, 0xac, 0x81, 0xca, 0x5b, 0x1a, 0xc1, 0x36, 0xd8, 0xc4, 0x61,
|
||||
0xc8, 0x08, 0xe7, 0x86, 0x69, 0x02, 0xe1, 0x2e, 0xd8, 0x10, 0x74, 0x10, 0x07, 0x9a, 0xae, 0x8a,
|
||||
0x0c, 0x92, 0xc2, 0x21, 0x16, 0x58, 0xf5, 0x15, 0x75, 0xa4, 0xc6, 0xf0, 0x18, 0xd4, 0xd5, 0xce,
|
||||
0xfc, 0x2c, 0x4f, 0x7b, 0x84, 0xa9, 0xf6, 0xc0, 0xea, 0x36, 0xef, 0x0a, 0xb7, 0xa6, 0xec, 0x5f,
|
||||
0x29, 0x33, 0x9a, 0x05, 0xf0, 0x23, 0xb0, 0x29, 0x46, 0xb3, 0x2f, 0xfb, 0xce, 0x5d, 0xe1, 0x36,
|
||||
0xc5, 0x74, 0x9b, 0xf2, 0xe1, 0x46, 0x1b, 0x62, 0xa4, 0x1e, 0xf0, 0x0e, 0xb0, 0xc5, 0xc8, 0x8f,
|
||||
0xb3, 0x90, 0x8c, 0xd4, 0xe3, 0x6d, 0x75, 0x5b, 0x77, 0x85, 0xeb, 0xcc, 0x84, 0x9f, 0x4b, 0x1f,
|
||||
0xda, 0x14, 0x23, 0x35, 0x80, 0x1f, 0x01, 0xa0, 0x97, 0xa4, 0x14, 0xf4, 0xd3, 0xbb, 0x75, 0x57,
|
||||
0xb8, 0x55, 0x65, 0x55, 0xdc, 0xd3, 0x21, 0xf4, 0xc0, 0xba, 0xe6, 0xb6, 0x15, 0x77, 0xfd, 0xae,
|
||||
0x70, 0xed, 0x84, 0x46, 0x9a, 0x53, 0xbb, 0x64, 0xaa, 0x18, 0x49, 0xe9, 0x90, 0x84, 0xea, 0x75,
|
||||
0xb3, 0xd1, 0x04, 0x7a, 0x7f, 0x5d, 0x03, 0xf6, 0xf5, 0x08, 0x11, 0x9e, 0x27, 0x02, 0x7e, 0x0e,
|
||||
0x9c, 0x80, 0x66, 0x82, 0xe1, 0x40, 0xf8, 0x73, 0xa9, 0xed, 0xbe, 0x98, 0xbe, 0x34, 0x8b, 0x11,
|
||||
0x1e, 0x6a, 0x4e, 0x4c, 0xa7, 0x26, 0xff, 0x2d, 0xb0, 0xde, 0x4b, 0x28, 0x4d, 0x55, 0x25, 0xd4,
|
||||
0x91, 0x06, 0x10, 0xa9, 0xac, 0xa9, 0x53, 0xae, 0xa8, 0x4e, 0xfb, 0xc7, 0x0f, 0x4f, 0x79, 0xa1,
|
||||
0x54, 0xba, 0xbb, 0xa6, 0xdb, 0x6e, 0x68, 0x6d, 0x33, 0xdf, 0x93, 0xb9, 0x55, 0xa5, 0xe4, 0x80,
|
||||
0x0a, 0x23, 0x42, 0x1d, 0x5a, 0x1d, 0xc9, 0x21, 0x7c, 0x0e, 0x6c, 0x46, 0x86, 0x84, 0x09, 0x12,
|
||||
0xaa, 0xc3, 0xb1, 0x51, 0x89, 0xe1, 0x87, 0xc0, 0x8e, 0x30, 0xf7, 0x73, 0x4e, 0x42, 0x7d, 0x12,
|
||||
0x68, 0x33, 0xc2, 0xfc, 0x6b, 0x4e, 0xc2, 0x4f, 0xad, 0x3f, 0x7f, 0xe7, 0xae, 0x78, 0x18, 0xd4,
|
||||
0x4e, 0x83, 0x80, 0x70, 0x7e, 0x9d, 0x0f, 0x12, 0xf2, 0x5f, 0x2a, 0xec, 0x18, 0xd4, 0xb9, 0xa0,
|
||||
0x0c, 0x47, 0xc4, 0xbf, 0x21, 0x63, 0x53, 0x67, 0xba, 0x6a, 0x8c, 0xfd, 0x57, 0x64, 0xcc, 0xd1,
|
||||
0x2c, 0x30, 0x12, 0xdf, 0x59, 0xa0, 0x76, 0xcd, 0x70, 0x40, 0x4c, 0x87, 0x2f, 0x6b, 0x55, 0x42,
|
||||
0x66, 0x24, 0x0c, 0x92, 0xda, 0x22, 0x4e, 0x09, 0xcd, 0x85, 0xb9, 0x4f, 0x13, 0x28, 0x67, 0x30,
|
||||
0x42, 0x46, 0x24, 0x50, 0x69, 0xb4, 0x90, 0x41, 0xf0, 0x04, 0x6c, 0x85, 0x31, 0x57, 0x9f, 0x4b,
|
||||
0x5c, 0xe0, 0xe0, 0x46, 0x6f, 0xbf, 0xeb, 0xdc, 0x15, 0x6e, 0xdd, 0x38, 0xae, 0xa4, 0x1d, 0xcd,
|
||||
0x21, 0xf8, 0x19, 0x68, 0x4e, 0xa7, 0xa9, 0xd5, 0xea, 0x0f, 0x94, 0x2e, 0xbc, 0x2b, 0xdc, 0x46,
|
||||
0x19, 0xaa, 0x3c, 0x68, 0x01, 0xcb, 0x93, 0x0e, 0x49, 0x2f, 0x8f, 0x54, 0xf1, 0xd9, 0x48, 0x03,
|
||||
0x69, 0x4d, 0xe2, 0x34, 0x16, 0xaa, 0xd8, 0xd6, 0x91, 0x06, 0xf0, 0x33, 0x50, 0xa5, 0x43, 0xc2,
|
||||
0x58, 0x1c, 0x12, 0xae, 0x5a, 0x9d, 0xff, 0xf5, 0xad, 0x85, 0xa6, 0xf1, 0x72, 0x73, 0xe6, 0x53,
|
||||
0x30, 0x25, 0x29, 0x65, 0x63, 0xd5, 0xbb, 0x98, 0xcd, 0x69, 0xc7, 0xaf, 0x95, 0x1d, 0xcd, 0x21,
|
||||
0xd8, 0x05, 0xd0, 0x4c, 0x63, 0x44, 0xe4, 0x2c, 0xf3, 0xd5, 0xfd, 0xaf, 0xab, 0xb9, 0xea, 0x16,
|
||||
0x6a, 0x2f, 0x52, 0xce, 0x37, 0x58, 0x60, 0xf4, 0xc0, 0x02, 0x7f, 0x09, 0xa0, 0x3e, 0x13, 0xff,
|
||||
0x5b, 0x4e, 0xcb, 0x8f, 0x45, 0xdd, 0x5a, 0x28, 0x7d, 0xed, 0x35, 0x6b, 0x76, 0x34, 0xba, 0xe0,
|
||||
0xd4, 0xec, 0xe2, 0xc2, 0xb2, 0x2d, 0x67, 0xfd, 0xc2, 0xb2, 0x37, 0x1d, 0xbb, 0xcc, 0x9f, 0xd9,
|
||||
0x05, 0xda, 0x99, 0xe0, 0x99, 0xe5, 0x75, 0x4f, 0xbf, 0xbf, 0xdd, 0x5b, 0xfd, 0xe1, 0x76, 0x6f,
|
||||
0xf5, 0xdf, 0xb7, 0x7b, 0xab, 0x7f, 0x7b, 0xbf, 0xb7, 0xf2, 0xc3, 0xfb, 0xbd, 0x95, 0x7f, 0xbe,
|
||||
0xdf, 0x5b, 0xf9, 0xdd, 0x4f, 0x67, 0xdf, 0x07, 0xc2, 0x82, 0x97, 0x31, 0xed, 0x24, 0x38, 0xa0,
|
||||
0x59, 0x1c, 0x84, 0x9d, 0x91, 0xfa, 0x17, 0x80, 0x7a, 0x24, 0x7a, 0x1b, 0xea, 0xd3, 0xfe, 0x93,
|
||||
0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x56, 0x5d, 0x52, 0xcc, 0x20, 0x10, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Params) Marshal() (dAtA []byte, err error) {
|
||||
@@ -878,6 +902,34 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.CancunBlock != nil {
|
||||
{
|
||||
size := m.CancunBlock.Size()
|
||||
i -= size
|
||||
if _, err := m.CancunBlock.MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintEvm(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xba
|
||||
}
|
||||
if m.ShanghaiBlock != nil {
|
||||
{
|
||||
size := m.ShanghaiBlock.Size()
|
||||
i -= size
|
||||
if _, err := m.ShanghaiBlock.MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintEvm(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xb2
|
||||
}
|
||||
if m.MergeNetsplitBlock != nil {
|
||||
{
|
||||
size := m.MergeNetsplitBlock.Size()
|
||||
@@ -1380,6 +1432,13 @@ func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.TracerJsonConfig) > 0 {
|
||||
i -= len(m.TracerJsonConfig)
|
||||
copy(dAtA[i:], m.TracerJsonConfig)
|
||||
i = encodeVarintEvm(dAtA, i, uint64(len(m.TracerJsonConfig)))
|
||||
i--
|
||||
dAtA[i] = 0x6a
|
||||
}
|
||||
if m.EnableReturnData {
|
||||
i--
|
||||
if m.EnableReturnData {
|
||||
@@ -1584,6 +1643,14 @@ func (m *ChainConfig) Size() (n int) {
|
||||
l = m.MergeNetsplitBlock.Size()
|
||||
n += 2 + l + sovEvm(uint64(l))
|
||||
}
|
||||
if m.ShanghaiBlock != nil {
|
||||
l = m.ShanghaiBlock.Size()
|
||||
n += 2 + l + sovEvm(uint64(l))
|
||||
}
|
||||
if m.CancunBlock != nil {
|
||||
l = m.CancunBlock.Size()
|
||||
n += 2 + l + sovEvm(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -1753,6 +1820,10 @@ func (m *TraceConfig) Size() (n int) {
|
||||
if m.EnableReturnData {
|
||||
n += 2
|
||||
}
|
||||
l = len(m.TracerJsonConfig)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovEvm(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -2634,6 +2705,78 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 22:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ShanghaiBlock", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowEvm
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var v github_com_cosmos_cosmos_sdk_types.Int
|
||||
m.ShanghaiBlock = &v
|
||||
if err := m.ShanghaiBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 23:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CancunBlock", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowEvm
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var v github_com_cosmos_cosmos_sdk_types.Int
|
||||
m.CancunBlock = &v
|
||||
if err := m.CancunBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipEvm(dAtA[iNdEx:])
|
||||
@@ -3777,6 +3920,38 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
}
|
||||
m.EnableReturnData = bool(v != 0)
|
||||
case 13:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field TracerJsonConfig", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowEvm
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthEvm
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.TracerJsonConfig = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipEvm(dAtA[iNdEx:])
|
||||
|
||||
Generated
+22
-22
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
@@ -152,27 +152,27 @@ func init() {
|
||||
func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescriptor_9bcdec50cc9d156d) }
|
||||
|
||||
var fileDescriptor_9bcdec50cc9d156d = []byte{
|
||||
// 308 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xf3, 0x30,
|
||||
0x14, 0x85, 0xe3, 0xbf, 0x55, 0xfb, 0xd7, 0x45, 0x80, 0x2c, 0x24, 0xa2, 0x0e, 0x6e, 0xd5, 0x85,
|
||||
0x2e, 0xd8, 0x6a, 0x91, 0xd8, 0x9b, 0x85, 0x15, 0xa5, 0x1b, 0x9b, 0xeb, 0x5c, 0xa5, 0x91, 0x48,
|
||||
0x5c, 0xd9, 0x6e, 0x04, 0x2b, 0x23, 0x13, 0xcf, 0xc1, 0x93, 0x74, 0xec, 0xc8, 0x04, 0xa8, 0x79,
|
||||
0x11, 0x14, 0x27, 0xad, 0x04, 0xd9, 0xae, 0x75, 0xbe, 0x73, 0xce, 0xf5, 0xc5, 0x14, 0xec, 0x0a,
|
||||
0x74, 0x9a, 0x64, 0x96, 0x43, 0x9e, 0xf2, 0x7c, 0xca, 0x63, 0xc8, 0xc0, 0x24, 0x86, 0xad, 0xb5,
|
||||
0xb2, 0x8a, 0x9c, 0x1f, 0x75, 0x06, 0x79, 0xca, 0xf2, 0xe9, 0xe0, 0x22, 0x56, 0xb1, 0x72, 0x22,
|
||||
0x2f, 0xa7, 0x8a, 0x1b, 0x0c, 0x1a, 0x39, 0x25, 0xee, 0xb4, 0xf1, 0x2b, 0xc2, 0x27, 0x77, 0x55,
|
||||
0xea, 0xc2, 0x0a, 0x0b, 0x24, 0xc0, 0xff, 0x85, 0x94, 0x6a, 0x93, 0x59, 0xe3, 0xa3, 0x51, 0x6b,
|
||||
0xd2, 0x9f, 0x8d, 0xd8, 0xdf, 0x1e, 0x56, 0x3b, 0xe6, 0x15, 0x18, 0xb4, 0xb7, 0x9f, 0x43, 0x2f,
|
||||
0x3c, 0xfa, 0xc8, 0x2d, 0xee, 0xac, 0x85, 0x16, 0xa9, 0xf1, 0xff, 0x8d, 0xd0, 0xa4, 0x3f, 0xf3,
|
||||
0x9b, 0x09, 0xf7, 0x4e, 0xaf, 0x9d, 0x35, 0x3d, 0x7e, 0x41, 0xf8, 0xf4, 0x77, 0x34, 0xf1, 0x71,
|
||||
0x57, 0x44, 0x91, 0x06, 0x53, 0x6e, 0x83, 0x26, 0xbd, 0xf0, 0xf0, 0x24, 0x04, 0xb7, 0xa5, 0x8a,
|
||||
0xc0, 0x55, 0xf4, 0x42, 0x37, 0x93, 0x00, 0x77, 0x8d, 0x55, 0x5a, 0xc4, 0xe0, 0xb7, 0xdc, 0xee,
|
||||
0x97, 0xcd, 0x66, 0xf7, 0xcd, 0xe0, 0xac, 0x2c, 0x7e, 0xff, 0x1a, 0x76, 0x17, 0x15, 0x1f, 0x1e,
|
||||
0x8c, 0xc1, 0x7c, 0xbb, 0xa7, 0x68, 0xb7, 0xa7, 0xe8, 0x7b, 0x4f, 0xd1, 0x5b, 0x41, 0xbd, 0x5d,
|
||||
0x41, 0xbd, 0x8f, 0x82, 0x7a, 0x0f, 0x57, 0x71, 0x62, 0x57, 0x9b, 0x25, 0x93, 0x2a, 0xe5, 0x12,
|
||||
0xb4, 0xbc, 0x4e, 0x14, 0x7f, 0x14, 0x52, 0x65, 0x89, 0x8c, 0xf8, 0x93, 0xbb, 0xad, 0x7d, 0x5e,
|
||||
0x83, 0x59, 0x76, 0xdc, 0x6d, 0x6f, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x50, 0xbd, 0xc3, 0x62,
|
||||
0xc1, 0x01, 0x00, 0x00,
|
||||
// 306 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x50, 0xbd, 0x4e, 0xeb, 0x30,
|
||||
0x14, 0x8e, 0x6f, 0xab, 0xf6, 0xd6, 0x45, 0x80, 0x2c, 0x24, 0xa2, 0x0e, 0x6e, 0xd5, 0x85, 0x2e,
|
||||
0xd8, 0x6a, 0x91, 0xd8, 0x9b, 0x85, 0x15, 0xa5, 0x1b, 0x9b, 0xeb, 0x1c, 0xa5, 0x91, 0x48, 0x5c,
|
||||
0xd9, 0x6e, 0x04, 0x2b, 0x23, 0x13, 0xcf, 0xc1, 0x93, 0x74, 0xec, 0xc8, 0x04, 0xa8, 0x79, 0x11,
|
||||
0x14, 0x27, 0xad, 0x04, 0xd9, 0x3e, 0xfb, 0xfb, 0x3b, 0xe7, 0x60, 0x0a, 0x76, 0x05, 0x3a, 0x4d,
|
||||
0x32, 0xcb, 0x21, 0x4f, 0x79, 0x3e, 0xe5, 0x31, 0x64, 0x60, 0x12, 0xc3, 0xd6, 0x5a, 0x59, 0x45,
|
||||
0xce, 0x8f, 0x3c, 0x83, 0x3c, 0x65, 0xf9, 0x74, 0x30, 0x68, 0x38, 0x4a, 0xc2, 0xa9, 0x07, 0x17,
|
||||
0xb1, 0x8a, 0x95, 0x83, 0xbc, 0x44, 0xd5, 0xef, 0xf8, 0x15, 0xe1, 0x93, 0xbb, 0x2a, 0x75, 0x61,
|
||||
0x85, 0x05, 0x12, 0xe0, 0xff, 0x42, 0x4a, 0xb5, 0xc9, 0xac, 0xf1, 0xd1, 0xa8, 0x35, 0xe9, 0xcf,
|
||||
0x46, 0xec, 0x6f, 0x0f, 0xab, 0x1d, 0xf3, 0x4a, 0x18, 0xb4, 0xb7, 0x9f, 0x43, 0x2f, 0x3c, 0xfa,
|
||||
0xc8, 0x2d, 0xee, 0xac, 0x85, 0x16, 0xa9, 0xf1, 0xff, 0x8d, 0xd0, 0xa4, 0x3f, 0xf3, 0x9b, 0x09,
|
||||
0xf7, 0x8e, 0xaf, 0x9d, 0xb5, 0x7a, 0xfc, 0x82, 0xf0, 0xe9, 0xef, 0x68, 0xe2, 0xe3, 0xae, 0x88,
|
||||
0x22, 0x0d, 0xa6, 0x9c, 0x06, 0x4d, 0x7a, 0xe1, 0xe1, 0x49, 0x08, 0x6e, 0x4b, 0x15, 0x81, 0xab,
|
||||
0xe8, 0x85, 0x0e, 0x93, 0x00, 0x77, 0x8d, 0x55, 0x5a, 0xc4, 0xe0, 0xb7, 0xdc, 0xec, 0x97, 0xcd,
|
||||
0x66, 0xb7, 0x66, 0x70, 0x56, 0x16, 0xbf, 0x7f, 0x0d, 0xbb, 0x8b, 0x4a, 0x1f, 0x1e, 0x8c, 0xc1,
|
||||
0x7c, 0xbb, 0xa7, 0x68, 0xb7, 0xa7, 0xe8, 0x7b, 0x4f, 0xd1, 0x5b, 0x41, 0xbd, 0x5d, 0x41, 0xbd,
|
||||
0x8f, 0x82, 0x7a, 0x0f, 0x57, 0x71, 0x62, 0x57, 0x9b, 0x25, 0x93, 0x2a, 0xe5, 0x12, 0xb4, 0xbc,
|
||||
0x4e, 0x14, 0x7f, 0x14, 0x52, 0x65, 0x89, 0x8c, 0xf8, 0x93, 0xbb, 0xb8, 0x7d, 0x5e, 0x83, 0x59,
|
||||
0x76, 0xdc, 0x6d, 0x6f, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x40, 0x85, 0xb0, 0xbb, 0xc1, 0x01,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package types
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
)
|
||||
@@ -160,31 +160,31 @@ func (tx *LegacyTx) SetSignatureValues(_, v, r, s *big.Int) {
|
||||
func (tx LegacyTx) Validate() error {
|
||||
gasPrice := tx.GetGasPrice()
|
||||
if gasPrice == nil {
|
||||
return sdkerrors.Wrap(ErrInvalidGasPrice, "gas price cannot be nil")
|
||||
return errorsmod.Wrap(ErrInvalidGasPrice, "gas price cannot be nil")
|
||||
}
|
||||
|
||||
if gasPrice.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice)
|
||||
return errorsmod.Wrapf(ErrInvalidGasPrice, "gas price cannot be negative %s", gasPrice)
|
||||
}
|
||||
if !types.IsValidInt256(gasPrice) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasPrice, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasPrice, "out of bound")
|
||||
}
|
||||
if !types.IsValidInt256(tx.Fee()) {
|
||||
return sdkerrors.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidGasFee, "out of bound")
|
||||
}
|
||||
|
||||
amount := tx.GetValue()
|
||||
// Amount can be 0
|
||||
if amount != nil && amount.Sign() == -1 {
|
||||
return sdkerrors.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount)
|
||||
}
|
||||
if !types.IsValidInt256(amount) {
|
||||
return sdkerrors.Wrap(ErrInvalidAmount, "out of bound")
|
||||
return errorsmod.Wrap(ErrInvalidAmount, "out of bound")
|
||||
}
|
||||
|
||||
if tx.To != "" {
|
||||
if err := types.ValidateAddress(tx.To); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid to address")
|
||||
return errorsmod.Wrap(err, "invalid to address")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-6
@@ -7,11 +7,12 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/ante"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/signing"
|
||||
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
@@ -165,23 +166,23 @@ func (msg MsgEthereumTx) Type() string { return TypeMsgEthereumTx }
|
||||
func (msg MsgEthereumTx) ValidateBasic() error {
|
||||
if msg.From != "" {
|
||||
if err := types.ValidateAddress(msg.From); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid from address")
|
||||
return errorsmod.Wrap(err, "invalid from address")
|
||||
}
|
||||
}
|
||||
|
||||
// Validate Size_ field, should be kept empty
|
||||
if msg.Size_ != 0 {
|
||||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "tx size is deprecated")
|
||||
return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "tx size is deprecated")
|
||||
}
|
||||
|
||||
txData, err := UnpackTxData(msg.Data)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(err, "failed to unpack tx data")
|
||||
return errorsmod.Wrap(err, "failed to unpack tx data")
|
||||
}
|
||||
|
||||
// prevent txs with 0 gas to fill up the mempool
|
||||
if txData.GetGas() == 0 {
|
||||
return sdkerrors.Wrap(ErrInvalidGasLimit, "gas limit must not be zero")
|
||||
return errorsmod.Wrap(ErrInvalidGasLimit, "gas limit must not be zero")
|
||||
}
|
||||
|
||||
if err := txData.Validate(); err != nil {
|
||||
@@ -191,7 +192,7 @@ func (msg MsgEthereumTx) ValidateBasic() error {
|
||||
// Validate Hash field after validated txData to avoid panic
|
||||
txHash := msg.AsTransaction().Hash().Hex()
|
||||
if msg.Hash != txHash {
|
||||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid tx hash %s, expected: %s", msg.Hash, txHash)
|
||||
return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid tx hash %s, expected: %s", msg.Hash, txHash)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Generated
+387
-111
@@ -8,15 +8,15 @@ import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
_ "google.golang.org/protobuf/types/known/timestamppb"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
@@ -78,7 +78,7 @@ var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo
|
||||
type QueryAccountResponse struct {
|
||||
// balance is the balance of the EVM denomination.
|
||||
Balance string `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"`
|
||||
// code hash is the hex-formatted code bytes from the EOA.
|
||||
// code_hash is the hex-formatted code bytes from the EOA.
|
||||
CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"`
|
||||
// nonce is the account's sequence number.
|
||||
Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
||||
@@ -185,7 +185,7 @@ type QueryCosmosAccountResponse struct {
|
||||
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
|
||||
// sequence is the account's sequence number.
|
||||
Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
|
||||
// account_number is the account numbert
|
||||
// account_number is the account number
|
||||
AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"`
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ func (m *QueryBalanceResponse) GetBalance() string {
|
||||
|
||||
// QueryStorageRequest is the request type for the Query/Storage RPC method.
|
||||
type QueryStorageRequest struct {
|
||||
/// address is the ethereum hex address to query the storage state for.
|
||||
// address is the ethereum hex address to query the storage state for.
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
// key defines the key of the storage state
|
||||
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
@@ -477,7 +477,7 @@ var xxx_messageInfo_QueryStorageRequest proto.InternalMessageInfo
|
||||
// QueryStorageResponse is the response type for the Query/Storage RPC
|
||||
// method.
|
||||
type QueryStorageResponse struct {
|
||||
// key defines the storage state value hash associated with the given key.
|
||||
// value defines the storage state value hash associated with the given key.
|
||||
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ func (m *QueryTxLogsRequest) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_QueryTxLogsRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryTxLogs is the response type for the Query/TxLogs RPC method.
|
||||
// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method.
|
||||
type QueryTxLogsResponse struct {
|
||||
// logs represents the ethereum logs generated from the given transaction.
|
||||
Logs []*Log `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
|
||||
@@ -788,10 +788,14 @@ func (m *QueryParamsResponse) GetParams() Params {
|
||||
|
||||
// EthCallRequest defines EthCall request
|
||||
type EthCallRequest struct {
|
||||
// same json format as the json rpc api.
|
||||
// args uses the same json format as the json rpc api.
|
||||
Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"`
|
||||
// the default gas cap to be used
|
||||
// gas_cap defines the default gas cap to be used
|
||||
GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"`
|
||||
// proposer_address of the requested block in hex format
|
||||
ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"`
|
||||
// chain_id is the eip155 chain id parsed from the requested block header
|
||||
ChainId int64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *EthCallRequest) Reset() { *m = EthCallRequest{} }
|
||||
@@ -841,9 +845,23 @@ func (m *EthCallRequest) GetGasCap() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *EthCallRequest) GetChainId() int64 {
|
||||
if m != nil {
|
||||
return m.ChainId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// EstimateGasResponse defines EstimateGas response
|
||||
type EstimateGasResponse struct {
|
||||
// the estimated gas
|
||||
// gas returns the estimated gas
|
||||
Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"`
|
||||
}
|
||||
|
||||
@@ -889,19 +907,23 @@ func (m *EstimateGasResponse) GetGas() uint64 {
|
||||
|
||||
// QueryTraceTxRequest defines TraceTx request
|
||||
type QueryTraceTxRequest struct {
|
||||
// msgEthereumTx for the requested transaction
|
||||
// msg is the MsgEthereumTx for the requested transaction
|
||||
Msg *MsgEthereumTx `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
// TraceConfig holds extra parameters to trace functions.
|
||||
// trace_config holds extra parameters to trace functions.
|
||||
TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"`
|
||||
// the predecessor transactions included in the same block
|
||||
// predecessors is an array of transactions included in the same block
|
||||
// need to be replayed first to get correct context for tracing.
|
||||
Predecessors []*MsgEthereumTx `protobuf:"bytes,4,rep,name=predecessors,proto3" json:"predecessors,omitempty"`
|
||||
// block number of requested transaction
|
||||
// block_number of requested transaction
|
||||
BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
|
||||
// block hex hash of requested transaction
|
||||
// block_hash of requested transaction
|
||||
BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
|
||||
// block time of requested transaction
|
||||
// block_time of requested transaction
|
||||
BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"`
|
||||
// proposer_address is the proposer of the requested block
|
||||
ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"`
|
||||
// chain_id is the the eip155 chain id parsed from the requested block header
|
||||
ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} }
|
||||
@@ -979,9 +1001,23 @@ func (m *QueryTraceTxRequest) GetBlockTime() time.Time {
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryTraceTxRequest) GetChainId() int64 {
|
||||
if m != nil {
|
||||
return m.ChainId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// QueryTraceTxResponse defines TraceTx response
|
||||
type QueryTraceTxResponse struct {
|
||||
// response serialized in bytes
|
||||
// data is the response serialized in bytes
|
||||
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
@@ -1027,16 +1063,20 @@ func (m *QueryTraceTxResponse) GetData() []byte {
|
||||
|
||||
// QueryTraceBlockRequest defines TraceTx request
|
||||
type QueryTraceBlockRequest struct {
|
||||
// txs messages in the block
|
||||
// txs is an array of messages in the block
|
||||
Txs []*MsgEthereumTx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
|
||||
// TraceConfig holds extra parameters to trace functions.
|
||||
// trace_config holds extra parameters to trace functions.
|
||||
TraceConfig *TraceConfig `protobuf:"bytes,3,opt,name=trace_config,json=traceConfig,proto3" json:"trace_config,omitempty"`
|
||||
// block number
|
||||
// block_number of the traced block
|
||||
BlockNumber int64 `protobuf:"varint,5,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
|
||||
// block hex hash
|
||||
// block_hash (hex) of the traced block
|
||||
BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
|
||||
// block time
|
||||
// block_time of the traced block
|
||||
BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"`
|
||||
// proposer_address is the address of the requested block
|
||||
ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"`
|
||||
// chain_id is the eip155 chain id parsed from the requested block header
|
||||
ChainId int64 `protobuf:"varint,9,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} }
|
||||
@@ -1107,8 +1147,23 @@ func (m *QueryTraceBlockRequest) GetBlockTime() time.Time {
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryTraceBlockRequest) GetChainId() int64 {
|
||||
if m != nil {
|
||||
return m.ChainId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// QueryTraceBlockResponse defines TraceBlock response
|
||||
type QueryTraceBlockResponse struct {
|
||||
// data is the response serialized in bytes
|
||||
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
@@ -1190,8 +1245,9 @@ func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo
|
||||
|
||||
// BaseFeeResponse returns the EIP1559 base fee.
|
||||
// QueryBaseFeeResponse returns the EIP1559 base fee.
|
||||
type QueryBaseFeeResponse struct {
|
||||
// base_fee is the EIP1559 base fee
|
||||
BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"`
|
||||
}
|
||||
|
||||
@@ -1258,94 +1314,98 @@ func init() {
|
||||
func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) }
|
||||
|
||||
var fileDescriptor_e15a877459347994 = []byte{
|
||||
// 1377 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xcf, 0x26, 0x4e, 0xec, 0x3e, 0xa7, 0x25, 0x4c, 0x53, 0xea, 0x2e, 0x89, 0x9d, 0x6e, 0x9b,
|
||||
0xbf, 0x4d, 0x77, 0x89, 0x41, 0x95, 0xa8, 0x84, 0x20, 0x89, 0xd2, 0x02, 0x6d, 0x51, 0x31, 0x11,
|
||||
0x07, 0x24, 0x64, 0x8d, 0xd7, 0xd3, 0xb5, 0x15, 0x7b, 0xc7, 0xf5, 0x8c, 0x8d, 0xd3, 0x52, 0x0e,
|
||||
0x48, 0x54, 0x45, 0xbd, 0x54, 0x82, 0x33, 0xea, 0x37, 0xe0, 0x6b, 0xf4, 0x58, 0x89, 0x0b, 0xe2,
|
||||
0x50, 0x50, 0x8b, 0x10, 0x37, 0xbe, 0x02, 0x9a, 0x3f, 0x6b, 0xaf, 0xbd, 0x5e, 0x3b, 0x45, 0x3d,
|
||||
0x70, 0xda, 0xf9, 0xf3, 0xe6, 0xfd, 0x7e, 0xf3, 0xe6, 0xed, 0xfb, 0x3d, 0x58, 0x20, 0xbc, 0x42,
|
||||
0x9a, 0xf5, 0xaa, 0xcf, 0x1d, 0xd2, 0xae, 0x3b, 0xed, 0x2d, 0xe7, 0x76, 0x8b, 0x34, 0x0f, 0xed,
|
||||
0x46, 0x93, 0x72, 0x8a, 0xe6, 0xba, 0xbb, 0x36, 0x69, 0xd7, 0xed, 0xf6, 0x96, 0x39, 0xef, 0x51,
|
||||
0x8f, 0xca, 0x4d, 0x47, 0x8c, 0x94, 0x9d, 0xb9, 0xe1, 0x52, 0x56, 0xa7, 0xcc, 0x29, 0x61, 0x46,
|
||||
0x94, 0x03, 0xa7, 0xbd, 0x55, 0x22, 0x1c, 0x6f, 0x39, 0x0d, 0xec, 0x55, 0x7d, 0xcc, 0xab, 0xd4,
|
||||
0xd7, 0xb6, 0x0b, 0x1e, 0xa5, 0x5e, 0x8d, 0x38, 0xb8, 0x51, 0x75, 0xb0, 0xef, 0x53, 0x2e, 0x37,
|
||||
0x99, 0xde, 0x35, 0x23, 0x7c, 0x04, 0xb0, 0xda, 0x3b, 0x13, 0xd9, 0xe3, 0x1d, 0xbd, 0x95, 0xd3,
|
||||
0x4e, 0xe5, 0xac, 0xd4, 0xba, 0xe5, 0xf0, 0x6a, 0x9d, 0x30, 0x8e, 0xeb, 0x0d, 0x65, 0x60, 0xbd,
|
||||
0x0b, 0x27, 0x3f, 0x15, 0xbc, 0xb6, 0x5d, 0x97, 0xb6, 0x7c, 0x5e, 0x20, 0xb7, 0x5b, 0x84, 0x71,
|
||||
0x94, 0x81, 0x24, 0x2e, 0x97, 0x9b, 0x84, 0xb1, 0x8c, 0xb1, 0x64, 0xac, 0x1d, 0x2b, 0x04, 0xd3,
|
||||
0xcb, 0xa9, 0x07, 0x8f, 0x73, 0x13, 0x7f, 0x3f, 0xce, 0x4d, 0x58, 0x2e, 0xcc, 0xf7, 0x1f, 0x65,
|
||||
0x0d, 0xea, 0x33, 0x22, 0xce, 0x96, 0x70, 0x0d, 0xfb, 0x2e, 0x09, 0xce, 0xea, 0x29, 0x7a, 0x13,
|
||||
0x8e, 0xb9, 0xb4, 0x4c, 0x8a, 0x15, 0xcc, 0x2a, 0x99, 0x49, 0xb9, 0x97, 0x12, 0x0b, 0x1f, 0x62,
|
||||
0x56, 0x41, 0xf3, 0x30, 0xed, 0x53, 0x71, 0x68, 0x6a, 0xc9, 0x58, 0x4b, 0x14, 0xd4, 0xc4, 0x7a,
|
||||
0x1f, 0xce, 0x48, 0x90, 0x5d, 0x19, 0xc8, 0xff, 0xc0, 0xf2, 0xbe, 0x01, 0xe6, 0x30, 0x0f, 0x9a,
|
||||
0xec, 0x32, 0x9c, 0x50, 0x6f, 0x54, 0xec, 0xf7, 0x74, 0x5c, 0xad, 0x6e, 0xab, 0x45, 0x64, 0x42,
|
||||
0x8a, 0x09, 0x50, 0xc1, 0x6f, 0x52, 0xf2, 0xeb, 0xce, 0x85, 0x0b, 0xac, 0xbc, 0x16, 0xfd, 0x56,
|
||||
0xbd, 0x44, 0x9a, 0xfa, 0x06, 0xc7, 0xf5, 0xea, 0x27, 0x72, 0xd1, 0xba, 0x06, 0x0b, 0x92, 0xc7,
|
||||
0xe7, 0xb8, 0x56, 0x2d, 0x63, 0x4e, 0x9b, 0x03, 0x97, 0x39, 0x0b, 0xb3, 0x2e, 0xf5, 0x07, 0x79,
|
||||
0xa4, 0xc5, 0xda, 0x76, 0xe4, 0x56, 0x0f, 0x0d, 0x58, 0x8c, 0xf1, 0xa6, 0x2f, 0xb6, 0x0a, 0xaf,
|
||||
0x05, 0xac, 0xfa, 0x3d, 0x06, 0x64, 0x5f, 0xe1, 0xd5, 0x82, 0x24, 0xda, 0x51, 0xef, 0xfc, 0x32,
|
||||
0xcf, 0xf3, 0x96, 0x4e, 0xa2, 0xee, 0xd1, 0x71, 0x49, 0x64, 0x5d, 0xd3, 0x60, 0x9f, 0x71, 0xda,
|
||||
0xc4, 0xde, 0x78, 0x30, 0x34, 0x07, 0x53, 0x07, 0xe4, 0x50, 0xe7, 0x9b, 0x18, 0x86, 0xe0, 0x37,
|
||||
0x35, 0x7c, 0xd7, 0x99, 0x86, 0x9f, 0x87, 0xe9, 0x36, 0xae, 0xb5, 0x02, 0x70, 0x35, 0xb1, 0x2e,
|
||||
0xc1, 0x9c, 0x4e, 0xa5, 0xf2, 0x4b, 0x5d, 0x72, 0x15, 0x5e, 0x0f, 0x9d, 0xd3, 0x10, 0x08, 0x12,
|
||||
0x22, 0xf7, 0xe5, 0xa9, 0xd9, 0x82, 0x1c, 0x5b, 0x77, 0x00, 0x49, 0xc3, 0xfd, 0xce, 0x75, 0xea,
|
||||
0xb1, 0x00, 0x02, 0x41, 0x42, 0xfe, 0x31, 0xca, 0xbf, 0x1c, 0xa3, 0x2b, 0x00, 0xbd, 0x0a, 0x22,
|
||||
0xef, 0x96, 0xce, 0xaf, 0xd8, 0x2a, 0x69, 0x6d, 0x51, 0x6e, 0x6c, 0x55, 0xaf, 0x74, 0xb9, 0xb1,
|
||||
0x6f, 0xf6, 0x42, 0x55, 0x08, 0x9d, 0x0c, 0x91, 0xfc, 0xde, 0xd0, 0x81, 0x0d, 0xc0, 0x35, 0xcf,
|
||||
0x75, 0x48, 0xd4, 0xa8, 0x27, 0x6e, 0x37, 0xb5, 0x96, 0xce, 0x9f, 0xb2, 0x07, 0x4b, 0x9f, 0x7d,
|
||||
0x9d, 0x7a, 0x05, 0x69, 0x82, 0xae, 0x0e, 0x21, 0xb5, 0x3a, 0x96, 0x94, 0xc2, 0x09, 0xb3, 0xb2,
|
||||
0xe6, 0x75, 0x1c, 0x6e, 0xe2, 0x26, 0xae, 0x07, 0x71, 0xb0, 0x6e, 0x68, 0x82, 0xc1, 0xaa, 0x26,
|
||||
0x78, 0x09, 0x66, 0x1a, 0x72, 0x45, 0x06, 0x28, 0x9d, 0xcf, 0x44, 0x29, 0xaa, 0x13, 0x3b, 0x89,
|
||||
0x27, 0xcf, 0x72, 0x13, 0x05, 0x6d, 0x6d, 0xbd, 0x07, 0x27, 0xf6, 0x78, 0x65, 0x17, 0xd7, 0x6a,
|
||||
0xa1, 0x40, 0xe3, 0xa6, 0xc7, 0x82, 0x27, 0x11, 0x63, 0x74, 0x1a, 0x92, 0x1e, 0x66, 0x45, 0x17,
|
||||
0x37, 0xf4, 0xdf, 0x31, 0xe3, 0x61, 0xb6, 0x8b, 0x1b, 0xd6, 0x2a, 0x9c, 0xdc, 0x63, 0xbc, 0x5a,
|
||||
0xc7, 0x9c, 0x5c, 0xc5, 0x3d, 0x36, 0x73, 0x30, 0xe5, 0x61, 0xe5, 0x22, 0x51, 0x10, 0x43, 0xeb,
|
||||
0xaf, 0xc9, 0x20, 0xb0, 0x4d, 0xec, 0x92, 0xfd, 0x4e, 0x80, 0xb6, 0x05, 0x53, 0x75, 0xe6, 0x69,
|
||||
0xd2, 0xb9, 0x28, 0xe9, 0x1b, 0xcc, 0xdb, 0x13, 0x6b, 0xa4, 0x55, 0xdf, 0xef, 0x14, 0x84, 0x2d,
|
||||
0xfa, 0x00, 0x66, 0xb9, 0x70, 0x52, 0x74, 0xa9, 0x7f, 0xab, 0xea, 0xc9, 0xbf, 0x31, 0x9d, 0x5f,
|
||||
0x8c, 0x9e, 0x95, 0x50, 0xbb, 0xd2, 0xa8, 0x90, 0xe6, 0xbd, 0x09, 0xda, 0x85, 0xd9, 0x46, 0x93,
|
||||
0x94, 0x89, 0x4b, 0x18, 0xa3, 0x4d, 0x96, 0x49, 0xc8, 0x57, 0x1d, 0x8b, 0xde, 0x77, 0x48, 0x94,
|
||||
0xaa, 0x52, 0x8d, 0xba, 0x07, 0x41, 0x51, 0x98, 0x5e, 0x32, 0xd6, 0xa6, 0x0a, 0x69, 0xb9, 0xa6,
|
||||
0x4a, 0x02, 0x5a, 0x04, 0x50, 0x26, 0x32, 0x73, 0x67, 0x64, 0xe6, 0x1e, 0x93, 0x2b, 0xb2, 0xd8,
|
||||
0xef, 0x06, 0xdb, 0x42, 0x8f, 0x32, 0x49, 0x79, 0x0d, 0xd3, 0x56, 0x62, 0x65, 0x07, 0x62, 0x65,
|
||||
0xef, 0x07, 0x62, 0xb5, 0x93, 0x12, 0x2f, 0xf7, 0xe8, 0xf7, 0x9c, 0xa1, 0x9d, 0x88, 0x9d, 0x8f,
|
||||
0x13, 0xa9, 0xc9, 0xb9, 0xa9, 0x42, 0x8a, 0x77, 0x8a, 0x55, 0xbf, 0x4c, 0x3a, 0xd6, 0x86, 0xfe,
|
||||
0x99, 0xbb, 0x71, 0xee, 0xfd, 0x69, 0x65, 0xcc, 0x71, 0xf0, 0xac, 0x62, 0x6c, 0xfd, 0x38, 0x09,
|
||||
0x6f, 0xf4, 0x8c, 0x77, 0x84, 0xcf, 0xd0, 0xbb, 0xf0, 0x4e, 0x90, 0xef, 0xe3, 0xdf, 0x85, 0x77,
|
||||
0xd8, 0x2b, 0x78, 0x97, 0xff, 0x47, 0x48, 0xad, 0x8b, 0x70, 0x3a, 0x12, 0x95, 0x11, 0x51, 0x3c,
|
||||
0xd5, 0x2d, 0xfc, 0x8c, 0x5c, 0x21, 0x41, 0x81, 0xb1, 0xbe, 0xec, 0x16, 0x75, 0xbd, 0xac, 0x5d,
|
||||
0xec, 0x41, 0x4a, 0x54, 0x81, 0xe2, 0x2d, 0xa2, 0x0b, 0xeb, 0xce, 0xc6, 0x6f, 0xcf, 0x72, 0x2b,
|
||||
0x5e, 0x95, 0x57, 0x5a, 0x25, 0xdb, 0xa5, 0x75, 0x47, 0xf7, 0x4b, 0xea, 0x73, 0x91, 0x95, 0x0f,
|
||||
0x1c, 0x7e, 0xd8, 0x20, 0xcc, 0xfe, 0xc8, 0xe7, 0x42, 0x01, 0xa4, 0xbb, 0xfc, 0x3f, 0xb3, 0x30,
|
||||
0x2d, 0xfd, 0xa3, 0xef, 0x0c, 0x48, 0x6a, 0xe1, 0x43, 0xcb, 0xd1, 0x68, 0x0f, 0xe9, 0x6c, 0xcc,
|
||||
0x95, 0x71, 0x66, 0x8a, 0xab, 0x75, 0xe1, 0xdb, 0x5f, 0xfe, 0xfc, 0x61, 0x72, 0x19, 0x9d, 0x73,
|
||||
0x22, 0xdd, 0x95, 0x16, 0x3f, 0xe7, 0xae, 0xae, 0xf4, 0xf7, 0xd0, 0x4f, 0x06, 0x1c, 0xef, 0xeb,
|
||||
0x2f, 0xd0, 0x85, 0x18, 0x98, 0x61, 0x7d, 0x8c, 0xb9, 0x79, 0x34, 0x63, 0xcd, 0x2c, 0x2f, 0x99,
|
||||
0x6d, 0xa2, 0x8d, 0x28, 0xb3, 0xa0, 0x95, 0x89, 0x10, 0xfc, 0xd9, 0x80, 0xb9, 0xc1, 0x56, 0x01,
|
||||
0xd9, 0x31, 0xb0, 0x31, 0x1d, 0x8a, 0xe9, 0x1c, 0xd9, 0x5e, 0x33, 0xbd, 0x2c, 0x99, 0xbe, 0x83,
|
||||
0xf2, 0x51, 0xa6, 0xed, 0xe0, 0x4c, 0x8f, 0x6c, 0xb8, 0xfb, 0xb9, 0x87, 0xee, 0x1b, 0x90, 0xd4,
|
||||
0x4d, 0x41, 0xec, 0xd3, 0xf6, 0xf7, 0x1b, 0xb1, 0x4f, 0x3b, 0xd0, 0x5b, 0x58, 0x9b, 0x92, 0xd6,
|
||||
0x0a, 0x3a, 0x1f, 0xa5, 0xa5, 0x9b, 0x0c, 0x16, 0x0a, 0xdd, 0x43, 0x03, 0x92, 0xba, 0x3d, 0x88,
|
||||
0x25, 0xd2, 0xdf, 0x8b, 0xc4, 0x12, 0x19, 0xe8, 0x32, 0xac, 0x2d, 0x49, 0xe4, 0x02, 0x5a, 0x8f,
|
||||
0x12, 0x61, 0xca, 0xb4, 0xc7, 0xc3, 0xb9, 0x7b, 0x40, 0x0e, 0xef, 0xa1, 0x3b, 0x90, 0x10, 0x5d,
|
||||
0x04, 0xb2, 0x62, 0x53, 0xa6, 0xdb, 0x9a, 0x98, 0xe7, 0x46, 0xda, 0x68, 0x0e, 0xeb, 0x92, 0xc3,
|
||||
0x39, 0x74, 0x76, 0x58, 0x36, 0x95, 0xfb, 0x22, 0xf1, 0x15, 0xcc, 0x28, 0x21, 0x45, 0xe7, 0x63,
|
||||
0x3c, 0xf7, 0xe9, 0xb5, 0xb9, 0x3c, 0xc6, 0x4a, 0x33, 0x58, 0x92, 0x0c, 0x4c, 0x94, 0x89, 0x32,
|
||||
0x50, 0x4a, 0x8d, 0x3a, 0x90, 0xd4, 0x4a, 0x8d, 0x96, 0xa2, 0x3e, 0xfb, 0x45, 0xdc, 0x5c, 0x1d,
|
||||
0x57, 0xb1, 0x03, 0x5c, 0x4b, 0xe2, 0x2e, 0x20, 0x33, 0x8a, 0x4b, 0x78, 0xa5, 0xe8, 0x0a, 0xb8,
|
||||
0x6f, 0x20, 0x1d, 0x12, 0xf9, 0x23, 0xa0, 0x0f, 0xb9, 0xf3, 0x90, 0x2e, 0xc1, 0x5a, 0x91, 0xd8,
|
||||
0x4b, 0x28, 0x3b, 0x04, 0x5b, 0x9b, 0x17, 0x3d, 0xcc, 0xd0, 0xd7, 0x90, 0xd4, 0x6a, 0x16, 0x9b,
|
||||
0x7b, 0xfd, 0x5d, 0x45, 0x6c, 0xee, 0x0d, 0x88, 0xe2, 0xa8, 0xdb, 0x2b, 0x29, 0xe3, 0x1d, 0xf4,
|
||||
0xc0, 0x00, 0xe8, 0x29, 0x01, 0x5a, 0x1b, 0xe5, 0x3a, 0x2c, 0xa1, 0xe6, 0xfa, 0x11, 0x2c, 0x35,
|
||||
0x8f, 0x65, 0xc9, 0x23, 0x87, 0x16, 0xe3, 0x78, 0x48, 0x71, 0x12, 0x81, 0xd0, 0x6a, 0x32, 0xa2,
|
||||
0x1a, 0x84, 0x45, 0x68, 0x44, 0x35, 0xe8, 0x13, 0xa5, 0x51, 0x81, 0x08, 0xc4, 0x6a, 0x67, 0xfb,
|
||||
0xc9, 0xf3, 0xac, 0xf1, 0xf4, 0x79, 0xd6, 0xf8, 0xe3, 0x79, 0xd6, 0x78, 0xf4, 0x22, 0x3b, 0xf1,
|
||||
0xf4, 0x45, 0x76, 0xe2, 0xd7, 0x17, 0xd9, 0x89, 0x2f, 0x56, 0xc3, 0xe2, 0x45, 0x9a, 0xee, 0xc5,
|
||||
0x2a, 0x75, 0x6a, 0xd8, 0xa5, 0x7e, 0xd5, 0x2d, 0x3b, 0x1d, 0xe9, 0x48, 0x2a, 0x58, 0x69, 0x46,
|
||||
0x4a, 0xf0, 0xdb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x45, 0x2a, 0xac, 0x59, 0x10, 0x00,
|
||||
0x00,
|
||||
// 1443 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6f, 0x13, 0xc7,
|
||||
0x17, 0xcf, 0xc6, 0x4e, 0xec, 0x8c, 0x03, 0xf8, 0x3b, 0x84, 0x2f, 0x66, 0x9b, 0xd8, 0x61, 0x21,
|
||||
0x3f, 0x09, 0xbb, 0x8d, 0x5b, 0x21, 0x95, 0x4b, 0x1b, 0x5b, 0x81, 0x52, 0xa0, 0xa2, 0x6e, 0xd4,
|
||||
0x43, 0x25, 0x64, 0x8d, 0xd7, 0xc3, 0x7a, 0x15, 0x7b, 0xc7, 0xec, 0x8c, 0x5d, 0x07, 0x4a, 0x0f,
|
||||
0x95, 0x8a, 0xa8, 0x90, 0x2a, 0xa4, 0xde, 0x2b, 0xfe, 0x83, 0x1e, 0xfb, 0x2f, 0x70, 0x44, 0xea,
|
||||
0xa5, 0xea, 0x81, 0x22, 0xd2, 0x43, 0x6f, 0xbd, 0xf7, 0x54, 0xcd, 0xec, 0x8c, 0x7f, 0xad, 0xd7,
|
||||
0x0e, 0x15, 0x3d, 0xf5, 0xb4, 0x3b, 0x33, 0x6f, 0xde, 0xfb, 0xbc, 0x1f, 0xf3, 0xde, 0x07, 0x2c,
|
||||
0x62, 0x56, 0xc3, 0x7e, 0xc3, 0xf5, 0x98, 0x85, 0xdb, 0x0d, 0xab, 0xbd, 0x6d, 0xdd, 0x6d, 0x61,
|
||||
0xff, 0xc0, 0x6c, 0xfa, 0x84, 0x11, 0x98, 0xee, 0x9e, 0x9a, 0xb8, 0xdd, 0x30, 0xdb, 0xdb, 0xfa,
|
||||
0xa6, 0x4d, 0x68, 0x83, 0x50, 0xab, 0x82, 0x28, 0x0e, 0x44, 0xad, 0xf6, 0x76, 0x05, 0x33, 0xb4,
|
||||
0x6d, 0x35, 0x91, 0xe3, 0x7a, 0x88, 0xb9, 0xc4, 0x0b, 0x6e, 0xeb, 0x7a, 0x48, 0x37, 0x57, 0x12,
|
||||
0x9c, 0x9d, 0x09, 0x9d, 0xb1, 0x8e, 0x3c, 0x5a, 0x70, 0x88, 0x43, 0xc4, 0xaf, 0xc5, 0xff, 0xe4,
|
||||
0xee, 0xa2, 0x43, 0x88, 0x53, 0xc7, 0x16, 0x6a, 0xba, 0x16, 0xf2, 0x3c, 0xc2, 0x84, 0x25, 0x2a,
|
||||
0x4f, 0x73, 0xf2, 0x54, 0xac, 0x2a, 0xad, 0x3b, 0x16, 0x73, 0x1b, 0x98, 0x32, 0xd4, 0x68, 0x06,
|
||||
0x02, 0xc6, 0x7b, 0xe0, 0xe4, 0x27, 0x1c, 0xed, 0x8e, 0x6d, 0x93, 0x96, 0xc7, 0x4a, 0xf8, 0x6e,
|
||||
0x0b, 0x53, 0x06, 0x33, 0x20, 0x81, 0xaa, 0x55, 0x1f, 0x53, 0x9a, 0xd1, 0x96, 0xb5, 0xf5, 0xb9,
|
||||
0x92, 0x5a, 0x5e, 0x4e, 0x3e, 0x7a, 0x9a, 0x9b, 0xfa, 0xe3, 0x69, 0x6e, 0xca, 0xb0, 0xc1, 0xc2,
|
||||
0xe0, 0x55, 0xda, 0x24, 0x1e, 0xc5, 0xfc, 0x6e, 0x05, 0xd5, 0x91, 0x67, 0x63, 0x75, 0x57, 0x2e,
|
||||
0xe1, 0x5b, 0x60, 0xce, 0x26, 0x55, 0x5c, 0xae, 0x21, 0x5a, 0xcb, 0x4c, 0x8b, 0xb3, 0x24, 0xdf,
|
||||
0xf8, 0x10, 0xd1, 0x1a, 0x5c, 0x00, 0x33, 0x1e, 0xe1, 0x97, 0x62, 0xcb, 0xda, 0x7a, 0xbc, 0x14,
|
||||
0x2c, 0x8c, 0xf7, 0xc1, 0x19, 0x61, 0xa4, 0x28, 0xc2, 0xfb, 0x0f, 0x50, 0x3e, 0xd4, 0x80, 0x3e,
|
||||
0x4a, 0x83, 0x04, 0xbb, 0x02, 0x8e, 0x07, 0x99, 0x2b, 0x0f, 0x6a, 0x3a, 0x16, 0xec, 0xee, 0x04,
|
||||
0x9b, 0x50, 0x07, 0x49, 0xca, 0x8d, 0x72, 0x7c, 0xd3, 0x02, 0x5f, 0x77, 0xcd, 0x55, 0xa0, 0x40,
|
||||
0x6b, 0xd9, 0x6b, 0x35, 0x2a, 0xd8, 0x97, 0x1e, 0x1c, 0x93, 0xbb, 0x1f, 0x8b, 0x4d, 0xe3, 0x3a,
|
||||
0x58, 0x14, 0x38, 0x3e, 0x43, 0x75, 0xb7, 0x8a, 0x18, 0xf1, 0x87, 0x9c, 0x39, 0x0b, 0xe6, 0x6d,
|
||||
0xe2, 0x0d, 0xe3, 0x48, 0xf1, 0xbd, 0x9d, 0x90, 0x57, 0x8f, 0x35, 0xb0, 0x14, 0xa1, 0x4d, 0x3a,
|
||||
0xb6, 0x06, 0x4e, 0x28, 0x54, 0x83, 0x1a, 0x15, 0xd8, 0x37, 0xe8, 0x9a, 0x2a, 0xa2, 0x42, 0x90,
|
||||
0xe7, 0xd7, 0x49, 0xcf, 0xdb, 0xb2, 0x88, 0xba, 0x57, 0x27, 0x15, 0x91, 0x71, 0x5d, 0x1a, 0xfb,
|
||||
0x94, 0x11, 0x1f, 0x39, 0x93, 0x8d, 0xc1, 0x34, 0x88, 0xed, 0xe3, 0x03, 0x59, 0x6f, 0xfc, 0xb7,
|
||||
0xcf, 0xfc, 0x96, 0x34, 0xdf, 0x55, 0x26, 0xcd, 0x2f, 0x80, 0x99, 0x36, 0xaa, 0xb7, 0x94, 0xf1,
|
||||
0x60, 0x61, 0x5c, 0x02, 0x69, 0x59, 0x4a, 0xd5, 0xd7, 0x72, 0x72, 0x0d, 0xfc, 0xaf, 0xef, 0x9e,
|
||||
0x34, 0x01, 0x41, 0x9c, 0xd7, 0xbe, 0xb8, 0x35, 0x5f, 0x12, 0xff, 0xc6, 0x3d, 0x00, 0x85, 0xe0,
|
||||
0x5e, 0xe7, 0x06, 0x71, 0xa8, 0x32, 0x01, 0x41, 0x5c, 0xbc, 0x98, 0x40, 0xbf, 0xf8, 0x87, 0x57,
|
||||
0x00, 0xe8, 0xf5, 0x15, 0xe1, 0x5b, 0x2a, 0xbf, 0x6a, 0x06, 0x45, 0x6b, 0xf2, 0x26, 0x64, 0x06,
|
||||
0xfd, 0x4a, 0x36, 0x21, 0xf3, 0x56, 0x2f, 0x54, 0xa5, 0xbe, 0x9b, 0x7d, 0x20, 0xbf, 0xd5, 0x64,
|
||||
0x60, 0x95, 0x71, 0x89, 0x73, 0x03, 0xc4, 0xeb, 0xc4, 0xe1, 0xde, 0xc5, 0xd6, 0x53, 0xf9, 0x53,
|
||||
0xe6, 0x70, 0xeb, 0x33, 0x6f, 0x10, 0xa7, 0x24, 0x44, 0xe0, 0xd5, 0x11, 0xa0, 0xd6, 0x26, 0x82,
|
||||
0x0a, 0xec, 0xf4, 0xa3, 0x32, 0x16, 0x64, 0x1c, 0x6e, 0x21, 0x1f, 0x35, 0x54, 0x1c, 0x8c, 0x9b,
|
||||
0x12, 0xa0, 0xda, 0x95, 0x00, 0x2f, 0x81, 0xd9, 0xa6, 0xd8, 0x11, 0x01, 0x4a, 0xe5, 0x33, 0x61,
|
||||
0x88, 0xc1, 0x8d, 0x42, 0xfc, 0xd9, 0x8b, 0xdc, 0x54, 0x49, 0x4a, 0x1b, 0x3f, 0x69, 0xe0, 0xf8,
|
||||
0x2e, 0xab, 0x15, 0x51, 0xbd, 0xde, 0x17, 0x69, 0xe4, 0x3b, 0x54, 0xe5, 0x84, 0xff, 0xc3, 0xd3,
|
||||
0x20, 0xe1, 0x20, 0x5a, 0xb6, 0x51, 0x53, 0x3e, 0x8f, 0x59, 0x07, 0xd1, 0x22, 0x6a, 0xc2, 0xdb,
|
||||
0x20, 0xdd, 0xf4, 0x49, 0x93, 0x50, 0xec, 0x77, 0x9f, 0x18, 0x7f, 0x1e, 0xf3, 0x85, 0xfc, 0x5f,
|
||||
0x2f, 0x72, 0xa6, 0xe3, 0xb2, 0x5a, 0xab, 0x62, 0xda, 0xa4, 0x61, 0xc9, 0xd9, 0x10, 0x7c, 0x2e,
|
||||
0xd2, 0xea, 0xbe, 0xc5, 0x0e, 0x9a, 0x98, 0x9a, 0xc5, 0xde, 0xdb, 0x2e, 0x9d, 0x50, 0xba, 0xd4,
|
||||
0xbb, 0x3c, 0x03, 0x92, 0x76, 0x0d, 0xb9, 0x5e, 0xd9, 0xad, 0x66, 0xe2, 0xcb, 0xda, 0x7a, 0xac,
|
||||
0x94, 0x10, 0xeb, 0x6b, 0x55, 0x63, 0x0d, 0x9c, 0xdc, 0xa5, 0xcc, 0x6d, 0x20, 0x86, 0xaf, 0xa2,
|
||||
0x5e, 0x20, 0xd2, 0x20, 0xe6, 0xa0, 0x00, 0x7c, 0xbc, 0xc4, 0x7f, 0x8d, 0x97, 0x31, 0x95, 0x53,
|
||||
0x1f, 0xd9, 0x78, 0xaf, 0xa3, 0xfc, 0xdc, 0x06, 0xb1, 0x06, 0x75, 0x64, 0xbc, 0x72, 0xe1, 0x78,
|
||||
0xdd, 0xa4, 0xce, 0x2e, 0xdf, 0xc3, 0xad, 0xc6, 0x5e, 0xa7, 0xc4, 0x65, 0xe1, 0x07, 0x60, 0x9e,
|
||||
0x71, 0x25, 0x65, 0x9b, 0x78, 0x77, 0x5c, 0x47, 0x78, 0x9a, 0xca, 0x2f, 0x85, 0xef, 0x0a, 0x53,
|
||||
0x45, 0x21, 0x54, 0x4a, 0xb1, 0xde, 0x02, 0x16, 0xc1, 0x7c, 0xd3, 0xc7, 0x55, 0x6c, 0x63, 0x4a,
|
||||
0x89, 0x4f, 0x33, 0x71, 0x51, 0x50, 0x13, 0xad, 0x0f, 0x5c, 0xe2, 0x5d, 0xb2, 0x52, 0x27, 0xf6,
|
||||
0xbe, 0xea, 0x47, 0x33, 0x22, 0x32, 0x29, 0xb1, 0x17, 0x74, 0x23, 0xb8, 0x04, 0x40, 0x20, 0x22,
|
||||
0x1e, 0xcd, 0xac, 0x78, 0x34, 0x73, 0x62, 0x47, 0xcc, 0x99, 0xa2, 0x3a, 0xe6, 0xa3, 0x30, 0x93,
|
||||
0x10, 0x6e, 0xe8, 0x66, 0x30, 0x27, 0x4d, 0x35, 0x27, 0xcd, 0x3d, 0x35, 0x27, 0x0b, 0x49, 0x5e,
|
||||
0x34, 0x4f, 0x7e, 0xcb, 0x69, 0x52, 0x09, 0x3f, 0x19, 0x99, 0xfb, 0xe4, 0xbf, 0x93, 0xfb, 0xb9,
|
||||
0x81, 0xdc, 0x7f, 0x14, 0x4f, 0x4e, 0xa7, 0x63, 0xa5, 0x24, 0xeb, 0x94, 0x5d, 0xaf, 0x8a, 0x3b,
|
||||
0xc6, 0xa6, 0xec, 0x60, 0xdd, 0x0c, 0xf7, 0xda, 0x4b, 0x15, 0x31, 0xa4, 0x4a, 0x99, 0xff, 0x1b,
|
||||
0xdf, 0xc5, 0xc0, 0xff, 0x7b, 0xc2, 0x05, 0xee, 0x4d, 0x5f, 0x45, 0xb0, 0x8e, 0x7a, 0xe4, 0x93,
|
||||
0x2b, 0x82, 0x75, 0xe8, 0x1b, 0xa8, 0x88, 0xff, 0x7a, 0x32, 0x8d, 0x8b, 0xe0, 0x74, 0x28, 0x1f,
|
||||
0x63, 0xf2, 0x77, 0xaa, 0x3b, 0x67, 0x29, 0xbe, 0x82, 0x55, 0x3f, 0x37, 0x6e, 0x77, 0x67, 0xa8,
|
||||
0xdc, 0x96, 0x2a, 0x76, 0x41, 0x92, 0x37, 0xdd, 0xf2, 0x1d, 0x2c, 0xe7, 0x58, 0x61, 0xf3, 0xd7,
|
||||
0x17, 0xb9, 0xd5, 0x23, 0xf8, 0x73, 0xcd, 0x63, 0x7c, 0xe0, 0x0a, 0x75, 0xf9, 0x3f, 0xe7, 0xc1,
|
||||
0x8c, 0xd0, 0x0f, 0xbf, 0xd1, 0x40, 0x42, 0xf2, 0x0c, 0xb8, 0x12, 0xce, 0xf3, 0x08, 0x22, 0xa9,
|
||||
0xaf, 0x4e, 0x12, 0x0b, 0xb0, 0x1a, 0x17, 0xbe, 0xfe, 0xf9, 0xf7, 0xef, 0xa7, 0x57, 0xe0, 0x39,
|
||||
0x2b, 0x44, 0x80, 0x25, 0xd7, 0xb0, 0xee, 0xcb, 0xdc, 0x3c, 0x80, 0x3f, 0x68, 0xe0, 0xd8, 0x00,
|
||||
0x9d, 0x83, 0x17, 0x22, 0xcc, 0x8c, 0xa2, 0x8d, 0xfa, 0xd6, 0xd1, 0x84, 0x25, 0xb2, 0xbc, 0x40,
|
||||
0xb6, 0x05, 0x37, 0xc3, 0xc8, 0x14, 0x73, 0x0c, 0x01, 0xfc, 0x51, 0x03, 0xe9, 0x61, 0x66, 0x06,
|
||||
0xcd, 0x08, 0xb3, 0x11, 0x84, 0x50, 0xb7, 0x8e, 0x2c, 0x2f, 0x91, 0x5e, 0x16, 0x48, 0xdf, 0x85,
|
||||
0xf9, 0x30, 0xd2, 0xb6, 0xba, 0xd3, 0x03, 0xdb, 0x4f, 0x36, 0x1f, 0xc0, 0x87, 0x1a, 0x48, 0x48,
|
||||
0x0e, 0x16, 0x99, 0xda, 0x41, 0x7a, 0x17, 0x99, 0xda, 0x21, 0x2a, 0x67, 0x6c, 0x09, 0x58, 0xab,
|
||||
0xf0, 0x7c, 0x18, 0x96, 0xe4, 0x74, 0xb4, 0x2f, 0x74, 0x8f, 0x35, 0x90, 0x90, 0x6c, 0x2c, 0x12,
|
||||
0xc8, 0x20, 0xf5, 0x8b, 0x04, 0x32, 0x44, 0xea, 0x8c, 0x6d, 0x01, 0xe4, 0x02, 0xdc, 0x08, 0x03,
|
||||
0xa1, 0x81, 0x68, 0x0f, 0x87, 0x75, 0x7f, 0x1f, 0x1f, 0x3c, 0x80, 0xf7, 0x40, 0x9c, 0x93, 0x36,
|
||||
0x68, 0x44, 0x96, 0x4c, 0x97, 0x09, 0xea, 0xe7, 0xc6, 0xca, 0x48, 0x0c, 0x1b, 0x02, 0xc3, 0x39,
|
||||
0x78, 0x76, 0x54, 0x35, 0x55, 0x07, 0x22, 0xf1, 0x05, 0x98, 0x0d, 0x78, 0x0b, 0x3c, 0x1f, 0xa1,
|
||||
0x79, 0x80, 0x1e, 0xe9, 0x2b, 0x13, 0xa4, 0x24, 0x82, 0x65, 0x81, 0x40, 0x87, 0x99, 0x30, 0x82,
|
||||
0x80, 0x18, 0xc1, 0x0e, 0x48, 0x48, 0x5e, 0x04, 0x97, 0xc3, 0x3a, 0x07, 0x29, 0x93, 0xbe, 0x36,
|
||||
0x69, 0x56, 0x28, 0xbb, 0x86, 0xb0, 0xbb, 0x08, 0xf5, 0xb0, 0x5d, 0xcc, 0x6a, 0x65, 0x9b, 0x9b,
|
||||
0xfb, 0x0a, 0xa4, 0xfa, 0x88, 0xcd, 0x11, 0xac, 0x8f, 0xf0, 0x79, 0x04, 0x33, 0x32, 0x56, 0x85,
|
||||
0xed, 0x65, 0x98, 0x1d, 0x61, 0x5b, 0x8a, 0x97, 0x1d, 0x44, 0xe1, 0x97, 0x20, 0x21, 0xe7, 0x68,
|
||||
0x64, 0xed, 0x0d, 0x32, 0xa9, 0xc8, 0xda, 0x1b, 0x1a, 0xc7, 0xe3, 0xbc, 0x0f, 0x86, 0x28, 0xeb,
|
||||
0xc0, 0x47, 0x1a, 0x00, 0xbd, 0x49, 0x00, 0xd7, 0xc7, 0xa9, 0xee, 0x1f, 0xde, 0xfa, 0xc6, 0x11,
|
||||
0x24, 0x25, 0x8e, 0x15, 0x81, 0x23, 0x07, 0x97, 0xa2, 0x70, 0x88, 0xb1, 0xc8, 0x03, 0x21, 0xa7,
|
||||
0xc9, 0x98, 0x6e, 0xd0, 0x3f, 0x84, 0xc6, 0x74, 0x83, 0x81, 0xa1, 0x34, 0x2e, 0x10, 0x6a, 0x58,
|
||||
0x15, 0x76, 0x9e, 0xbd, 0xca, 0x6a, 0xcf, 0x5f, 0x65, 0xb5, 0x97, 0xaf, 0xb2, 0xda, 0x93, 0xc3,
|
||||
0xec, 0xd4, 0xf3, 0xc3, 0xec, 0xd4, 0x2f, 0x87, 0xd9, 0xa9, 0xcf, 0xd7, 0xfa, 0x87, 0x17, 0xf6,
|
||||
0xed, 0x8b, 0x2e, 0xb1, 0xea, 0xc8, 0x26, 0x9e, 0x6b, 0x57, 0xad, 0x8e, 0x50, 0x24, 0x26, 0x58,
|
||||
0x65, 0x56, 0x0c, 0xff, 0x77, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xa7, 0xcc, 0x53, 0xc8,
|
||||
0x11, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -2420,6 +2480,18 @@ func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.ChainId != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.ChainId))
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.GasCap != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.GasCap))
|
||||
i--
|
||||
@@ -2483,6 +2555,18 @@ func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.ChainId != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.ChainId))
|
||||
i--
|
||||
dAtA[i] = 0x48
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):])
|
||||
if err4 != nil {
|
||||
return 0, err4
|
||||
@@ -2594,6 +2678,18 @@ func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.ChainId != 0 {
|
||||
i = encodeVarintQuery(dAtA, i, uint64(m.ChainId))
|
||||
i--
|
||||
dAtA[i] = 0x48
|
||||
}
|
||||
if len(m.ProposerAddress) > 0 {
|
||||
i -= len(m.ProposerAddress)
|
||||
copy(dAtA[i:], m.ProposerAddress)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress)))
|
||||
i--
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):])
|
||||
if err7 != nil {
|
||||
return 0, err7
|
||||
@@ -2990,6 +3086,13 @@ func (m *EthCallRequest) Size() (n int) {
|
||||
if m.GasCap != 0 {
|
||||
n += 1 + sovQuery(uint64(m.GasCap))
|
||||
}
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -3034,6 +3137,13 @@ func (m *QueryTraceTxRequest) Size() (n int) {
|
||||
}
|
||||
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime)
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -3075,6 +3185,13 @@ func (m *QueryTraceBlockRequest) Size() (n int) {
|
||||
}
|
||||
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime)
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
l = len(m.ProposerAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -4717,6 +4834,59 @@ func (m *EthCallRequest) Unmarshal(dAtA []byte) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
|
||||
}
|
||||
m.ChainId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ChainId |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
@@ -5026,6 +5196,59 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
|
||||
}
|
||||
m.ChainId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ChainId |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
@@ -5314,6 +5537,59 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.ProposerAddress == nil {
|
||||
m.ProposerAddress = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType)
|
||||
}
|
||||
m.ChainId = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ChainId |= int64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
|
||||
Generated
+51
-13
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAccountRequest
|
||||
@@ -560,12 +562,14 @@ func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marsha
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -573,6 +577,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -586,6 +591,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -593,6 +600,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -606,6 +614,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -613,6 +623,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -626,6 +637,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -633,6 +646,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -646,6 +660,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -653,6 +669,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -666,6 +683,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -673,6 +692,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -686,6 +706,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -693,6 +715,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -706,6 +729,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -713,6 +738,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -726,6 +752,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -733,6 +761,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -746,6 +775,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -753,6 +784,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -766,6 +798,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -773,6 +807,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_TraceBlock_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -786,6 +821,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -793,6 +830,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -1088,29 +1126,29 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"ethermint", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"ethermint", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ func (s Storage) Validate() error {
|
||||
seenStorage := make(map[string]bool)
|
||||
for i, state := range s {
|
||||
if seenStorage[state.Key] {
|
||||
return sdkerrors.Wrapf(ErrInvalidState, "duplicate state key %d: %s", i, state.Key)
|
||||
return errorsmod.Wrapf(ErrInvalidState, "duplicate state key %d: %s", i, state.Key)
|
||||
}
|
||||
|
||||
if err := state.Validate(); err != nil {
|
||||
@@ -51,7 +51,7 @@ func (s Storage) Copy() Storage {
|
||||
// NOTE: state value can be empty
|
||||
func (s State) Validate() error {
|
||||
if strings.TrimSpace(s.Key) == "" {
|
||||
return sdkerrors.Wrap(ErrInvalidState, "state key hash cannot be blank")
|
||||
return errorsmod.Wrap(ErrInvalidState, "state key hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -1,10 +1,37 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
)
|
||||
|
||||
// GetTxPriority returns the priority of a given Ethereum tx. It relies of the
|
||||
// priority reduction global variable to calculate the tx priority given the tx
|
||||
// tip price:
|
||||
//
|
||||
// tx_priority = tip_price / priority_reduction
|
||||
func GetTxPriority(txData TxData, baseFee *big.Int) (priority int64) {
|
||||
// calculate priority based on effective gas price
|
||||
tipPrice := txData.EffectiveGasPrice(baseFee)
|
||||
// if london hardfork is not enabled, tipPrice is the gasPrice
|
||||
if baseFee != nil {
|
||||
tipPrice = new(big.Int).Sub(tipPrice, baseFee)
|
||||
}
|
||||
|
||||
priority = math.MaxInt64
|
||||
priorityBig := new(big.Int).Quo(tipPrice, DefaultPriorityReduction.BigInt())
|
||||
|
||||
// safety check
|
||||
if priorityBig.IsInt64() {
|
||||
priority = priorityBig.Int64()
|
||||
}
|
||||
|
||||
return priority
|
||||
}
|
||||
|
||||
// Failed returns if the contract execution failed in vm errors
|
||||
func (m *MsgEthereumTxResponse) Failed() bool {
|
||||
return len(m.VmError) > 0
|
||||
|
||||
Generated
+82
-79
@@ -7,12 +7,12 @@ import (
|
||||
context "context"
|
||||
encoding_binary "encoding/binary"
|
||||
fmt "fmt"
|
||||
_ "github.com/cosmos/cosmos-proto"
|
||||
types "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/regen-network/cosmos-proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -35,13 +35,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// MsgEthereumTx encapsulates an Ethereum transaction as an SDK message.
|
||||
type MsgEthereumTx struct {
|
||||
// inner transaction data
|
||||
// data is inner transaction data of the Ethereum transaction
|
||||
Data *types.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// DEPRECATED: encoded storage size of the transaction
|
||||
// size is the encoded storage size of the transaction (DEPRECATED)
|
||||
Size_ float64 `protobuf:"fixed64,2,opt,name=size,proto3" json:"-"`
|
||||
// transaction hash in hex format
|
||||
// hash of the transaction in hex format
|
||||
Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty" rlp:"-"`
|
||||
// ethereum signer address in hex format. This address value is checked
|
||||
// from is the ethereum signer address in hex format. This address value is checked
|
||||
// against the address derived from the signature (V, R, S) using the
|
||||
// secp256k1 elliptic curve
|
||||
From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
|
||||
@@ -86,15 +86,15 @@ var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo
|
||||
type LegacyTx struct {
|
||||
// nonce corresponds to the account nonce (transaction sequence).
|
||||
Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
||||
// gas price defines the value for each gas unit
|
||||
// gas_price defines the value for each gas unit
|
||||
GasPrice *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_price,omitempty"`
|
||||
// gas defines the gas limit defined for the transaction.
|
||||
GasLimit uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"`
|
||||
// hex formatted address of the recipient
|
||||
// to is the hex formatted address of the recipient
|
||||
To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"`
|
||||
// value defines the unsigned integer value of the transaction amount.
|
||||
Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
|
||||
// input defines the data payload bytes of the transaction.
|
||||
// data is the data payload bytes of the transaction.
|
||||
Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// v defines the signature value
|
||||
V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"`
|
||||
@@ -139,20 +139,21 @@ var xxx_messageInfo_LegacyTx proto.InternalMessageInfo
|
||||
|
||||
// AccessListTx is the data of EIP-2930 access list transactions.
|
||||
type AccessListTx struct {
|
||||
// destination EVM chain ID
|
||||
// chain_id of the destination EVM chain
|
||||
ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
|
||||
// nonce corresponds to the account nonce (transaction sequence).
|
||||
Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
||||
// gas price defines the value for each gas unit
|
||||
// gas_price defines the value for each gas unit
|
||||
GasPrice *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_price,omitempty"`
|
||||
// gas defines the gas limit defined for the transaction.
|
||||
GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"`
|
||||
// hex formatted address of the recipient
|
||||
// to is the recipient address in hex format
|
||||
To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
|
||||
// value defines the unsigned integer value of the transaction amount.
|
||||
Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
|
||||
// input defines the data payload bytes of the transaction.
|
||||
Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// data is the data payload bytes of the transaction.
|
||||
Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// accesses is an array of access tuples
|
||||
Accesses AccessList `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
|
||||
// v defines the signature value
|
||||
V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"`
|
||||
@@ -197,22 +198,23 @@ var xxx_messageInfo_AccessListTx proto.InternalMessageInfo
|
||||
|
||||
// DynamicFeeTx is the data of EIP-1559 dinamic fee transactions.
|
||||
type DynamicFeeTx struct {
|
||||
// destination EVM chain ID
|
||||
// chain_id of the destination EVM chain
|
||||
ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
|
||||
// nonce corresponds to the account nonce (transaction sequence).
|
||||
Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
||||
// gas tip cap defines the max value for the gas tip
|
||||
// gas_tip_cap defines the max value for the gas tip
|
||||
GasTipCap *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_tip_cap,omitempty"`
|
||||
// gas fee cap defines the max value for the gas fee
|
||||
// gas_fee_cap defines the max value for the gas fee
|
||||
GasFeeCap *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_fee_cap,omitempty"`
|
||||
// gas defines the gas limit defined for the transaction.
|
||||
GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"`
|
||||
// hex formatted address of the recipient
|
||||
// to is the hex formatted address of the recipient
|
||||
To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
|
||||
// value defines the the transaction amount.
|
||||
Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
|
||||
// input defines the data payload bytes of the transaction.
|
||||
Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// data is the data payload bytes of the transaction.
|
||||
Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
|
||||
// accesses is an array of access tuples
|
||||
Accesses AccessList `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
|
||||
// v defines the signature value
|
||||
V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"`
|
||||
@@ -255,6 +257,7 @@ func (m *DynamicFeeTx) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_DynamicFeeTx proto.InternalMessageInfo
|
||||
|
||||
// ExtensionOptionsEthereumTx is an extension option for ethereum transactions
|
||||
type ExtensionOptionsEthereumTx struct {
|
||||
}
|
||||
|
||||
@@ -293,19 +296,19 @@ var xxx_messageInfo_ExtensionOptionsEthereumTx proto.InternalMessageInfo
|
||||
|
||||
// MsgEthereumTxResponse defines the Msg/EthereumTx response type.
|
||||
type MsgEthereumTxResponse struct {
|
||||
// ethereum transaction hash in hex format. This hash differs from the
|
||||
// hash of the ethereum transaction in hex format. This hash differs from the
|
||||
// Tendermint sha256 hash of the transaction bytes. See
|
||||
// https://github.com/tendermint/tendermint/issues/6539 for reference
|
||||
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
// logs contains the transaction hash and the proto-compatible ethereum
|
||||
// logs.
|
||||
Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"`
|
||||
// returned data from evm function (result or data supplied with revert
|
||||
// ret is the returned data from evm function (result or data supplied with revert
|
||||
// opcode)
|
||||
Ret []byte `protobuf:"bytes,3,opt,name=ret,proto3" json:"ret,omitempty"`
|
||||
// vm error is the error returned by vm execution
|
||||
// vm_error is the error returned by vm execution
|
||||
VmError string `protobuf:"bytes,4,opt,name=vm_error,json=vmError,proto3" json:"vm_error,omitempty"`
|
||||
// gas consumed by the transaction
|
||||
// gas_used specifies how much gas was consumed by the transaction
|
||||
GasUsed uint64 `protobuf:"varint,5,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
|
||||
}
|
||||
|
||||
@@ -354,61 +357,61 @@ func init() {
|
||||
func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) }
|
||||
|
||||
var fileDescriptor_f75ac0a12d075f21 = []byte{
|
||||
// 859 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x41, 0x8f, 0xdb, 0x44,
|
||||
0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0x42, 0x55, 0x59, 0x5b, 0xc9, 0x1b, 0xd1, 0x38, 0xb2, 0x04,
|
||||
0x0d, 0x48, 0xb1, 0xd5, 0x85, 0xd3, 0x9e, 0xd8, 0x74, 0xb7, 0x55, 0xab, 0xad, 0x40, 0x56, 0xb8,
|
||||
0xd0, 0x43, 0x34, 0xeb, 0xcc, 0x3a, 0x23, 0xe2, 0x19, 0xcb, 0x33, 0xb1, 0x1c, 0x24, 0x2e, 0x88,
|
||||
0x03, 0x37, 0x90, 0xf8, 0x03, 0x1c, 0x38, 0x71, 0x85, 0x1f, 0xc0, 0xb1, 0xc7, 0x0a, 0x2e, 0x88,
|
||||
0x83, 0x41, 0x59, 0x4e, 0x7b, 0x83, 0x5f, 0x80, 0x66, 0xec, 0xec, 0x6e, 0x88, 0x52, 0xa0, 0x2c,
|
||||
0xea, 0x29, 0xf3, 0xfc, 0xbd, 0x79, 0xf3, 0xde, 0xfb, 0xbe, 0xbc, 0x07, 0x77, 0xb1, 0x98, 0xe2,
|
||||
0x24, 0x22, 0x54, 0x78, 0x38, 0x8d, 0xbc, 0xf4, 0xae, 0x27, 0x32, 0x37, 0x4e, 0x98, 0x60, 0xe6,
|
||||
0xcd, 0x0b, 0xc8, 0xc5, 0x69, 0xe4, 0xa6, 0x77, 0x3b, 0x3b, 0x21, 0x0b, 0x99, 0x02, 0x3d, 0x79,
|
||||
0x2a, 0xfc, 0x3a, 0xaf, 0x86, 0x8c, 0x85, 0x33, 0xec, 0xa1, 0x98, 0x78, 0x88, 0x52, 0x26, 0x90,
|
||||
0x20, 0x8c, 0xf2, 0x12, 0xdd, 0x2d, 0x51, 0x65, 0x9d, 0xcc, 0x4f, 0x3d, 0x44, 0x17, 0x2b, 0x28,
|
||||
0x60, 0x3c, 0x62, 0x7c, 0x5c, 0x44, 0x2c, 0x8c, 0x12, 0xea, 0x6c, 0xa4, 0x25, 0x53, 0x50, 0x98,
|
||||
0xf3, 0x39, 0x80, 0xaf, 0x3c, 0xe6, 0xe1, 0x91, 0xf4, 0xc0, 0xf3, 0x68, 0x94, 0x99, 0x7d, 0xa8,
|
||||
0x4d, 0x90, 0x40, 0x16, 0xe8, 0x81, 0x7e, 0x6b, 0x6f, 0xc7, 0x2d, 0x9e, 0x74, 0x57, 0x4f, 0xba,
|
||||
0x07, 0x74, 0xe1, 0x2b, 0x0f, 0x73, 0x17, 0x6a, 0x9c, 0x7c, 0x84, 0xad, 0x6a, 0x0f, 0xf4, 0xc1,
|
||||
0xb0, 0x7e, 0x9e, 0xdb, 0x60, 0xe0, 0xab, 0x4f, 0xa6, 0x0d, 0xb5, 0x29, 0xe2, 0x53, 0xab, 0xd6,
|
||||
0x03, 0xfd, 0xe6, 0xb0, 0xf5, 0x47, 0x6e, 0xeb, 0xc9, 0x2c, 0xde, 0x77, 0x06, 0x8e, 0xaf, 0x00,
|
||||
0xd3, 0x84, 0xda, 0x69, 0xc2, 0x22, 0x4b, 0x93, 0x0e, 0xbe, 0x3a, 0xef, 0x6b, 0x9f, 0x7d, 0x65,
|
||||
0x57, 0x9c, 0x6f, 0xab, 0xd0, 0x38, 0xc6, 0x21, 0x0a, 0x16, 0xa3, 0xcc, 0xdc, 0x81, 0x75, 0xca,
|
||||
0x68, 0x80, 0x55, 0x36, 0x9a, 0x5f, 0x18, 0xe6, 0x03, 0xd8, 0x0c, 0x91, 0x2c, 0x95, 0x04, 0xc5,
|
||||
0xeb, 0xcd, 0xe1, 0x9b, 0x3f, 0xe7, 0xf6, 0xeb, 0x21, 0x11, 0xd3, 0xf9, 0x89, 0x1b, 0xb0, 0xa8,
|
||||
0x6c, 0x40, 0xf9, 0x33, 0xe0, 0x93, 0x0f, 0x3d, 0xb1, 0x88, 0x31, 0x77, 0x1f, 0x52, 0xe1, 0x1b,
|
||||
0x21, 0xe2, 0xef, 0xc9, 0xbb, 0x66, 0x17, 0xd6, 0x42, 0xc4, 0x55, 0x96, 0xda, 0xb0, 0xbd, 0xcc,
|
||||
0x6d, 0xe3, 0x01, 0xe2, 0xc7, 0x24, 0x22, 0xc2, 0x97, 0x80, 0x79, 0x03, 0x56, 0x05, 0x2b, 0x73,
|
||||
0xac, 0x0a, 0x66, 0x3e, 0x82, 0xf5, 0x14, 0xcd, 0xe6, 0xd8, 0xaa, 0xab, 0x47, 0xdf, 0xfe, 0xe7,
|
||||
0x8f, 0x2e, 0x73, 0xbb, 0x71, 0x10, 0xb1, 0x39, 0x15, 0x7e, 0x11, 0x42, 0x76, 0x40, 0xf5, 0xb9,
|
||||
0xd1, 0x03, 0xfd, 0x76, 0xd9, 0xd1, 0x36, 0x04, 0xa9, 0xa5, 0xab, 0x0f, 0x20, 0x95, 0x56, 0x62,
|
||||
0x19, 0x85, 0x95, 0x48, 0x8b, 0x5b, 0xcd, 0xc2, 0xe2, 0xfb, 0x37, 0x64, 0xaf, 0x7e, 0xf8, 0x6e,
|
||||
0xd0, 0x18, 0x65, 0x87, 0x48, 0x20, 0xe7, 0xf7, 0x1a, 0x6c, 0x1f, 0x04, 0x01, 0xe6, 0xfc, 0x98,
|
||||
0x70, 0x31, 0xca, 0xcc, 0x27, 0xd0, 0x08, 0xa6, 0x88, 0xd0, 0x31, 0x99, 0xa8, 0xe6, 0x35, 0x87,
|
||||
0xef, 0xfc, 0xab, 0x6c, 0xf5, 0x7b, 0xf2, 0xf6, 0xc3, 0xc3, 0xf3, 0xdc, 0xd6, 0x83, 0xe2, 0xe8,
|
||||
0x97, 0x87, 0xc9, 0x25, 0x2d, 0xd5, 0xad, 0xb4, 0xd4, 0xfe, 0x3b, 0x2d, 0xda, 0xf3, 0x69, 0xa9,
|
||||
0x6f, 0xd2, 0xd2, 0xb8, 0x3e, 0x5a, 0xf4, 0x2b, 0xb4, 0x3c, 0x81, 0x06, 0x52, 0xbd, 0xc5, 0xdc,
|
||||
0x32, 0x7a, 0xb5, 0x7e, 0x6b, 0xef, 0xb6, 0xfb, 0xd7, 0xff, 0xb3, 0x5b, 0x74, 0x7f, 0x34, 0x8f,
|
||||
0x67, 0x78, 0xd8, 0x7b, 0x9a, 0xdb, 0x95, 0xf3, 0xdc, 0x86, 0xe8, 0x82, 0x92, 0x6f, 0x7e, 0xb1,
|
||||
0xe1, 0x25, 0x41, 0xfe, 0x45, 0xc0, 0x82, 0xf3, 0xe6, 0x1a, 0xe7, 0x70, 0x8d, 0xf3, 0xd6, 0x36,
|
||||
0xce, 0xbf, 0xd7, 0x60, 0xfb, 0x70, 0x41, 0x51, 0x44, 0x82, 0xfb, 0x18, 0xbf, 0x1c, 0xce, 0x1f,
|
||||
0xc1, 0x96, 0xe4, 0x5c, 0x90, 0x78, 0x1c, 0xa0, 0xf8, 0x05, 0x58, 0x97, 0x92, 0x19, 0x91, 0xf8,
|
||||
0x1e, 0x8a, 0x57, 0xb1, 0x4e, 0x31, 0x56, 0xb1, 0xb4, 0x17, 0x8a, 0x75, 0x1f, 0x63, 0x19, 0xab,
|
||||
0x94, 0x50, 0xfd, 0xf9, 0x12, 0x6a, 0x6c, 0x4a, 0x48, 0xbf, 0x3e, 0x09, 0x19, 0x5b, 0x24, 0xd4,
|
||||
0xfc, 0x5f, 0x24, 0x04, 0xd7, 0x24, 0xd4, 0x5a, 0x93, 0x50, 0x7b, 0x9b, 0x84, 0x1c, 0xd8, 0x39,
|
||||
0xca, 0x04, 0xa6, 0x9c, 0x30, 0xfa, 0x6e, 0xac, 0x56, 0xcd, 0xe5, 0x2a, 0x28, 0x07, 0xf2, 0xd7,
|
||||
0x00, 0xde, 0x5a, 0x5b, 0x11, 0x3e, 0xe6, 0x31, 0xa3, 0x5c, 0x15, 0xaa, 0xa6, 0x3c, 0x28, 0x86,
|
||||
0xb8, 0x1a, 0xec, 0x6f, 0x40, 0x6d, 0xc6, 0x42, 0x6e, 0x55, 0x55, 0x91, 0xb7, 0x36, 0x8b, 0x3c,
|
||||
0x66, 0xa1, 0xaf, 0x5c, 0xcc, 0x9b, 0xb0, 0x96, 0x60, 0xa1, 0x34, 0xd3, 0xf6, 0xe5, 0xd1, 0xdc,
|
||||
0x85, 0x46, 0x1a, 0x8d, 0x71, 0x92, 0xb0, 0xa4, 0x9c, 0xba, 0x7a, 0x1a, 0x1d, 0x49, 0x53, 0x42,
|
||||
0x52, 0x1c, 0x73, 0x8e, 0x27, 0x05, 0xab, 0xbe, 0x1e, 0x22, 0xfe, 0x3e, 0xc7, 0x93, 0x22, 0xcd,
|
||||
0xbd, 0x4f, 0x01, 0xac, 0x3d, 0xe6, 0xa1, 0xf9, 0x31, 0x84, 0x57, 0xb6, 0x99, 0xbd, 0x99, 0xc0,
|
||||
0x5a, 0x2d, 0x9d, 0x3b, 0x7f, 0xe3, 0xb0, 0x2a, 0xd6, 0x79, 0xed, 0x93, 0x1f, 0x7f, 0xfb, 0xb2,
|
||||
0x6a, 0x3b, 0xb7, 0xbd, 0xcd, 0x75, 0x5a, 0x7a, 0x8f, 0x45, 0x36, 0x3c, 0x78, 0xba, 0xec, 0x82,
|
||||
0x67, 0xcb, 0x2e, 0xf8, 0x75, 0xd9, 0x05, 0x5f, 0x9c, 0x75, 0x2b, 0xcf, 0xce, 0xba, 0x95, 0x9f,
|
||||
0xce, 0xba, 0x95, 0x0f, 0xee, 0x5c, 0xd5, 0x13, 0x4e, 0x82, 0x01, 0x61, 0xde, 0x0c, 0x05, 0x8c,
|
||||
0x92, 0x60, 0xe2, 0x65, 0x2a, 0x96, 0x12, 0xd5, 0x49, 0x43, 0xed, 0xda, 0xb7, 0xfe, 0x0c, 0x00,
|
||||
0x00, 0xff, 0xff, 0x91, 0xe5, 0xb2, 0x95, 0x4f, 0x08, 0x00, 0x00,
|
||||
// 860 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x8f, 0xdb, 0x44,
|
||||
0x14, 0xcf, 0x24, 0x4e, 0xe2, 0x4c, 0x42, 0x55, 0x59, 0x5b, 0xc9, 0x89, 0x68, 0x1c, 0x45, 0x82,
|
||||
0x06, 0xa4, 0xd8, 0xea, 0xc2, 0x69, 0x4f, 0x6c, 0xba, 0xdb, 0xaa, 0xd5, 0x56, 0x20, 0x2b, 0x5c,
|
||||
0xe8, 0x21, 0x9a, 0x75, 0x66, 0x9d, 0x11, 0xf1, 0x8c, 0xe5, 0x99, 0x58, 0x0e, 0x12, 0x17, 0xc4,
|
||||
0x81, 0x1b, 0x48, 0x7c, 0x01, 0x0e, 0x9c, 0xb8, 0xc2, 0x07, 0xe0, 0x58, 0x71, 0xaa, 0xc4, 0x05,
|
||||
0x71, 0x30, 0x28, 0xcb, 0x69, 0x6f, 0xf0, 0x09, 0xd0, 0xcc, 0x78, 0xff, 0x84, 0x28, 0x05, 0xca,
|
||||
0xa2, 0x9e, 0xf2, 0x9e, 0xdf, 0x9f, 0x79, 0xef, 0xfd, 0x7e, 0x79, 0x0f, 0xb6, 0xb1, 0x98, 0xe1,
|
||||
0x24, 0x22, 0x54, 0x78, 0x38, 0x8d, 0xbc, 0xf4, 0xae, 0x27, 0x32, 0x37, 0x4e, 0x98, 0x60, 0xd6,
|
||||
0xcd, 0x0b, 0x93, 0x8b, 0xd3, 0xc8, 0x4d, 0xef, 0x76, 0xda, 0x01, 0xe3, 0x11, 0xe3, 0x13, 0x65,
|
||||
0xf7, 0xb4, 0xa2, 0x9d, 0x3b, 0x9d, 0x8d, 0x3c, 0x32, 0x46, 0xdb, 0x76, 0x42, 0x16, 0x32, 0x1d,
|
||||
0x23, 0xa5, 0xe2, 0xeb, 0xab, 0x21, 0x63, 0xe1, 0x1c, 0x7b, 0x28, 0x26, 0x1e, 0xa2, 0x94, 0x09,
|
||||
0x24, 0x08, 0xa3, 0xe7, 0xf9, 0xda, 0x85, 0x55, 0x69, 0xc7, 0x8b, 0x13, 0x0f, 0xd1, 0xa5, 0x36,
|
||||
0xf5, 0x3f, 0x07, 0xf0, 0x95, 0xc7, 0x3c, 0x3c, 0x94, 0x0f, 0xe2, 0x45, 0x34, 0xce, 0xac, 0x01,
|
||||
0x34, 0xa6, 0x48, 0x20, 0x1b, 0xf4, 0xc0, 0xa0, 0xb9, 0xbb, 0xe3, 0xea, 0x58, 0xf7, 0x3c, 0xd6,
|
||||
0xdd, 0xa7, 0x4b, 0x5f, 0x79, 0x58, 0x6d, 0x68, 0x70, 0xf2, 0x11, 0xb6, 0xcb, 0x3d, 0x30, 0x00,
|
||||
0xa3, 0xea, 0x59, 0xee, 0x80, 0xa1, 0xaf, 0x3e, 0x59, 0x0e, 0x34, 0x66, 0x88, 0xcf, 0xec, 0x4a,
|
||||
0x0f, 0x0c, 0x1a, 0xa3, 0xe6, 0x1f, 0xb9, 0x53, 0x4f, 0xe6, 0xf1, 0x5e, 0x7f, 0xd8, 0xf7, 0x95,
|
||||
0xc1, 0xb2, 0xa0, 0x71, 0x92, 0xb0, 0xc8, 0x36, 0xa4, 0x83, 0xaf, 0xe4, 0x3d, 0xe3, 0xb3, 0xaf,
|
||||
0x9c, 0x52, 0xff, 0xdb, 0x32, 0x34, 0x8f, 0x70, 0x88, 0x82, 0xe5, 0x38, 0xb3, 0x76, 0x60, 0x95,
|
||||
0x32, 0x1a, 0x60, 0x55, 0x8d, 0xe1, 0x6b, 0xc5, 0x7a, 0x00, 0x1b, 0x21, 0x92, 0x93, 0x23, 0x81,
|
||||
0x7e, 0xbd, 0x31, 0x7a, 0xf3, 0xe7, 0xdc, 0x79, 0x3d, 0x24, 0x62, 0xb6, 0x38, 0x76, 0x03, 0x16,
|
||||
0x15, 0xf3, 0x2c, 0x7e, 0x86, 0x7c, 0xfa, 0xa1, 0x27, 0x96, 0x31, 0xe6, 0xee, 0x43, 0x2a, 0x7c,
|
||||
0x33, 0x44, 0xfc, 0x3d, 0x19, 0x6b, 0x75, 0x61, 0x25, 0x44, 0x5c, 0x55, 0x69, 0x8c, 0x5a, 0xab,
|
||||
0xdc, 0x31, 0x1f, 0x20, 0x7e, 0x44, 0x22, 0x22, 0x7c, 0x69, 0xb0, 0x6e, 0xc0, 0xb2, 0x60, 0x45,
|
||||
0x8d, 0x65, 0xc1, 0xac, 0x47, 0xb0, 0x9a, 0xa2, 0xf9, 0x02, 0xdb, 0x55, 0xf5, 0xe8, 0xdb, 0xff,
|
||||
0xfc, 0xd1, 0x55, 0xee, 0xd4, 0xf6, 0x23, 0xb6, 0xa0, 0xc2, 0xd7, 0x29, 0xe4, 0x04, 0xd4, 0x9c,
|
||||
0x6b, 0x3d, 0x30, 0x68, 0x15, 0x13, 0x6d, 0x41, 0x90, 0xda, 0x75, 0xf5, 0x01, 0xa4, 0x52, 0x4b,
|
||||
0x6c, 0x53, 0x6b, 0x89, 0xd4, 0xb8, 0xdd, 0xd0, 0x1a, 0xdf, 0xbb, 0x21, 0x67, 0xf5, 0xc3, 0x77,
|
||||
0xc3, 0xda, 0x38, 0x3b, 0x40, 0x02, 0xf5, 0x7f, 0xaf, 0xc0, 0xd6, 0x7e, 0x10, 0x60, 0xce, 0x8f,
|
||||
0x08, 0x17, 0xe3, 0xcc, 0x7a, 0x02, 0xcd, 0x60, 0x86, 0x08, 0x9d, 0x90, 0xa9, 0x1a, 0x5e, 0x63,
|
||||
0xf4, 0xce, 0xbf, 0xaa, 0xb6, 0x7e, 0x4f, 0x46, 0x3f, 0x3c, 0x38, 0xcb, 0x9d, 0x7a, 0xa0, 0x45,
|
||||
0xbf, 0x10, 0xa6, 0x97, 0xb0, 0x94, 0xb7, 0xc2, 0x52, 0xf9, 0xef, 0xb0, 0x18, 0xcf, 0x87, 0xa5,
|
||||
0xba, 0x09, 0x4b, 0xed, 0xfa, 0x60, 0xa9, 0x5f, 0x81, 0xe5, 0x09, 0x34, 0x91, 0x9a, 0x2d, 0xe6,
|
||||
0xb6, 0xd9, 0xab, 0x0c, 0x9a, 0xbb, 0xb7, 0xdd, 0xbf, 0xfe, 0x9f, 0x5d, 0x3d, 0xfd, 0xf1, 0x22,
|
||||
0x9e, 0xe3, 0x51, 0xef, 0x69, 0xee, 0x94, 0xce, 0x72, 0x07, 0xa2, 0x0b, 0x48, 0xbe, 0xf9, 0xc5,
|
||||
0x81, 0x97, 0x00, 0xf9, 0x17, 0x09, 0x35, 0xe6, 0x8d, 0x35, 0xcc, 0xe1, 0x1a, 0xe6, 0xcd, 0x6d,
|
||||
0x98, 0x7f, 0x6f, 0xc0, 0xd6, 0xc1, 0x92, 0xa2, 0x88, 0x04, 0xf7, 0x31, 0x7e, 0x39, 0x98, 0x3f,
|
||||
0x82, 0x4d, 0x89, 0xb9, 0x20, 0xf1, 0x24, 0x40, 0xf1, 0x0b, 0xa0, 0x2e, 0x29, 0x33, 0x26, 0xf1,
|
||||
0x3d, 0x14, 0x9f, 0xe7, 0x3a, 0xc1, 0x58, 0xe5, 0x32, 0x5e, 0x28, 0xd7, 0x7d, 0x8c, 0x65, 0xae,
|
||||
0x82, 0x42, 0xd5, 0xe7, 0x53, 0xa8, 0xb6, 0x49, 0xa1, 0xfa, 0xf5, 0x51, 0xc8, 0xdc, 0x42, 0xa1,
|
||||
0xc6, 0xff, 0x42, 0x21, 0xb8, 0x46, 0xa1, 0xe6, 0x1a, 0x85, 0x5a, 0xdb, 0x28, 0xd4, 0x87, 0x9d,
|
||||
0xc3, 0x4c, 0x60, 0xca, 0x09, 0xa3, 0xef, 0xc6, 0xea, 0x66, 0x5c, 0x9e, 0x82, 0x62, 0x21, 0x7f,
|
||||
0x0d, 0xe0, 0xad, 0xb5, 0x13, 0xe1, 0x63, 0x1e, 0x33, 0xca, 0x55, 0xa3, 0x6a, 0xcb, 0x03, 0xbd,
|
||||
0xc4, 0xd5, 0x62, 0x7f, 0x03, 0x1a, 0x73, 0x16, 0x72, 0xbb, 0xac, 0x9a, 0xbc, 0xb5, 0xd9, 0xe4,
|
||||
0x11, 0x0b, 0x7d, 0xe5, 0x62, 0xdd, 0x84, 0x95, 0x04, 0x0b, 0xc5, 0x99, 0x96, 0x2f, 0x45, 0xab,
|
||||
0x0d, 0xcd, 0x34, 0x9a, 0xe0, 0x24, 0x61, 0x49, 0xb1, 0x75, 0xeb, 0x69, 0x74, 0x28, 0x55, 0x69,
|
||||
0x92, 0xe4, 0x58, 0x70, 0x3c, 0xd5, 0xa8, 0xfa, 0xf5, 0x10, 0xf1, 0xf7, 0x39, 0x9e, 0xea, 0x32,
|
||||
0x77, 0x3f, 0x05, 0xb0, 0xf2, 0x98, 0x87, 0xd6, 0xc7, 0x10, 0x5e, 0xb9, 0x66, 0xce, 0x66, 0x01,
|
||||
0x6b, 0xbd, 0x74, 0xee, 0xfc, 0x8d, 0xc3, 0x79, 0xb3, 0xfd, 0xd7, 0x3e, 0xf9, 0xf1, 0xb7, 0x2f,
|
||||
0xcb, 0x4e, 0xff, 0xb6, 0xb7, 0x79, 0x9d, 0x0b, 0xef, 0x89, 0xc8, 0x46, 0xfb, 0x4f, 0x57, 0x5d,
|
||||
0xf0, 0x6c, 0xd5, 0x05, 0xbf, 0xae, 0xba, 0xe0, 0x8b, 0xd3, 0x6e, 0xe9, 0xd9, 0x69, 0xb7, 0xf4,
|
||||
0xd3, 0x69, 0xb7, 0xf4, 0xc1, 0x9d, 0xab, 0x7c, 0xc2, 0x49, 0x30, 0x24, 0xcc, 0x9b, 0xa3, 0x80,
|
||||
0x51, 0x12, 0x4c, 0xbd, 0x4c, 0xe5, 0x52, 0xa4, 0x3a, 0xae, 0xa9, 0x5b, 0xfb, 0xd6, 0x9f, 0x01,
|
||||
0x00, 0x00, 0xff, 0xff, 0x44, 0x7c, 0x85, 0x7a, 0x4f, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
Generated
+7
-2
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
var (
|
||||
filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
@@ -70,12 +72,14 @@ func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marsh
|
||||
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
|
||||
// UnaryRPC :call MsgServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
|
||||
func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -83,6 +87,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -158,7 +163,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/math"
|
||||
@@ -34,7 +34,7 @@ func DecodeTxResponse(in []byte) (*MsgEthereumTxResponse, error) {
|
||||
|
||||
var res MsgEthereumTxResponse
|
||||
if err := proto.Unmarshal(txMsgData.MsgResponses[0].Value, &res); err != nil {
|
||||
return nil, sdkerrors.Wrap(err, "failed to unmarshal tx response message data")
|
||||
return nil, errorsmod.Wrap(err, "failed to unmarshal tx response message data")
|
||||
}
|
||||
|
||||
return &res, nil
|
||||
|
||||
@@ -49,7 +49,7 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) {
|
||||
// to prevent BaseFee manipulation we limit the gasWanted so that
|
||||
// gasWanted = max(gasWanted * MinGasMultiplier, gasUsed)
|
||||
// this will be keep BaseFee protected from un-penalized manipulation
|
||||
// more info here https://github.com/cerc-io/laconicd/pull/1105#discussion_r888798925
|
||||
// more info here https://github.com/evmos/ethermint/pull/1105#discussion_r888798925
|
||||
minGasMultiplier := k.GetParams(ctx).MinGasMultiplier
|
||||
limitedGasWanted := sdk.NewDec(int64(gasWanted)).Mul(minGasMultiplier)
|
||||
gasWanted = sdk.MaxDec(limitedGasWanted, sdk.NewDec(int64(gasUsed))).TruncateInt().Uint64()
|
||||
|
||||
@@ -9,10 +9,12 @@ import (
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
v010 "github.com/cerc-io/laconicd/x/feemarket/migrations/v010"
|
||||
"github.com/cerc-io/laconicd/x/feemarket/types"
|
||||
)
|
||||
|
||||
// KeyPrefixBaseFeeV1 TODO: Temporary will be removed with params refactor PR
|
||||
var KeyPrefixBaseFeeV1 = []byte{2}
|
||||
|
||||
// Keeper grants access to the Fee Market module state.
|
||||
type Keeper struct {
|
||||
// Protobuf codec
|
||||
@@ -98,7 +100,7 @@ func (k Keeper) AddTransientGasWanted(ctx sdk.Context, gasWanted uint64) (uint64
|
||||
// return nil if base fee is not enabled
|
||||
func (k Keeper) GetBaseFeeV1(ctx sdk.Context) *big.Int {
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
bz := store.Get(v010.KeyPrefixBaseFeeV1)
|
||||
bz := store.Get(KeyPrefixBaseFeeV1)
|
||||
if len(bz) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
v010 "github.com/cerc-io/laconicd/x/feemarket/migrations/v010"
|
||||
v011 "github.com/cerc-io/laconicd/x/feemarket/migrations/v011"
|
||||
)
|
||||
|
||||
// Migrator is a struct for handling in-place store migrations.
|
||||
type Migrator struct {
|
||||
keeper Keeper
|
||||
@@ -18,13 +11,3 @@ func NewMigrator(keeper Keeper) Migrator {
|
||||
keeper: keeper,
|
||||
}
|
||||
}
|
||||
|
||||
// Migrate1to2 migrates the store from consensus version v1 to v2
|
||||
func (m Migrator) Migrate1to2(ctx sdk.Context) error {
|
||||
return v010.MigrateStore(ctx, &m.keeper.paramSpace, m.keeper.storeKey)
|
||||
}
|
||||
|
||||
// Migrate2to3 migrates the store from consensus version v2 to v3
|
||||
func (m Migrator) Migrate2to3(ctx sdk.Context) error {
|
||||
return v011.MigrateStore(ctx, &m.keeper.paramSpace)
|
||||
}
|
||||
|
||||
@@ -1,20 +1 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/feemarket/keeper"
|
||||
v010 "github.com/cerc-io/laconicd/x/feemarket/migrations/v010"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestMigration1To2() {
|
||||
suite.SetupTest()
|
||||
storeKey := suite.app.GetKey("feemarket")
|
||||
store := suite.ctx.KVStore(storeKey)
|
||||
baseFee := big.NewInt(1000)
|
||||
store.Set(v010.KeyPrefixBaseFeeV1, baseFee.Bytes())
|
||||
m := keeper.NewMigrator(suite.app.FeeMarketKeeper)
|
||||
err := m.Migrate1to2(suite.ctx)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(baseFee, suite.app.FeeMarketKeeper.GetBaseFee(suite.ctx))
|
||||
}
|
||||
|
||||
@@ -28,6 +28,15 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
||||
// Required by EIP1559 base fee calculation.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// GetBaseFeeEnabled returns true if base fee is enabled
|
||||
func (k Keeper) GetBaseFeeEnabled(ctx sdk.Context) bool {
|
||||
var noBaseFee bool
|
||||
var enableHeight int64
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyNoBaseFee, &noBaseFee)
|
||||
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableHeight, &enableHeight)
|
||||
return !noBaseFee && ctx.BlockHeight() >= enableHeight
|
||||
}
|
||||
|
||||
// GetBaseFee get's the base fee from the paramSpace
|
||||
// return nil if base fee is not enabled
|
||||
func (k Keeper) GetBaseFee(ctx sdk.Context) *big.Int {
|
||||
|
||||
@@ -1,14 +1,71 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/feemarket/types"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestSetGetParams() {
|
||||
params := suite.app.FeeMarketKeeper.GetParams(suite.ctx)
|
||||
suite.Require().Equal(types.DefaultParams(), params)
|
||||
params.ElasticityMultiplier = 3
|
||||
suite.app.FeeMarketKeeper.SetParams(suite.ctx, params)
|
||||
newParams := suite.app.FeeMarketKeeper.GetParams(suite.ctx)
|
||||
suite.Require().Equal(newParams, params)
|
||||
testCases := []struct {
|
||||
name string
|
||||
paramsFun func() interface{}
|
||||
getFun func() interface{}
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
"success - Checks if the default params are set correctly",
|
||||
func() interface{} {
|
||||
return types.DefaultParams()
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.FeeMarketKeeper.GetParams(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check ElasticityMultiplier is set to 3 and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.ElasticityMultiplier = 3
|
||||
suite.app.FeeMarketKeeper.SetParams(suite.ctx, params)
|
||||
return params.ElasticityMultiplier
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.FeeMarketKeeper.GetParams(suite.ctx).ElasticityMultiplier
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check BaseFeeEnabled is computed with its default params and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
suite.app.FeeMarketKeeper.SetParams(suite.ctx, types.DefaultParams())
|
||||
return true
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.FeeMarketKeeper.GetBaseFeeEnabled(suite.ctx)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"success - Check BaseFeeEnabled is computed with alternate params and can be retrieved correctly",
|
||||
func() interface{} {
|
||||
params.NoBaseFee = true
|
||||
params.EnableHeight = 5
|
||||
suite.app.FeeMarketKeeper.SetParams(suite.ctx, params)
|
||||
return true
|
||||
},
|
||||
func() interface{} {
|
||||
return suite.app.FeeMarketKeeper.GetBaseFeeEnabled(suite.ctx)
|
||||
},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
outcome := reflect.DeepEqual(tc.paramsFun(), tc.getFun())
|
||||
suite.Require().Equal(tc.expected, outcome)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
+8
-21
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/cerc-io/laconicd/x/feemarket/client/cli"
|
||||
"github.com/cerc-io/laconicd/x/feemarket/keeper"
|
||||
"github.com/cerc-io/laconicd/x/feemarket/simulation"
|
||||
"github.com/cerc-io/laconicd/x/feemarket/types"
|
||||
)
|
||||
|
||||
@@ -65,7 +64,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo
|
||||
|
||||
// RegisterRESTRoutes performs a no-op as the EVM module doesn't expose REST
|
||||
// endpoints
|
||||
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {
|
||||
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {
|
||||
}
|
||||
|
||||
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(c client.Context, serveMux *runtime.ServeMux) {
|
||||
@@ -110,23 +109,12 @@ func (AppModule) Name() string {
|
||||
|
||||
// RegisterInvariants interface for registering invariants. Performs a no-op
|
||||
// as the fee market module doesn't expose invariants.
|
||||
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {}
|
||||
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}
|
||||
|
||||
// RegisterServices registers the GRPC query service and migrator service to respond to the
|
||||
// module-specific GRPC queries and handle the upgrade store migration for the module.
|
||||
func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
|
||||
|
||||
m := keeper.NewMigrator(am.keeper)
|
||||
err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Route returns the message routing key for the fee market module.
|
||||
@@ -139,7 +127,7 @@ func (AppModule) QuerierRoute() string { return types.RouterKey }
|
||||
|
||||
// LegacyQuerierHandler returns nil as the fee market module doesn't expose a legacy
|
||||
// Querier.
|
||||
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
|
||||
func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -173,24 +161,23 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
|
||||
}
|
||||
|
||||
// RandomizedParams creates randomized fee market param changes for the simulator.
|
||||
func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange {
|
||||
func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange {
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for fee market module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {}
|
||||
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {}
|
||||
|
||||
// ProposalContents doesn't return any content functions for governance proposals.
|
||||
func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent {
|
||||
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GenerateGenesisState creates a randomized GenState of the fee market module.
|
||||
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
|
||||
simulation.RandomizedGenState(simState)
|
||||
func (AppModule) GenerateGenesisState(_ *module.SimulationState) {
|
||||
}
|
||||
|
||||
// WeightedOperations returns the all the fee market module operations with their respective weights.
|
||||
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
|
||||
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ Before EIP-1559 the transaction fee is calculated with
|
||||
fee = gasPrice * gasLimit
|
||||
```
|
||||
|
||||
, where `gasPrice` is the price per gas and `gasLimit` describes the amount of gas required to perform the transaction. The more complex operations a transaction requires, the higher the gasLimit (See [Executing EVM bytecode](https://docs.evmos.org/modules/evm/01_concepts.html#executing-evm-bytecode)). To submit a transaction, the signer needs to specify the `gasPrice`.
|
||||
where `gasPrice` is the price per gas and `gasLimit` describes the amount of gas required to perform the transaction.
|
||||
The more complex operations a transaction requires, the higher the gasLimit (See [Executing EVM bytecode](https://docs.evmos.org/modules/evm/01_concepts.html#executing-evm-bytecode)).
|
||||
To submit a transaction, the signer needs to specify the `gasPrice`.
|
||||
|
||||
With EIP-1559 enabled, the transaction fee is calculated with
|
||||
|
||||
@@ -22,10 +24,16 @@ With EIP-1559 enabled, the transaction fee is calculated with
|
||||
fee = (baseFee + priorityTip) * gasLimit
|
||||
```
|
||||
|
||||
, where `baseFee` is the fixed-per-block network fee per gas and `priorityTip` is an additional fee per gas that can be set optionally. Note, that both the base fee and the priority tip are a gas prices. To submit a transaction with EIP-1559, the signer needs to specify the `gasFeeCap` a maximum fee per gas they are willing to pay total and optionally the `priorityTip` , which covers both the priority fee and the block's network fee per gas (aka: base fee).
|
||||
where `baseFee` is the fixed-per-block network fee per gas and `priorityTip` is an additional fee per gas that can be set optionally.
|
||||
Note, that both the base fee and the priority tip are gas prices.
|
||||
To submit a transaction with EIP-1559, the signer needs to specify the `gasFeeCap`, which is the maximum fee per gas they are willing to pay in total.
|
||||
Optionally, the `priorityTip` can be specified, which covers both the priority fee and the block's network fee per gas (aka: base fee).
|
||||
|
||||
::: tip
|
||||
The Cosmos SDK uses a different terminology for `gas` than Ethereum. What is called `gasLimit` on Ethereum is called `gasWanted` on Cosmos. You might encounter both terminologies on Evmos since it builds Ethereum on top of the SDK, e.g. when using different wallets like Keplr for Cosmos and Metamask for Ethereum.
|
||||
The Cosmos SDK uses a different terminology for `gas` than Ethereum.
|
||||
What is called `gasLimit` on Ethereum is called `gasWanted` on Cosmos.
|
||||
You might encounter both terminologies on Evmos since it builds Ethereum on top of the SDK,
|
||||
e.g. when using different wallets like Keplr for Cosmos and Metamask for Ethereum.
|
||||
:::
|
||||
|
||||
## Base Fee
|
||||
@@ -39,13 +47,17 @@ Instead of burning the base fee (as implemented on Ethereum), the `feemarket` mo
|
||||
|
||||
## Priority Tip
|
||||
|
||||
In EIP-1559, the `max_priority_fee_per_gas`, often referred to as `tip`, is an additional gas price that can be added to the `baseFee` in order to incentive transaction prioritization. The higher the tip, the more likely the transaction is included in the block.
|
||||
In EIP-1559, the `max_priority_fee_per_gas`, often referred to as `tip`,
|
||||
is an additional gas price that can be added to the `baseFee` in order to incentivize transaction prioritization.
|
||||
The higher the tip, the more likely the transaction is included in the block.
|
||||
|
||||
Until the Cosmos SDK version v0.46, however, there is no notion of transaction prioritization. Thus the tip for an EIP-1559 transaction on Ethermint should be zero (`MaxPriorityFeePerGas` JSON-RPC endpoint returns `0`). Have a look at [ADR 067](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-067-mempool-refactor.md) to read about future plans on transaction prioritization in the Cosmos SDK.
|
||||
Until the Cosmos SDK version v0.46, however, there is no notion of transaction prioritization.
|
||||
Thus, the tip for an EIP-1559 transaction on Ethermint should be zero (`MaxPriorityFeePerGas` JSON-RPC endpoint returns `0`).
|
||||
Have a look at the [mempool](https://docs.evmos.org/validators/setup/mempool.html) docs to read more about how to leverage transaction prioritization.
|
||||
|
||||
## Effective Gas price
|
||||
|
||||
For EIP-1559 transactions (dynamic fee transactions) the effective gas price descibes the maximum gas price that a transaction is willing to provide. It is derived from the transaction arguments and the base fee parameter. Depending on which one is smaller, the effective gas price is either the `baseFee + tip` or the `gasFeeCap`
|
||||
For EIP-1559 transactions (dynamic fee transactions) the effective gas price describes the maximum gas price that a transaction is willing to provide. It is derived from the transaction arguments and the base fee parameter. Depending on which one is smaller, the effective gas price is either the `baseFee + tip` or the `gasFeeCap`
|
||||
|
||||
```
|
||||
min(baseFee + gasTipCap, gasFeeCap)
|
||||
@@ -72,4 +84,4 @@ The comparison of transaction gas price and the lower bound is implemented throu
|
||||
|
||||
::: tip
|
||||
If the base fee decreases to a value below the global `MinGasPrice`, it is set to the `MinGasPrice`. This is implemented, so that the base fee can't drop to gas prices that wouldn't allow transactions to be accepted in the mempool, because of a higher `MinGasPrice`.
|
||||
:::
|
||||
:::
|
||||
|
||||
@@ -20,13 +20,13 @@ ethermintd query feemarket --help
|
||||
The `base-fee` command allows users to query the block base fee by height.
|
||||
|
||||
```
|
||||
ethermintd query feemarket base-fee [height] [flags]
|
||||
ethermintd query feemarket base-fee [flags]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
ethermintd query feemarket base-fee 5...
|
||||
ethermintd query feemarket base-fee ...
|
||||
```
|
||||
|
||||
Example Output:
|
||||
@@ -40,13 +40,13 @@ base_fee: "512908936"
|
||||
The `block-gas` command allows users to query the block gas by height.
|
||||
|
||||
```
|
||||
ethermintd query feemarket block-gas [height] [flags]
|
||||
ethermintd query feemarket block-gas [flags]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
ethermintd query feemarket block-gas 5...
|
||||
ethermintd query feemarket block-gas ...
|
||||
```
|
||||
|
||||
Example Output:
|
||||
|
||||
Generated
+8
-8
@@ -6,7 +6,7 @@ package types
|
||||
import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
@@ -26,22 +26,22 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Params defines the EVM module parameters
|
||||
type Params struct {
|
||||
// no base fee forces the EIP-1559 base fee to 0 (needed for 0 price calls)
|
||||
// no_base_fee forces the EIP-1559 base fee to 0 (needed for 0 price calls)
|
||||
NoBaseFee bool `protobuf:"varint,1,opt,name=no_base_fee,json=noBaseFee,proto3" json:"no_base_fee,omitempty"`
|
||||
// base fee change denominator bounds the amount the base fee can change
|
||||
// base_fee_change_denominator bounds the amount the base fee can change
|
||||
// between blocks.
|
||||
BaseFeeChangeDenominator uint32 `protobuf:"varint,2,opt,name=base_fee_change_denominator,json=baseFeeChangeDenominator,proto3" json:"base_fee_change_denominator,omitempty"`
|
||||
// elasticity multiplier bounds the maximum gas limit an EIP-1559 block may
|
||||
// elasticity_multiplier bounds the maximum gas limit an EIP-1559 block may
|
||||
// have.
|
||||
ElasticityMultiplier uint32 `protobuf:"varint,3,opt,name=elasticity_multiplier,json=elasticityMultiplier,proto3" json:"elasticity_multiplier,omitempty"`
|
||||
// height at which the base fee calculation is enabled.
|
||||
// enable_height defines at which block height the base fee calculation is enabled.
|
||||
EnableHeight int64 `protobuf:"varint,5,opt,name=enable_height,json=enableHeight,proto3" json:"enable_height,omitempty"`
|
||||
// base fee for EIP-1559 blocks.
|
||||
// base_fee for EIP-1559 blocks.
|
||||
BaseFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee"`
|
||||
// min_gas_price defines the minimum gas price value for cosmos and eth transactions
|
||||
MinGasPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_price"`
|
||||
// min gas denominator bounds the minimum gasUsed to be charged
|
||||
// to senders based on GasLimit
|
||||
// min_gas_multiplier bounds the minimum gas used to be charged
|
||||
// to senders based on gas limit
|
||||
MinGasMultiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_multiplier"`
|
||||
}
|
||||
|
||||
|
||||
Generated
+16
-16
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
@@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
type GenesisState struct {
|
||||
// params defines all the paramaters of the module.
|
||||
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
|
||||
// block gas is the amount of gas wanted on the last block before the upgrade.
|
||||
// block_gas is the amount of gas wanted on the last block before the upgrade.
|
||||
// Zero by default.
|
||||
BlockGas uint64 `protobuf:"varint,3,opt,name=block_gas,json=blockGas,proto3" json:"block_gas,omitempty"`
|
||||
}
|
||||
@@ -88,23 +88,23 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_6241c21661288629 = []byte{
|
||||
// 253 bytes of a gzipped FileDescriptorProto
|
||||
// 252 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48,
|
||||
0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1,
|
||||
0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
|
||||
0x17, 0x12, 0x83, 0xab, 0xd2, 0x83, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf,
|
||||
0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0xd4, 0x70, 0x98, 0x89, 0xd0, 0x0a, 0x56, 0xa7,
|
||||
0x54, 0xc9, 0xc5, 0xe3, 0x0e, 0xb1, 0x26, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x86, 0x8b, 0xad,
|
||||
0x20, 0xb1, 0x28, 0x31, 0xb7, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x4e, 0x0f, 0xbb,
|
||||
0xb5, 0x7a, 0x01, 0x60, 0x55, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x08, 0x49,
|
||||
0x73, 0x71, 0x26, 0xe5, 0xe4, 0x27, 0x67, 0xc7, 0xa7, 0x27, 0x16, 0x4b, 0x30, 0x2b, 0x30, 0x6a,
|
||||
0xb0, 0x04, 0x71, 0x80, 0x05, 0xdc, 0x13, 0x8b, 0xbd, 0x58, 0x38, 0x98, 0x04, 0x98, 0x83, 0x38,
|
||||
0x92, 0x12, 0x8b, 0x53, 0xe3, 0xd3, 0x52, 0x53, 0x9d, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0,
|
||||
0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8,
|
||||
0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57,
|
||||
0x3f, 0x39, 0xb5, 0x28, 0x59, 0x37, 0x33, 0x5f, 0x3f, 0x27, 0x31, 0x39, 0x3f, 0x2f, 0x33, 0x39,
|
||||
0x45, 0xbf, 0x02, 0xc9, 0x43, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xaf, 0x18, 0x03,
|
||||
0x02, 0x00, 0x00, 0xff, 0xff, 0x77, 0x0a, 0xa1, 0x73, 0x48, 0x01, 0x00, 0x00,
|
||||
0x17, 0x12, 0x83, 0xab, 0xd2, 0x83, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x52, 0xc3, 0xa1, 0x1b, 0xa1,
|
||||
0x08, 0xac, 0x5f, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xcc, 0xd4, 0x07, 0xb1, 0x20, 0xa2, 0x4a,
|
||||
0x95, 0x5c, 0x3c, 0xee, 0x10, 0x6b, 0x82, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x6c, 0xb8, 0xd8, 0x0a,
|
||||
0x12, 0x8b, 0x12, 0x73, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xe4, 0xf4, 0xb0, 0x5b,
|
||||
0xab, 0x17, 0x00, 0x56, 0xe5, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x54, 0x8f, 0x90, 0x34,
|
||||
0x17, 0x67, 0x52, 0x4e, 0x7e, 0x72, 0x76, 0x7c, 0x7a, 0x62, 0xb1, 0x04, 0xb3, 0x02, 0xa3, 0x06,
|
||||
0x4b, 0x10, 0x07, 0x58, 0xc0, 0x3d, 0xb1, 0xd8, 0x8b, 0x85, 0x83, 0x49, 0x80, 0x39, 0x88, 0x23,
|
||||
0x29, 0xb1, 0x38, 0x35, 0x3e, 0x2d, 0x35, 0xd5, 0xc9, 0xfd, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f,
|
||||
0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b,
|
||||
0x8f, 0xe5, 0x18, 0xa2, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5,
|
||||
0x93, 0x53, 0x8b, 0x92, 0x75, 0x33, 0xf3, 0xf5, 0x73, 0x12, 0x93, 0xf3, 0xf3, 0x32, 0x93, 0x53,
|
||||
0xf4, 0x2b, 0x90, 0xbc, 0x59, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x8a, 0x31, 0x20,
|
||||
0x00, 0x00, 0xff, 0xff, 0x4f, 0xed, 0x9b, 0xf6, 0x48, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
||||
|
||||
@@ -19,7 +19,7 @@ const (
|
||||
// prefix bytes for the feemarket persistent store
|
||||
const (
|
||||
prefixBlockGasWanted = iota + 1
|
||||
deprecatedPrefixBaseFee //nolint
|
||||
deprecatedPrefixBaseFee // unused
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Generated
+32
-30
@@ -7,7 +7,7 @@ import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
@@ -151,8 +151,9 @@ func (m *QueryBaseFeeRequest) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo
|
||||
|
||||
// BaseFeeResponse returns the EIP1559 base fee.
|
||||
// QueryBaseFeeResponse returns the EIP1559 base fee.
|
||||
type QueryBaseFeeResponse struct {
|
||||
// base_fee is the EIP1559 base fee
|
||||
BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"`
|
||||
}
|
||||
|
||||
@@ -229,6 +230,7 @@ var xxx_messageInfo_QueryBlockGasRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryBlockGasResponse returns block gas used for a given height.
|
||||
type QueryBlockGasResponse struct {
|
||||
// gas is the returned block gas
|
||||
Gas int64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"`
|
||||
}
|
||||
|
||||
@@ -287,34 +289,34 @@ func init() {
|
||||
|
||||
var fileDescriptor_71a07c1ffd85fde2 = []byte{
|
||||
// 448 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x6f, 0xd3, 0x30,
|
||||
0x14, 0x8e, 0x29, 0x74, 0xc3, 0x5c, 0x90, 0xe9, 0x26, 0x14, 0x21, 0xaf, 0x04, 0xa9, 0xda, 0x06,
|
||||
0x89, 0xb5, 0x71, 0xe5, 0x14, 0x09, 0x26, 0x6e, 0x10, 0x6e, 0x48, 0x68, 0x72, 0xb2, 0xb7, 0x2c,
|
||||
0x6a, 0x13, 0x67, 0xb1, 0x3b, 0xb1, 0x2b, 0x37, 0x2e, 0x08, 0xc1, 0xaf, 0xe1, 0x1f, 0xf4, 0x58,
|
||||
0x89, 0x0b, 0xe2, 0x50, 0xa1, 0x96, 0x1f, 0x82, 0xe2, 0x38, 0xa5, 0x01, 0xc2, 0x7a, 0x8a, 0xf5,
|
||||
0xf2, 0xbd, 0xef, 0xfb, 0xde, 0xf7, 0x6c, 0xec, 0x80, 0x3a, 0x83, 0x22, 0x4d, 0x32, 0xc5, 0x4e,
|
||||
0x01, 0x52, 0x5e, 0x0c, 0x41, 0xb1, 0x8b, 0x03, 0x76, 0x3e, 0x86, 0xe2, 0xd2, 0xcb, 0x0b, 0xa1,
|
||||
0x04, 0xd9, 0x5e, 0x62, 0xbc, 0x25, 0xc6, 0xbb, 0x38, 0xb0, 0x7b, 0xb1, 0x88, 0x85, 0x86, 0xb0,
|
||||
0xf2, 0x54, 0xa1, 0xed, 0x7b, 0xb1, 0x10, 0xf1, 0x08, 0x18, 0xcf, 0x13, 0xc6, 0xb3, 0x4c, 0x28,
|
||||
0xae, 0x12, 0x91, 0x49, 0xf3, 0x77, 0xd0, 0xa2, 0xf7, 0x9b, 0x58, 0xe3, 0x9c, 0x1e, 0x26, 0x2f,
|
||||
0x4b, 0x0b, 0x2f, 0x78, 0xc1, 0x53, 0x19, 0xc0, 0xf9, 0x18, 0xa4, 0x72, 0x5e, 0xe1, 0x3b, 0x8d,
|
||||
0xaa, 0xcc, 0x45, 0x26, 0x81, 0x3c, 0xc1, 0xdd, 0x5c, 0x57, 0xee, 0xa2, 0x3e, 0xda, 0xbd, 0x75,
|
||||
0x48, 0xbd, 0x7f, 0x3b, 0xf6, 0xaa, 0x3e, 0xff, 0xfa, 0x64, 0xb6, 0x63, 0x05, 0xa6, 0xc7, 0xd9,
|
||||
0x32, 0xa4, 0x3e, 0x97, 0xf0, 0x0c, 0xa0, 0xd6, 0x7a, 0x83, 0x7b, 0xcd, 0xb2, 0x11, 0x7b, 0x8a,
|
||||
0x37, 0x43, 0x2e, 0xe1, 0xf8, 0x14, 0x40, 0xcb, 0xdd, 0xf4, 0xf7, 0xbf, 0xcf, 0x76, 0x06, 0x71,
|
||||
0xa2, 0xce, 0xc6, 0xa1, 0x17, 0x89, 0x94, 0x45, 0x42, 0xa6, 0x42, 0x9a, 0x8f, 0x2b, 0x4f, 0x86,
|
||||
0x4c, 0x5d, 0xe6, 0x20, 0xbd, 0xe7, 0x99, 0x0a, 0x36, 0xc2, 0x8a, 0xce, 0xd9, 0xae, 0xe9, 0x47,
|
||||
0x22, 0x1a, 0x1e, 0xf1, 0xe5, 0x88, 0x7b, 0x78, 0xeb, 0x8f, 0xba, 0xd1, 0xbd, 0x8d, 0x3b, 0x31,
|
||||
0xaf, 0x26, 0xec, 0x04, 0xe5, 0xf1, 0xf0, 0x4b, 0x07, 0xdf, 0xd0, 0x58, 0xf2, 0x1e, 0xe1, 0x6e,
|
||||
0x35, 0x1b, 0xd9, 0x6f, 0x9b, 0xfd, 0xef, 0x38, 0xed, 0x87, 0x6b, 0x61, 0x2b, 0x7d, 0x67, 0xf0,
|
||||
0xee, 0xeb, 0xcf, 0xcf, 0xd7, 0xfa, 0x84, 0xb2, 0x96, 0x15, 0x56, 0x71, 0x92, 0x0f, 0x08, 0x6f,
|
||||
0x98, 0xcc, 0xc8, 0xff, 0x05, 0x9a, 0x81, 0xdb, 0x8f, 0xd6, 0x03, 0x1b, 0x3b, 0xbb, 0xda, 0x8e,
|
||||
0x43, 0xfa, 0x6d, 0x76, 0xea, 0x25, 0x91, 0x4f, 0x08, 0x6f, 0xd6, 0x69, 0x92, 0x2b, 0x44, 0x9a,
|
||||
0xcb, 0xb0, 0xdd, 0x35, 0xd1, 0xc6, 0xd3, 0x9e, 0xf6, 0xf4, 0x80, 0xdc, 0x6f, 0xf5, 0x54, 0x76,
|
||||
0x1c, 0xc7, 0x5c, 0xfa, 0x47, 0x93, 0x39, 0x45, 0xd3, 0x39, 0x45, 0x3f, 0xe6, 0x14, 0x7d, 0x5c,
|
||||
0x50, 0x6b, 0xba, 0xa0, 0xd6, 0xb7, 0x05, 0xb5, 0x5e, 0xbb, 0xab, 0x37, 0x09, 0x8a, 0xc8, 0x4d,
|
||||
0x04, 0x1b, 0xf1, 0x48, 0x64, 0x49, 0x74, 0xc2, 0xde, 0xae, 0xf0, 0xe9, 0x4b, 0x15, 0x76, 0xf5,
|
||||
0x7b, 0x79, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xed, 0x22, 0xb4, 0xc9, 0x03, 0x00, 0x00,
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xc1, 0x6e, 0xd4, 0x30,
|
||||
0x10, 0x8d, 0x59, 0xd8, 0x16, 0x73, 0x41, 0x66, 0x5b, 0xa1, 0x08, 0xb9, 0x4b, 0x90, 0x56, 0x6d,
|
||||
0x21, 0xb1, 0x5a, 0xae, 0x9c, 0x22, 0x41, 0xc5, 0x0d, 0xc2, 0x0d, 0x09, 0x55, 0x4e, 0x3a, 0x4d,
|
||||
0xa3, 0xdd, 0xc4, 0x69, 0xec, 0xad, 0xe8, 0x95, 0x1b, 0x17, 0x84, 0xe0, 0x6b, 0xf8, 0x83, 0x1e,
|
||||
0x2b, 0x71, 0x41, 0x1c, 0x2a, 0xb4, 0xcb, 0x87, 0xa0, 0xd8, 0xce, 0xd2, 0x00, 0xa1, 0x7b, 0x8a,
|
||||
0x35, 0x79, 0xf3, 0xde, 0x9b, 0x37, 0x36, 0xf6, 0x40, 0x1d, 0x41, 0x95, 0x67, 0x85, 0x62, 0x87,
|
||||
0x00, 0x39, 0xaf, 0xc6, 0xa0, 0xd8, 0xc9, 0x0e, 0x3b, 0x9e, 0x42, 0x75, 0x1a, 0x94, 0x95, 0x50,
|
||||
0x82, 0xac, 0x2f, 0x30, 0xc1, 0x02, 0x13, 0x9c, 0xec, 0xb8, 0x83, 0x54, 0xa4, 0x42, 0x43, 0x58,
|
||||
0x7d, 0x32, 0x68, 0x77, 0xd4, 0xc1, 0xf8, 0xbb, 0xd5, 0xe0, 0xee, 0xa5, 0x42, 0xa4, 0x13, 0x60,
|
||||
0xbc, 0xcc, 0x18, 0x2f, 0x0a, 0xa1, 0xb8, 0xca, 0x44, 0x21, 0xcd, 0x5f, 0x6f, 0x80, 0xc9, 0xcb,
|
||||
0xda, 0xc2, 0x0b, 0x5e, 0xf1, 0x5c, 0x46, 0x70, 0x3c, 0x05, 0xa9, 0xbc, 0x57, 0xf8, 0x4e, 0xab,
|
||||
0x2a, 0x4b, 0x51, 0x48, 0x20, 0x4f, 0x70, 0xbf, 0xd4, 0x95, 0xbb, 0x68, 0x88, 0x36, 0x6f, 0xed,
|
||||
0xd2, 0xe0, 0xdf, 0x8e, 0x03, 0xd3, 0x17, 0x5e, 0x3f, 0xbb, 0xd8, 0x70, 0x22, 0xdb, 0xe3, 0xad,
|
||||
0x59, 0xd2, 0x90, 0x4b, 0x78, 0x06, 0xd0, 0x68, 0xbd, 0xc1, 0x83, 0x76, 0xd9, 0x8a, 0x3d, 0xc5,
|
||||
0xab, 0x31, 0x97, 0xb0, 0x7f, 0x08, 0xa0, 0xe5, 0x6e, 0x86, 0xdb, 0xdf, 0x2f, 0x36, 0x46, 0x69,
|
||||
0xa6, 0x8e, 0xa6, 0x71, 0x90, 0x88, 0x9c, 0x25, 0x42, 0xe6, 0x42, 0xda, 0x8f, 0x2f, 0x0f, 0xc6,
|
||||
0x4c, 0x9d, 0x96, 0x20, 0x83, 0xe7, 0x85, 0x8a, 0x56, 0x62, 0x43, 0xe7, 0xad, 0x37, 0xf4, 0x13,
|
||||
0x91, 0x8c, 0xf7, 0xf8, 0x62, 0xc4, 0x2d, 0xbc, 0xf6, 0x47, 0xdd, 0xea, 0xde, 0xc6, 0xbd, 0x94,
|
||||
0x9b, 0x09, 0x7b, 0x51, 0x7d, 0xdc, 0xfd, 0xd2, 0xc3, 0x37, 0x34, 0x96, 0xbc, 0x47, 0xb8, 0x6f,
|
||||
0x66, 0x23, 0xdb, 0x5d, 0xb3, 0xff, 0x1d, 0xa7, 0xfb, 0x70, 0x29, 0xac, 0xd1, 0xf7, 0x46, 0xef,
|
||||
0xbe, 0xfe, 0xfc, 0x7c, 0x6d, 0x48, 0x28, 0xeb, 0x58, 0xb0, 0x89, 0x93, 0x7c, 0x40, 0x78, 0xc5,
|
||||
0x66, 0x46, 0xfe, 0x2f, 0xd0, 0x0e, 0xdc, 0x7d, 0xb4, 0x1c, 0xd8, 0xda, 0xd9, 0xd4, 0x76, 0x3c,
|
||||
0x32, 0xec, 0xb2, 0xd3, 0x2c, 0x89, 0x7c, 0x42, 0x78, 0xb5, 0x49, 0x93, 0x5c, 0x21, 0xd2, 0x5e,
|
||||
0x86, 0xeb, 0x2f, 0x89, 0xb6, 0x9e, 0xb6, 0xb4, 0xa7, 0x07, 0xe4, 0x7e, 0xa7, 0xa7, 0xba, 0x63,
|
||||
0x3f, 0xe5, 0x32, 0xdc, 0x3b, 0x9b, 0x51, 0x74, 0x3e, 0xa3, 0xe8, 0xc7, 0x8c, 0xa2, 0x8f, 0x73,
|
||||
0xea, 0x9c, 0xcf, 0xa9, 0xf3, 0x6d, 0x4e, 0x9d, 0xd7, 0xfe, 0xe5, 0x9b, 0x04, 0x55, 0xe2, 0x67,
|
||||
0x82, 0x4d, 0x78, 0x22, 0x8a, 0x2c, 0x39, 0x60, 0x6f, 0x2f, 0xf1, 0xe9, 0x4b, 0x15, 0xf7, 0xf5,
|
||||
0x7b, 0x79, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x30, 0x2e, 0xbe, 0xb0, 0xc9, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
Generated
+15
-4
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryParamsRequest
|
||||
@@ -88,12 +90,14 @@ func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marsh
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -101,6 +105,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -114,6 +119,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -121,6 +128,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -134,6 +142,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -141,6 +151,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -256,11 +267,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -2,7 +2,7 @@ package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/cerc-io/laconicd/server/flags"
|
||||
@@ -380,7 +380,7 @@ $ %s tx %s delete-name [crn]
|
||||
func GetPayloadFromFile(filePath string) (*types.PayloadType, error) {
|
||||
var payload types.PayloadType
|
||||
|
||||
data, err := ioutil.ReadFile(filePath) // #nosec G304
|
||||
data, err := os.ReadFile(filePath) // #nosec G304
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -60,7 +60,9 @@ func (q Querier) GetRecordByBondID(c context.Context, req *types.QueryRecordByBo
|
||||
return &types.QueryRecordByBondIDResponse{Records: records}, nil
|
||||
}
|
||||
|
||||
func (q Querier) GetRegistryModuleBalance(c context.Context, _ *types.GetRegistryModuleBalanceRequest) (*types.GetRegistryModuleBalanceResponse, error) {
|
||||
func (q Querier) GetRegistryModuleBalance(c context.Context,
|
||||
_ *types.GetRegistryModuleBalanceRequest,
|
||||
) (*types.GetRegistryModuleBalanceResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
balances := q.Keeper.GetModuleBalances(ctx)
|
||||
return &types.GetRegistryModuleBalanceResponse{
|
||||
@@ -109,7 +111,9 @@ func (q Querier) GetRecordExpiryQueue(c context.Context, _ *types.QueryGetRecord
|
||||
return &types.QueryGetRecordExpiryQueueResponse{Records: records}, nil
|
||||
}
|
||||
|
||||
func (q Querier) GetAuthorityExpiryQueue(c context.Context, _ *types.QueryGetAuthorityExpiryQueue) (*types.QueryGetAuthorityExpiryQueueResponse, error) {
|
||||
func (q Querier) GetAuthorityExpiryQueue(c context.Context,
|
||||
_ *types.QueryGetAuthorityExpiryQueue,
|
||||
) (*types.QueryGetAuthorityExpiryQueueResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
authorities := q.Keeper.GetAuthorityExpiryQueue(ctx)
|
||||
return &types.QueryGetAuthorityExpiryQueueResponse{Authorities: authorities}, nil
|
||||
|
||||
Generated
+1
-1
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
Generated
+1
-1
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
Generated
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
Generated
+47
-12
@@ -20,6 +20,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryParamsRequest
|
||||
@@ -466,12 +468,14 @@ func local_request_Query_GetAuthorityExpiryQueue_0(ctx context.Context, marshale
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -479,6 +483,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -492,6 +497,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_ListRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -499,6 +506,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_ListRecords_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -512,6 +520,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -519,6 +529,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetRecord_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -532,6 +543,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetRecordByBondID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -539,6 +552,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetRecordByBondID_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -552,6 +566,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetRegistryModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -559,6 +575,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetRegistryModuleBalance_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -572,6 +589,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_ListNameRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -579,6 +598,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_ListNameRecords_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -592,6 +612,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_Whois_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -599,6 +621,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Whois_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -612,6 +635,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_LookupCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -619,6 +644,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_LookupCrn_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -632,6 +658,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_ResolveCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -639,6 +667,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_ResolveCrn_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -652,6 +681,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetRecordExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -659,6 +690,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetRecordExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -672,6 +704,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
mux.Handle("GET", pattern_Query_GetAuthorityExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
@@ -679,6 +713,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetAuthorityExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
@@ -954,27 +989,27 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ListRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "records"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ListRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "records"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "records", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "records", "id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetRecordByBondID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "records-by-bond-id", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetRecordByBondID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "records-by-bond-id", "id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetRegistryModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetRegistryModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ListNameRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "names"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ListNameRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "names"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Whois_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "whois", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_Whois_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "registry", "v1beta1", "whois", "name"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_LookupCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "lookup"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_LookupCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "lookup"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_ResolveCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "resolve"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_ResolveCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetRecordExpiryQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "record-expiry"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetRecordExpiryQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "record-expiry"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetAuthorityExpiryQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "authority-expiry"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_Query_GetAuthorityExpiryQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "registry", "v1beta1", "authority-expiry"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Generated
+2
-2
@@ -7,11 +7,11 @@ import (
|
||||
fmt "fmt"
|
||||
types1 "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/gogo/protobuf/types"
|
||||
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
_ "google.golang.org/protobuf/types/known/durationpb"
|
||||
_ "google.golang.org/protobuf/types/known/timestamppb"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
|
||||
Generated
+1
-1
@@ -6,7 +6,7 @@ package types
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/gogo/protobuf/grpc"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
|
||||
Reference in New Issue
Block a user