forked from cerc-io/laconicd-deprecated
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>
This commit is contained in:
co-authored by
dependabot[bot]
HuangYi
MalteHerrmann
Federico Kunze Küllmer
Freddy Caceres
Daniel Burckhardt
mmsqe
Austin Chandra
4rgon4ut
Adi Saravanan
Tomas Guerra
Ramiro Carlucho
Vladislav Varadinov
Vladislav Varadinov
mmsqe
Devon Bear
v-homsi
parent
4b676b603f
commit
55b292f179
+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/evmos/ethermint/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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package evm_test
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/evmos/ethermint/x/evm/keeper"
|
||||
"math/big"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -594,9 +595,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)
|
||||
|
||||
+73
-25
@@ -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, GetProposerAddress(ctx, req.ProposerAddress))
|
||||
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,7 +300,7 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type
|
||||
hi = req.GasCap
|
||||
}
|
||||
cap = hi
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress))
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress), chainID)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, "failed to load evm config")
|
||||
}
|
||||
@@ -305,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)
|
||||
@@ -328,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
|
||||
@@ -374,7 +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, GetProposerAddress(ctx, req.ProposerAddress))
|
||||
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())
|
||||
}
|
||||
@@ -402,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
|
||||
@@ -441,7 +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))
|
||||
cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress))
|
||||
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, "failed to load evm config")
|
||||
}
|
||||
@@ -455,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)
|
||||
}
|
||||
|
||||
@@ -484,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 (
|
||||
@@ -524,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())
|
||||
}
|
||||
}
|
||||
@@ -577,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
|
||||
}
|
||||
|
||||
@@ -758,6 +758,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
txMsg *types.MsgEthereumTx
|
||||
traceConfig *types.TraceConfig
|
||||
predecessors []*types.MsgEthereumTx
|
||||
chainID *sdkmath.Int
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
@@ -886,18 +887,6 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "trace config - Execution Timeout",
|
||||
malleate: func() {
|
||||
traceConfig = &types.TraceConfig{
|
||||
DisableStack: true,
|
||||
DisableStorage: true,
|
||||
EnableMemory: false,
|
||||
Timeout: "0s",
|
||||
}
|
||||
},
|
||||
expPass: false,
|
||||
},
|
||||
{
|
||||
msg: "default tracer with contract creation tx as predecessor but 'create' param disabled",
|
||||
malleate: func() {
|
||||
@@ -932,6 +921,16 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
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 {
|
||||
@@ -951,6 +950,10 @@ 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)
|
||||
|
||||
if tc.expPass {
|
||||
@@ -969,6 +972,8 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
// Reset for next test case
|
||||
chainID = nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -979,6 +984,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
var (
|
||||
txs []*types.MsgEthereumTx
|
||||
traceConfig *types.TraceConfig
|
||||
chainID *sdkmath.Int
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
@@ -1088,7 +1094,17 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
}
|
||||
},
|
||||
expPass: true,
|
||||
traceResponse: "[]",
|
||||
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\"}]",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1111,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 {
|
||||
@@ -1124,6 +1145,8 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
||||
} else {
|
||||
suite.Require().Error(err)
|
||||
}
|
||||
// Reset for next case
|
||||
chainID = nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1140,6 +1163,8 @@ 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,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
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"
|
||||
"github.com/evmos/ethermint/x/evm/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"
|
||||
@@ -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
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
v2 "github.com/evmos/ethermint/x/evm/migrations/v2"
|
||||
v3 "github.com/evmos/ethermint/x/evm/migrations/v3"
|
||||
)
|
||||
|
||||
// Migrator is a struct for handling in-place store migrations.
|
||||
type Migrator struct {
|
||||
keeper Keeper
|
||||
@@ -17,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 v2.MigrateStore(ctx, &m.keeper.paramSpace)
|
||||
}
|
||||
|
||||
// Migrate2to3 migrates the store from consensus version v2 to v3
|
||||
func (m Migrator) Migrate2to3(ctx sdk.Context) error {
|
||||
return v3.MigrateStore(ctx, &m.keeper.paramSpace)
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestMigrations() {
|
||||
migrator := evmkeeper.NewMigrator(*suite.app.EvmKeeper)
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
migrateFunc func(ctx sdk.Context) error
|
||||
}{
|
||||
{
|
||||
"Run Migrate1to2",
|
||||
migrator.Migrate1to2,
|
||||
},
|
||||
{
|
||||
"Run Migrate2to3",
|
||||
migrator.Migrate2to3,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
suite.Run(tc.name, func() {
|
||||
err := tc.migrateFunc(suite.ctx)
|
||||
suite.Require().NoError(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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/evmos/ethermint/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))
|
||||
}
|
||||
|
||||
@@ -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, proposerAddress sdk.ConsAddress) (*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, 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)
|
||||
@@ -199,9 +199,9 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
|
||||
bloomReceipt ethtypes.Bloom
|
||||
)
|
||||
|
||||
cfg, err := k.EVMConfig(ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress))
|
||||
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 +209,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 +226,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 +241,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 +287,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 +300,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 +360,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 +386,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 +422,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 +437,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 +449,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 +467,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, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress))
|
||||
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 +495,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 +504,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
|
||||
@@ -531,7 +534,7 @@ func GetProposerAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) sdk.Co
|
||||
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",
|
||||
proposerAddress.String(),
|
||||
|
||||
@@ -517,7 +517,7 @@ func (suite *KeeperTestSuite) TestResetGasMeterAndConsumeGas() {
|
||||
|
||||
func (suite *KeeperTestSuite) TestEVMConfig() {
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
cfg, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, 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
|
||||
@@ -537,7 +537,7 @@ func (suite *KeeperTestSuite) TestApplyMessage() {
|
||||
var msg core.Message
|
||||
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
config, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress)
|
||||
config, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress, big.NewInt(9000))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
@@ -638,7 +638,7 @@ func (suite *KeeperTestSuite) TestApplyMessageWithConfig() {
|
||||
expectedGasUsed = params.TxGas
|
||||
|
||||
proposerAddress := suite.ctx.BlockHeader().ProposerAddress
|
||||
config, err = suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress)
|
||||
config, err = suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress, big.NewInt(9000))
|
||||
suite.Require().NoError(err)
|
||||
|
||||
keeperParams = suite.app.EvmKeeper.GetParams(suite.ctx)
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"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"
|
||||
ethermint "github.com/evmos/ethermint/types"
|
||||
"github.com/evmos/ethermint/x/evm/statedb"
|
||||
@@ -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
|
||||
|
||||
+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/evmos/ethermint/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(),
|
||||
)
|
||||
}
|
||||
|
||||
+148
-124
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
ethparams "github.com/ethereum/go-ethereum/params"
|
||||
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
|
||||
"github.com/evmos/ethermint/x/evm/keeper"
|
||||
evmtypes "github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
@@ -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,126 +269,138 @@ 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
|
||||
from string
|
||||
malleate func()
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
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{},
|
||||
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,
|
||||
from: suite.address.String(),
|
||||
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,
|
||||
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{},
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
enableFeemarket: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "Invalid from address",
|
||||
gasLimit: 10,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: false,
|
||||
from: "",
|
||||
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",
|
||||
@@ -394,17 +413,19 @@ func (suite *KeeperTestSuite) TestDeductTxCostsFromUserBalance() {
|
||||
StorageKeys: []common.Hash{},
|
||||
},
|
||||
},
|
||||
expectPass: true,
|
||||
from: suite.address.String(),
|
||||
expectPassVerify: true,
|
||||
expectPassDeduct: true,
|
||||
from: suite.address.String(),
|
||||
},
|
||||
{
|
||||
name: "gasLimit < intrinsicGas during IsCheckTx",
|
||||
gasLimit: 1,
|
||||
gasPrice: &oneInt,
|
||||
cost: &oneInt,
|
||||
accessList: ðtypes.AccessList{},
|
||||
expectPass: false,
|
||||
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)
|
||||
},
|
||||
@@ -446,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 = 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(
|
||||
@@ -472,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 {
|
||||
@@ -481,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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// MigrateStore sets the default AllowUnprotectedTxs parameter.
|
||||
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
|
||||
if !paramstore.HasKeyTable() {
|
||||
ps := paramstore.WithKeyTable(types.ParamKeyTable())
|
||||
paramstore = &ps
|
||||
}
|
||||
|
||||
// add RejectUnprotected
|
||||
paramstore.Set(ctx, types.ParamStoreKeyAllowUnprotectedTxs, types.DefaultAllowUnprotectedTxs)
|
||||
return nil
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package v2_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
|
||||
"github.com/evmos/ethermint/encoding"
|
||||
|
||||
"github.com/evmos/ethermint/app"
|
||||
v2 "github.com/evmos/ethermint/x/evm/migrations/v2"
|
||||
v2types "github.com/evmos/ethermint/x/evm/migrations/v2/types"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
func TestMigrateStore(t *testing.T) {
|
||||
encCfg := encoding.MakeConfig(app.ModuleBasics)
|
||||
feemarketKey := sdk.NewKVStoreKey(types.StoreKey)
|
||||
tFeeMarketKey := sdk.NewTransientStoreKey(fmt.Sprintf("%s_test", types.StoreKey))
|
||||
ctx := testutil.DefaultContext(feemarketKey, tFeeMarketKey)
|
||||
paramstore := paramtypes.NewSubspace(
|
||||
encCfg.Codec, encCfg.Amino, feemarketKey, tFeeMarketKey, "evm",
|
||||
).WithKeyTable(v2types.ParamKeyTable())
|
||||
|
||||
params := v2types.DefaultParams()
|
||||
paramstore.SetParamSet(ctx, ¶ms)
|
||||
|
||||
require.Panics(t, func() {
|
||||
var result bool
|
||||
paramstore.Get(ctx, types.ParamStoreKeyAllowUnprotectedTxs, &result)
|
||||
})
|
||||
|
||||
paramstore = paramtypes.NewSubspace(
|
||||
encCfg.Codec, encCfg.Amino, feemarketKey, tFeeMarketKey, "evm",
|
||||
).WithKeyTable(types.ParamKeyTable())
|
||||
err := v2.MigrateStore(ctx, ¶mstore)
|
||||
require.NoError(t, err)
|
||||
|
||||
var result bool
|
||||
paramstore.Get(ctx, types.ParamStoreKeyAllowUnprotectedTxs, &result)
|
||||
require.Equal(t, types.DefaultAllowUnprotectedTxs, result)
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"strings"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
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"
|
||||
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions.
|
||||
// All the negative or nil values are converted to nil
|
||||
func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
|
||||
return ¶ms.ChainConfig{
|
||||
ChainID: chainID,
|
||||
HomesteadBlock: getBlockValue(cc.HomesteadBlock),
|
||||
DAOForkBlock: getBlockValue(cc.DAOForkBlock),
|
||||
DAOForkSupport: cc.DAOForkSupport,
|
||||
EIP150Block: getBlockValue(cc.EIP150Block),
|
||||
EIP150Hash: common.HexToHash(cc.EIP150Hash),
|
||||
EIP155Block: getBlockValue(cc.EIP155Block),
|
||||
EIP158Block: getBlockValue(cc.EIP158Block),
|
||||
ByzantiumBlock: getBlockValue(cc.ByzantiumBlock),
|
||||
ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock),
|
||||
PetersburgBlock: getBlockValue(cc.PetersburgBlock),
|
||||
IstanbulBlock: getBlockValue(cc.IstanbulBlock),
|
||||
MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock),
|
||||
BerlinBlock: getBlockValue(cc.BerlinBlock),
|
||||
LondonBlock: getBlockValue(cc.LondonBlock),
|
||||
ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock),
|
||||
MergeNetsplitBlock: getBlockValue(cc.MergeForkBlock),
|
||||
TerminalTotalDifficulty: nil,
|
||||
Ethash: nil,
|
||||
Clique: nil,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultChainConfig returns default evm parameters.
|
||||
func DefaultChainConfig() ChainConfig {
|
||||
homesteadBlock := sdk.ZeroInt()
|
||||
daoForkBlock := sdk.ZeroInt()
|
||||
eip150Block := sdk.ZeroInt()
|
||||
eip155Block := sdk.ZeroInt()
|
||||
eip158Block := sdk.ZeroInt()
|
||||
byzantiumBlock := sdk.ZeroInt()
|
||||
constantinopleBlock := sdk.ZeroInt()
|
||||
petersburgBlock := sdk.ZeroInt()
|
||||
istanbulBlock := sdk.ZeroInt()
|
||||
muirGlacierBlock := sdk.ZeroInt()
|
||||
berlinBlock := sdk.ZeroInt()
|
||||
londonBlock := sdk.ZeroInt()
|
||||
arrowGlacierBlock := sdk.ZeroInt()
|
||||
mergeForkBlock := sdk.ZeroInt()
|
||||
|
||||
return ChainConfig{
|
||||
HomesteadBlock: &homesteadBlock,
|
||||
DAOForkBlock: &daoForkBlock,
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: &eip150Block,
|
||||
EIP150Hash: common.Hash{}.String(),
|
||||
EIP155Block: &eip155Block,
|
||||
EIP158Block: &eip158Block,
|
||||
ByzantiumBlock: &byzantiumBlock,
|
||||
ConstantinopleBlock: &constantinopleBlock,
|
||||
PetersburgBlock: &petersburgBlock,
|
||||
IstanbulBlock: &istanbulBlock,
|
||||
MuirGlacierBlock: &muirGlacierBlock,
|
||||
BerlinBlock: &berlinBlock,
|
||||
LondonBlock: &londonBlock,
|
||||
ArrowGlacierBlock: &arrowGlacierBlock,
|
||||
MergeForkBlock: &mergeForkBlock,
|
||||
}
|
||||
}
|
||||
|
||||
func getBlockValue(block *sdkmath.Int) *big.Int {
|
||||
if block == nil || block.IsNegative() {
|
||||
return nil
|
||||
}
|
||||
|
||||
return block.BigInt()
|
||||
}
|
||||
|
||||
// Validate performs a basic validation of the ChainConfig params. The function will return an error
|
||||
// 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")
|
||||
}
|
||||
if err := validateBlock(cc.DAOForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "daoForkBlock")
|
||||
}
|
||||
if err := validateBlock(cc.EIP150Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip150Block")
|
||||
}
|
||||
if err := validateHash(cc.EIP150Hash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateBlock(cc.EIP155Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip155Block")
|
||||
}
|
||||
if err := validateBlock(cc.EIP158Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip158Block")
|
||||
}
|
||||
if err := validateBlock(cc.ByzantiumBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "byzantiumBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "constantinopleBlock")
|
||||
}
|
||||
if err := validateBlock(cc.PetersburgBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "petersburgBlock")
|
||||
}
|
||||
if err := validateBlock(cc.IstanbulBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "istanbulBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "muirGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.BerlinBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "berlinBlock")
|
||||
}
|
||||
if err := validateBlock(cc.LondonBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "londonBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "arrowGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MergeForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "mergeForkBlock")
|
||||
}
|
||||
|
||||
// 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 nil
|
||||
}
|
||||
|
||||
func validateHash(hex string) error {
|
||||
if hex != "" && strings.TrimSpace(hex) == "" {
|
||||
return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateBlock(block *sdkmath.Int) error {
|
||||
// nil value means that the fork has not yet been applied
|
||||
if block == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if block.IsNegative() {
|
||||
return sdkerrors.Wrapf(
|
||||
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
|
||||
)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Generated
-3781
File diff suppressed because it is too large
Load Diff
@@ -1,145 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/evmos/ethermint/types"
|
||||
)
|
||||
|
||||
var _ paramtypes.ParamSet = &Params{}
|
||||
|
||||
const (
|
||||
DefaultEVMDenom = types.AttoPhoton
|
||||
)
|
||||
|
||||
// DefaultMinGasMultiplier is 0.5 or 50%
|
||||
var DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2)
|
||||
|
||||
// Parameter keys
|
||||
var (
|
||||
ParamStoreKeyEVMDenom = []byte("EVMDenom")
|
||||
ParamStoreKeyEnableCreate = []byte("EnableCreate")
|
||||
ParamStoreKeyEnableCall = []byte("EnableCall")
|
||||
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
|
||||
ParamStoreKeyChainConfig = []byte("ChainConfig")
|
||||
|
||||
// AvailableExtraEIPs define the list of all EIPs that can be enabled by the
|
||||
// EVM interpreter. These EIPs are applied in order and can override the
|
||||
// instruction sets from the latest hard fork enabled by the ChainConfig. For
|
||||
// more info check:
|
||||
// https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L97
|
||||
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
|
||||
)
|
||||
|
||||
// ParamKeyTable returns the parameter key table.
|
||||
func ParamKeyTable() paramtypes.KeyTable {
|
||||
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
|
||||
}
|
||||
|
||||
// NewParams creates a new Params instance
|
||||
func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, extraEIPs ...int64) Params {
|
||||
return Params{
|
||||
EvmDenom: evmDenom,
|
||||
EnableCreate: enableCreate,
|
||||
EnableCall: enableCall,
|
||||
ExtraEIPs: extraEIPs,
|
||||
ChainConfig: config,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultParams returns default evm parameters
|
||||
// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
|
||||
func DefaultParams() Params {
|
||||
return Params{
|
||||
EvmDenom: DefaultEVMDenom,
|
||||
EnableCreate: true,
|
||||
EnableCall: true,
|
||||
ChainConfig: DefaultChainConfig(),
|
||||
ExtraEIPs: nil,
|
||||
}
|
||||
}
|
||||
|
||||
// ParamSetPairs returns the parameter set pairs.
|
||||
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
|
||||
return paramtypes.ParamSetPairs{
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
|
||||
}
|
||||
}
|
||||
|
||||
// Validate performs basic validation on evm parameters.
|
||||
func (p Params) Validate() error {
|
||||
if err := sdk.ValidateDenom(p.EvmDenom); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateEIPs(p.ExtraEIPs); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return p.ChainConfig.Validate()
|
||||
}
|
||||
|
||||
// EIPs returns the ExtraEips as a int slice
|
||||
func (p Params) EIPs() []int {
|
||||
eips := make([]int, len(p.ExtraEIPs))
|
||||
for i, eip := range p.ExtraEIPs {
|
||||
eips[i] = int(eip)
|
||||
}
|
||||
return eips
|
||||
}
|
||||
|
||||
func validateEVMDenom(i interface{}) error {
|
||||
denom, ok := i.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter EVM denom type: %T", i)
|
||||
}
|
||||
|
||||
return sdk.ValidateDenom(denom)
|
||||
}
|
||||
|
||||
func validateBool(i interface{}) error {
|
||||
_, ok := i.(bool)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateEIPs(i interface{}) error {
|
||||
eips, ok := i.([]int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid EIP slice type: %T", i)
|
||||
}
|
||||
|
||||
for _, eip := range eips {
|
||||
if !vm.ValidEip(int(eip)) {
|
||||
return fmt.Errorf("EIP %d is not activateable, valid EIPS are: %s", eip, vm.ActivateableEips())
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateChainConfig(i interface{}) error {
|
||||
cfg, ok := i.(ChainConfig)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid chain config type: %T", i)
|
||||
}
|
||||
|
||||
return cfg.Validate()
|
||||
}
|
||||
|
||||
// IsLondon returns if london hardfork is enabled.
|
||||
func IsLondon(ethConfig *params.ChainConfig, height int64) bool {
|
||||
return ethConfig.IsLondon(big.NewInt(height))
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// MigrateStore sets the default for GrayGlacierBlock and MergeNetsplitBlock in ChainConfig parameter.
|
||||
func MigrateStore(ctx sdk.Context, paramstore *paramtypes.Subspace) error {
|
||||
if !paramstore.HasKeyTable() {
|
||||
ps := paramstore.WithKeyTable(types.ParamKeyTable())
|
||||
paramstore = &ps
|
||||
}
|
||||
prevConfig := &types.ChainConfig{}
|
||||
paramstore.GetIfExists(ctx, types.ParamStoreKeyChainConfig, prevConfig)
|
||||
|
||||
defaultConfig := types.DefaultChainConfig()
|
||||
|
||||
prevConfig.GrayGlacierBlock = defaultConfig.GrayGlacierBlock
|
||||
prevConfig.MergeNetsplitBlock = defaultConfig.MergeNetsplitBlock
|
||||
|
||||
paramstore.Set(ctx, types.ParamStoreKeyChainConfig, prevConfig)
|
||||
return nil
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package v3_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
v3 "github.com/evmos/ethermint/x/evm/migrations/v3"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
|
||||
"github.com/evmos/ethermint/encoding"
|
||||
|
||||
"github.com/evmos/ethermint/app"
|
||||
v3types "github.com/evmos/ethermint/x/evm/migrations/v3/types"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
func TestMigrateStore(t *testing.T) {
|
||||
encCfg := encoding.MakeConfig(app.ModuleBasics)
|
||||
evmKey := sdk.NewKVStoreKey(types.StoreKey)
|
||||
tEvmKey := sdk.NewTransientStoreKey(fmt.Sprintf("%s_test", types.StoreKey))
|
||||
ctx := testutil.DefaultContext(evmKey, tEvmKey)
|
||||
paramstore := paramtypes.NewSubspace(
|
||||
encCfg.Codec, encCfg.Amino, evmKey, tEvmKey, "evm",
|
||||
).WithKeyTable(v3types.ParamKeyTable())
|
||||
|
||||
params := v3types.DefaultParams()
|
||||
paramstore.SetParamSet(ctx, ¶ms)
|
||||
|
||||
require.Panics(t, func() {
|
||||
var preMigrationConfig types.ChainConfig
|
||||
paramstore.Get(ctx, types.ParamStoreKeyChainConfig, &preMigrationConfig)
|
||||
})
|
||||
var preMigrationConfig v3types.ChainConfig
|
||||
paramstore.Get(ctx, types.ParamStoreKeyChainConfig, &preMigrationConfig)
|
||||
require.NotNil(t, preMigrationConfig.MergeForkBlock)
|
||||
|
||||
paramstore = paramtypes.NewSubspace(
|
||||
encCfg.Codec, encCfg.Amino, evmKey, tEvmKey, "evm",
|
||||
).WithKeyTable(types.ParamKeyTable())
|
||||
err := v3.MigrateStore(ctx, ¶mstore)
|
||||
require.NoError(t, err)
|
||||
|
||||
updatedDefaultConfig := types.DefaultChainConfig()
|
||||
|
||||
var postMigrationConfig types.ChainConfig
|
||||
paramstore.Get(ctx, types.ParamStoreKeyChainConfig, &postMigrationConfig)
|
||||
require.Equal(t, postMigrationConfig.GrayGlacierBlock, updatedDefaultConfig.GrayGlacierBlock)
|
||||
require.Equal(t, postMigrationConfig.MergeNetsplitBlock, updatedDefaultConfig.MergeNetsplitBlock)
|
||||
require.Panics(t, func() {
|
||||
var preMigrationConfig v3types.ChainConfig
|
||||
paramstore.Get(ctx, types.ParamStoreKeyChainConfig, &preMigrationConfig)
|
||||
})
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"strings"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions.
|
||||
// All the negative or nil values are converted to nil
|
||||
func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
|
||||
return ¶ms.ChainConfig{
|
||||
ChainID: chainID,
|
||||
HomesteadBlock: getBlockValue(cc.HomesteadBlock),
|
||||
DAOForkBlock: getBlockValue(cc.DAOForkBlock),
|
||||
DAOForkSupport: cc.DAOForkSupport,
|
||||
EIP150Block: getBlockValue(cc.EIP150Block),
|
||||
EIP150Hash: common.HexToHash(cc.EIP150Hash),
|
||||
EIP155Block: getBlockValue(cc.EIP155Block),
|
||||
EIP158Block: getBlockValue(cc.EIP158Block),
|
||||
ByzantiumBlock: getBlockValue(cc.ByzantiumBlock),
|
||||
ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock),
|
||||
PetersburgBlock: getBlockValue(cc.PetersburgBlock),
|
||||
IstanbulBlock: getBlockValue(cc.IstanbulBlock),
|
||||
MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock),
|
||||
BerlinBlock: getBlockValue(cc.BerlinBlock),
|
||||
LondonBlock: getBlockValue(cc.LondonBlock),
|
||||
ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock),
|
||||
TerminalTotalDifficulty: nil,
|
||||
Ethash: nil,
|
||||
Clique: nil,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultChainConfig returns default evm parameters.
|
||||
func DefaultChainConfig() ChainConfig {
|
||||
homesteadBlock := sdk.ZeroInt()
|
||||
daoForkBlock := sdk.ZeroInt()
|
||||
eip150Block := sdk.ZeroInt()
|
||||
eip155Block := sdk.ZeroInt()
|
||||
eip158Block := sdk.ZeroInt()
|
||||
byzantiumBlock := sdk.ZeroInt()
|
||||
constantinopleBlock := sdk.ZeroInt()
|
||||
petersburgBlock := sdk.ZeroInt()
|
||||
istanbulBlock := sdk.ZeroInt()
|
||||
muirGlacierBlock := sdk.ZeroInt()
|
||||
berlinBlock := sdk.ZeroInt()
|
||||
londonBlock := sdk.ZeroInt()
|
||||
arrowGlacierBlock := sdk.ZeroInt()
|
||||
mergeForkBlock := sdk.ZeroInt()
|
||||
|
||||
return ChainConfig{
|
||||
HomesteadBlock: &homesteadBlock,
|
||||
DAOForkBlock: &daoForkBlock,
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: &eip150Block,
|
||||
EIP150Hash: common.Hash{}.String(),
|
||||
EIP155Block: &eip155Block,
|
||||
EIP158Block: &eip158Block,
|
||||
ByzantiumBlock: &byzantiumBlock,
|
||||
ConstantinopleBlock: &constantinopleBlock,
|
||||
PetersburgBlock: &petersburgBlock,
|
||||
IstanbulBlock: &istanbulBlock,
|
||||
MuirGlacierBlock: &muirGlacierBlock,
|
||||
BerlinBlock: &berlinBlock,
|
||||
LondonBlock: &londonBlock,
|
||||
ArrowGlacierBlock: &arrowGlacierBlock,
|
||||
MergeForkBlock: &mergeForkBlock,
|
||||
}
|
||||
}
|
||||
|
||||
func getBlockValue(block *sdkmath.Int) *big.Int {
|
||||
if block == nil || block.IsNegative() {
|
||||
return nil
|
||||
}
|
||||
|
||||
return block.BigInt()
|
||||
}
|
||||
|
||||
// Validate performs a basic validation of the ChainConfig params. The function will return an error
|
||||
// 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")
|
||||
}
|
||||
if err := validateBlock(cc.DAOForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "daoForkBlock")
|
||||
}
|
||||
if err := validateBlock(cc.EIP150Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip150Block")
|
||||
}
|
||||
if err := validateHash(cc.EIP150Hash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateBlock(cc.EIP155Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip155Block")
|
||||
}
|
||||
if err := validateBlock(cc.EIP158Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip158Block")
|
||||
}
|
||||
if err := validateBlock(cc.ByzantiumBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "byzantiumBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "constantinopleBlock")
|
||||
}
|
||||
if err := validateBlock(cc.PetersburgBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "petersburgBlock")
|
||||
}
|
||||
if err := validateBlock(cc.IstanbulBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "istanbulBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "muirGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.BerlinBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "berlinBlock")
|
||||
}
|
||||
if err := validateBlock(cc.LondonBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "londonBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "arrowGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MergeForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "mergeForkBlock")
|
||||
}
|
||||
|
||||
// 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 nil
|
||||
}
|
||||
|
||||
func validateHash(hex string) error {
|
||||
if hex != "" && strings.TrimSpace(hex) == "" {
|
||||
return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateBlock(block *sdkmath.Int) error {
|
||||
// nil value means that the fork has not yet been applied
|
||||
if block == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if block.IsNegative() {
|
||||
return sdkerrors.Wrapf(
|
||||
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
|
||||
)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Generated
-3812
File diff suppressed because it is too large
Load Diff
@@ -1,150 +0,0 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/evmos/ethermint/types"
|
||||
)
|
||||
|
||||
var _ paramtypes.ParamSet = &Params{}
|
||||
|
||||
var (
|
||||
// DefaultEVMDenom defines the default EVM denomination on Ethermint
|
||||
DefaultEVMDenom = types.AttoPhoton
|
||||
// DefaultMinGasMultiplier is 0.5 or 50%
|
||||
DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2)
|
||||
// DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false)
|
||||
DefaultAllowUnprotectedTxs = false
|
||||
)
|
||||
|
||||
// Parameter keys
|
||||
var (
|
||||
ParamStoreKeyEVMDenom = []byte("EVMDenom")
|
||||
ParamStoreKeyEnableCreate = []byte("EnableCreate")
|
||||
ParamStoreKeyEnableCall = []byte("EnableCall")
|
||||
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
|
||||
ParamStoreKeyChainConfig = []byte("ChainConfig")
|
||||
ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs")
|
||||
|
||||
// AvailableExtraEIPs define the list of all EIPs that can be enabled by the
|
||||
// EVM interpreter. These EIPs are applied in order and can override the
|
||||
// instruction sets from the latest hard fork enabled by the ChainConfig. For
|
||||
// more info check:
|
||||
// https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L97
|
||||
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
|
||||
)
|
||||
|
||||
// ParamKeyTable returns the parameter key table.
|
||||
func ParamKeyTable() paramtypes.KeyTable {
|
||||
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
|
||||
}
|
||||
|
||||
// NewParams creates a new Params instance
|
||||
func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, extraEIPs ...int64) Params {
|
||||
return Params{
|
||||
EvmDenom: evmDenom,
|
||||
EnableCreate: enableCreate,
|
||||
EnableCall: enableCall,
|
||||
ExtraEIPs: extraEIPs,
|
||||
ChainConfig: config,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultParams returns default evm parameters
|
||||
// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
|
||||
func DefaultParams() Params {
|
||||
return Params{
|
||||
EvmDenom: DefaultEVMDenom,
|
||||
EnableCreate: true,
|
||||
EnableCall: true,
|
||||
ChainConfig: DefaultChainConfig(),
|
||||
ExtraEIPs: nil,
|
||||
AllowUnprotectedTxs: DefaultAllowUnprotectedTxs,
|
||||
}
|
||||
}
|
||||
|
||||
// ParamSetPairs returns the parameter set pairs.
|
||||
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
|
||||
return paramtypes.ParamSetPairs{
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
|
||||
paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool),
|
||||
}
|
||||
}
|
||||
|
||||
// Validate performs basic validation on evm parameters.
|
||||
func (p Params) Validate() error {
|
||||
if err := sdk.ValidateDenom(p.EvmDenom); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := validateEIPs(p.ExtraEIPs); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return p.ChainConfig.Validate()
|
||||
}
|
||||
|
||||
// EIPs returns the ExtraEips as a int slice
|
||||
func (p Params) EIPs() []int {
|
||||
eips := make([]int, len(p.ExtraEIPs))
|
||||
for i, eip := range p.ExtraEIPs {
|
||||
eips[i] = int(eip)
|
||||
}
|
||||
return eips
|
||||
}
|
||||
|
||||
func validateEVMDenom(i interface{}) error {
|
||||
denom, ok := i.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter EVM denom type: %T", i)
|
||||
}
|
||||
|
||||
return sdk.ValidateDenom(denom)
|
||||
}
|
||||
|
||||
func validateBool(i interface{}) error {
|
||||
_, ok := i.(bool)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid parameter type: %T", i)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateEIPs(i interface{}) error {
|
||||
eips, ok := i.([]int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid EIP slice type: %T", i)
|
||||
}
|
||||
|
||||
for _, eip := range eips {
|
||||
if !vm.ValidEip(int(eip)) {
|
||||
return fmt.Errorf("EIP %d is not activateable, valid EIPS are: %s", eip, vm.ActivateableEips())
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateChainConfig(i interface{}) error {
|
||||
cfg, ok := i.(ChainConfig)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid chain config type: %T", i)
|
||||
}
|
||||
|
||||
return cfg.Validate()
|
||||
}
|
||||
|
||||
// IsLondon returns if london hardfork is enabled.
|
||||
func IsLondon(ethConfig *params.ChainConfig, height int64) bool {
|
||||
return ethConfig.IsLondon(big.NewInt(height))
|
||||
}
|
||||
+10
-25
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/evmos/ethermint/x/evm/client/cli"
|
||||
"github.com/evmos/ethermint/x/evm/keeper"
|
||||
"github.com/evmos/ethermint/x/evm/simulation"
|
||||
"github.com/evmos/ethermint/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
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package simulation
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's
|
||||
// value to the corresponding EVM type.
|
||||
func NewDecodeStore() func(kvA, kvB kv.Pair) string {
|
||||
return func(kvA, kvB kv.Pair) string {
|
||||
switch {
|
||||
case bytes.Equal(kvA.Key[:1], types.KeyPrefixStorage):
|
||||
storageA := common.BytesToHash(kvA.Value).Hex()
|
||||
storageB := common.BytesToHash(kvB.Value).Hex()
|
||||
|
||||
return fmt.Sprintf("%v\n%v", storageA, storageB)
|
||||
case bytes.Equal(kvA.Key[:1], types.KeyPrefixCode):
|
||||
codeHashA := common.Bytes2Hex(kvA.Value)
|
||||
codeHashB := common.Bytes2Hex(kvB.Value)
|
||||
|
||||
return fmt.Sprintf("%v\n%v", codeHashA, codeHashB)
|
||||
default:
|
||||
panic(fmt.Sprintf("invalid evm key prefix %X", kvA.Key[:1]))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package simulation
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// TestDecodeStore tests that evm simulation decoder decodes the key value pairs as expected.
|
||||
func TestDecodeStore(t *testing.T) {
|
||||
dec := NewDecodeStore()
|
||||
|
||||
hash := common.BytesToHash([]byte("hash"))
|
||||
code := common.Bytes2Hex([]byte{1, 2, 3})
|
||||
|
||||
kvPairs := kv.Pairs{
|
||||
Pairs: []kv.Pair{
|
||||
{Key: types.KeyPrefixCode, Value: common.FromHex(code)},
|
||||
{Key: types.KeyPrefixStorage, Value: hash.Bytes()},
|
||||
},
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
expectedLog string
|
||||
}{
|
||||
{"Code", fmt.Sprintf("%v\n%v", code, code)},
|
||||
{"Storage", fmt.Sprintf("%v\n%v", hash, hash)},
|
||||
{"other", ""},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
i, tt := i, tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
switch i {
|
||||
case len(tests) - 1:
|
||||
require.Panics(t, func() { dec(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name)
|
||||
default:
|
||||
require.Equal(t, tt.expectedLog, dec(kvPairs.Pairs[i], kvPairs.Pairs[i]), tt.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package simulation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
const (
|
||||
extraEIPsKey = "extra_eips"
|
||||
)
|
||||
|
||||
// GenExtraEIPs defines a set of extra EIPs with 50% probability
|
||||
func GenExtraEIPs(r *rand.Rand) []int64 {
|
||||
var extraEIPs []int64
|
||||
// 50% chance of having extra EIPs
|
||||
if r.Intn(2) == 0 {
|
||||
extraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
|
||||
}
|
||||
return extraEIPs
|
||||
}
|
||||
|
||||
// GenEnableCreate enables the EnableCreate param with 80% probability
|
||||
func GenEnableCreate(r *rand.Rand) bool {
|
||||
// 80% chance of enabling create contract
|
||||
enableCreate := r.Intn(100) < 80
|
||||
return enableCreate
|
||||
}
|
||||
|
||||
// GenEnableCall enables the EnableCall param with 80% probability
|
||||
func GenEnableCall(r *rand.Rand) bool {
|
||||
// 80% chance of enabling evm account transfer and calling contract
|
||||
enableCall := r.Intn(100) < 80
|
||||
return enableCall
|
||||
}
|
||||
|
||||
// RandomizedGenState generates a random GenesisState for the EVM module
|
||||
func RandomizedGenState(simState *module.SimulationState) {
|
||||
// evm params
|
||||
var extraEIPs []int64
|
||||
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, extraEIPsKey, &extraEIPs, simState.Rand,
|
||||
func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) },
|
||||
)
|
||||
|
||||
params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), extraEIPs...)
|
||||
evmGenesis := types.NewGenesisState(params, []types.GenesisAccount{})
|
||||
|
||||
bz, err := json.MarshalIndent(evmGenesis, "", " ")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("Selected randomly generated %s parameters:\n%s\n", types.ModuleName, bz)
|
||||
|
||||
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(evmGenesis)
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package simulation_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
"github.com/evmos/ethermint/x/evm/simulation"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// TestRandomizedGenState tests the normal scenario of applying RandomizedGenState.
|
||||
// Abonormal scenarios are not tested here.
|
||||
func TestRandomizedGenState(t *testing.T) {
|
||||
registry := codectypes.NewInterfaceRegistry()
|
||||
types.RegisterInterfaces(registry)
|
||||
cdc := codec.NewProtoCodec(registry)
|
||||
|
||||
s := rand.NewSource(1)
|
||||
r := rand.New(s)
|
||||
|
||||
simState := module.SimulationState{
|
||||
AppParams: make(simtypes.AppParams),
|
||||
Cdc: cdc,
|
||||
Rand: r,
|
||||
NumBonded: 3,
|
||||
Accounts: simtypes.RandomAccounts(r, 3),
|
||||
InitialStake: sdkmath.NewInt(1000),
|
||||
GenState: make(map[string]json.RawMessage),
|
||||
}
|
||||
|
||||
simulation.RandomizedGenState(&simState)
|
||||
|
||||
var evmGenesis types.GenesisState
|
||||
simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &evmGenesis)
|
||||
|
||||
require.Equal(t, true, evmGenesis.Params.GetEnableCreate())
|
||||
require.Equal(t, true, evmGenesis.Params.GetEnableCall())
|
||||
require.Equal(t, types.DefaultEVMDenom, evmGenesis.Params.GetEvmDenom())
|
||||
require.Equal(t, simulation.GenExtraEIPs(r), evmGenesis.Params.GetExtraEIPs())
|
||||
require.Equal(t, types.DefaultChainConfig(), evmGenesis.Params.GetChainConfig())
|
||||
|
||||
require.Equal(t, len(evmGenesis.Accounts), 0)
|
||||
}
|
||||
@@ -1,313 +0,0 @@
|
||||
package simulation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
sdktx "github.com/cosmos/cosmos-sdk/types/tx"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
"github.com/cosmos/cosmos-sdk/x/simulation"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/signing"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/evmos/ethermint/encoding"
|
||||
"github.com/evmos/ethermint/tests"
|
||||
"github.com/evmos/ethermint/x/evm/keeper"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
const (
|
||||
/* #nosec */
|
||||
OpWeightMsgEthSimpleTransfer = "op_weight_msg_eth_simple_transfer"
|
||||
/* #nosec */
|
||||
OpWeightMsgEthCreateContract = "op_weight_msg_eth_create_contract"
|
||||
/* #nosec */
|
||||
OpWeightMsgEthCallContract = "op_weight_msg_eth_call_contract"
|
||||
)
|
||||
|
||||
const (
|
||||
WeightMsgEthSimpleTransfer = 50
|
||||
WeightMsgEthCreateContract = 50
|
||||
)
|
||||
|
||||
var ErrNoEnoughBalance = fmt.Errorf("no enough balance")
|
||||
|
||||
var maxWaitSeconds = 10
|
||||
|
||||
type simulateContext struct {
|
||||
context sdk.Context
|
||||
bapp *baseapp.BaseApp
|
||||
rand *rand.Rand
|
||||
keeper *keeper.Keeper
|
||||
}
|
||||
|
||||
// WeightedOperations generate Two kinds of operations: SimulateEthSimpleTransfer, SimulateEthCreateContract.
|
||||
// Contract call operations work as the future operations of SimulateEthCreateContract.
|
||||
func WeightedOperations(
|
||||
appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, k *keeper.Keeper,
|
||||
) simulation.WeightedOperations {
|
||||
var (
|
||||
weightMsgEthSimpleTransfer int
|
||||
weightMsgEthCreateContract int
|
||||
)
|
||||
|
||||
appParams.GetOrGenerate(cdc, OpWeightMsgEthSimpleTransfer, &weightMsgEthSimpleTransfer, nil,
|
||||
func(_ *rand.Rand) {
|
||||
weightMsgEthSimpleTransfer = WeightMsgEthSimpleTransfer
|
||||
},
|
||||
)
|
||||
|
||||
appParams.GetOrGenerate(cdc, OpWeightMsgEthCreateContract, &weightMsgEthCreateContract, nil,
|
||||
func(_ *rand.Rand) {
|
||||
weightMsgEthCreateContract = WeightMsgEthCreateContract
|
||||
},
|
||||
)
|
||||
|
||||
return simulation.WeightedOperations{
|
||||
simulation.NewWeightedOperation(
|
||||
weightMsgEthSimpleTransfer,
|
||||
SimulateEthSimpleTransfer(ak, k),
|
||||
),
|
||||
simulation.NewWeightedOperation(
|
||||
weightMsgEthCreateContract,
|
||||
SimulateEthCreateContract(ak, k),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// SimulateEthSimpleTransfer simulate simple eth account transferring gas token.
|
||||
// It randomly choose sender, recipient and transferable amount.
|
||||
// Other tx details like nonce, gasprice, gaslimit are calculated to get valid value.
|
||||
func SimulateEthSimpleTransfer(ak types.AccountKeeper, k *keeper.Keeper) simtypes.Operation {
|
||||
return func(
|
||||
r *rand.Rand, bapp *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
|
||||
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||
simAccount, _ := simtypes.RandomAcc(r, accs)
|
||||
var recipient simtypes.Account
|
||||
if r.Intn(2) == 1 {
|
||||
recipient, _ = simtypes.RandomAcc(r, accs)
|
||||
} else {
|
||||
recipient = simtypes.RandomAccounts(r, 1)[0]
|
||||
}
|
||||
from := common.BytesToAddress(simAccount.Address)
|
||||
to := common.BytesToAddress(recipient.Address)
|
||||
|
||||
simulateContext := &simulateContext{ctx, bapp, r, k}
|
||||
|
||||
return SimulateEthTx(simulateContext, &from, &to, nil, (*hexutil.Bytes)(&[]byte{}), simAccount.PrivKey, nil)
|
||||
}
|
||||
}
|
||||
|
||||
// SimulateEthCreateContract simulate create an ERC20 contract.
|
||||
// It makes operationSimulateEthCallContract the future operations of SimulateEthCreateContract
|
||||
// to ensure valid contract call.
|
||||
func SimulateEthCreateContract(ak types.AccountKeeper, k *keeper.Keeper) simtypes.Operation {
|
||||
return func(
|
||||
r *rand.Rand, bapp *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
|
||||
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||
simAccount, _ := simtypes.RandomAcc(r, accs)
|
||||
|
||||
from := common.BytesToAddress(simAccount.Address)
|
||||
nonce := k.GetNonce(ctx, from)
|
||||
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("", from, sdkmath.NewIntWithDecimal(1000, 18).BigInt())
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "can not pack owner and supply"), nil, err
|
||||
}
|
||||
data := types.ERC20Contract.Bin
|
||||
data = append(data, ctorArgs...)
|
||||
|
||||
simulateContext := &simulateContext{ctx, bapp, r, k}
|
||||
|
||||
fops := make([]simtypes.FutureOperation, 1)
|
||||
whenCall := ctx.BlockHeader().Time.Add(time.Duration(r.Intn(maxWaitSeconds)+1) * time.Second)
|
||||
contractAddr := crypto.CreateAddress(from, nonce)
|
||||
var tokenReceipient simtypes.Account
|
||||
if r.Intn(2) == 1 {
|
||||
tokenReceipient, _ = simtypes.RandomAcc(r, accs)
|
||||
} else {
|
||||
tokenReceipient = simtypes.RandomAccounts(r, 1)[0]
|
||||
}
|
||||
receipientAddr := common.BytesToAddress(tokenReceipient.Address)
|
||||
fops[0] = simtypes.FutureOperation{
|
||||
BlockTime: whenCall,
|
||||
Op: operationSimulateEthCallContract(k, &contractAddr, &receipientAddr, nil),
|
||||
}
|
||||
return SimulateEthTx(simulateContext, &from, nil, nil, (*hexutil.Bytes)(&data), simAccount.PrivKey, fops)
|
||||
}
|
||||
}
|
||||
|
||||
// operationSimulateEthCallContract simulate calling an contract.
|
||||
// It is always calling an ERC20 contract.
|
||||
func operationSimulateEthCallContract(k *keeper.Keeper, contractAddr, to *common.Address, amount *big.Int) simtypes.Operation {
|
||||
return func(
|
||||
r *rand.Rand, bapp *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
|
||||
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||
simAccount, _ := simtypes.RandomAcc(r, accs)
|
||||
|
||||
from := common.BytesToAddress(simAccount.Address)
|
||||
|
||||
ctorArgs, err := types.ERC20Contract.ABI.Pack("transfer", to, amount)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "can not pack method and args"), nil, err
|
||||
}
|
||||
data := types.ERC20Contract.Bin
|
||||
data = append(data, ctorArgs...)
|
||||
|
||||
simulateContext := &simulateContext{ctx, bapp, r, k}
|
||||
|
||||
return SimulateEthTx(simulateContext, &from, contractAddr, nil, (*hexutil.Bytes)(&data), simAccount.PrivKey, nil)
|
||||
}
|
||||
}
|
||||
|
||||
// SimulateEthTx creates valid ethereum tx and pack it as cosmos tx, and deliver it.
|
||||
func SimulateEthTx(
|
||||
ctx *simulateContext, from, to *common.Address, amount *big.Int, data *hexutil.Bytes, prv cryptotypes.PrivKey, fops []simtypes.FutureOperation,
|
||||
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
|
||||
ethTx, err := CreateRandomValidEthTx(ctx, from, nil, nil, data)
|
||||
if err == ErrNoEnoughBalance {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "no enough balance"), nil, nil
|
||||
}
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "can not create valid eth tx"), nil, err
|
||||
}
|
||||
|
||||
txConfig := encoding.MakeConfig(module.NewBasicManager()).TxConfig
|
||||
txBuilder := txConfig.NewTxBuilder()
|
||||
signedTx, err := GetSignedTx(ctx, txBuilder, ethTx, prv)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "can not sign ethereum tx"), nil, err
|
||||
}
|
||||
|
||||
_, _, err = ctx.bapp.SimDeliver(txConfig.TxEncoder(), signedTx)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "failed to deliver tx"), nil, err
|
||||
}
|
||||
|
||||
return simtypes.OperationMsg{}, fops, nil
|
||||
}
|
||||
|
||||
// CreateRandomValidEthTx create the ethereum tx with valid random values
|
||||
func CreateRandomValidEthTx(ctx *simulateContext,
|
||||
from,
|
||||
to *common.Address,
|
||||
amount *big.Int,
|
||||
data *hexutil.Bytes,
|
||||
) (ethTx *types.MsgEthereumTx, err error) {
|
||||
gasCap := ctx.rand.Uint64()
|
||||
estimateGas, err := EstimateGas(ctx, from, to, data, gasCap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// we suppose that gasLimit should be larger than estimateGas to ensure tx validity
|
||||
gasLimit := estimateGas + uint64(ctx.rand.Intn(int(sdktx.MaxGasWanted-estimateGas)))
|
||||
ethChainID := ctx.keeper.ChainID()
|
||||
chainConfig := ctx.keeper.GetParams(ctx.context).ChainConfig.EthereumConfig(ethChainID)
|
||||
gasPrice := ctx.keeper.GetBaseFee(ctx.context, chainConfig)
|
||||
gasFeeCap := new(big.Int).Add(gasPrice, big.NewInt(int64(ctx.rand.Int())))
|
||||
gasTipCap := big.NewInt(int64(ctx.rand.Int()))
|
||||
nonce := ctx.keeper.GetNonce(ctx.context, *from)
|
||||
|
||||
if amount == nil {
|
||||
amount, err = RandomTransferableAmount(ctx, *from, estimateGas, gasFeeCap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
ethTx = types.NewTx(ethChainID, nonce, to, amount, gasLimit, gasPrice, gasFeeCap, gasTipCap, *data, nil)
|
||||
ethTx.From = from.String()
|
||||
return ethTx, nil
|
||||
}
|
||||
|
||||
// EstimateGas estimates the gas used by quering the keeper.
|
||||
func EstimateGas(ctx *simulateContext, from, to *common.Address, data *hexutil.Bytes, gasCap uint64) (gas uint64, err error) {
|
||||
args, err := json.Marshal(&types.TransactionArgs{To: to, From: from, Data: data})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
res, err := ctx.keeper.EstimateGas(sdk.WrapSDKContext(ctx.context), &types.EthCallRequest{
|
||||
Args: args,
|
||||
GasCap: gasCap,
|
||||
})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return res.Gas, nil
|
||||
}
|
||||
|
||||
// RandomTransferableAmount generates a random valid transferable amount.
|
||||
// Transferable amount is between the range [0, spendable), spendable = balance - gasFeeCap * GasLimit.
|
||||
func RandomTransferableAmount(ctx *simulateContext, address common.Address, estimateGas uint64, gasFeeCap *big.Int) (amount *big.Int, err error) {
|
||||
balance := ctx.keeper.GetBalance(ctx.context, address)
|
||||
feeLimit := new(big.Int).Mul(gasFeeCap, big.NewInt(int64(estimateGas)))
|
||||
if (feeLimit.Cmp(balance)) > 0 {
|
||||
return nil, ErrNoEnoughBalance
|
||||
}
|
||||
spendable := new(big.Int).Sub(balance, feeLimit)
|
||||
if spendable.Cmp(big.NewInt(0)) == 0 {
|
||||
amount = new(big.Int).Set(spendable)
|
||||
return amount, nil
|
||||
}
|
||||
simAmount, err := simtypes.RandPositiveInt(ctx.rand, sdkmath.NewIntFromBigInt(spendable))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
amount = simAmount.BigInt()
|
||||
return amount, nil
|
||||
}
|
||||
|
||||
// GetSignedTx sign the ethereum tx and packs it as a signing.Tx .
|
||||
func GetSignedTx(
|
||||
ctx *simulateContext,
|
||||
txBuilder client.TxBuilder,
|
||||
msg *types.MsgEthereumTx,
|
||||
prv cryptotypes.PrivKey,
|
||||
) (signedTx signing.Tx, err error) {
|
||||
builder, ok := txBuilder.(tx.ExtensionOptionsTxBuilder)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("can not initiate ExtensionOptionsTxBuilder")
|
||||
}
|
||||
option, err := codectypes.NewAnyWithValue(&types.ExtensionOptionsEthereumTx{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
builder.SetExtensionOptions(option)
|
||||
|
||||
if err := msg.Sign(ethtypes.LatestSignerForChainID(ctx.keeper.ChainID()), tests.NewSigner(prv)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = builder.SetMsgs(msg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
txData, err := types.UnpackTxData(msg.Data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fees := sdk.NewCoins(sdk.NewCoin(ctx.keeper.GetParams(ctx.context).EvmDenom, sdkmath.NewIntFromBigInt(txData.Fee())))
|
||||
builder.SetFeeAmount(fees)
|
||||
builder.SetGasLimit(msg.GetGas())
|
||||
|
||||
signedTx = builder.GetTx()
|
||||
return signedTx, nil
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package simulation
|
||||
|
||||
// DONTCOVER
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
amino "github.com/cosmos/cosmos-sdk/codec"
|
||||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
"github.com/cosmos/cosmos-sdk/x/simulation"
|
||||
"github.com/evmos/ethermint/x/evm/types"
|
||||
)
|
||||
|
||||
// ParamChanges defines the parameters that can be modified by param change proposals
|
||||
// on the simulation.
|
||||
func ParamChanges(r *rand.Rand) []simtypes.ParamChange {
|
||||
return []simtypes.ParamChange{
|
||||
simulation.NewSimParamChange(types.ModuleName, string(types.ParamStoreKeyExtraEIPs),
|
||||
func(r *rand.Rand) string {
|
||||
extraEIPs := GenExtraEIPs(r)
|
||||
amino := amino.NewLegacyAmino()
|
||||
bz, err := amino.MarshalJSON(extraEIPs)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return string(bz)
|
||||
},
|
||||
),
|
||||
simulation.NewSimParamChange(types.ModuleName, string(types.ParamStoreKeyEnableCreate),
|
||||
func(r *rand.Rand) string {
|
||||
return fmt.Sprintf("%v", GenEnableCreate(r))
|
||||
},
|
||||
),
|
||||
simulation.NewSimParamChange(types.ModuleName, string(types.ParamStoreKeyEnableCall),
|
||||
func(r *rand.Rand) string {
|
||||
return fmt.Sprintf("%v", GenEnableCall(r))
|
||||
},
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package simulation_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/evmos/ethermint/x/evm/simulation"
|
||||
)
|
||||
|
||||
// TestParamChanges tests the paramChanges are generated as expected.
|
||||
func TestParamChanges(t *testing.T) {
|
||||
s := rand.NewSource(1)
|
||||
r := rand.New(s)
|
||||
|
||||
extraEIPs := simulation.GenExtraEIPs(r)
|
||||
bz, err := json.Marshal(extraEIPs)
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := []struct {
|
||||
composedKey string
|
||||
key string
|
||||
simValue string
|
||||
subspace string
|
||||
}{
|
||||
{"evm/EnableExtraEIPs", "EnableExtraEIPs", string(bz), "evm"},
|
||||
{"evm/EnableCreate", "EnableCreate", fmt.Sprintf("%v", simulation.GenEnableCreate(r)), "evm"},
|
||||
{"evm/EnableCall", "EnableCall", fmt.Sprintf("%v", simulation.GenEnableCall(r)), "evm"},
|
||||
}
|
||||
|
||||
paramChanges := simulation.ParamChanges(r)
|
||||
|
||||
require.Len(t, paramChanges, 3)
|
||||
|
||||
for i, p := range paramChanges {
|
||||
require.Equal(t, expected[i].composedKey, p.ComposedKey())
|
||||
require.Equal(t, expected[i].key, p.Key())
|
||||
require.Equal(t, expected[i].simValue, p.SimValue()(r))
|
||||
require.Equal(t, expected[i].subspace, p.Subspace())
|
||||
}
|
||||
}
|
||||
@@ -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 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 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{
|
||||
// 1538 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x5d, 0x4f, 0xdc, 0xca,
|
||||
0x19, 0x06, 0x76, 0x01, 0xef, 0xec, 0xb2, 0x6b, 0x86, 0x85, 0x6e, 0x88, 0x8a, 0xa9, 0x2f, 0x2a,
|
||||
0x2a, 0x25, 0x10, 0x88, 0x50, 0xa3, 0x44, 0x95, 0xca, 0x02, 0x49, 0xa0, 0x69, 0x8a, 0x06, 0xa2,
|
||||
0x4a, 0x95, 0x2a, 0x6b, 0xd6, 0x9e, 0x18, 0x17, 0xdb, 0xb3, 0x9a, 0x19, 0x6f, 0x76, 0xdb, 0xfe,
|
||||
0x80, 0x56, 0xbd, 0xe9, 0x4f, 0xe8, 0xcf, 0x89, 0xaa, 0x5e, 0xe4, 0xb2, 0x3a, 0x17, 0x56, 0x44,
|
||||
0xee, 0xb8, 0xdc, 0x5f, 0x70, 0x34, 0x1f, 0xfb, 0x09, 0x3a, 0xe7, 0xc0, 0x95, 0xe7, 0x79, 0x3f,
|
||||
0x9e, 0x67, 0x3e, 0x5e, 0xfb, 0x1d, 0x83, 0x75, 0x22, 0x2e, 0x09, 0x4b, 0xa2, 0x54, 0xec, 0x90,
|
||||
0x4e, 0xb2, 0xd3, 0xd9, 0x95, 0x8f, 0xed, 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 0x5b,
|
||||
0x1a, 0x27, 0x64, 0xff, 0x06, 0xea, 0x09, 0x61, 0x21, 0xf1, 0x52, 0x22, 0x78, 0x3b, 0x8e, 0x84,
|
||||
0x11, 0x5e, 0x7d, 0xf8, 0xfb, 0x78, 0x17, 0x9f, 0x8b, 0xa0, 0x32, 0xbf, 0x37, 0x56, 0x25, 0x7e,
|
||||
0x5a, 0xb4, 0xaa, 0x76, 0xed, 0xb4, 0x68, 0xd5, 0x6c, 0xfb, 0xb4, 0x68, 0xd9, 0xf6, 0xf2, 0x69,
|
||||
0xd1, 0x5a, 0xb1, 0xeb, 0x68, 0xa9, 0x47, 0x63, 0xea, 0x75, 0x9e, 0xeb, 0x5c, 0x54, 0x26, 0x9f,
|
||||
0x30, 0x37, 0x5f, 0x14, 0x54, 0xf5, 0xb1, 0xc0, 0x71, 0x8f, 0x1b, 0x62, 0x64, 0x6b, 0xb9, 0xb1,
|
||||
0x1e, 0xb7, 0x03, 0xe6, 0xcf, 0x85, 0xbc, 0xe6, 0xd8, 0xa0, 0x70, 0x45, 0x7a, 0xba, 0x77, 0x23,
|
||||
0x39, 0x84, 0x75, 0x30, 0xdf, 0xc1, 0x71, 0xa6, 0xef, 0x4b, 0x25, 0xa4, 0x81, 0x7b, 0x06, 0x6a,
|
||||
0x17, 0x0c, 0xa7, 0x1c, 0xfb, 0x22, 0xa2, 0xe9, 0x3b, 0x1a, 0x72, 0x08, 0x41, 0x51, 0xf5, 0x10,
|
||||
0x9d, 0xab, 0xc6, 0xf0, 0x57, 0xa0, 0x18, 0xd3, 0x90, 0x37, 0xe6, 0x36, 0x0b, 0x5b, 0xe5, 0xbd,
|
||||
0xd5, 0xdb, 0x37, 0x96, 0x77, 0x34, 0x44, 0x2a, 0xc4, 0xfd, 0xef, 0x1c, 0x28, 0xbc, 0xa3, 0x21,
|
||||
0x6c, 0x80, 0x45, 0x1c, 0x04, 0x8c, 0x70, 0x6e, 0x98, 0x06, 0x10, 0xae, 0x81, 0x05, 0x41, 0xdb,
|
||||
0x91, 0xaf, 0xe9, 0x4a, 0xc8, 0x20, 0x29, 0x1c, 0x60, 0x81, 0x55, 0x17, 0xae, 0x20, 0x35, 0x86,
|
||||
0x7b, 0xa0, 0xa2, 0x56, 0xe6, 0xa5, 0x59, 0xd2, 0x22, 0x4c, 0x35, 0xd3, 0x62, 0xb3, 0x76, 0x93,
|
||||
0x3b, 0x65, 0x65, 0x7f, 0xaf, 0xcc, 0x68, 0x1c, 0xc0, 0x27, 0x60, 0x51, 0x74, 0xc7, 0xfb, 0xe0,
|
||||
0xca, 0x4d, 0xee, 0xd4, 0xc4, 0x68, 0x99, 0xb2, 0xcd, 0xa1, 0x05, 0xd1, 0x55, 0xed, 0x6e, 0x07,
|
||||
0x58, 0xa2, 0xeb, 0x45, 0x69, 0x40, 0xba, 0xaa, 0xd5, 0x15, 0x9b, 0xf5, 0x9b, 0xdc, 0xb1, 0xc7,
|
||||
0xc2, 0x4f, 0xa4, 0x0f, 0x2d, 0x8a, 0xae, 0x1a, 0xc0, 0x27, 0x00, 0xe8, 0x29, 0x29, 0x05, 0xdd,
|
||||
0xa8, 0x96, 0x6e, 0x72, 0xa7, 0xa4, 0xac, 0x8a, 0x7b, 0x34, 0x84, 0x2e, 0x98, 0xd7, 0xdc, 0x96,
|
||||
0xe2, 0xae, 0xdc, 0xe4, 0x8e, 0x15, 0xd3, 0x50, 0x73, 0x6a, 0x97, 0xdc, 0x2a, 0x46, 0x12, 0xda,
|
||||
0x21, 0x81, 0xea, 0x05, 0x16, 0x1a, 0x40, 0xf7, 0x5f, 0x73, 0xc0, 0xba, 0xe8, 0x22, 0xc2, 0xb3,
|
||||
0x58, 0xc0, 0xd7, 0xc0, 0xf6, 0x69, 0x2a, 0x18, 0xf6, 0x85, 0x37, 0xb1, 0xb5, 0xcd, 0xc7, 0xa3,
|
||||
0xef, 0xf2, 0x74, 0x84, 0x8b, 0x6a, 0x03, 0xd3, 0x81, 0xd9, 0xff, 0x3a, 0x98, 0x6f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 0xab, 0x3e, 0xf9, 0xad, 0x05,
|
||||
0xf5, 0x1f, 0xfb, 0xfc, 0xfb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x44, 0xf1, 0x35, 0x0d, 0x0f,
|
||||
0x00, 0x00,
|
||||
// 1608 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,
|
||||
0x0a, 0x17, 0x48, 0xec, 0xd8, 0x81, 0xd1, 0x45, 0x82, 0x16, 0xb5, 0x76, 0x9d, 0xc4, 0xee, 0x36,
|
||||
0x35, 0xc6, 0x0e, 0x0a, 0x14, 0x28, 0x88, 0x11, 0x39, 0xa1, 0x18, 0x93, 0x1c, 0x61, 0x66, 0xa8,
|
||||
0x95, 0xda, 0x3e, 0x40, 0x8b, 0xde, 0xf4, 0x09, 0x8a, 0x3c, 0x4e, 0xd0, 0xab, 0xbd, 0x2c, 0x7a,
|
||||
0x41, 0x14, 0xde, 0x3b, 0x5f, 0xea, 0x09, 0x8a, 0xf9, 0x11, 0xf5, 0x63, 0xa3, 0xad, 0x75, 0xe5,
|
||||
0xf9, 0xce, 0x39, 0xf3, 0x7d, 0x33, 0x67, 0xce, 0x68, 0x0e, 0x0d, 0x9e, 0x13, 0xd1, 0x23, 0x2c,
|
||||
0x8d, 0x33, 0x71, 0x44, 0x06, 0xe9, 0xd1, 0xe0, 0x58, 0xfe, 0x39, 0xec, 0x33, 0x2a, 0x28, 0x74,
|
||||
0x4a, 0xdf, 0xa1, 0x34, 0x0e, 0x8e, 0x9f, 0xb7, 0x22, 0x1a, 0x51, 0xe5, 0x3c, 0x92, 0x23, 0x1d,
|
||||
0xe7, 0xfd, 0xa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 0x42, 0xbc, 0x7f, 0xac, 0x81, 0xca, 0x1b, 0x1a, 0xc1, 0x36, 0xd8, 0xc4, 0x61,
|
||||
0xc8, 0x08, 0xe7, 0x86, 0x69, 0x02, 0xe1, 0x2e, 0xd8, 0x10, 0xb4, 0x1f, 0x07, 0x9a, 0xae, 0x8a,
|
||||
0x0c, 0x92, 0xc2, 0x21, 0x16, 0x58, 0xf5, 0x15, 0x75, 0xa4, 0xc6, 0xf0, 0x04, 0xd4, 0xd5, 0xce,
|
||||
0xfc, 0x2c, 0x4f, 0xbb, 0x84, 0xa9, 0xf6, 0xc0, 0xea, 0x34, 0xef, 0x0b, 0xb7, 0xa6, 0xec, 0x5f,
|
||||
0x2b, 0x33, 0x9a, 0x05, 0xf0, 0x23, 0xb0, 0x29, 0x86, 0xb3, 0x2f, 0xfb, 0xce, 0x7d, 0xe1, 0x36,
|
||||
0xc5, 0x74, 0x9b, 0xf2, 0xe1, 0x46, 0x1b, 0x62, 0xa8, 0x1e, 0xf0, 0x23, 0x60, 0x8b, 0xa1, 0x1f,
|
||||
0x67, 0x21, 0x19, 0xaa, 0xc7, 0xdb, 0xea, 0xb4, 0xee, 0x0b, 0xd7, 0x99, 0x09, 0xbf, 0x90, 0x3e,
|
||||
0xb4, 0x29, 0x86, 0x6a, 0x00, 0x3f, 0x02, 0x40, 0x2f, 0x49, 0x29, 0xe8, 0xa7, 0x77, 0xeb, 0xbe,
|
||||
0x70, 0xab, 0xca, 0xaa, 0xb8, 0xa7, 0x43, 0xe8, 0x81, 0x75, 0xcd, 0x6d, 0x2b, 0xee, 0xfa, 0x7d,
|
||||
0xe1, 0xda, 0x09, 0x8d, 0x34, 0xa7, 0x76, 0xc9, 0x54, 0x31, 0x92, 0xd2, 0x01, 0x09, 0xd5, 0xeb,
|
||||
0x66, 0xa3, 0x09, 0xf4, 0xfe, 0xba, 0x06, 0xec, 0x9b, 0x21, 0x22, 0x3c, 0x4f, 0x04, 0xfc, 0x02,
|
||||
0x38, 0x01, 0xcd, 0x04, 0xc3, 0x81, 0xf0, 0xe7, 0x52, 0xdb, 0x79, 0x31, 0x7d, 0x69, 0x16, 0x23,
|
||||
0x3c, 0xd4, 0x9c, 0x98, 0xce, 0x4c, 0xfe, 0x5b, 0x60, 0xbd, 0x9b, 0x50, 0x9a, 0xaa, 0x4a, 0xa8,
|
||||
0x23, 0x0d, 0x20, 0x52, 0x59, 0x53, 0xa7, 0x5c, 0x51, 0x9d, 0xf6, 0x8f, 0x1f, 0x9e, 0xf2, 0x42,
|
||||
0xa9, 0x74, 0x76, 0x4d, 0xb7, 0xdd, 0xd0, 0xda, 0x66, 0xbe, 0x27, 0x73, 0xab, 0x4a, 0xc9, 0x01,
|
||||
0x15, 0x46, 0x84, 0x3a, 0xb4, 0x3a, 0x92, 0x43, 0xf8, 0x1c, 0xd8, 0x8c, 0x0c, 0x08, 0x13, 0x24,
|
||||
0x54, 0x87, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x81, 0x1d, 0x61, 0xee, 0xe7, 0x9c, 0x84, 0xfa, 0x24,
|
||||
0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, 0x5d, 0xf1, 0x30, 0xa8,
|
||||
0x9d, 0x05, 0x01, 0xe1, 0xfc, 0x26, 0xef, 0x27, 0xe4, 0xbf, 0x54, 0xd8, 0x09, 0xa8, 0x73, 0x41,
|
||||
0x19, 0x8e, 0x88, 0x7f, 0x4b, 0x46, 0xa6, 0xce, 0x74, 0xd5, 0x18, 0xfb, 0xaf, 0xc8, 0x88, 0xa3,
|
||||
0x59, 0x60, 0x24, 0xbe, 0xb7, 0x40, 0xed, 0x86, 0xe1, 0x80, 0x98, 0x0e, 0x5f, 0xd6, 0xaa, 0x84,
|
||||
0xcc, 0x48, 0x18, 0x24, 0xb5, 0x45, 0x9c, 0x12, 0x9a, 0x0b, 0x73, 0x9f, 0x26, 0x50, 0xce, 0x60,
|
||||
0x84, 0x0c,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3,
|
||||
0x0b, 0xb4, 0x33, 0xc1, 0x33, 0xcb, 0xeb, 0xfc, 0xf2, 0x87, 0xbb, 0xbd, 0xd5, 0x77, 0x77, 0x7b,
|
||||
0xab, 0xff, 0xbe, 0xdb, 0x5b, 0xfd, 0xdb, 0xfb, 0xbd, 0x95, 0x77, 0xef, 0xf7, 0x56, 0xfe, 0xf9,
|
||||
0x7e, 0x6f, 0xe5, 0x77, 0xb3, 0xef, 0x03, 0x19, 0xc8, 0xe7, 0x61, 0xfa, 0xfd, 0x3f, 0x54, 0xff,
|
||||
0x01, 0x50, 0x6f, 0x44, 0x77, 0x43, 0x7d, 0xd9, 0x7f, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0xe2, 0xe1, 0x18, 0x7a, 0x1f, 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
+19
-19
@@ -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"
|
||||
@@ -154,24 +154,24 @@ func init() { proto.RegisterFile("ethermint/evm/v1/genesis.proto", fileDescripto
|
||||
var fileDescriptor_9bcdec50cc9d156d = []byte{
|
||||
// 297 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x50, 0xbf, 0x4e, 0x83, 0x40,
|
||||
0x18, 0xe7, 0x6c, 0x53, 0xec, 0xd5, 0xa8, 0xb9, 0x98, 0x48, 0x18, 0xae, 0xa4, 0x83, 0x61, 0x3a,
|
||||
0xd2, 0x9a, 0x38, 0x2b, 0x8b, 0xab, 0xa1, 0x9b, 0xdb, 0x15, 0xbe, 0x50, 0x06, 0x38, 0xc2, 0x5d,
|
||||
0x89, 0xae, 0x8e, 0x4e, 0x3e, 0x87, 0x4f, 0xd2, 0xb1, 0xa3, 0x93, 0x1a, 0x78, 0x11, 0xc3, 0x41,
|
||||
0x6b, 0x94, 0xed, 0xbb, 0xfc, 0xfe, 0xde, 0x0f, 0x53, 0x50, 0x6b, 0x28, 0xd2, 0x24, 0x53, 0x1e,
|
||||
0x94, 0xa9, 0x57, 0xce, 0xbd, 0x18, 0x32, 0x90, 0x89, 0x64, 0x79, 0x21, 0x94, 0x20, 0xe7, 0x07,
|
||||
0x9c, 0x41, 0x99, 0xb2, 0x72, 0x6e, 0x5f, 0xc4, 0x22, 0x16, 0x1a, 0xf4, 0x9a, 0xab, 0xe5, 0xd9,
|
||||
0x76, 0xcf, 0xa7, 0xa1, 0x6b, 0x6c, 0xf6, 0x8a, 0xf0, 0xc9, 0x7d, 0xeb, 0xba, 0x54, 0x5c, 0x01,
|
||||
0xf1, 0xf1, 0x31, 0x0f, 0x43, 0xb1, 0xc9, 0x94, 0xb4, 0x90, 0x33, 0x70, 0x27, 0x0b, 0x87, 0xfd,
|
||||
0xcf, 0x61, 0x9d, 0xe2, 0xae, 0x25, 0xfa, 0xc3, 0xed, 0xe7, 0xd4, 0x08, 0x0e, 0x3a, 0x72, 0x83,
|
||||
0x47, 0x39, 0x2f, 0x78, 0x2a, 0xad, 0x23, 0x07, 0xb9, 0x93, 0x85, 0xd5, 0x77, 0x78, 0xd0, 0x78,
|
||||
0xa7, 0xec, 0xd8, 0xb3, 0x17, 0x84, 0x4f, 0xff, 0x5a, 0x13, 0x0b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0xd5, 0xd4, 0xf8, 0xa8, 0xa9,
|
||||
0xf1, 0x78, 0x15, 0x27, 0x6a, 0xbd, 0x59, 0xb1, 0x50, 0xa4, 0xcd, 0xae, 0x42, 0x7a, 0xbf, 0x73,
|
||||
0x3f, 0xe9, 0xc1, 0xd5, 0x73, 0x0e, 0x72, 0x35, 0xd2, 0xd3, 0x5e, 0xff, 0x04, 0x00, 0x00, 0xff,
|
||||
0xff, 0xe3, 0x61, 0xf0, 0x9f, 0xc0, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/evmos/ethermint/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
+226
-115
@@ -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,12 +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"`
|
||||
// the proposer of the requested block
|
||||
// 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{} }
|
||||
@@ -850,9 +852,16 @@ func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -898,21 +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"`
|
||||
// the proposer of the requested block
|
||||
// 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{} }
|
||||
@@ -997,9 +1008,16 @@ func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -1045,18 +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"`
|
||||
// the proposer of the requested block
|
||||
// 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{} }
|
||||
@@ -1134,8 +1154,16 @@ func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_s
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -1217,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"`
|
||||
}
|
||||
|
||||
@@ -1285,96 +1314,97 @@ func init() {
|
||||
func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) }
|
||||
|
||||
var fileDescriptor_e15a877459347994 = []byte{
|
||||
// 1415 bytes of a gzipped FileDescriptorProto
|
||||
// 1434 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6f, 0x13, 0x47,
|
||||
0x1b, 0xcf, 0xc6, 0x4e, 0x6c, 0xc6, 0x01, 0xfc, 0x0e, 0xe1, 0xc5, 0xec, 0x9b, 0xd8, 0x61, 0x21,
|
||||
0x9f, 0x84, 0xdd, 0x37, 0x6e, 0x85, 0x54, 0x2e, 0x05, 0x5b, 0x81, 0xb6, 0x40, 0x45, 0xb7, 0x51,
|
||||
0x0f, 0x95, 0x90, 0x35, 0x5e, 0x0f, 0x6b, 0x2b, 0xf6, 0x8e, 0xd9, 0x19, 0xbb, 0x0e, 0x94, 0x1e,
|
||||
0x2a, 0x15, 0x51, 0x71, 0x41, 0xea, 0xb5, 0xaa, 0xf8, 0x0f, 0xfa, 0x57, 0x54, 0xe2, 0x88, 0xd4,
|
||||
0x4b, 0xd5, 0x03, 0xad, 0xa0, 0x87, 0xde, 0x7a, 0xe8, 0xad, 0xa7, 0x6a, 0x3e, 0xd6, 0x5e, 0x7b,
|
||||
0xbd, 0x76, 0xa8, 0xb8, 0xf5, 0xb4, 0x3b, 0x33, 0xcf, 0x3c, 0xcf, 0xef, 0xf9, 0x98, 0xe7, 0xf9,
|
||||
0x81, 0x25, 0xcc, 0xea, 0xd8, 0x6f, 0x35, 0x3c, 0x66, 0xe1, 0x6e, 0xcb, 0xea, 0xee, 0x58, 0x77,
|
||||
0x3b, 0xd8,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 0x27, 0xf4, 0xc3, 0xaf,
|
||||
0x34, 0x90, 0x52, 0xb4, 0x00, 0xae, 0x46, 0x93, 0x39, 0x86, 0xf7, 0xe9, 0x6b, 0xd3, 0xc4, 0x24,
|
||||
0x56, 0xe3, 0xfc, 0x97, 0x3f, 0xfe, 0xf6, 0xcd, 0xec, 0x2a, 0x3c, 0x6b, 0x45, 0xb8, 0xa7, 0xa2,
|
||||
0x06, 0xd6, 0x7d, 0x95, 0x80, 0x07, 0xf0, 0x3b, 0x0d, 0x1c, 0x1d, 0x62, 0x5f, 0xf0, 0x7c, 0x8c,
|
||||
0x99, 0x71, 0x2c, 0x4f, 0xdf, 0x3e, 0x9c, 0xb0, 0x42, 0x56, 0x14, 0xc8, 0xb6, 0xe1, 0x56, 0x14,
|
||||
0x59, 0x40, 0xf4, 0x22, 0x00, 0xbf, 0xd7, 0x40, 0x76, 0x94, 0x48, 0x41, 0x33, 0xc6, 0x6c, 0x0c,
|
||||
0x7f, 0xd3, 0xad, 0x43, 0xcb, 0x2b, 0xa4, 0x97, 0x04, 0xd2, 0xb7, 0x61, 0x31, 0x8a, 0xb4, 0x1b,
|
||||
0xdc, 0x19, 0x80, 0x0d, 0x73, 0xc3, 0x07, 0xf0, 0xa1, 0x06, 0x52, 0x8a, 0x32, 0xc5, 0xa6, 0x76,
|
||||
0x98, 0x8d, 0xc5, 0xa6, 0x76, 0x84, 0x79, 0x19, 0xdb, 0x02, 0xd6, 0x1a, 0x3c, 0x17, 0x85, 0xa5,
|
||||
0x28, 0x18, 0x0d, 0x85, 0xee, 0xb1, 0x06, 0x52, 0x8a, 0x3c, 0xc5, 0x02, 0x19, 0x66, 0x6a, 0xb1,
|
||||
0x40, 0x46, 0x38, 0x98, 0xb1, 0x23, 0x80, 0x9c, 0x87, 0x9b, 0x51, 0x20, 0x54, 0x8a, 0x0e, 0x70,
|
||||
0x58, 0xf7, 0xf7, 0xf1, 0xc1, 0x03, 0x78, 0x0f, 0x24, 0x39, 0xc7, 0x82, 0x46, 0x6c, 0xc9, 0xf4,
|
||||
0x89, 0x9b, 0x7e, 0x76, 0xa2, 0x8c, 0xc2, 0xb0, 0x29, 0x30, 0x9c, 0x85, 0x67, 0xc6, 0x55, 0x53,
|
||||
0x6d, 0x28, 0x12, 0x9f, 0x81, 0x79, 0x49, 0x33, 0xe0, 0xb9, 0x18, 0xcd, 0x43, 0x6c, 0x46, 0x5f,
|
||||
0x9d, 0x22, 0xa5, 0x10, 0xac, 0x08, 0x04, 0x3a, 0xcc, 0x45, 0x11, 0x48, 0x1e, 0x03, 0x7b, 0x20,
|
||||
0xa5, 0x68, 0x0c, 0x5c, 0x89, 0xea, 0x1c, 0x66, 0x38, 0xfa, 0xfa, 0xb4, 0x81, 0x10, 0xd8, 0x35,
|
||||
0x84, 0xdd, 0x25, 0xa8, 0x47, 0xed, 0x62, 0x56, 0xaf, 0x38, 0xdc, 0xdc, 0x17, 0x20, 0x13, 0xa2,
|
||||
0x28, 0x87, 0xb0, 0x3e, 0xc6, 0xe7, 0x31, 0x1c, 0xc7, 0x58, 0x13, 0xb6, 0x57, 0x60, 0x7e, 0x8c,
|
||||
0x6d, 0x25, 0x5e, 0x71, 0x11, 0x85, 0x9f, 0x83, 0x94, 0x1a, 0x96, 0xb1, 0xb5, 0x37, 0xcc, 0x89,
|
||||
0x62, 0x6b, 0x6f, 0x64, 0xe6, 0x4e, 0xf2, 0x5e, 0x4e, 0x4a, 0xd6, 0x83, 0x8f, 0x34, 0x00, 0x06,
|
||||
0x93, 0x00, 0x6e, 0x4c, 0x52, 0x1d, 0x9e, 0xd0, 0xfa, 0xe6, 0x21, 0x24, 0x15, 0x8e, 0x55, 0x81,
|
||||
0xa3, 0x00, 0x97, 0xe3, 0x70, 0x88, 0xd9, 0xc7, 0x03, 0xa1, 0xa6, 0xc9, 0x84, 0x6e, 0x10, 0x1e,
|
||||
0x42, 0x13, 0xba, 0xc1, 0xd0, 0x50, 0x9a, 0x14, 0x88, 0x60, 0x58, 0x95, 0x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
||||
0x7c, 0x84, 0x69, 0x05, 0x2d, 0xc0, 0x8c, 0xeb, 0xf1, 0x4b, 0x91, 0x65, 0x6d, 0x3d, 0x5a, 0x08,
|
||||
0x16, 0xc6, 0x87, 0x70, 0x4a, 0x18, 0xc9, 0x8b, 0xf0, 0xfe, 0x0b, 0x94, 0x0f, 0x35, 0xd0, 0x87,
|
||||
0x69, 0x90, 0x60, 0x57, 0xe0, 0x68, 0x90, 0xb9, 0x62, 0xbf, 0xa6, 0x23, 0xc1, 0xee, 0xe5, 0x60,
|
||||
0x13, 0xe9, 0x10, 0xa7, 0xdc, 0x28, 0xc7, 0x37, 0x2d, 0xf0, 0x75, 0xd6, 0x5c, 0x05, 0x0e, 0xb4,
|
||||
0x16, 0xdd, 0x66, 0xbd, 0x44, 0x7c, 0xe9, 0xc1, 0x11, 0xb9, 0xfb, 0x89, 0xd8, 0x34, 0xae, 0xc3,
|
||||
0xa2, 0xc0, 0xf1, 0x39, 0xae, 0x55, 0xcb, 0x98, 0x79, 0xfe, 0x80, 0x33, 0xa7, 0x61, 0xde, 0xf6,
|
||||
0xdc, 0x41, 0x1c, 0x09, 0xbe, 0x77, 0x39, 0xe4, 0xd5, 0x63, 0x0d, 0x96, 0x46, 0x68, 0x93, 0x8e,
|
||||
0xad, 0xc1, 0x31, 0x85, 0xaa, 0x5f, 0xa3, 0x02, 0xfb, 0x06, 0x5d, 0x53, 0x45, 0x94, 0x0b, 0xf2,
|
||||
0xfc, 0x3a, 0xe9, 0x79, 0x57, 0x16, 0x51, 0xe7, 0xea, 0xa4, 0x22, 0x32, 0xae, 0x4b, 0x63, 0x9f,
|
||||
0x31, 0xcf, 0xc7, 0xce, 0x64, 0x63, 0x28, 0x09, 0x91, 0x3d, 0xb2, 0x2f, 0xeb, 0x8d, 0xff, 0xf6,
|
||||
0x98, 0xdf, 0x92, 0xe6, 0x3b, 0xca, 0xa4, 0xf9, 0x05, 0x98, 0x69, 0xe1, 0x5a, 0x53, 0x19, 0x0f,
|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, 0xb1, 0xdc, 0xe6, 0x6f, 0x2f, 0x32,
|
||||
0xab, 0x87, 0xf0, 0xe7, 0x9a, 0xcb, 0xf8, 0xc0, 0x15, 0xea, 0xb2, 0x7f, 0xcd, 0xc3, 0x8c, 0xd0,
|
||||
0x8f, 0xbe, 0xd5, 0x20, 0x26, 0x79, 0x06, 0x5a, 0x09, 0xe7, 0x79, 0x08, 0x91, 0xd4, 0x57, 0x27,
|
||||
0x89, 0x05, 0x58, 0x8d, 0x73, 0xdf, 0xfc, 0xf2, 0xc7, 0x0f, 0xd3, 0x2b, 0xe8, 0x8c, 0x15, 0x22,
|
||||
0xc0, 0x92, 0x6b, 0x58, 0xf7, 0x65, 0x6e, 0x1e, 0xa0, 0x1f, 0x35, 0x38, 0xd2, 0x47, 0xe7, 0xd0,
|
||||
0xb9, 0x11, 0x66, 0x86, 0xd1, 0x46, 0x7d, 0xeb, 0x70, 0xc2, 0x12, 0x59, 0x56, 0x20, 0xdb, 0x42,
|
||||
0x9b, 0x61, 0x64, 0x8a, 0x39, 0x86, 0x00, 0xfe, 0xa4, 0x41, 0x72, 0x90, 0x99, 0x21, 0x73, 0x84,
|
||||
0xd9, 0x11, 0x84, 0x50, 0xb7, 0x0e, 0x2d, 0x2f, 0x91, 0x5e, 0x14, 0x48, 0xdf, 0x47, 0xd9, 0x30,
|
||||
0xd2, 0x96, 0xba, 0xd3, 0x05, 0xdb, 0x4b, 0x36, 0x1f, 0xa0, 0x87, 0x1a, 0xc4, 0x24, 0x07, 0x1b,
|
||||
0x99, 0xda, 0x7e, 0x7a, 0x37, 0x32, 0xb5, 0x03, 0x54, 0xce, 0xd8, 0x12, 0xb0, 0x56, 0xd1, 0xd9,
|
||||
0x30, 0x2c, 0xc9, 0xe9, 0x68, 0x4f, 0xe8, 0x1e, 0x6b, 0x10, 0x93, 0x6c, 0x6c, 0x24, 0x90, 0x7e,
|
||||
0xea, 0x37, 0x12, 0xc8, 0x00, 0xa9, 0x33, 0xb6, 0x05, 0x90, 0x73, 0x68, 0x23, 0x0c, 0x84, 0x06,
|
||||
0xa2, 0x5d, 0x1c, 0xd6, 0xfd, 0x3d, 0xb2, 0xff, 0x00, 0xdd, 0x83, 0x28, 0x27, 0x6d, 0xc8, 0x18,
|
||||
0x59, 0x32, 0x1d, 0x26, 0xa8, 0x9f, 0x19, 0x2b, 0x23, 0x31, 0x6c, 0x08, 0x0c, 0x67, 0xd0, 0xe9,
|
||||
0x61, 0xd5, 0x54, 0xee, 0x8b, 0xc4, 0x97, 0x30, 0x1b, 0xf0, 0x16, 0x74, 0x76, 0x84, 0xe6, 0x3e,
|
||||
0x7a, 0xa4, 0xaf, 0x4c, 0x90, 0x92, 0x08, 0x96, 0x05, 0x02, 0x1d, 0xa5, 0xc2, 0x08, 0x02, 0x62,
|
||||
0x84, 0xda, 0x10, 0x93, 0xbc, 0x08, 0x2d, 0x87, 0x75, 0xf6, 0x53, 0x26, 0x7d, 0x6d, 0xd2, 0xac,
|
||||
0x50, 0x76, 0x0d, 0x61, 0x77, 0x11, 0xe9, 0x61, 0xbb, 0x84, 0x55, 0x8a, 0x36, 0x37, 0xf7, 0x35,
|
||||
0x24, 0x7a, 0x88, 0xcd, 0x21, 0xac, 0x0f, 0xf1, 0x79, 0x08, 0x33, 0x32, 0x56, 0x85, 0xed, 0x65,
|
||||
0x94, 0x1e, 0x62, 0x5b, 0x8a, 0x17, 0x1d, 0x4c, 0xd1, 0x57, 0x10, 0x93, 0x73, 0x74, 0x64, 0xed,
|
||||
0xf5, 0x33, 0xa9, 0x91, 0xb5, 0x37, 0x30, 0x8e, 0xc7, 0x79, 0x1f, 0x0c, 0x51, 0xd6, 0x46, 0x8f,
|
||||
0x34, 0x80, 0xee, 0x24, 0x40, 0xeb, 0xe3, 0x54, 0xf7, 0x0e, 0x6f, 0x7d, 0xe3, 0x10, 0x92, 0x12,
|
||||
0xc7, 0x8a, 0xc0, 0x91, 0x41, 0x4b, 0xa3, 0x70, 0x88, 0xb1, 0xc8, 0x03, 0x21, 0xa7, 0xc9, 0x98,
|
||||
0x6e, 0xd0, 0x3b, 0x84, 0xc6, 0x74, 0x83, 0xbe, 0xa1, 0x34, 0x2e, 0x10, 0x6a, 0x58, 0xe5, 0x2e,
|
||||
0x3d, 0x7b, 0x95, 0xd6, 0x9e, 0xbf, 0x4a, 0x6b, 0x2f, 0x5f, 0xa5, 0xb5, 0x27, 0x07, 0xe9, 0xa9,
|
||||
0xe7, 0x07, 0xe9, 0xa9, 0x5f, 0x0f, 0xd2, 0x53, 0x5f, 0xf4, 0x0e, 0x2f, 0xd2, 0xe2, 0xb3, 0xab,
|
||||
0xab, 0xa5, 0x2d, 0xf4, 0x88, 0x01, 0x56, 0x9a, 0x15, 0xb3, 0xff, 0xbd, 0x7f, 0x02, 0x00, 0x00,
|
||||
0xff, 0xff, 0xa4, 0xba, 0x06, 0x5b, 0xc7, 0x11, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -2449,6 +2479,11 @@ 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)
|
||||
@@ -2519,6 +2554,11 @@ 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)
|
||||
@@ -2637,6 +2677,11 @@ 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)
|
||||
@@ -3044,6 +3089,9 @@ func (m *EthCallRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -3092,6 +3140,9 @@ func (m *QueryTraceTxRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -3137,6 +3188,9 @@ func (m *QueryTraceBlockRequest) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
if m.ChainId != 0 {
|
||||
n += 1 + sovQuery(uint64(m.ChainId))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -4813,6 +4867,25 @@ func (m *EthCallRequest) Unmarshal(dAtA []byte) error {
|
||||
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:])
|
||||
@@ -5156,6 +5229,25 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error {
|
||||
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:])
|
||||
@@ -5478,6 +5570,25 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error {
|
||||
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{
|
||||
// 851 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x6f, 0xe3, 0x44,
|
||||
0x14, 0xcf, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0x6a, 0x65, 0x75, 0x25, 0x27, 0x62, 0xe3, 0xc8, 0x12,
|
||||
0x10, 0x90, 0x62, 0x6b, 0x0b, 0xa7, 0x9e, 0xb6, 0xd9, 0xfe, 0x51, 0xab, 0x54, 0x20, 0x2b, 0x5c,
|
||||
0xe8, 0x21, 0x9a, 0x3a, 0x53, 0xc7, 0x22, 0xf6, 0x58, 0x9e, 0x89, 0xe5, 0x20, 0x71, 0x41, 0x1c,
|
||||
0xb8, 0x81, 0xc4, 0x17, 0xe0, 0xc0, 0x89, 0x2b, 0x7c, 0x00, 0x8e, 0x3d, 0x56, 0x70, 0x41, 0x1c,
|
||||
0x0c, 0x4a, 0x39, 0xf5, 0x06, 0x9f, 0x00, 0xcd, 0xd8, 0x69, 0x1a, 0xa2, 0x14, 0x28, 0x45, 0x7b,
|
||||
0xca, 0x3c, 0xff, 0xde, 0xbc, 0x79, 0xef, 0xfd, 0x7e, 0x79, 0x0f, 0x36, 0x30, 0x1b, 0xe3, 0xc8,
|
||||
0xf7, 0x02, 0x66, 0xe1, 0xd8, 0xb7, 0xe2, 0x67, 0x16, 0x4b, 0xcc, 0x30, 0x22, 0x8c, 0xa8, 0x8f,
|
||||
0x6f, 0x20, 0x13, 0xc7, 0xbe, 0x19, 0x3f, 0x6b, 0x6e, 0xb9, 0xc4, 0x25, 0x02, 0xb4, 0xf8, 0x29,
|
||||
0xf3, 0x6b, 0xbe, 0xea, 0x12, 0xe2, 0x4e, 0xb0, 0x85, 0x42, 0xcf, 0x42, 0x41, 0x40, 0x18, 0x62,
|
||||
0x1e, 0x09, 0x68, 0x8e, 0x36, 0x72, 0x54, 0x58, 0x67, 0xd3, 0x73, 0x0b, 0x05, 0xb3, 0x05, 0xe4,
|
||||
0x10, 0xea, 0x13, 0x3a, 0xcc, 0x22, 0x66, 0x46, 0x0e, 0x35, 0xd7, 0xd2, 0xe2, 0x29, 0x08, 0xcc,
|
||||
0xf8, 0x1c, 0xc0, 0x57, 0x4e, 0xa8, 0xbb, 0xcf, 0x3d, 0xf0, 0xd4, 0x1f, 0x24, 0x6a, 0x07, 0x4a,
|
||||
0x23, 0xc4, 0x90, 0x06, 0xda, 0xa0, 0x53, 0xdb, 0xde, 0x32, 0xb3, 0x27, 0xcd, 0xc5, 0x93, 0xe6,
|
||||
0x6e, 0x30, 0xb3, 0x85, 0x87, 0xda, 0x80, 0x12, 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, 0xd6, 0xf7, 0x66, 0x01, 0xf2, 0x3d, 0xe7, 0x00, 0xe3, 0x97, 0xc3, 0xf9, 0x31,
|
||||
0xac, 0x71, 0xce, 0x99, 0x17, 0x0e, 0x1d, 0x14, 0xde, 0x83, 0x75, 0x2e, 0x99, 0x81, 0x17, 0xbe,
|
||||
0x40, 0xe1, 0x22, 0xd6, 0x39, 0xc6, 0x22, 0x96, 0x74, 0xaf, 0x58, 0x07, 0x18, 0xf3, 0x58, 0xb9,
|
||||
0x84, 0xca, 0x77, 0x4b, 0xa8, 0xb2, 0x2e, 0x21, 0xf9, 0xe1, 0x24, 0xa4, 0x6c, 0x90, 0x50, 0xf5,
|
||||
0x7f, 0x91, 0x10, 0x5c, 0x91, 0x50, 0x6d, 0x45, 0x42, 0xf5, 0x4d, 0x12, 0x32, 0x60, 0x73, 0x3f,
|
||||
0x61, 0x38, 0xa0, 0x1e, 0x09, 0xde, 0x0d, 0xc5, 0xaa, 0x59, 0xae, 0x82, 0x7c, 0x20, 0x7f, 0x0d,
|
||||
0xe0, 0x93, 0x95, 0x15, 0x61, 0x63, 0x1a, 0x92, 0x80, 0x8a, 0x42, 0xc5, 0x94, 0x07, 0xd9, 0x10,
|
||||
0x17, 0x83, 0xfd, 0x4d, 0x28, 0x4d, 0x88, 0x4b, 0xb5, 0xa2, 0x28, 0xf2, 0xc9, 0x7a, 0x91, 0x7d,
|
||||
0xe2, 0xda, 0xc2, 0x45, 0x7d, 0x0c, 0x4b, 0x11, 0x66, 0x42, 0x33, 0x75, 0x9b, 0x1f, 0xd5, 0x06,
|
||||
0x54, 0x62, 0x7f, 0x88, 0xa3, 0x88, 0x44, 0xf9, 0xd4, 0x95, 0x63, 0x7f, 0x9f, 0x9b, 0x1c, 0xe2,
|
||||
0xe2, 0x98, 0x52, 0x3c, 0xca, 0x58, 0xb5, 0x65, 0x17, 0xd1, 0xf7, 0x29, 0x1e, 0x65, 0x69, 0x6e,
|
||||
0x7f, 0x0a, 0x60, 0xe9, 0x84, 0xba, 0xea, 0xc7, 0x10, 0xde, 0xda, 0x66, 0xfa, 0x7a, 0x02, 0x2b,
|
||||
0xb5, 0x34, 0xdf, 0xf8, 0x1b, 0x87, 0x45, 0xb1, 0xc6, 0x6b, 0x9f, 0xfc, 0xf8, 0xdb, 0x97, 0x45,
|
||||
0xdd, 0x78, 0x6a, 0xad, 0xaf, 0xd3, 0xdc, 0x7b, 0xc8, 0x92, 0xde, 0xf3, 0x8b, 0x79, 0x0b, 0x5c,
|
||||
0xce, 0x5b, 0xe0, 0xd7, 0x79, 0x0b, 0x7c, 0x71, 0xd5, 0x2a, 0x5c, 0x5e, 0xb5, 0x0a, 0x3f, 0x5d,
|
||||
0xb5, 0x0a, 0x1f, 0xdc, 0xd6, 0x13, 0x8e, 0xb9, 0x9c, 0x96, 0x81, 0x12, 0x11, 0x4a, 0x68, 0xea,
|
||||
0xac, 0x22, 0x56, 0xed, 0xdb, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x31, 0x9d, 0x29, 0x4e,
|
||||
0x08, 0x00, 0x00,
|
||||
// 853 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x31, 0x8f, 0xe3, 0x44,
|
||||
0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0xe9, 0x64, 0xed, 0x49, 0x4e, 0xc4, 0xc5, 0x91, 0x25,
|
||||
0x20, 0x20, 0xc5, 0xd6, 0x2d, 0x54, 0x5b, 0xdd, 0xe6, 0x76, 0xef, 0x74, 0xa7, 0x9c, 0x40, 0x56,
|
||||
0x68, 0xb8, 0x22, 0x9a, 0x75, 0x66, 0x1d, 0x8b, 0xd8, 0x63, 0x79, 0x26, 0x96, 0x83, 0x44, 0x83,
|
||||
0x28, 0xe8, 0x40, 0xe2, 0x0f, 0x50, 0x50, 0xd1, 0xc2, 0x0f, 0xa0, 0x3c, 0x51, 0x9d, 0x44, 0x83,
|
||||
0x28, 0x0c, 0xca, 0x52, 0x6d, 0x07, 0xbf, 0x00, 0xcd, 0x8c, 0xb3, 0xd9, 0x10, 0x65, 0x81, 0x65,
|
||||
0xd1, 0x55, 0x99, 0xe7, 0xf7, 0xde, 0x37, 0x6f, 0xde, 0xf7, 0xe5, 0x3d, 0xd8, 0xc2, 0x6c, 0x8a,
|
||||
0x93, 0x30, 0x88, 0x98, 0x83, 0xd3, 0xd0, 0x49, 0xef, 0x39, 0x2c, 0xb3, 0xe3, 0x84, 0x30, 0xa2,
|
||||
0xdf, 0xbe, 0x70, 0xd9, 0x38, 0x0d, 0xed, 0xf4, 0x5e, 0xbb, 0xe5, 0x11, 0x1a, 0x12, 0x3a, 0x16,
|
||||
0x7e, 0x47, 0x1a, 0x32, 0xb8, 0xdd, 0xde, 0xc2, 0xe1, 0x39, 0xd2, 0xb7, 0xe7, 0x13, 0x9f, 0xc8,
|
||||
0x1c, 0x7e, 0x2a, 0xbe, 0xbe, 0xea, 0x13, 0xe2, 0xcf, 0xb0, 0x83, 0xe2, 0xc0, 0x41, 0x51, 0x44,
|
||||
0x18, 0x62, 0x01, 0x89, 0x56, 0x78, 0xad, 0xc2, 0x2b, 0xac, 0x93, 0xf9, 0xa9, 0x83, 0xa2, 0x85,
|
||||
0x74, 0x59, 0x9f, 0x03, 0xf8, 0xca, 0x53, 0xea, 0x1f, 0xf3, 0x0b, 0xf1, 0x3c, 0x1c, 0x65, 0x7a,
|
||||
0x0f, 0x2a, 0x13, 0xc4, 0x90, 0x01, 0xba, 0xa0, 0xd7, 0xd8, 0xdf, 0xb3, 0x65, 0xae, 0xbd, 0xca,
|
||||
0xb5, 0x0f, 0xa3, 0x85, 0x2b, 0x22, 0xf4, 0x16, 0x54, 0x68, 0xf0, 0x11, 0x36, 0xca, 0x5d, 0xd0,
|
||||
0x03, 0x83, 0xea, 0x79, 0x6e, 0x82, 0xbe, 0x2b, 0x3e, 0xe9, 0x26, 0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 0xbf, 0x09, 0x58, 0x3d, 0xd6, 0x7a, 0xed, 0x93, 0x1f, 0x7f, 0xfb,
|
||||
0xb2, 0x6c, 0x5a, 0x77, 0x9d, 0xed, 0xed, 0x5c, 0x44, 0x8f, 0x59, 0x36, 0xb8, 0xff, 0x7c, 0xd9,
|
||||
0x01, 0x2f, 0x96, 0x1d, 0xf0, 0xeb, 0xb2, 0x03, 0xbe, 0x38, 0xeb, 0x94, 0x5e, 0x9c, 0x75, 0x4a,
|
||||
0x3f, 0x9d, 0x75, 0x4a, 0x1f, 0x5c, 0xd6, 0x13, 0x4e, 0xb9, 0x9c, 0xd6, 0x40, 0x99, 0x80, 0x12,
|
||||
0x9a, 0x3a, 0xa9, 0x89, 0x55, 0xfb, 0xf6, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xce, 0x14,
|
||||
0xcb, 0x4e, 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
|
||||
|
||||
Reference in New Issue
Block a user