diff --git a/ante/eth.go b/ante/eth.go index dee8a3b7f7..9b363a1018 100644 --- a/ante/eth.go +++ b/ante/eth.go @@ -71,6 +71,7 @@ func VerifyEthAccount( ctx sdk.Context, tx sdk.Tx, evmKeeper interfaces.EVMKeeper, evmDenom string, accountGetter AccountGetter, + rules params.Rules, ) error { if !ctx.IsCheckTx() { return nil @@ -92,10 +93,13 @@ func VerifyEthAccount( // check whether the sender address is EOA acct := statedb.NewAccountFromSdkAccount(accountGetter(from)) - if acct.IsContract() { - fromAddr := common.BytesToAddress(from) - return errorsmod.Wrapf(errortypes.ErrInvalidType, - "the sender is not EOA: address %s, codeHash <%s>", fromAddr, acct.CodeHash) + + if !rules.IsPrague { + if acct.IsContract() { + fromAddr := common.BytesToAddress(from) + return errorsmod.Wrapf(errortypes.ErrInvalidType, + "the sender is not EOA: address %s, codeHash <%s>", fromAddr, acct.CodeHash) + } } balance := evmKeeper.GetBalance(ctx, from, evmDenom) @@ -162,7 +166,7 @@ func CheckEthGasConsume( continue } - fees, err := keeper.VerifyFee(msgEthTx, evmDenom, baseFee, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai, ctx.IsCheckTx()) + fees, err := keeper.VerifyFee(msgEthTx, evmDenom, baseFee, rules, ctx.IsCheckTx()) if err != nil { return ctx, errorsmod.Wrapf(err, "failed to verify the fees") } diff --git a/ante/interfaces/setup.go b/ante/interfaces/setup.go index ac50c462ad..378d5ea186 100644 --- a/ante/interfaces/setup.go +++ b/ante/interfaces/setup.go @@ -125,6 +125,16 @@ func ValidateEthBasic(ctx sdk.Context, tx sdk.Tx, evmParams *evmtypes.Params, ba "rejected unprotected Ethereum transaction. Please EIP155 sign your transaction to protect it against replay-attacks") } + // Check that EIP-7702 authorization list signatures are well formed. + if tx.SetCodeAuthorizations() != nil { + if tx.To() == nil { + return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "EIP-7702 set code transaction cannot be contract creation (sender %v)", msgEthTx.From) + } + if len(tx.SetCodeAuthorizations()) == 0 { + return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "EIP-7702 authorization list cannot be empty (sender %v)", msgEthTx.From) + } + } + txFee = txFee.Add(sdk.Coin{Denom: evmDenom, Amount: sdkmath.NewIntFromBigInt(msgEthTx.GetFee())}) } diff --git a/evmd/ante/eth_test.go b/evmd/ante/eth_test.go index 837f167847..39d4a75951 100644 --- a/evmd/ante/eth_test.go +++ b/evmd/ante/eth_test.go @@ -3,10 +3,11 @@ package ante_test import ( "errors" "fmt" - "github.com/evmos/ethermint/ante/cache" "math" "math/big" + "github.com/evmos/ethermint/ante/cache" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/holiman/uint256" "google.golang.org/protobuf/proto" @@ -14,6 +15,7 @@ import ( storetypes "cosmossdk.io/store/types" "github.com/ethereum/go-ethereum/core/tracing" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/ante" "github.com/evmos/ethermint/server/config" "github.com/evmos/ethermint/tests" @@ -96,7 +98,10 @@ func (suite *AnteTestSuite) TestNewEthAccountVerificationDecorator() { suite.Require().NoError(vmdb.Commit()) accountGetter := ante.NewCachedAccountGetter(suite.ctx, suite.app.AccountKeeper) - err := ante.VerifyEthAccount(suite.ctx.WithIsCheckTx(tc.checkTx), tc.tx, suite.app.EvmKeeper, evmtypes.DefaultEVMDenom, accountGetter) + rules := params.Rules{ + IsPrague: false, + } + err := ante.VerifyEthAccount(suite.ctx.WithIsCheckTx(tc.checkTx), tc.tx, suite.app.EvmKeeper, evmtypes.DefaultEVMDenom, accountGetter, rules) if tc.expPass { suite.Require().NoError(err) diff --git a/evmd/ante/handler_options.go b/evmd/ante/handler_options.go index 5fb2ae4a2f..9924cfd546 100644 --- a/evmd/ante/handler_options.go +++ b/evmd/ante/handler_options.go @@ -139,7 +139,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { // it's safe because there's no store branching in the ante handlers. accountGetter := evmante.NewCachedAccountGetter(ctx, options.AccountKeeper) - if err := evmante.VerifyEthAccount(ctx, tx, options.EvmKeeper, evmDenom, accountGetter); err != nil { + if err := evmante.VerifyEthAccount(ctx, tx, options.EvmKeeper, evmDenom, accountGetter, rules); err != nil { return ctx, err } diff --git a/gomod2nix.toml b/gomod2nix.toml index a72740ed07..c1bc946be9 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -44,8 +44,8 @@ schema = 3 version = "v1.0.2" hash = "sha256-ZgO21iLMf6JN740JQizNI0v1mogNUTc77CXrUVSvDcg=" [mod."cosmossdk.io/log"] - version = "v1.5.1" - hash = "sha256-0k5Njvo59BHi923/+frZmPZnzc7ebXaMi0+MpNFLu0A=" + version = "v1.6.1" + hash = "sha256-wz5TjyHP+24VL57msJLVepTqNChSE2WMW9Dt33AyPWo=" [mod."cosmossdk.io/math"] version = "v1.5.3" hash = "sha256-8jBAGa0D9EYBzn9SxiJNZwj3ChFtX03oow8BEP7dIU4=" @@ -89,14 +89,17 @@ schema = 3 version = "v1.5.7" hash = "sha256-GlSZOyix7Ct7tOKmSKpGckDjMhTtiYPBTpoWdwGLx5M=" [mod."github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp"] - version = "v1.27.0" - hash = "sha256-zdT1oaizbstU0ZlAzsV/EmOkkaOoDfX7tXrMYNRD7gI=" + version = "v1.29.0" + hash = "sha256-RjFWSVTnRl6VVyvHo0xSdP2N8r/M1uDrMY13QuzuoK8=" [mod."github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric"] version = "v0.48.1" hash = "sha256-hClW3wbw/4yAIxh+Wb8muAuq5W4EF5lF219ShJX4x40=" [mod."github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping"] version = "v0.48.1" hash = "sha256-r/Aeb+gQXcko/VEtRJ8eMh6PoC+oWAXCN0PtscvzcPw=" + [mod."github.com/Masterminds/semver/v3"] + version = "v3.3.1" + hash = "sha256-/4klCUODDVG0qnxNuGCPWUTBzOSgQl4pwvyeQXrqlCw=" [mod."github.com/Microsoft/go-winio"] version = "v0.6.2" hash = "sha256-tVNWDUMILZbJvarcl/E7tpSnkn7urqgSHa2Eaka5vSU=" @@ -143,11 +146,11 @@ schema = 3 version = "v1.1.0" hash = "sha256-F+EqvufC+KBslZV/vL8ph6MqDoVD5ic5rVaM27reDqo=" [mod."github.com/bytedance/sonic"] - version = "v1.13.2" - hash = "sha256-IF2qmt4IxTwivMWHUJC8sg6d85/ORb2SWvJ54fvoAMI=" + version = "v1.14.0" + hash = "sha256-caxXESTGRVGIOMyhgZTVxjVTyoT7LkGdPjQh17H7S7Y=" [mod."github.com/bytedance/sonic/loader"] - version = "v0.2.4" - hash = "sha256-rv9LnePpm4OspSVbfSoVbohXzhu+dxE1BH1gm3mTmTc=" + version = "v0.3.0" + hash = "sha256-nYgehtTjd3INGcLqwKKzXEmjIbKYlpeDnYwewH/pskQ=" [mod."github.com/cenkalti/backoff/v4"] version = "v4.3.0" hash = "sha256-wfVjNZsGG1WoNC5aL+kdcy6QXPgZo4THAevZ1787md8=" @@ -320,8 +323,8 @@ schema = 3 version = "v0.33.0" hash = "sha256-pu9akz2POlvlU7ynCSyOKhafByB+jsQm/8uYKJjrtds=" [mod."github.com/go-jose/go-jose/v4"] - version = "v4.0.5" - hash = "sha256-xDbwQfxNiH0gdNMCuxa6qKqiAeOhsnWm8MYSM+KISew=" + version = "v4.1.1" + hash = "sha256-G8QU1HforBE7kMVMvVCOaQZ49UA0iTW2mldsBUjw+DY=" [mod."github.com/go-kit/kit"] version = "v0.13.0" hash = "sha256-EncDzq0JVtY+NLlW5lD+nbVewNYTTrfzlOxI4PuwREw=" @@ -425,8 +428,8 @@ schema = 3 version = "v0.5.2" hash = "sha256-N9GOKYo7tK6XQUFhvhImtL7PZW/mr4C4Manx/yPVvcQ=" [mod."github.com/hashicorp/go-getter"] - version = "v1.7.8" - hash = "sha256-3ISgkCNTZSC8Z6HrmBN0FmYrG08awMO4HSAvRtaIlbw=" + version = "v1.7.9" + hash = "sha256-wWMsgh5pxMdSDqUy2A0z6CT+kxmJwypieL0SLnPtBw8=" [mod."github.com/hashicorp/go-hclog"] version = "v1.6.3" hash = "sha256-BK2s+SH1tQyUaXCH4kC0/jgqiSu638UFbwamfKjFOYg=" @@ -523,9 +526,6 @@ schema = 3 [mod."github.com/mitchellh/go-homedir"] version = "v1.1.0" hash = "sha256-oduBKXHAQG8X6aqLEpqZHs5DOKe84u6WkBwi4W6cv3k=" - [mod."github.com/mitchellh/go-testing-interface"] - version = "v1.14.1" - hash = "sha256-TMGi38D13BEVN5cpeKDzKRIgLclm4ErOG+JEyqJrN/c=" [mod."github.com/mitchellh/mapstructure"] version = "v1.5.0" hash = "sha256-ztVhGQXs67MF8UadVvG72G3ly0ypQW0IRDdOOkjYwoE=" @@ -548,8 +548,8 @@ schema = 3 version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" [mod."github.com/onsi/ginkgo/v2"] - version = "v2.23.4" - hash = "sha256-AVq5cBqBhja/BMSMHqeLkXjmYV8+ddTRthiGWt28c38=" + version = "v2.25.0" + hash = "sha256-noSjWI7l8tFMZ/8Gdlyx3TuqlL7qKUmXzLjWYNQAelA=" [mod."github.com/onsi/gomega"] version = "v1.38.0" hash = "sha256-96uL3QlcQBpnyjMbKDBO2fgq+28ay/5IQjAEQ4jIGjI=" @@ -721,20 +721,20 @@ schema = 3 version = "v0.58.0" hash = "sha256-iqTPHfR1wXZY/yVTWtRBMjWlZkRxasaBGNhsNWHYxGw=" [mod."go.opentelemetry.io/otel"] - version = "v1.36.0" - hash = "sha256-j8wojdCtKal3LKojanHA8KXXQ0FkbWONpO8tUxpJDko=" + version = "v1.37.0" + hash = "sha256-zWpyp9K8/Te86uhNjamchZctTdAnmHhoVw9m4ACfSoo=" [mod."go.opentelemetry.io/otel/metric"] - version = "v1.36.0" - hash = "sha256-z6Uqi4HhUljWIYd58svKK5MqcGbpcac+/M8JeTrUtJ8=" + version = "v1.37.0" + hash = "sha256-BWnkdldA3xzGhnaConzMAuQzOnugytIvrP6GjkZVAYg=" [mod."go.opentelemetry.io/otel/sdk"] - version = "v1.36.0" - hash = "sha256-rg8T1fsoU6WTHcfnbWgB8hOxiufXmOhNqXpxlqbJQK4=" + version = "v1.37.0" + hash = "sha256-uNFhKuSRhf+SXwVu8mg/qqsVio7KstVN/WyCTxgWHT0=" [mod."go.opentelemetry.io/otel/sdk/metric"] - version = "v1.36.0" - hash = "sha256-kCJXX26+jXz/bFBpnNmFi6r+EusDXsy24tk7FgQbVgA=" + version = "v1.37.0" + hash = "sha256-dm6Aa5UDFgQCVexayiWu85A1ir1lpNn5rIN9tj9KVDs=" [mod."go.opentelemetry.io/otel/trace"] - version = "v1.36.0" - hash = "sha256-owWD9x1lp8aIJqYt058BXPUsIMHdk3RI0escso0BxwA=" + version = "v1.37.0" + hash = "sha256-FBeLOb5qmIiE9VmbgCf1l/xpndBqHkRiaPt1PvoKrVY=" [mod."go.uber.org/automaxprocs"] version = "v1.6.0" hash = "sha256-a/Agm+kM9x+VRo0CYyTL3ipUYv9Glrc4NeGSZJdpobA=" @@ -745,8 +745,8 @@ schema = 3 version = "v2.4.2" hash = "sha256-oC8RWdf1zbMYCtmR0ATy/kCkhIwPR9UqFZSMOKLVF/A=" [mod."golang.org/x/arch"] - version = "v0.15.0" - hash = "sha256-EsCsTDmn+j3S8yzV4n2WJyDuYBDwIlj29M9OBxWNMGQ=" + version = "v0.17.0" + hash = "sha256-avV63nZlJxuo3/LLBKQ2a96Nn1wflNtc1Dr7GSPbHAs=" [mod."golang.org/x/crypto"] version = "v0.41.0" hash = "sha256-o5Di0lsFmYnXl7a5MBTqmN9vXMCRpE9ay71C1Ar8jEY=" @@ -775,8 +775,8 @@ schema = 3 version = "v0.10.0" hash = "sha256-vnlAME3gDR6R4cbCmSYAlR1Rjc0yUpkufTOPNvCdf6Q=" [mod."golang.org/x/tools"] - version = "v0.35.0" - hash = "sha256-5aTV8oS9e0frUNUE2Pw+yTnPLghmZHryDa01COSyrCM=" + version = "v0.36.0" + hash = "sha256-p91Ig5XR7JL0rxIQdCRZBJvK4M8apyoeV/sOLyjOndk=" [mod."google.golang.org/api"] version = "v0.222.0" hash = "sha256-n1qxH8dqwl7Drry1H9bpQx7EeysceA98UrgEDxd1XEM=" @@ -784,17 +784,17 @@ schema = 3 version = "v0.0.0-20241118233622-e639e219e697" hash = "sha256-QcnHSM6CWo18f0rqeXHSCFaydwFp+nENjE8x/NErgEI=" [mod."google.golang.org/genproto/googleapis/api"] - version = "v0.0.0-20250528174236-200df99c418a" - hash = "sha256-VO7Rko8b/zO2sm6vML7hhxi9laPilt6JEab8xl4qIN8=" + version = "v0.0.0-20250707201910-8d1bb00bc6a7" + hash = "sha256-xtTBmzlyynWQa0KtuQpNZ4fzSTB/5ozXclE3SuP3naI=" [mod."google.golang.org/genproto/googleapis/rpc"] - version = "v0.0.0-20250528174236-200df99c418a" + version = "v0.0.0-20250707201910-8d1bb00bc6a7" hash = "sha256-WK7iDtAhH19NPe3TywTQlGjDawNaDKWnxhFL9PgVUwM=" [mod."google.golang.org/grpc"] - version = "v1.74.2" - hash = "sha256-tvYMdfu/ZQZRPZNmnQI4CZpg46CM8+mD49hw0gFheGs=" + version = "v1.75.0" + hash = "sha256-bMJEB2luUeYWwsQWqzuq4Wro2tTKBWGJPuTtzioJcfM=" [mod."google.golang.org/protobuf"] - version = "v1.36.7" - hash = "sha256-6xCU+t2AVPcscMKenVs4etGqutYGPDXCQ3DCD3PpTq4=" + version = "v1.36.8" + hash = "sha256-yZN8ZON0b5HjUNUSubHst7zbvnMsOzd81tDPYQRtPgM=" [mod."gopkg.in/yaml.v3"] version = "v3.0.1" hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU=" diff --git a/nix/testenv.nix b/nix/testenv.nix index d02782f618..f30154c8fc 100644 --- a/nix/testenv.nix +++ b/nix/testenv.nix @@ -21,11 +21,24 @@ poetry2nix.mkPoetryEnv { eth-bloom = [ "setuptools" ]; }; in - lib.mapAttrs ( - attr: systems: - super.${attr}.overridePythonAttrs (old: { - nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems; - }) - ) buildSystems + (lib.mapAttrs + (attr: systems: super.${attr}.overridePythonAttrs + (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ map (a: self.${a}) systems; + })) + buildSystems) // { + # Fix malformed license field in types-requests package + types-requests = super.types-requests.overridePythonAttrs (old: { + postPatch = (old.postPatch or "") + '' + # Fix malformed license field in pyproject.toml + if [ -f pyproject.toml ]; then + # Fix license field format + sed -i 's/license = "Apache-2.0"/license = {text = "Apache-2.0"}/' pyproject.toml + # Remove invalid license-files property from [project] section + sed -i '/^license-files = /d' pyproject.toml + fi + ''; + }); + } ); } diff --git a/proto/ethermint/evm/v1/chain_config.proto b/proto/ethermint/evm/v1/chain_config.proto index 64b956a3c8..274f664179 100644 --- a/proto/ethermint/evm/v1/chain_config.proto +++ b/proto/ethermint/evm/v1/chain_config.proto @@ -9,10 +9,8 @@ option go_package = "github.com/evmos/ethermint/x/evm/types"; // instead of *big.Int. message ChainConfig { // homestead_block switch (nil no fork, 0 = already homestead) - string homestead_block = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"homestead_block\"" - ]; + string homestead_block = 1 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"homestead_block\""]; // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", @@ -44,74 +42,48 @@ message ChainConfig { (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) - string byzantium_block = 8 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"byzantium_block\"" - ]; + string byzantium_block = 8 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) - string constantinople_block = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"constantinople_block\"" - ]; + string constantinople_block = 9 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\""]; // petersburg_block: Petersburg switch block (nil same as Constantinople) - string petersburg_block = 10 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"petersburg_block\"" - ]; + string petersburg_block = 10 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\""]; // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) - string istanbul_block = 11 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"istanbul_block\"" - ]; + string istanbul_block = 11 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\""]; // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - string muir_glacier_block = 12 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" - ]; + string muir_glacier_block = 12 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\""]; // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) - string berlin_block = 13 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"berlin_block\"" - ]; + string berlin_block = 13 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"berlin_block\""]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated reserved 14, 15, 16; reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; // london_block: London switch block (nil = no fork, 0 = already on london) - string london_block = 17 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"london_block\"" - ]; + string london_block = 17 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"london_block\""]; // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - string arrow_glacier_block = 18 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" - ]; + string arrow_glacier_block = 18 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\""]; // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 reserved 19; reserved "merge_fork_block"; // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) - string gray_glacier_block = 20 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" - ]; + string gray_glacier_block = 20 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"gray_glacier_block\""]; // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter - string merge_netsplit_block = 21 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" - ]; + string merge_netsplit_block = 21 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"merge_netsplit_block\""]; // shanghai switch time (nil = no fork, 0 = already on shanghai) - string shanghai_time = 22 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"shanghai_time\"" - ]; + string shanghai_time = 22 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"shanghai_time\""]; // cancun switch time (nil = no fork, 0 = already on cancun) - string cancun_time = 23 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"cancun_time\"" - ]; + string cancun_time = 23 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"cancun_time\""]; // prague switch time (nil = no fork, 0 = already on prague) - string prague_time = 24 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"prague_time\"" - ]; + string prague_time = 24 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"prague_time\""]; } \ No newline at end of file diff --git a/proto/ethermint/evm/v1/chain_config_v0.proto b/proto/ethermint/evm/v1/chain_config_v0.proto index fe2ee499e7..c8fce02856 100644 --- a/proto/ethermint/evm/v1/chain_config_v0.proto +++ b/proto/ethermint/evm/v1/chain_config_v0.proto @@ -9,10 +9,8 @@ option go_package = "github.com/evmos/ethermint/x/evm/types"; // instead of *big.Int. message V0ChainConfig { // homestead_block switch (nil no fork, 0 = already homestead) - string homestead_block = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"homestead_block\"" - ]; + string homestead_block = 1 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"homestead_block\""]; // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", @@ -44,69 +42,45 @@ message V0ChainConfig { (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) - string byzantium_block = 8 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"byzantium_block\"" - ]; + string byzantium_block = 8 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) - string constantinople_block = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"constantinople_block\"" - ]; + string constantinople_block = 9 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\""]; // petersburg_block: Petersburg switch block (nil same as Constantinople) - string petersburg_block = 10 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"petersburg_block\"" - ]; + string petersburg_block = 10 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\""]; // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) - string istanbul_block = 11 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"istanbul_block\"" - ]; + string istanbul_block = 11 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\""]; // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - string muir_glacier_block = 12 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" - ]; + string muir_glacier_block = 12 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\""]; // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) - string berlin_block = 13 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"berlin_block\"" - ]; + string berlin_block = 13 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"berlin_block\""]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated reserved 14, 15, 16; reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; // london_block: London switch block (nil = no fork, 0 = already on london) - string london_block = 17 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"london_block\"" - ]; + string london_block = 17 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"london_block\""]; // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - string arrow_glacier_block = 18 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" - ]; + string arrow_glacier_block = 18 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\""]; // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 reserved 19; reserved "merge_fork_block"; // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) - string gray_glacier_block = 20 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" - ]; + string gray_glacier_block = 20 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"gray_glacier_block\""]; // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter - string merge_netsplit_block = 21 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" - ]; + string merge_netsplit_block = 21 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"merge_netsplit_block\""]; // shanghai_block switch block (nil = no fork, 0 = already on shanghai) - string shanghai_block = 22 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"shanghai_block\"" - ]; + string shanghai_block = 22 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"shanghai_block\""]; // cancun_block switch block (nil = no fork, 0 = already on cancun) - string cancun_block = 23 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.moretags) = "yaml:\"cancun_block\"" - ]; + string cancun_block = 23 + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"cancun_block\""]; } diff --git a/proto/ethermint/evm/v1/params_v4.proto b/proto/ethermint/evm/v1/params_v4.proto index d7404e8340..9c5d181c38 100644 --- a/proto/ethermint/evm/v1/params_v4.proto +++ b/proto/ethermint/evm/v1/params_v4.proto @@ -18,7 +18,10 @@ message V4Params { // extra_eips defines the additional EIPs for the vm.Config ExtraEIPs extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.nullable) = false]; // chain_config defines the EVM chain configuration parameters - V0ChainConfig chain_config = 5 [(gogoproto.nullable) = false]; + V0ChainConfig chain_config = 5 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/evmos/ethermint/x/evm/migrations/v0/types.V0ChainConfig" + ]; // allow_unprotected_txs defines if replay-protected (i.e non EIP155 // signed) transactions can be executed on the state machine. bool allow_unprotected_txs = 6; diff --git a/proto/ethermint/evm/v1/set_code_authorization.proto b/proto/ethermint/evm/v1/set_code_authorization.proto new file mode 100644 index 0000000000..fb2e29cc9f --- /dev/null +++ b/proto/ethermint/evm/v1/set_code_authorization.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package ethermint.evm.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/evmos/ethermint/x/evm/types"; + +// SetCodeAuthorization is an authorization from an account to deploy code at its address. +message SetCodeAuthorization { + option (gogoproto.goproto_getters) = false; + + string chain_id = 1 [ + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.customname) = "ChainID", + (gogoproto.jsontag) = "chainID" + ]; + string address = 2; + uint64 nonce = 3; + bytes v = 4; + bytes r = 5; + bytes s = 6; +} diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index cea3279399..694ed9591f 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -9,6 +9,7 @@ import "google/protobuf/any.proto"; import "ethermint/evm/v1/access_tuple.proto"; import "ethermint/evm/v1/log.proto"; import "ethermint/evm/v1/params.proto"; +import "ethermint/evm/v1/set_code_authorization.proto"; option go_package = "github.com/evmos/ethermint/x/evm/types"; @@ -61,8 +62,7 @@ message LegacyTx { // to is the hex formatted address of the recipient string to = 4; // value defines the unsigned integer value of the transaction amount. - string value = 5 - [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + string value = 5 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 6; // v defines the signature value @@ -93,8 +93,7 @@ message AccessListTx { // to is the recipient address in hex format string to = 5; // value defines the unsigned integer value of the transaction amount. - string value = 6 - [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + string value = 6 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 7; // accesses is an array of access tuples @@ -130,8 +129,7 @@ message DynamicFeeTx { // to is the hex formatted address of the recipient string to = 6; // value defines the the transaction amount. - string value = 7 - [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + string value = 7 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 8; // accesses is an array of access tuples @@ -145,6 +143,46 @@ message DynamicFeeTx { bytes s = 12; } +// SetCodeTx implements the EIP-7702 transaction type. +message SetCodeTx { + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "TxData"; + + // chain_id of the destination EVM chain + string chain_id = 1 [ + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.customname) = "ChainID", + (gogoproto.jsontag) = "chainID" + ]; + // nonce corresponds to the account nonce (transaction sequence). + uint64 nonce = 2; + // gas_tip_cap defines the max value for the gas tip + string gas_tip_cap = 3 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas_fee_cap defines the max value for the gas fee + string gas_fee_cap = 4 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; + // gas defines the gas limit defined for the transaction. + uint64 gas = 5 [(gogoproto.customname) = "GasLimit"]; + // to is the hex formatted address of the recipient + string to = 6; + // value defines the the transaction amount. + string value = 7 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. + bytes data = 8; + // accesses is an array of access tuples + repeated AccessTuple accesses = 9 + [(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false]; + // auth_list is a list of tuples that indicate what code the signer of each tuple desires to execute in the context of + // their EOA + repeated SetCodeAuthorization auth_list = 10 + [(gogoproto.castrepeated) = "AuthList", (gogoproto.jsontag) = "authList", (gogoproto.nullable) = false]; + // v defines the signature value + bytes v = 11; + // r defines the signature value + bytes r = 12; + // s define the signature value + bytes s = 13; +} + // ExtensionOptionsEthereumTx is an extension option for ethereum transactions message ExtensionOptionsEthereumTx { option (gogoproto.goproto_getters) = false; diff --git a/proto/ethermint/feemarket/v1/feemarket.proto b/proto/ethermint/feemarket/v1/feemarket.proto index 55c8c4bc3e..210f5d7822 100644 --- a/proto/ethermint/feemarket/v1/feemarket.proto +++ b/proto/ethermint/feemarket/v1/feemarket.proto @@ -23,10 +23,8 @@ message Params { // base_fee for EIP-1559 blocks. string base_fee = 6 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // min_gas_price defines the minimum gas price value for cosmos and eth transactions - string min_gas_price = 7 - [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; + string min_gas_price = 7 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // min_gas_multiplier bounds the minimum gas used to be charged // to senders based on gas limit - string min_gas_multiplier = 8 - [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; + string min_gas_multiplier = 8 [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; } diff --git a/proto/ethermint/types/v1/dynamic_fee.proto b/proto/ethermint/types/v1/dynamic_fee.proto index 1b38f07326..bde4191ce2 100644 --- a/proto/ethermint/types/v1/dynamic_fee.proto +++ b/proto/ethermint/types/v1/dynamic_fee.proto @@ -8,6 +8,5 @@ option go_package = "github.com/evmos/ethermint/types"; // ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx message ExtensionOptionDynamicFeeTx { // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec - string max_priority_price = 1 - [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; + string max_priority_price = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; } diff --git a/rpc/backend/call_tx.go b/rpc/backend/call_tx.go index c42a33fda1..171f4037fa 100644 --- a/rpc/backend/call_tx.go +++ b/rpc/backend/call_tx.go @@ -313,9 +313,6 @@ func (b *Backend) handleRevertError(vmError string, ret []byte) error { if vmError != vm.ErrExecutionReverted.Error() { return status.Error(codes.Internal, vmError) } - if len(ret) == 0 { - return errors.New(vmError) - } return evmtypes.NewExecErrorWithReason(ret) } return nil diff --git a/scripts/geth-genesis.json b/scripts/geth-genesis.json index 69a591e5ad..dd57def1a1 100755 --- a/scripts/geth-genesis.json +++ b/scripts/geth-genesis.json @@ -16,8 +16,20 @@ "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "shanghaiTime": 0, - "cancunTime": null, - "pragueTime": null, + "cancunTime": 0, + "pragueTime": 0, + "blobSchedule": { + "cancun": { + "target": 3, + "max": 6, + "baseFeeUpdateFraction": 3338477 + }, + "prague": { + "target": 3, + "max": 6, + "baseFeeUpdateFraction": 3338477 + } + }, "terminalTotalDifficulty": 0, "clique": { "period": 2, diff --git a/tests/integration_tests/bytecode_deployer.py b/tests/integration_tests/bytecode_deployer.py new file mode 100644 index 0000000000..5c53cbefcb --- /dev/null +++ b/tests/integration_tests/bytecode_deployer.py @@ -0,0 +1,74 @@ +from hexbytes import HexBytes +from web3 import Web3 + +from .utils import CONTRACTS, deploy_contract, send_transaction, w3_wait_for_new_blocks + + +# Given a runtime bytecode X, +# construct initialization (constructor) bytecode that, +# when deployed, results in a contract whose runtime bytecode is exactly X. +# No storage initialization is required. +class BytecodeDeployerHelper: + def __init__(self, w3: Web3, deployer_account=None): + self.w3 = w3 + key = deployer_account.key if deployer_account else None + self.deployer_contract, self.deployer_receipt = deploy_contract( + w3, CONTRACTS["BytecodeDeployer"], key=key + ) + + def deploy_bytecode(self, bytecode: str, sender_account=None) -> str: + tx = self.deployer_contract.functions.deployBytecode( + HexBytes(bytecode) + ).build_transaction() + + key = sender_account.key if sender_account else None + receipt = send_transaction(self.w3, tx, key) + receipt = self.w3.eth.wait_for_transaction_receipt( + receipt.transactionHash, timeout=30 + ) + deployed_event = ( + self.deployer_contract.events.ContractDeployed().process_receipt(receipt)[0] + ) + return deployed_event["args"]["deployedAddress"] + + +# https://ethereum.stackexchange.com/a/167820 +def create_constructor_bytecode(runtime_bytecode: str) -> str: + if not runtime_bytecode.startswith("0x"): + runtime_bytecode = "0x" + runtime_bytecode + + prefix = bytes.fromhex("600b380380600b5f395ff3") + suffix = bytes.fromhex(runtime_bytecode[2:]) + + constructor_bytecode = prefix + suffix + + return constructor_bytecode + + +def deploy_runtime_bytecode( + w3: Web3, runtime_bytecode: str, sender_account=None, deployer_account=None +) -> str: + bytecode_deployer = BytecodeDeployerHelper(w3, deployer_account) + + constructor_bytecode = create_constructor_bytecode(runtime_bytecode) + + deployed_address = bytecode_deployer.deploy_bytecode( + constructor_bytecode, sender_account + ) + + w3_wait_for_new_blocks(w3, 1) + + deployed_code = w3.eth.get_code(deployed_address, "latest") + expected_code = ( + runtime_bytecode + if runtime_bytecode.startswith("0x") + else "0x" + runtime_bytecode + ) + + if deployed_code != HexBytes(expected_code): + raise RuntimeError( + f"Deployment failed: deployed code {Web3.to_hex(deployed_code)} " + f"doesn't match expected {expected_code}" + ) + + return deployed_address diff --git a/tests/integration_tests/hardhat/contracts/BytecodeDeployer.sol b/tests/integration_tests/hardhat/contracts/BytecodeDeployer.sol new file mode 100644 index 0000000000..77d74405d4 --- /dev/null +++ b/tests/integration_tests/hardhat/contracts/BytecodeDeployer.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @title BytecodeDeployer + * @dev A factory contract that can deploy arbitrary bytecode to create contracts + * Used for EIP-7702 SetCode transaction testing where specific contracts need to be deployed + * at predetermined addresses (like 0xaaaa and 0xbbbb) + */ +contract BytecodeDeployer { + event ContractDeployed(address indexed deployedAddress, address indexed deployer); + + /** + * @dev Deploy bytecode using CREATE opcode + * @param bytecode The contract bytecode to deploy + * @return deployedAddress The address of the deployed contract + */ + function deployBytecode(bytes memory bytecode) public returns (address deployedAddress) { + assembly { + deployedAddress := create(0, add(bytecode, 0x20), mload(bytecode)) + } + require(deployedAddress != address(0), "Deployment failed"); + emit ContractDeployed(deployedAddress, msg.sender); + } + + /** + * @dev Deploy bytecode using CREATE2 opcode with a salt + * @param bytecode The contract bytecode to deploy + * @param salt The salt value for CREATE2 + * @return deployedAddress The address of the deployed contract + */ + function deployBytecodeWithSalt(bytes memory bytecode, bytes32 salt) public returns (address deployedAddress) { + assembly { + deployedAddress := create2(0, add(bytecode, 0x20), mload(bytecode), salt) + } + require(deployedAddress != address(0), "Deployment failed"); + emit ContractDeployed(deployedAddress, msg.sender); + } + + /** + * @dev Predict the address for CREATE2 deployment + * @param bytecode The contract bytecode to deploy + * @param salt The salt value for CREATE2 + * @return predictedAddress The predicted address of the contract + */ + function predictCreate2Address(bytes memory bytecode, bytes32 salt) public view returns (address predictedAddress) { + bytes32 hash = keccak256( + abi.encodePacked( + bytes1(0xff), + address(this), + salt, + keccak256(bytecode) + ) + ); + predictedAddress = address(uint160(uint256(hash))); + } + + /** + * @dev Deploy bytecode and call a function on the deployed contract + * @param bytecode The contract bytecode to deploy + * @param callData The function call data to execute on the deployed contract + * @return deployedAddress The address of the deployed contract + * @return result The result of the function call + */ + function deployAndCall(bytes memory bytecode, bytes memory callData) public returns (address deployedAddress, bytes memory result) { + deployedAddress = deployBytecode(bytecode); + + if (callData.length > 0) { + (bool success, bytes memory returnData) = deployedAddress.call(callData); + require(success, "Call to deployed contract failed"); + result = returnData; + } + } +} \ No newline at end of file diff --git a/tests/integration_tests/network.py b/tests/integration_tests/network.py index 1552faa7d1..3995dd61d6 100644 --- a/tests/integration_tests/network.py +++ b/tests/integration_tests/network.py @@ -6,7 +6,7 @@ import web3 from pystarport import ports -from web3.middleware import geth_poa_middleware +from web3.middleware import ExtraDataToPOAMiddleware from .cosmoscli import CosmosCLI from .utils import supervisorctl, w3_wait_for_block, wait_for_port @@ -41,7 +41,7 @@ def w3(self, i=0): if self._w3 is None: if self._use_websockets: self._w3 = web3.Web3( - web3.providers.WebsocketProvider(self.w3_ws_endpoint) + web3.providers.LegacyWebSocketProvider(self.w3_ws_endpoint) ) else: self._w3 = web3.Web3(web3.providers.HTTPProvider(self.w3_http_endpoint)) @@ -104,7 +104,7 @@ def setup_geth(path, base_port): try: wait_for_port(base_port) w3 = web3.Web3(web3.providers.HTTPProvider(f"http://127.0.0.1:{base_port}")) - w3.middleware_onion.inject(geth_poa_middleware, layer=0) + w3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0) yield Geth(w3) finally: os.killpg(os.getpgid(proc.pid), signal.SIGTERM) diff --git a/tests/integration_tests/poetry.lock b/tests/integration_tests/poetry.lock index 274ce7075b..6dd94af442 100644 --- a/tests/integration_tests/poetry.lock +++ b/tests/integration_tests/poetry.lock @@ -110,6 +110,17 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +[[package]] +name = "annotated-types" +version = "0.7.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, +] + [[package]] name = "async-timeout" version = "4.0.3" @@ -463,6 +474,115 @@ files = [ {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, ] +[[package]] +name = "ckzg" +version = "2.1.1" +description = "Python bindings for C-KZG-4844" +optional = false +python-versions = "*" +files = [ + {file = "ckzg-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4b9825a1458219e8b4b023012b8ef027ef1f47e903f9541cbca4615f80132730"}, + {file = "ckzg-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e2a40a3ba65cca4b52825d26829e6f7eb464aa27a9e9efb6b8b2ce183442c741"}, + {file = "ckzg-2.1.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a1d753fbe85be7c21602eddc2d40e0915e25fce10329f4f801a0002a4f886cc7"}, + {file = "ckzg-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d76b50527f1d12430bf118aff6fa4051e9860eada43f29177258b8d399448ea"}, + {file = "ckzg-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44c8603e43c021d100f355f50189183135d1df3cbbddb8881552d57fbf421dde"}, + {file = "ckzg-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:38707a638c9d715b3c30b29352b969f78d8fc10faed7db5faf517f04359895c0"}, + {file = "ckzg-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:52c4d257bdcbe822d20c5cd24c8154ec5aac33c49a8f5a19e716d9107a1c8785"}, + {file = "ckzg-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1507f7bfb9bcf51d816db5d8d0f0ed53c8289605137820d437b69daea8333e16"}, + {file = "ckzg-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:d02eaaf4f841910133552b3a051dea53bcfe60cd98199fc4cf80b27609d8baa2"}, + {file = "ckzg-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:465e2b71cf9dc383f66f1979269420a0da9274a3a9e98b1a4455e84927dfe491"}, + {file = "ckzg-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ee2f26f17a64ad0aab833d637b276f28486b82a29e34f32cf54b237b8f8ab72d"}, + {file = "ckzg-2.1.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99cc2c4e9fb8c62e3e0862c7f4df9142f07ba640da17fded5f6e0fd09f75909f"}, + {file = "ckzg-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:773dd016693d74aca1f5d7982db2bad7dde2e147563aeb16a783f7e5f69c01fe"}, + {file = "ckzg-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af2b2144f87ba218d8db01382a961b3ecbdde5ede4fa0d9428d35f8c8a595ba"}, + {file = "ckzg-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8f55e63d3f7c934a2cb53728ed1d815479e177aca8c84efe991c2920977cff6"}, + {file = "ckzg-2.1.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ecb42aaa0ffa427ff14a9dde9356ba69e5ae6014650b397af55b31bdae7a9b6e"}, + {file = "ckzg-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5a01514239f12fb1a7ad9009c20062a4496e13b09541c1a65f97e295da648c70"}, + {file = "ckzg-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:6516b9684aae262c85cf7fddd8b585b8139ad20e08ec03994e219663abbb0916"}, + {file = "ckzg-2.1.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c60e8903344ce98ce036f0fabacce952abb714cad4607198b2f0961c28b8aa72"}, + {file = "ckzg-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4299149dd72448e5a8d2d1cc6cc7472c92fc9d9f00b1377f5b017c089d9cd92"}, + {file = "ckzg-2.1.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:025dd31ffdcc799f3ff842570a2a6683b6c5b01567da0109c0c05d11768729c4"}, + {file = "ckzg-2.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b42ab8385c273f40a693657c09d2bba40cb4f4666141e263906ba2e519e80bd"}, + {file = "ckzg-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1be3890fc1543f4fcfc0063e4baf5c036eb14bcf736dabdc6171ab017e0f1671"}, + {file = "ckzg-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b754210ded172968b201e2d7252573af6bf52d6ad127ddd13d0b9a45a51dae7b"}, + {file = "ckzg-2.1.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b2f8fda87865897a269c4e951e3826c2e814427a6cdfed6731cccfe548f12b36"}, + {file = "ckzg-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:98e70b5923d77c7359432490145e9d1ab0bf873eb5de56ec53f4a551d7eaec79"}, + {file = "ckzg-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:42af7bde4ca45469cd93a96c3d15d69d51d40e7f0d30e3a20711ebd639465fcb"}, + {file = "ckzg-2.1.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7e4edfdaf87825ff43b9885fabfdea408737a714f4ce5467100d9d1d0a03b673"}, + {file = "ckzg-2.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:815fd2a87d6d6c57d669fda30c150bc9bf387d47e67d84535aa42b909fdc28ea"}, + {file = "ckzg-2.1.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c32466e809b1ab3ff01d3b0bb0b9912f61dcf72957885615595f75e3f7cc10e5"}, + {file = "ckzg-2.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f11b73ccf37b12993f39a7dbace159c6d580aacacde6ee17282848476550ddbc"}, + {file = "ckzg-2.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3b9433a1f2604bd9ac1646d3c83ad84a850d454d3ac589fe8e70c94b38a6b0"}, + {file = "ckzg-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b7d7e1b5ea06234558cd95c483666fd785a629b720a7f1622b3cbffebdc62033"}, + {file = "ckzg-2.1.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9f5556e6675866040cc4335907be6c537051e7f668da289fa660fdd8a30c9ddb"}, + {file = "ckzg-2.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:55b2ba30c5c9daac0c55f1aac851f1b7bf1f7aa0028c2db4440e963dd5b866d6"}, + {file = "ckzg-2.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:10d201601fc8f28c0e8cec3406676797024dd374c367bbeec5a7a9eac9147237"}, + {file = "ckzg-2.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5f46c8fd5914db62b446baf62c8599da07e6f91335779a9709c554ef300a7b60"}, + {file = "ckzg-2.1.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:60f14612c2be84f405755d734b0ad4e445db8af357378b95b72339b59e1f4fcf"}, + {file = "ckzg-2.1.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:929e6e793039f42325988004a90d16b0ef4fc7e1330142e180f0298f2ed4527c"}, + {file = "ckzg-2.1.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2beac2af53ea181118179570ecc81d8a8fc52c529553d7fd8786fd100a2aa39b"}, + {file = "ckzg-2.1.1-cp36-cp36m-musllinux_1_2_aarch64.whl", hash = "sha256:2432d48aec296baee79556bfde3bddd2799bcc7753cd1f0d0c9a3b0333935637"}, + {file = "ckzg-2.1.1-cp36-cp36m-musllinux_1_2_i686.whl", hash = "sha256:4c2e8180b54261ccae2bf8acd003ccee7394d88d073271af19c5f2ac4a54c607"}, + {file = "ckzg-2.1.1-cp36-cp36m-musllinux_1_2_x86_64.whl", hash = "sha256:c44e36bd53d9dd0ab29bd6ed2d67ea43c48eecd57f8197854a75742213938bf5"}, + {file = "ckzg-2.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:10befd86e643d38ac468151cdfb71e79b2d46aa6397b81db4224f4f6995262eb"}, + {file = "ckzg-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:138a9324ad8e8a9ade464043dc3a84afe12996516788f2ed841bdbe5d123af81"}, + {file = "ckzg-2.1.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:635af0a33a10c9ac275f3efc142880a6b46ac63f4495f600aae05266af4fadff"}, + {file = "ckzg-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:360e263677ee5aedb279b42cf54b51c905ddcac9181c65d89ec0b298d3f31ec0"}, + {file = "ckzg-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f81395f77bfd069831cbb1de9d473c7044abe9ce6cd562ef6ccd76d23abcef43"}, + {file = "ckzg-2.1.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:db1ff122f8dc10c9500a00a4d680c3c38f4e19b01d95f38e0f5bc55a77c8ab98"}, + {file = "ckzg-2.1.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:1f82f539949ff3c6a5accfdd211919a3e374d354b3665d062395ebdbf8befaeb"}, + {file = "ckzg-2.1.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:5bc8ae85df97467e84abb491b516e25dbca36079e766eafce94d1bc45e4aaa35"}, + {file = "ckzg-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:e749ce9fcb26e37101f2af8ba9c6376b66eb598880d35e457890044ba77c1cf7"}, + {file = "ckzg-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5b00201979a64fd7e6029f64d791af42374febb42452537933e881b49d4e8c77"}, + {file = "ckzg-2.1.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c61c437ba714ab7c802b51fb30125e8f8550e1320fe9050d20777420c153a2b3"}, + {file = "ckzg-2.1.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8bd54394376598a7c081df009cfde3cc447beb640b6c6b7534582a31e6290ac7"}, + {file = "ckzg-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67d8c6680a7b370718af59cc17a983752706407cfbcace013ee707646d1f7b00"}, + {file = "ckzg-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:55f6c57b24bc4fe16b1b50324ef8548f2a5053ad76bf90c618e2f88c040120d7"}, + {file = "ckzg-2.1.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:f55fc10fb1b217c66bfe14e05535e5e61cfbb2a95dbb9b93a80984fa2ab4a7c0"}, + {file = "ckzg-2.1.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:2e23e3198f8933f0140ef8b2aeba717d8de03ec7b8fb1ee946f8d39986ce0811"}, + {file = "ckzg-2.1.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:2f9caf88bf216756bb1361b92616c750a933c9afb67972ad05c212649a9be520"}, + {file = "ckzg-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:30e0c2d258bbc0c099c2d1854c6ffa2fd9abf6138b9c81f855e1936f6cb259aa"}, + {file = "ckzg-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a6239d3d2e30cb894ca4e7765b1097eb6a70c0ecbe5f8e0b023fbf059472d4ac"}, + {file = "ckzg-2.1.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:909ebabc253a98d9dc1d51f93dc75990134bfe296c947e1ecf3b7142aba5108e"}, + {file = "ckzg-2.1.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0700dace6559b288b42ca8622be89c2a43509881ed6f4f0bfb6312bcceed0cb9"}, + {file = "ckzg-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a36aeabd243e906314694b4a107de99b0c4473ff1825fcb06acd147ffb1951a"}, + {file = "ckzg-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d884e8f9c7d7839f1a95561f4479096dce21d45b0c5dd013dc0842550cea1cad"}, + {file = "ckzg-2.1.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:338fdf4a0b463973fc7b7e4dc289739db929e61d7cb9ba984ebbe9c49d3aa6f9"}, + {file = "ckzg-2.1.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:c594036d3408eebdcd8ab2c7aab7308239ed4df3d94f3211b7cf253f228fb0b7"}, + {file = "ckzg-2.1.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b0912ebb328ced510250a2325b095917db19c1a014792a0bf4c389f0493e39de"}, + {file = "ckzg-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:5046aceb03482ddf7200f2f5c643787b100e6fb96919852faf1c79f8870c80a1"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:375918e25eafb9bafe5215ab91698504cba3fe51b4fe92f5896af6c5663f50c6"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:38b3b7802c76d4ad015db2b7a79a49c193babae50ee5f77e9ac2865c9e9ddb09"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:438a5009fd254ace0bc1ad974d524547f1a41e6aa5e778c5cd41f4ee3106bcd6"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ce11cc163a2e0dab3af7455aca7053f9d5bb8d157f231acc7665fd230565d48"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b53964c07f6a076e97eaa1ef35045e935d7040aff14f80bae7e9105717702d05"}, + {file = "ckzg-2.1.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cf085f15ae52ab2599c9b5a3d5842794bcf5613b7f58661fbfb0c5d9eac988b9"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:4b0c850bd6cad22ac79b2a2ab884e0e7cd2b54a67d643cd616c145ebdb535a11"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:26951f36bb60c9150bbd38110f5e1625596f9779dad54d1d492d8ec38bc84e3a"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bbe12445e49c4bee67746b7b958e90a973b0de116d0390749b0df351d94e9a8c"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71c5d4f66f09de4a99271acac74d2acb3559a77de77a366b34a91e99e8822667"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42673c1d007372a4e8b48f6ef8f0ce31a9688a463317a98539757d1e2fb1ecc7"}, + {file = "ckzg-2.1.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:57a7dc41ec6b69c1d9117eb61cf001295e6b4f67a736020442e71fb4367fb1a5"}, + {file = "ckzg-2.1.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:22e4606857660b2ffca2f7b96c01d0b18b427776d8a93320caf2b1c7342881fe"}, + {file = "ckzg-2.1.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b55475126a9efc82d61718b2d2323502e33d9733b7368c407954592ccac87faf"}, + {file = "ckzg-2.1.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5939ae021557c64935a7649b13f4a58f1bd35c39998fd70d0cefb5cbaf77d1be"}, + {file = "ckzg-2.1.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad1ec5f9726a9946508a4a2aace298172aa778de9ebbe97e21c873c3688cc87"}, + {file = "ckzg-2.1.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:93d7edea3bb1602b18b394ebeec231d89dfd8d48fdd06571cb7656107aa62226"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c450d77af61011ced3777f97431d5f1bc148ca5362c67caf516aa2f6ef7e4817"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:8fc8df4e17e08974961d6c14f6c57ccfd3ad5aede74598292ec6e5d6fc2dbcac"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93338da8011790ef53a68475678bc951fa7b337db027d8edbf1889e59691161c"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4889f24b4ff614f39e3584709de1a3b0f1556675b33e360dbcb28cda827296d4"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7b58fbb1a9be4ae959feede8f103e12d80ef8453bdc6483bfdaf164879a2b80"}, + {file = "ckzg-2.1.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:6136c5b5377c7f7033323b25bc2c7b43c025d44ed73e338c02f9f59df9460e5b"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fa419b92a0e8766deb7157fb28b6542c1c3f8dde35d2a69d1f91ec8e41047d35"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:95cd6c8eb3ab5148cd97ab5bf44b84fd7f01adf4b36ffd070340ad2d9309b3f9"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:848191201052b48bdde18680ebb77bf8da99989270e5aea8b0290051f5ac9468"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4716c0564131b0d609fb8856966e83892b9809cf6719c7edd6495b960451f8b"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c399168ba199827dee3104b00cdc7418d4dbdf47a5fcbe7cf938fc928037534"}, + {file = "ckzg-2.1.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:724f29f9f110d9ef42a6a1a1a7439548c61070604055ef96b2ab7a884cad4192"}, + {file = "ckzg-2.1.1.tar.gz", hash = "sha256:d6b306b7ec93a24e4346aa53d07f7f75053bc0afc7398e35fa649e5f9d48fcc4"}, +] + [[package]] name = "click" version = "8.1.7" @@ -661,51 +781,53 @@ files = [ [[package]] name = "eth-abi" -version = "5.0.0" +version = "5.2.0" description = "eth_abi: Python utilities for working with Ethereum ABI definitions, especially encoding and decoding" optional = false -python-versions = ">=3.8, <4" +python-versions = "<4,>=3.8" files = [ - {file = "eth_abi-5.0.0-py3-none-any.whl", hash = "sha256:936a715d7366ac13cac665cbdaf01cc4aabbe8c2d810d716287a9634f9665e01"}, - {file = "eth_abi-5.0.0.tar.gz", hash = "sha256:89c4454d794d9ed92ad5cb2794698c5cee6b7b3ca6009187d0e282adc7f9b6dc"}, + {file = "eth_abi-5.2.0-py3-none-any.whl", hash = "sha256:17abe47560ad753f18054f5b3089fcb588f3e3a092136a416b6c1502cb7e8877"}, + {file = "eth_abi-5.2.0.tar.gz", hash = "sha256:178703fa98c07d8eecd5ae569e7e8d159e493ebb6eeb534a8fe973fbc4e40ef0"}, ] [package.dependencies] eth-typing = ">=3.0.0" eth-utils = ">=2.0.0" -parsimonious = ">=0.9.0,<0.10.0" +parsimonious = ">=0.10.0,<0.11.0" [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "hypothesis (>=4.18.2,<5.0.0)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-pythonpath (>=0.7.1)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -test = ["eth-hash[pycryptodome]", "hypothesis (>=4.18.2,<5.0.0)", "pytest (>=7.0.0)", "pytest-pythonpath (>=0.7.1)", "pytest-xdist (>=2.4.0)"] -tools = ["hypothesis (>=4.18.2,<5.0.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth-hash[pycryptodome]", "hypothesis (>=6.22.0,<6.108.7)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-pythonpath (>=0.7.1)", "pytest-timeout (>=2.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["eth-hash[pycryptodome]", "hypothesis (>=6.22.0,<6.108.7)", "pytest (>=7.0.0)", "pytest-pythonpath (>=0.7.1)", "pytest-timeout (>=2.0.0)", "pytest-xdist (>=2.4.0)"] +tools = ["hypothesis (>=6.22.0,<6.108.7)"] [[package]] name = "eth-account" -version = "0.11.0" +version = "0.13.7" description = "eth-account: Sign Ethereum transactions and messages with local private keys" optional = false -python-versions = ">=3.8, <4" +python-versions = "<4,>=3.8" files = [ - {file = "eth-account-0.11.0.tar.gz", hash = "sha256:2ffc7a0c7538053a06a7d11495c16c7ad9897dd42be0f64ca7551e9f6e0738c3"}, - {file = "eth_account-0.11.0-py3-none-any.whl", hash = "sha256:76dd261ea096ee09e51455b0a4c99f22185516fdc062f63df0817c28f605e430"}, + {file = "eth_account-0.13.7-py3-none-any.whl", hash = "sha256:39727de8c94d004ff61d10da7587509c04d2dc7eac71e04830135300bdfc6d24"}, + {file = "eth_account-0.13.7.tar.gz", hash = "sha256:5853ecbcbb22e65411176f121f5f24b8afeeaf13492359d254b16d8b18c77a46"}, ] [package.dependencies] bitarray = ">=2.4.0" +ckzg = ">=2.0.0" eth-abi = ">=4.0.0-b.2" -eth-keyfile = ">=0.6.0" +eth-keyfile = ">=0.7.0,<0.9.0" eth-keys = ">=0.4.0" -eth-rlp = ">=0.3.0" +eth-rlp = ">=2.1.0" eth-utils = ">=2.0.0" -hexbytes = ">=0.1.0,<0.4.0" +hexbytes = ">=1.2.0" +pydantic = ">=2.0.0" rlp = ">=1.0.0" [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "coverage", "hypothesis (>=4.18.0,<5)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -test = ["coverage", "hypothesis (>=4.18.0,<5)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "coverage", "hypothesis (>=6.22.0,<6.108.7)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["coverage", "hypothesis (>=6.22.0,<6.108.7)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-bloom" @@ -791,63 +913,67 @@ test = ["asn1tools (>=0.146.2)", "eth-hash[pysha3]", "factory-boy (>=3.0.1)", "h [[package]] name = "eth-rlp" -version = "1.0.1" +version = "2.2.0" description = "eth-rlp: RLP definitions for common Ethereum objects in Python" optional = false -python-versions = ">=3.8, <4" +python-versions = "<4,>=3.8" files = [ - {file = "eth-rlp-1.0.1.tar.gz", hash = "sha256:d61dbda892ee1220f28fb3663c08f6383c305db9f1f5624dc585c9cd05115027"}, - {file = "eth_rlp-1.0.1-py3-none-any.whl", hash = "sha256:dd76515d71654277377d48876b88e839d61553aaf56952e580bb7cebef2b1517"}, + {file = "eth_rlp-2.2.0-py3-none-any.whl", hash = "sha256:5692d595a741fbaef1203db6a2fedffbd2506d31455a6ad378c8449ee5985c47"}, + {file = "eth_rlp-2.2.0.tar.gz", hash = "sha256:5e4b2eb1b8213e303d6a232dfe35ab8c29e2d3051b86e8d359def80cd21db83d"}, ] [package.dependencies] eth-utils = ">=2.0.0" -hexbytes = ">=0.1.0,<1" +hexbytes = ">=1.2.0" rlp = ">=0.6.0" -typing-extensions = {version = ">=4.0.1", markers = "python_version <= \"3.11\""} +typing_extensions = {version = ">=4.0.1", markers = "python_version <= \"3.10\""} [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth-hash[pycryptodome]", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] test = ["eth-hash[pycryptodome]", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-typing" -version = "4.0.0" +version = "5.2.1" description = "eth-typing: Common type annotations for ethereum python packages" optional = false -python-versions = ">=3.8, <4" +python-versions = "<4,>=3.8" files = [ - {file = "eth-typing-4.0.0.tar.gz", hash = "sha256:9af0b6beafbc5c2e18daf19da5f5a68315023172c4e79d149e12ad10a3d3f731"}, - {file = "eth_typing-4.0.0-py3-none-any.whl", hash = "sha256:7e556bea322b6e8c0a231547b736c258e10ce9eed5ddc254f51031b12af66a16"}, + {file = "eth_typing-5.2.1-py3-none-any.whl", hash = "sha256:b0c2812ff978267563b80e9d701f487dd926f1d376d674f3b535cfe28b665d3d"}, + {file = "eth_typing-5.2.1.tar.gz", hash = "sha256:7557300dbf02a93c70fa44af352b5c4a58f94e997a0fd6797fb7d1c29d9538ee"}, ] +[package.dependencies] +typing_extensions = ">=4.5.0" + [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] test = ["pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "eth-utils" -version = "3.0.0" +version = "5.3.0" description = "eth-utils: Common utility functions for python code that interacts with Ethereum" optional = false -python-versions = ">=3.8, <4" +python-versions = "<4,>=3.8" files = [ - {file = "eth-utils-3.0.0.tar.gz", hash = "sha256:8721869568448349bceae63c277b75758d11e0dc190e7ef31e161b89619458f1"}, - {file = "eth_utils-3.0.0-py3-none-any.whl", hash = "sha256:9a284106acf6f6ce91ddf792489cf8bd4c681fd5ae7653d2f3d5d100be5c3905"}, + {file = "eth_utils-5.3.0-py3-none-any.whl", hash = "sha256:ac184883ab299d923428bbe25dae5e356979a3993e0ef695a864db0a20bc262d"}, + {file = "eth_utils-5.3.0.tar.gz", hash = "sha256:1f096867ac6be895f456fa3acb26e9573ae66e753abad9208f316d24d6178156"}, ] [package.dependencies] cytoolz = {version = ">=0.10.1", markers = "implementation_name == \"cpython\""} eth-hash = ">=0.3.1" -eth-typing = ">=3.0.0" +eth-typing = ">=5.0.0" +pydantic = ">=2.0.0,<3" toolz = {version = ">0.8.2", markers = "implementation_name == \"pypy\""} [package.extras] -dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "eth-hash[pycryptodome]", "hypothesis (>=4.43.0)", "ipython", "mypy (==1.5.1)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -test = ["hypothesis (>=4.43.0)", "mypy (==1.5.1)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth-hash[pycryptodome]", "hypothesis (>=4.43.0)", "ipython", "mypy (==1.10.0)", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["hypothesis (>=4.43.0)", "mypy (==1.10.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "exceptiongroup" @@ -1029,20 +1155,19 @@ files = [ [[package]] name = "hexbytes" -version = "0.3.1" +version = "1.3.1" description = "hexbytes: Python `bytes` subclass that decodes hex, with a readable console output" optional = false -python-versions = ">=3.7, <4" +python-versions = "<4,>=3.8" files = [ - {file = "hexbytes-0.3.1-py3-none-any.whl", hash = "sha256:383595ad75026cf00abd570f44b368c6cdac0c6becfae5c39ff88829877f8a59"}, - {file = "hexbytes-0.3.1.tar.gz", hash = "sha256:a3fe35c6831ee8fafd048c4c086b986075fc14fd46258fa24ecb8d65745f9a9d"}, + {file = "hexbytes-1.3.1-py3-none-any.whl", hash = "sha256:da01ff24a1a9a2b1881c4b85f0e9f9b0f51b526b379ffa23832ae7899d29c2c7"}, + {file = "hexbytes-1.3.1.tar.gz", hash = "sha256:a657eebebdfe27254336f98d8af6e2236f3f83aed164b87466b6cf6c5f5a4765"}, ] [package.extras] -dev = ["black (>=22)", "bumpversion (>=0.5.3)", "eth-utils (>=1.0.1,<3)", "flake8 (==6.0.0)", "flake8-bugbear (==23.3.23)", "hypothesis (>=3.44.24,<=6.31.6)", "ipython", "isort (>=5.10.1)", "mypy (==0.971)", "pydocstyle (>=5.0.0)", "pytest (>=7.0.0)", "pytest-watch (>=4.1.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=5.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] -doc = ["sphinx (>=5.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -lint = ["black (>=22)", "flake8 (==6.0.0)", "flake8-bugbear (==23.3.23)", "isort (>=5.10.1)", "mypy (==0.971)", "pydocstyle (>=5.0.0)"] -test = ["eth-utils (>=1.0.1,<3)", "hypothesis (>=3.44.24,<=6.31.6)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth_utils (>=2.0.0)", "hypothesis (>=3.44.24)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "twine", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["eth_utils (>=2.0.0)", "hypothesis (>=3.44.24)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] name = "idna" @@ -1177,100 +1302,6 @@ files = [ [package.dependencies] referencing = ">=0.31.0" -[[package]] -name = "lru-dict" -version = "1.2.0" -description = "An Dict like LRU container." -optional = false -python-versions = "*" -files = [ - {file = "lru-dict-1.2.0.tar.gz", hash = "sha256:13c56782f19d68ddf4d8db0170041192859616514c706b126d0df2ec72a11bd7"}, - {file = "lru_dict-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:de906e5486b5c053d15b7731583c25e3c9147c288ac8152a6d1f9bccdec72641"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604d07c7604b20b3130405d137cae61579578b0e8377daae4125098feebcb970"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:203b3e78d03d88f491fa134f85a42919020686b6e6f2d09759b2f5517260c651"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020b93870f8c7195774cbd94f033b96c14f51c57537969965c3af300331724fe"}, - {file = "lru_dict-1.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1184d91cfebd5d1e659d47f17a60185bbf621635ca56dcdc46c6a1745d25df5c"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:fc42882b554a86e564e0b662da47b8a4b32fa966920bd165e27bb8079a323bc1"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:18ee88ada65bd2ffd483023be0fa1c0a6a051ef666d1cd89e921dcce134149f2"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:756230c22257597b7557eaef7f90484c489e9ba78e5bb6ab5a5bcfb6b03cb075"}, - {file = "lru_dict-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c4da599af36618881748b5db457d937955bb2b4800db891647d46767d636c408"}, - {file = "lru_dict-1.2.0-cp310-cp310-win32.whl", hash = "sha256:35a142a7d1a4fd5d5799cc4f8ab2fff50a598d8cee1d1c611f50722b3e27874f"}, - {file = "lru_dict-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:6da5b8099766c4da3bf1ed6e7d7f5eff1681aff6b5987d1258a13bd2ed54f0c9"}, - {file = "lru_dict-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b20b7c9beb481e92e07368ebfaa363ed7ef61e65ffe6e0edbdbaceb33e134124"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22147367b296be31cc858bf167c448af02435cac44806b228c9be8117f1bfce4"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34a3091abeb95e707f381a8b5b7dc8e4ee016316c659c49b726857b0d6d1bd7a"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:877801a20f05c467126b55338a4e9fa30e2a141eb7b0b740794571b7d619ee11"}, - {file = "lru_dict-1.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d3336e901acec897bcd318c42c2b93d5f1d038e67688f497045fc6bad2c0be7"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8dafc481d2defb381f19b22cc51837e8a42631e98e34b9e0892245cc96593deb"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:87bbad3f5c3de8897b8c1263a9af73bbb6469fb90e7b57225dad89b8ef62cd8d"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:25f9e0bc2fe8f41c2711ccefd2871f8a5f50a39e6293b68c3dec576112937aad"}, - {file = "lru_dict-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ae301c282a499dc1968dd633cfef8771dd84228ae9d40002a3ea990e4ff0c469"}, - {file = "lru_dict-1.2.0-cp311-cp311-win32.whl", hash = "sha256:c9617583173a29048e11397f165501edc5ae223504a404b2532a212a71ecc9ed"}, - {file = "lru_dict-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6b7a031e47421d4b7aa626b8c91c180a9f037f89e5d0a71c4bb7afcf4036c774"}, - {file = "lru_dict-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ea2ac3f7a7a2f32f194c84d82a034e66780057fd908b421becd2f173504d040e"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd46c94966f631a81ffe33eee928db58e9fbee15baba5923d284aeadc0e0fa76"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:086ce993414f0b28530ded7e004c77dc57c5748fa6da488602aa6e7f79e6210e"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df25a426446197488a6702954dcc1de511deee20c9db730499a2aa83fddf0df1"}, - {file = "lru_dict-1.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c53b12b89bd7a6c79f0536ff0d0a84fdf4ab5f6252d94b24b9b753bd9ada2ddf"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:f9484016e6765bd295708cccc9def49f708ce07ac003808f69efa386633affb9"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:d0f7ec902a0097ac39f1922c89be9eaccf00eb87751e28915320b4f72912d057"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:981ef3edc82da38d39eb60eae225b88a538d47b90cce2e5808846fd2cf64384b"}, - {file = "lru_dict-1.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:e25b2e90a032dc248213af7f3f3e975e1934b204f3b16aeeaeaff27a3b65e128"}, - {file = "lru_dict-1.2.0-cp36-cp36m-win32.whl", hash = "sha256:59f3df78e94e07959f17764e7fa7ca6b54e9296953d2626a112eab08e1beb2db"}, - {file = "lru_dict-1.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:de24b47159e07833aeab517d9cb1c3c5c2d6445cc378b1c2f1d8d15fb4841d63"}, - {file = "lru_dict-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d0dd4cd58220351233002f910e35cc01d30337696b55c6578f71318b137770f9"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a87bdc291718bbdf9ea4be12ae7af26cbf0706fa62c2ac332748e3116c5510a7"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05fb8744f91f58479cbe07ed80ada6696ec7df21ea1740891d4107a8dd99a970"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00f6e8a3fc91481b40395316a14c94daa0f0a5de62e7e01a7d589f8d29224052"}, - {file = "lru_dict-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5b172fce0a0ffc0fa6d282c14256d5a68b5db1e64719c2915e69084c4b6bf555"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:e707d93bae8f0a14e6df1ae8b0f076532b35f00e691995f33132d806a88e5c18"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b9ec7a4a0d6b8297102aa56758434fb1fca276a82ed7362e37817407185c3abb"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:f404dcc8172da1f28da9b1f0087009578e608a4899b96d244925c4f463201f2a"}, - {file = "lru_dict-1.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1171ad3bff32aa8086778be4a3bdff595cc2692e78685bcce9cb06b96b22dcc2"}, - {file = "lru_dict-1.2.0-cp37-cp37m-win32.whl", hash = "sha256:0c316dfa3897fabaa1fe08aae89352a3b109e5f88b25529bc01e98ac029bf878"}, - {file = "lru_dict-1.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:5919dd04446bc1ee8d6ecda2187deeebfff5903538ae71083e069bc678599446"}, - {file = "lru_dict-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fbf36c5a220a85187cacc1fcb7dd87070e04b5fc28df7a43f6842f7c8224a388"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:712e71b64da181e1c0a2eaa76cd860265980cd15cb0e0498602b8aa35d5db9f8"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f54908bf91280a9b8fa6a8c8f3c2f65850ce6acae2852bbe292391628ebca42f"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3838e33710935da2ade1dd404a8b936d571e29268a70ff4ca5ba758abb3850df"}, - {file = "lru_dict-1.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5d5a5f976b39af73324f2b793862859902ccb9542621856d51a5993064f25e4"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8bda3a9afd241ee0181661decaae25e5336ce513ac268ab57da737eacaa7871f"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:bd2cd1b998ea4c8c1dad829fc4fa88aeed4dee555b5e03c132fc618e6123f168"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:b55753ee23028ba8644fd22e50de7b8f85fa60b562a0fafaad788701d6131ff8"}, - {file = "lru_dict-1.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e51fa6a203fa91d415f3b2900e5748ec8e06ad75777c98cc3aeb3983ca416d7"}, - {file = "lru_dict-1.2.0-cp38-cp38-win32.whl", hash = "sha256:cd6806313606559e6c7adfa0dbeb30fc5ab625f00958c3d93f84831e7a32b71e"}, - {file = "lru_dict-1.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d90a70c53b0566084447c3ef9374cc5a9be886e867b36f89495f211baabd322"}, - {file = "lru_dict-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3ea7571b6bf2090a85ff037e6593bbafe1a8598d5c3b4560eb56187bcccb4dc"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:287c2115a59c1c9ed0d5d8ae7671e594b1206c36ea9df2fca6b17b86c468ff99"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b5ccfd2291c93746a286c87c3f895165b697399969d24c54804ec3ec559d4e43"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b710f0f4d7ec4f9fa89dfde7002f80bcd77de8024017e70706b0911ea086e2ef"}, - {file = "lru_dict-1.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5345bf50e127bd2767e9fd42393635bbc0146eac01f6baf6ef12c332d1a6a329"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:291d13f85224551913a78fe695cde04cbca9dcb1d84c540167c443eb913603c9"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d5bb41bc74b321789803d45b124fc2145c1b3353b4ad43296d9d1d242574969b"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:0facf49b053bf4926d92d8d5a46fe07eecd2af0441add0182c7432d53d6da667"}, - {file = "lru_dict-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:987b73a06bcf5a95d7dc296241c6b1f9bc6cda42586948c9dabf386dc2bef1cd"}, - {file = "lru_dict-1.2.0-cp39-cp39-win32.whl", hash = "sha256:231d7608f029dda42f9610e5723614a35b1fff035a8060cf7d2be19f1711ace8"}, - {file = "lru_dict-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:71da89e134747e20ed5b8ad5b4ee93fc5b31022c2b71e8176e73c5a44699061b"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:21b3090928c7b6cec509e755cc3ab742154b33660a9b433923bd12c37c448e3e"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaecd7085212d0aa4cd855f38b9d61803d6509731138bf798a9594745953245b"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ead83ac59a29d6439ddff46e205ce32f8b7f71a6bd8062347f77e232825e3d0a"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:312b6b2a30188586fe71358f0f33e4bac882d33f5e5019b26f084363f42f986f"}, - {file = "lru_dict-1.2.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:b30122e098c80e36d0117810d46459a46313421ce3298709170b687dc1240b02"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:f010cfad3ab10676e44dc72a813c968cd586f37b466d27cde73d1f7f1ba158c2"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20f5f411f7751ad9a2c02e80287cedf69ae032edd321fe696e310d32dd30a1f8"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:afdadd73304c9befaed02eb42f5f09fdc16288de0a08b32b8080f0f0f6350aa6"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7ab0c10c4fa99dc9e26b04e6b62ac32d2bcaea3aad9b81ec8ce9a7aa32b7b1b"}, - {file = "lru_dict-1.2.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:edad398d5d402c43d2adada390dd83c74e46e020945ff4df801166047013617e"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:91d577a11b84387013815b1ad0bb6e604558d646003b44c92b3ddf886ad0f879"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb12f19cdf9c4f2d9aa259562e19b188ff34afab28dd9509ff32a3f1c2c29326"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e4c85aa8844bdca3c8abac3b7f78da1531c74e9f8b3e4890c6e6d86a5a3f6c0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c6acbd097b15bead4de8e83e8a1030bb4d8257723669097eac643a301a952f0"}, - {file = "lru_dict-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6613daa851745dd22b860651de930275be9d3e9373283a2164992abacb75b62"}, -] - -[package.extras] -test = ["pytest"] - [[package]] name = "lsprotocol" version = "2023.0.1" @@ -1433,12 +1464,13 @@ files = [ [[package]] name = "parsimonious" -version = "0.9.0" +version = "0.10.0" description = "(Soon to be) the fastest pure-Python PEG parser I could muster" optional = false python-versions = "*" files = [ - {file = "parsimonious-0.9.0.tar.gz", hash = "sha256:b2ad1ae63a2f65bd78f5e0a8ac510a98f3607a43f1db2a8d46636a5d9e4a30c1"}, + {file = "parsimonious-0.10.0-py3-none-any.whl", hash = "sha256:982ab435fabe86519b57f6b35610aa4e4e977e9f02a14353edf4bbc75369fc0f"}, + {file = "parsimonious-0.10.0.tar.gz", hash = "sha256:8281600da180ec8ae35427a4ab4f7b82bfec1e3d1e52f80cb60ea82b9512501c"}, ] [package.dependencies] @@ -1586,6 +1618,237 @@ files = [ {file = "pycryptodome-3.20.0.tar.gz", hash = "sha256:09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7"}, ] +[[package]] +name = "pydantic" +version = "2.7.4" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.7.4-py3-none-any.whl", hash = "sha256:ee8538d41ccb9c0a9ad3e0e5f07bf15ed8015b481ced539a1759d8cc89ae90d0"}, + {file = "pydantic-2.7.4.tar.gz", hash = "sha256:0c84efd9548d545f63ac0060c1e4d39bb9b14db8b3c0652338aecc07b5adec52"}, +] + +[package.dependencies] +annotated-types = ">=0.4.0" +pydantic-core = "2.18.4" +typing-extensions = ">=4.6.1" + +[package.extras] +email = ["email-validator (>=2.0.0)"] + +[[package]] +name = "pydantic" +version = "2.9.2" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, + {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, +] + +[package.dependencies] +annotated-types = ">=0.6.0" +pydantic-core = "2.23.4" +typing-extensions = {version = ">=4.6.1", markers = "python_version < \"3.13\""} + +[package.extras] +email = ["email-validator (>=2.0.0)"] +timezone = ["tzdata"] + +[[package]] +name = "pydantic-core" +version = "2.18.4" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.18.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f76d0ad001edd426b92233d45c746fd08f467d56100fd8f30e9ace4b005266e4"}, + {file = "pydantic_core-2.18.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59ff3e89f4eaf14050c8022011862df275b552caef8082e37b542b066ce1ff26"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a55b5b16c839df1070bc113c1f7f94a0af4433fcfa1b41799ce7606e5c79ce0a"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4d0dcc59664fcb8974b356fe0a18a672d6d7cf9f54746c05f43275fc48636851"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8951eee36c57cd128f779e641e21eb40bc5073eb28b2d23f33eb0ef14ffb3f5d"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4701b19f7e3a06ea655513f7938de6f108123bf7c86bbebb1196eb9bd35cf724"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e00a3f196329e08e43d99b79b286d60ce46bed10f2280d25a1718399457e06be"}, + {file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97736815b9cc893b2b7f663628e63f436018b75f44854c8027040e05230eeddb"}, + {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6891a2ae0e8692679c07728819b6e2b822fb30ca7445f67bbf6509b25a96332c"}, + {file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bc4ff9805858bd54d1a20efff925ccd89c9d2e7cf4986144b30802bf78091c3e"}, + {file = "pydantic_core-2.18.4-cp310-none-win32.whl", hash = "sha256:1b4de2e51bbcb61fdebd0ab86ef28062704f62c82bbf4addc4e37fa4b00b7cbc"}, + {file = "pydantic_core-2.18.4-cp310-none-win_amd64.whl", hash = "sha256:6a750aec7bf431517a9fd78cb93c97b9b0c496090fee84a47a0d23668976b4b0"}, + {file = "pydantic_core-2.18.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:942ba11e7dfb66dc70f9ae66b33452f51ac7bb90676da39a7345e99ffb55402d"}, + {file = "pydantic_core-2.18.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2ebef0e0b4454320274f5e83a41844c63438fdc874ea40a8b5b4ecb7693f1c4"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a642295cd0c8df1b86fc3dced1d067874c353a188dc8e0f744626d49e9aa51c4"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f09baa656c904807e832cf9cce799c6460c450c4ad80803517032da0cd062e2"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98906207f29bc2c459ff64fa007afd10a8c8ac080f7e4d5beff4c97086a3dabd"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19894b95aacfa98e7cb093cd7881a0c76f55731efad31073db4521e2b6ff5b7d"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fbbdc827fe5e42e4d196c746b890b3d72876bdbf160b0eafe9f0334525119c8"}, + {file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f85d05aa0918283cf29a30b547b4df2fbb56b45b135f9e35b6807cb28bc47951"}, + {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e85637bc8fe81ddb73fda9e56bab24560bdddfa98aa64f87aaa4e4b6730c23d2"}, + {file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2f5966897e5461f818e136b8451d0551a2e77259eb0f73a837027b47dc95dab9"}, + {file = "pydantic_core-2.18.4-cp311-none-win32.whl", hash = "sha256:44c7486a4228413c317952e9d89598bcdfb06399735e49e0f8df643e1ccd0558"}, + {file = "pydantic_core-2.18.4-cp311-none-win_amd64.whl", hash = "sha256:8a7164fe2005d03c64fd3b85649891cd4953a8de53107940bf272500ba8a788b"}, + {file = "pydantic_core-2.18.4-cp311-none-win_arm64.whl", hash = "sha256:4e99bc050fe65c450344421017f98298a97cefc18c53bb2f7b3531eb39bc7805"}, + {file = "pydantic_core-2.18.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6f5c4d41b2771c730ea1c34e458e781b18cc668d194958e0112455fff4e402b2"}, + {file = "pydantic_core-2.18.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2fdf2156aa3d017fddf8aea5adfba9f777db1d6022d392b682d2a8329e087cef"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4748321b5078216070b151d5271ef3e7cc905ab170bbfd27d5c83ee3ec436695"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847a35c4d58721c5dc3dba599878ebbdfd96784f3fb8bb2c356e123bdcd73f34"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c40d4eaad41f78e3bbda31b89edc46a3f3dc6e171bf0ecf097ff7a0ffff7cb1"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:21a5e440dbe315ab9825fcd459b8814bb92b27c974cbc23c3e8baa2b76890077"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01dd777215e2aa86dfd664daed5957704b769e726626393438f9c87690ce78c3"}, + {file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4b06beb3b3f1479d32befd1f3079cc47b34fa2da62457cdf6c963393340b56e9"}, + {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:564d7922e4b13a16b98772441879fcdcbe82ff50daa622d681dd682175ea918c"}, + {file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0eb2a4f660fcd8e2b1c90ad566db2b98d7f3f4717c64fe0a83e0adb39766d5b8"}, + {file = "pydantic_core-2.18.4-cp312-none-win32.whl", hash = "sha256:8b8bab4c97248095ae0c4455b5a1cd1cdd96e4e4769306ab19dda135ea4cdb07"}, + {file = "pydantic_core-2.18.4-cp312-none-win_amd64.whl", hash = "sha256:14601cdb733d741b8958224030e2bfe21a4a881fb3dd6fbb21f071cabd48fa0a"}, + {file = "pydantic_core-2.18.4-cp312-none-win_arm64.whl", hash = "sha256:c1322d7dd74713dcc157a2b7898a564ab091ca6c58302d5c7b4c07296e3fd00f"}, + {file = "pydantic_core-2.18.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:823be1deb01793da05ecb0484d6c9e20baebb39bd42b5d72636ae9cf8350dbd2"}, + {file = "pydantic_core-2.18.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ebef0dd9bf9b812bf75bda96743f2a6c5734a02092ae7f721c048d156d5fabae"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae1d6df168efb88d7d522664693607b80b4080be6750c913eefb77e34c12c71a"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f9899c94762343f2cc2fc64c13e7cae4c3cc65cdfc87dd810a31654c9b7358cc"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99457f184ad90235cfe8461c4d70ab7dd2680e28821c29eca00252ba90308c78"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18f469a3d2a2fdafe99296a87e8a4c37748b5080a26b806a707f25a902c040a8"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7cdf28938ac6b8b49ae5e92f2735056a7ba99c9b110a474473fd71185c1af5d"}, + {file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:938cb21650855054dc54dfd9120a851c974f95450f00683399006aa6e8abb057"}, + {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:44cd83ab6a51da80fb5adbd9560e26018e2ac7826f9626bc06ca3dc074cd198b"}, + {file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:972658f4a72d02b8abfa2581d92d59f59897d2e9f7e708fdabe922f9087773af"}, + {file = "pydantic_core-2.18.4-cp38-none-win32.whl", hash = "sha256:1d886dc848e60cb7666f771e406acae54ab279b9f1e4143babc9c2258213daa2"}, + {file = "pydantic_core-2.18.4-cp38-none-win_amd64.whl", hash = "sha256:bb4462bd43c2460774914b8525f79b00f8f407c945d50881568f294c1d9b4443"}, + {file = "pydantic_core-2.18.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:44a688331d4a4e2129140a8118479443bd6f1905231138971372fcde37e43528"}, + {file = "pydantic_core-2.18.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a2fdd81edd64342c85ac7cf2753ccae0b79bf2dfa063785503cb85a7d3593223"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86110d7e1907ab36691f80b33eb2da87d780f4739ae773e5fc83fb272f88825f"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46387e38bd641b3ee5ce247563b60c5ca098da9c56c75c157a05eaa0933ed154"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:123c3cec203e3f5ac7b000bd82235f1a3eced8665b63d18be751f115588fea30"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dc1803ac5c32ec324c5261c7209e8f8ce88e83254c4e1aebdc8b0a39f9ddb443"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53db086f9f6ab2b4061958d9c276d1dbe3690e8dd727d6abf2321d6cce37fa94"}, + {file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:abc267fa9837245cc28ea6929f19fa335f3dc330a35d2e45509b6566dc18be23"}, + {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0d829524aaefdebccb869eed855e2d04c21d2d7479b6cada7ace5448416597b"}, + {file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:509daade3b8649f80d4e5ff21aa5673e4ebe58590b25fe42fac5f0f52c6f034a"}, + {file = "pydantic_core-2.18.4-cp39-none-win32.whl", hash = "sha256:ca26a1e73c48cfc54c4a76ff78df3727b9d9f4ccc8dbee4ae3f73306a591676d"}, + {file = "pydantic_core-2.18.4-cp39-none-win_amd64.whl", hash = "sha256:c67598100338d5d985db1b3d21f3619ef392e185e71b8d52bceacc4a7771ea7e"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:574d92eac874f7f4db0ca653514d823a0d22e2354359d0759e3f6a406db5d55d"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1f4d26ceb5eb9eed4af91bebeae4b06c3fb28966ca3a8fb765208cf6b51102ab"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77450e6d20016ec41f43ca4a6c63e9fdde03f0ae3fe90e7c27bdbeaece8b1ed4"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d323a01da91851a4f17bf592faf46149c9169d68430b3146dcba2bb5e5719abc"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43d447dd2ae072a0065389092a231283f62d960030ecd27565672bd40746c507"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:578e24f761f3b425834f297b9935e1ce2e30f51400964ce4801002435a1b41ef"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:81b5efb2f126454586d0f40c4d834010979cb80785173d1586df845a632e4e6d"}, + {file = "pydantic_core-2.18.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ab86ce7c8f9bea87b9d12c7f0af71102acbf5ecbc66c17796cff45dae54ef9a5"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:90afc12421df2b1b4dcc975f814e21bc1754640d502a2fbcc6d41e77af5ec312"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:51991a89639a912c17bef4b45c87bd83593aee0437d8102556af4885811d59f5"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:293afe532740370aba8c060882f7d26cfd00c94cae32fd2e212a3a6e3b7bc15e"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48ece5bde2e768197a2d0f6e925f9d7e3e826f0ad2271120f8144a9db18d5c8"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:eae237477a873ab46e8dd748e515c72c0c804fb380fbe6c85533c7de51f23a8f"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:834b5230b5dfc0c1ec37b2fda433b271cbbc0e507560b5d1588e2cc1148cf1ce"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e858ac0a25074ba4bce653f9b5d0a85b7456eaddadc0ce82d3878c22489fa4ee"}, + {file = "pydantic_core-2.18.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2fd41f6eff4c20778d717af1cc50eca52f5afe7805ee530a4fbd0bae284f16e9"}, + {file = "pydantic_core-2.18.4.tar.gz", hash = "sha256:ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + +[[package]] +name = "pydantic-core" +version = "2.23.4" +description = "Core functionality for Pydantic validation and serialization" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, + {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, + {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, + {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, + {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, + {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, + {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, + {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, + {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, + {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, + {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, + {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, + {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, + {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, + {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, + {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, + {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, + {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, + {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, + {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, + {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, + {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, + {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, + {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, + {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, + {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, + {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, + {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, + {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, + {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, + {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, + {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, + {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, + {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + [[package]] name = "pyflakes" version = "3.2.0" @@ -2203,6 +2466,20 @@ files = [ {file = "toolz-0.12.1.tar.gz", hash = "sha256:ecca342664893f177a13dac0e6b41cbd8ac25a358e5f215316d43e2100224f4d"}, ] +[[package]] +name = "types-requests" +version = "2.32.4.20250611" +description = "Typing stubs for requests" +optional = false +python-versions = ">=3.9" +files = [ + {file = "types_requests-2.32.4.20250611-py3-none-any.whl", hash = "sha256:ad2fe5d3b0cb3c2c902c8815a70e7fb2302c4b8c1f77bdcd738192cdb3878072"}, + {file = "types_requests-2.32.4.20250611.tar.gz", hash = "sha256:741c8777ed6425830bf51e54d6abe245f79b4dcb9019f1622b773463946bf826"}, +] + +[package.dependencies] +urllib3 = ">=2" + [[package]] name = "typing-extensions" version = "4.9.0" @@ -2233,38 +2510,36 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "web3" -version = "6.15.1" -description = "web3.py" +version = "7.13.0" +description = "web3: A Python library for interacting with Ethereum" optional = false -python-versions = ">=3.7.2" +python-versions = "<4,>=3.8" files = [ - {file = "web3-6.15.1-py3-none-any.whl", hash = "sha256:4e4a8313aa4556ecde61c852a62405b853b667498b07da6ff05c29fe8c79096b"}, - {file = "web3-6.15.1.tar.gz", hash = "sha256:f9e7eefc1b3c3d194868a4ef9583b625c18ea3f31a48ebe143183db74898f381"}, + {file = "web3-7.13.0-py3-none-any.whl", hash = "sha256:4da7e953300577b7dadbaf430e5fd4479b127b1ad4910234b230fdcb8a49f735"}, + {file = "web3-7.13.0.tar.gz", hash = "sha256:281795e0f5d404c1374e1771f6710bb43e0c975f3141366eb1680763edfb4806"}, ] [package.dependencies] aiohttp = ">=3.7.4.post0" -eth-abi = ">=4.0.0" -eth-account = ">=0.8.0" +eth-abi = ">=5.0.1" +eth-account = ">=0.13.6" eth-hash = {version = ">=0.5.1", extras = ["pycryptodome"]} -eth-typing = ">=3.0.0" -eth-utils = ">=2.1.0" -hexbytes = ">=0.1.0,<0.4.0" -jsonschema = ">=4.0.0" -lru-dict = ">=1.1.6,<1.3.0" -protobuf = ">=4.21.6" +eth-typing = ">=5.0.0" +eth-utils = ">=5.0.0" +hexbytes = ">=1.2.0" +pydantic = ">=2.4.0" pyunormalize = ">=15.0.0" pywin32 = {version = ">=223", markers = "platform_system == \"Windows\""} -requests = ">=2.16.0" +requests = ">=2.23.0" +types-requests = ">=2.0.0" typing-extensions = ">=4.0.1" -websockets = ">=10.0.0" +websockets = ">=10.0.0,<16.0.0" [package.extras] -dev = ["black (>=22.1.0)", "build (>=0.9.0)", "bumpversion", "eth-tester[py-evm] (==v0.9.1-b.2)", "flake8 (==3.8.3)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "importlib-metadata (<5.0)", "ipfshttpclient (==0.8.0a2)", "isort (>=5.11.0)", "mypy (==1.4.1)", "py-geth (>=3.14.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.18.1,<0.23)", "pytest-mock (>=1.10)", "pytest-watch (>=4.2)", "pytest-xdist (>=1.29)", "setuptools (>=38.6.0)", "sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=3.18.0)", "tqdm (>4.32)", "twine (>=1.13)", "types-protobuf (==3.19.13)", "types-requests (>=2.26.1)", "types-setuptools (>=57.4.4)", "when-changed (>=0.3.0)"] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] -ipfs = ["ipfshttpclient (==0.8.0a2)"] -linter = ["black (>=22.1.0)", "flake8 (==3.8.3)", "isort (>=5.11.0)", "mypy (==1.4.1)", "types-protobuf (==3.19.13)", "types-requests (>=2.26.1)", "types-setuptools (>=57.4.4)"] -tester = ["eth-tester[py-evm] (==v0.9.1-b.2)", "py-geth (>=3.14.0)"] +dev = ["build (>=0.9.0)", "bump_my_version (>=0.19.0)", "eth-tester[py-evm] (>=0.13.0b1,<0.14.0b1)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "ipython", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "py-geth (>=5.1.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.18.1,<0.23)", "pytest-mock (>=1.10)", "pytest-xdist (>=2.4.0)", "setuptools (>=38.6.0)", "sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)", "tox (>=4.0.0)", "tqdm (>4.32)", "twine (>=1.13)", "wheel"] +docs = ["sphinx (>=6.0.0)", "sphinx-autobuild (>=2021.3.14)", "sphinx_rtd_theme (>=1.0.0)", "towncrier (>=24,<25)"] +test = ["eth-tester[py-evm] (>=0.13.0b1,<0.14.0b1)", "flaky (>=3.7.0)", "hypothesis (>=3.31.2)", "mypy (==1.10.0)", "pre-commit (>=3.4.0)", "py-geth (>=5.1.0)", "pytest (>=7.0.0)", "pytest-asyncio (>=0.18.1,<0.23)", "pytest-mock (>=1.10)", "pytest-xdist (>=2.4.0)", "tox (>=4.0.0)"] +tester = ["eth-tester[py-evm] (>=0.13.0b1,<0.14.0b1)", "py-geth (>=5.1.0)"] [[package]] name = "websockets" @@ -2453,4 +2728,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "250de604d40c8546d723cca7b74a237ac10d99d4c525f91be84783430f2f2267" +content-hash = "ac4ae99b43ee6ef2b3bbdf61ca8606b6853d73b69336a6785085eccec88e3c03" diff --git a/tests/integration_tests/pyproject.toml b/tests/integration_tests/pyproject.toml index eff0e248ea..eeb29173dd 100644 --- a/tests/integration_tests/pyproject.toml +++ b/tests/integration_tests/pyproject.toml @@ -15,13 +15,13 @@ flake8-isort = "^6.1" pep8-naming = "^0.13" protobuf = "^4.25" python-dateutil = "^2.8" -web3 = "^6.15" +web3 = "^7.13.0" python-dotenv = "^1.0" pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main" } websockets = "^12.0" toml = "^0" jsonnet = "^0" -eth-account = "^0.11" +eth-account = "^0.13" cprotobuf = "^0.1.11" flaky = "^3.7" eth-bloom = "^3.0" diff --git a/tests/integration_tests/test_account.py b/tests/integration_tests/test_account.py index b18028f7a7..3dc58b19f4 100644 --- a/tests/integration_tests/test_account.py +++ b/tests/integration_tests/test_account.py @@ -1,5 +1,5 @@ import pytest -from web3 import Web3 +from web3 import Web3, exceptions from .network import setup_ethermint from .utils import ADDRS, derive_new_account, w3_wait_for_new_blocks @@ -51,7 +51,7 @@ def test_query_future_blk(cluster): acc = derive_new_account(2).address current = w3.eth.block_number future = current + 1000 - with pytest.raises(ValueError) as exc: + with pytest.raises(exceptions.Web3RPCError) as exc: w3.eth.get_transaction_count(acc, hex(future)) print(acc, str(exc)) assert "-32000" in str(exc) diff --git a/tests/integration_tests/test_batch.py b/tests/integration_tests/test_batch.py index 75a50fa79a..010e1a6bb2 100644 --- a/tests/integration_tests/test_batch.py +++ b/tests/integration_tests/test_batch.py @@ -1,5 +1,7 @@ import json +from web3 import Web3 + from .utils import ADDRS, CONTRACTS, build_batch_tx, contract_address @@ -56,7 +58,7 @@ def test_batch_tx(ethermint): # check traceTransaction rsps = [ - w3.provider.make_request("debug_traceTransaction", [h.hex()])["result"] + w3.provider.make_request("debug_traceTransaction", [Web3.to_hex(h)])["result"] for h in tx_hashes ] diff --git a/tests/integration_tests/test_block.py b/tests/integration_tests/test_block.py index b8c1facc32..99367d4231 100644 --- a/tests/integration_tests/test_block.py +++ b/tests/integration_tests/test_block.py @@ -1,3 +1,5 @@ +from web3 import Web3 + from .utils import CONTRACTS, deploy_contract, w3_wait_for_new_blocks @@ -6,6 +8,6 @@ def test_call(ethermint): contract, res = deploy_contract(w3, CONTRACTS["TestBlockTxProperties"]) height = w3.eth.get_block_number() w3_wait_for_new_blocks(w3, 1) - res = contract.caller.getBlockHash(height).hex() + res = Web3.to_hex(contract.caller.getBlockHash(height)) blk = w3.eth.get_block(height) - assert f"0x{res}" == blk.hash.hex(), res + assert res == Web3.to_hex(blk.hash), res diff --git a/tests/integration_tests/test_call.py b/tests/integration_tests/test_call.py index cb49d253a9..7280ecf6eb 100644 --- a/tests/integration_tests/test_call.py +++ b/tests/integration_tests/test_call.py @@ -1,6 +1,5 @@ import json -from hexbytes import HexBytes from web3 import Web3 from web3._utils.contracts import encode_transaction_data @@ -11,16 +10,16 @@ def test_temporary_contract_code(ethermint): state = 100 w3: Web3 = ethermint.w3 info = json.loads(CONTRACTS["Greeter"].read_text()) - data = encode_transaction_data(w3, "intValue", info["abi"]) + data = encode_transaction_data( + w3, "intValue", contract_abi=info["abi"], args=[], kwargs={} + ) # call an arbitrary address address = w3.to_checksum_address("0x0000000000000000000000000000ffffffffffff") overrides = { address: { "code": info["deployedBytecode"], "state": { - ("0x" + "0" * 64): HexBytes( - w3.codec.encode(("uint256",), (state,)) - ).hex(), + ("0x" + "0" * 64): Web3.to_hex(w3.codec.encode(("uint256",), (state,))), }, }, } @@ -45,12 +44,14 @@ def test_override_state(ethermint): info = json.loads(CONTRACTS["Greeter"].read_text()) int_value = 100 state = { - ("0x" + "0" * 64): HexBytes(w3.codec.encode(("uint256",), (int_value,))).hex(), + ("0x" + "0" * 64): Web3.to_hex(w3.codec.encode(("uint256",), (int_value,))), } result = w3.eth.call( { "to": contract.address, - "data": encode_transaction_data(w3, "intValue", info["abi"]), + "data": encode_transaction_data( + w3, "intValue", contract_abi=info["abi"], args=[], kwargs={} + ), }, "latest", { @@ -66,7 +67,9 @@ def test_override_state(ethermint): result = w3.eth.call( { "to": contract.address, - "data": encode_transaction_data(w3, "greet", info["abi"]), + "data": encode_transaction_data( + w3, "greet", contract_abi=info["abi"], args=[], kwargs={} + ), }, "latest", { @@ -82,7 +85,9 @@ def test_override_state(ethermint): result = w3.eth.call( { "to": contract.address, - "data": encode_transaction_data(w3, "greet", info["abi"]), + "data": encode_transaction_data( + w3, "greet", contract_abi=info["abi"], args=[], kwargs={} + ), }, "latest", { diff --git a/tests/integration_tests/test_debug_traceblock.py b/tests/integration_tests/test_debug_traceblock.py index 906d14c078..57bec4dfcb 100644 --- a/tests/integration_tests/test_debug_traceblock.py +++ b/tests/integration_tests/test_debug_traceblock.py @@ -34,7 +34,7 @@ def test_traceblock(ethermint): "nonce": nonce + n, } signed = sign_transaction(w3, tx, acc.key) - txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + txhash = w3.eth.send_raw_transaction(signed.raw_transaction) txhashes.append(txhash) for txhash in txhashes[0 : total - 1]: res = w3.eth.wait_for_transaction_receipt(txhash) diff --git a/tests/integration_tests/test_estimate_gas.py b/tests/integration_tests/test_estimate_gas.py index 9db5876d40..e931ff1040 100644 --- a/tests/integration_tests/test_estimate_gas.py +++ b/tests/integration_tests/test_estimate_gas.py @@ -39,8 +39,9 @@ def process(w3): def test_out_of_gas_error(ethermint, geth): - iterations = 1 - gas = 21204 + # increase gas to pass EIP-7623: Floor Data Gas + iterations = 10 + gas = 21510 def process(w3): contract, _ = deploy_contract(w3, CONTRACTS["TestMessageCall"]) diff --git a/tests/integration_tests/test_filters.py b/tests/integration_tests/test_filters.py index f1a737eb47..32cb059cef 100644 --- a/tests/integration_tests/test_filters.py +++ b/tests/integration_tests/test_filters.py @@ -85,17 +85,17 @@ def test_get_logs_by_topic(cluster): # The getLogs method under the hood works as a filter # with the specified topics and a block range. # If the block range is not specified, it defaults - # to fromBlock: "latest", toBlock: "latest". + # to from_block: "latest", toBlock: "latest". # Then, if we make a getLogs call within the same block that the tx # happened, we will get a log in the result. However, if we make the call # one or more blocks later, the result will be an empty array. - logs = w3.eth.get_logs({"topics": [topic.hex()]}) + logs = w3.eth.get_logs({"topics": [Web3.to_hex(topic)]}) assert len(logs) == 1 assert logs[0]["address"] == contract.address w3_wait_for_new_blocks(w3, 2) - logs = w3.eth.get_logs({"topics": [topic.hex()]}) + logs = w3.eth.get_logs({"topics": [Web3.to_hex(topic)]}) assert len(logs) == 0 end = "latest" @@ -158,7 +158,7 @@ def test_event_log_filter_by_contract(cluster): # Create new filter from contract current_height = hex(w3.eth.get_block_number()) - flt = contract.events.ChangeGreeting.create_filter(fromBlock=current_height) + flt = contract.events.ChangeGreeting.create_filter(from_block=current_height) # without tx assert flt.get_new_entries() == [] # GetFilterChanges @@ -223,11 +223,11 @@ def test_event_log_filter_by_topic(cluster): { "name": "one contract emiting one topic", "filters": [ - {"topics": [CHANGE_GREETING_TOPIC.hex()]}, + {"topics": [Web3.to_hex(CHANGE_GREETING_TOPIC)]}, { "fromBlock": 1, "toBlock": "latest", - "topics": [CHANGE_GREETING_TOPIC.hex()], + "topics": [Web3.to_hex(CHANGE_GREETING_TOPIC)], }, ], "exp_len": 1, @@ -238,12 +238,12 @@ def test_event_log_filter_by_topic(cluster): "name": "multiple contracts emitting same topic", "filters": [ { - "topics": [CHANGE_GREETING_TOPIC.hex()], + "topics": [Web3.to_hex(CHANGE_GREETING_TOPIC)], }, { "fromBlock": 1, "toBlock": "latest", - "topics": [CHANGE_GREETING_TOPIC.hex()], + "topics": [Web3.to_hex(CHANGE_GREETING_TOPIC)], }, ], "exp_len": 5, @@ -254,12 +254,22 @@ def test_event_log_filter_by_topic(cluster): "name": "multiple contracts emitting different topics", "filters": [ { - "topics": [[CHANGE_GREETING_TOPIC.hex(), TRANSFER_TOPIC.hex()]], + "topics": [ + [ + Web3.to_hex(CHANGE_GREETING_TOPIC), + Web3.to_hex(TRANSFER_TOPIC), + ] + ], }, { "fromBlock": 1, "toBlock": "latest", - "topics": [[CHANGE_GREETING_TOPIC.hex(), TRANSFER_TOPIC.hex()]], + "topics": [ + [ + Web3.to_hex(CHANGE_GREETING_TOPIC), + Web3.to_hex(TRANSFER_TOPIC), + ] + ], }, ], "exp_len": 3, # 2 transfer events, mint&transfer on deploy (2)tx in test @@ -353,14 +363,14 @@ def test_multiple_filters(cluster): "exp_len": 1, }, { - "params": {"topics": [topic.hex()]}, + "params": {"topics": [Web3.to_hex(topic)]}, "exp_len": 1, }, { "params": { "topics": [ - topic.hex(), - another_topic.hex(), + Web3.to_hex(topic), + Web3.to_hex(another_topic), ], # 'with all topics' condition }, "exp_len": 0, @@ -368,7 +378,7 @@ def test_multiple_filters(cluster): { "params": { "topics": [ - [topic.hex(), another_topic.hex()] + [Web3.to_hex(topic), Web3.to_hex(another_topic)] ], # 'with any topic' condition }, "exp_len": 1, @@ -376,7 +386,7 @@ def test_multiple_filters(cluster): { "params": { "address": contract.address, - "topics": [[topic.hex(), another_topic.hex()]], + "topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]], }, "exp_len": 1, }, @@ -385,7 +395,7 @@ def test_multiple_filters(cluster): "fromBlock": 1, "toBlock": 2, "address": contract.address, - "topics": [[topic.hex(), another_topic.hex()]], + "topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]], }, "exp_len": 0, }, @@ -394,7 +404,7 @@ def test_multiple_filters(cluster): "fromBlock": 1, "toBlock": "latest", "address": contract.address, - "topics": [[topic.hex(), another_topic.hex()]], + "topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]], }, "exp_len": 1, }, @@ -402,7 +412,7 @@ def test_multiple_filters(cluster): "params": { "fromBlock": 1, "toBlock": "latest", - "topics": [[topic.hex(), another_topic.hex()]], + "topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]], }, "exp_len": 1, }, @@ -512,14 +522,14 @@ def test_register_filters_before_contract_deploy(cluster): filters = [ { - "params": {"topics": [topic.hex()]}, + "params": {"topics": [Web3.to_hex(topic)]}, "exp_len": 1, }, { "params": { "topics": [ - topic.hex(), - another_topic.hex(), + Web3.to_hex(topic), + Web3.to_hex(another_topic), ], # 'with all topics' condition }, "exp_len": 0, @@ -527,7 +537,7 @@ def test_register_filters_before_contract_deploy(cluster): { "params": { "topics": [ - [topic.hex(), another_topic.hex()] + [Web3.to_hex(topic), Web3.to_hex(another_topic)] ], # 'with any topic' condition }, "exp_len": 1, @@ -536,7 +546,7 @@ def test_register_filters_before_contract_deploy(cluster): "params": { "fromBlock": 1, "toBlock": "latest", - "topics": [[topic.hex(), another_topic.hex()]], + "topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]], }, "exp_len": 1, }, @@ -632,13 +642,13 @@ def test_get_logs(cluster): }, { "name": "get logs by topic", - "logs": w3.eth.get_logs({"topics": [topic.hex()]}), + "logs": w3.eth.get_logs({"topics": [Web3.to_hex(topic)]}), "exp_log": True, "exp_len": 1, }, { "name": "get logs by incorrect topic - should not have logs", - "logs": w3.eth.get_logs({"topics": [another_topic.hex()]}), + "logs": w3.eth.get_logs({"topics": [Web3.to_hex(another_topic)]}), "exp_log": False, "exp_len": 0, }, @@ -647,8 +657,8 @@ def test_get_logs(cluster): "logs": w3.eth.get_logs( { "topics": [ - topic.hex(), - another_topic.hex(), + Web3.to_hex(topic), + Web3.to_hex(another_topic), ] } ), @@ -657,7 +667,9 @@ def test_get_logs(cluster): }, { "name": "get logs by multiple topics ('match any' condition)", - "logs": w3.eth.get_logs({"topics": [[topic.hex(), another_topic.hex()]]}), + "logs": w3.eth.get_logs( + {"topics": [[Web3.to_hex(topic), Web3.to_hex(another_topic)]]} + ), "exp_log": True, "exp_len": 1, }, @@ -667,7 +679,7 @@ def test_get_logs(cluster): { "fromBlock": tx_block_num, "toBlock": "latest", - "topics": [topic.hex()], + "topics": [Web3.to_hex(topic)], } ), "exp_log": True, diff --git a/tests/integration_tests/test_gas.py b/tests/integration_tests/test_gas.py index 99f88eea2f..7bbe845599 100644 --- a/tests/integration_tests/test_gas.py +++ b/tests/integration_tests/test_gas.py @@ -1,6 +1,7 @@ from pathlib import Path import pytest +from web3 import exceptions from .network import setup_custom_ethermint from .utils import ( @@ -8,6 +9,8 @@ CONTRACTS, KEYS, deploy_contract, + derive_random_account, + fund_acc, send_transaction, w3_wait_for_new_blocks, ) @@ -108,6 +111,34 @@ def test_block_gas_limit(ethermint): return +# EIP-7623: Floor Data Gas +def test_floor_data_gas_error(ethermint, geth): + iterations = 1 + acc = derive_random_account() + gas = 21204 + + def process(w3): + fund_acc(w3, acc) + contract, _ = deploy_contract(w3, CONTRACTS["TestMessageCall"], key=acc.key) + tx = contract.functions.test(iterations).build_transaction({"gas": gas}) + res = send_transaction(w3, tx) + return res + + providers = [ethermint.w3, geth.w3] + exceptions = [] + for w3 in providers: + try: + process(w3) + except Exception as e: + exceptions.append(e) + + assert len(exceptions) == len(providers) + expected_substring = "insufficient gas for floor data gas cost" + for exception in exceptions: + assert exception is not None, "Expected an exception but none was raised" + assert expected_substring in str(exception), exception + + @pytest.fixture(scope="module") def discard(request, tmp_path_factory): path = tmp_path_factory.mktemp("discard") @@ -117,6 +148,6 @@ def discard(request, tmp_path_factory): def test_discard_abci_responses(discard): - with pytest.raises(ValueError) as exc: + with pytest.raises(exceptions.Web3RPCError) as exc: discard.w3.eth.gas_price assert "header result not found for height" in str(exc) diff --git a/tests/integration_tests/test_grpc_only.py b/tests/integration_tests/test_grpc_only.py index ecb207a57f..166b979a12 100644 --- a/tests/integration_tests/test_grpc_only.py +++ b/tests/integration_tests/test_grpc_only.py @@ -73,7 +73,7 @@ def test_grpc_mode(custom_ethermint): msg = { "to": contract.address, - "data": contract.encodeABI(fn_name="currentChainID"), + "data": contract.encode_abi(abi_element_identifier="currentChainID"), } api_port = ports.api_port(custom_ethermint.base_port(1)) diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index e1191e138b..ed8fc006c5 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -1,6 +1,7 @@ import sys import pytest +from web3 import exceptions from .network import setup_ethermint from .utils import ( @@ -113,7 +114,7 @@ def test_priority(ethermint): signed = [sign_transaction(w3, tx, key=KEYS[sender]) for sender, tx in test_cases] # send the txs from low priority to high, # but the later sent txs should be included earlier. - txhashes = [w3.eth.send_raw_transaction(tx.rawTransaction) for tx in signed] + txhashes = [w3.eth.send_raw_transaction(tx.raw_transaction) for tx in signed] receipts = [w3.eth.wait_for_transaction_receipt(txhash) for txhash in txhashes] print(receipts) @@ -221,6 +222,6 @@ def test_validate(ethermint): "maxFeePerGas": gas, "maxPriorityFeePerGas": gas + 1, } - with pytest.raises(ValueError) as exc: + with pytest.raises(exceptions.Web3RPCError) as exc: send_transaction(w3, tx) assert "max priority fee per gas higher than max fee per gas" in str(exc) diff --git a/tests/integration_tests/test_pruned_node.py b/tests/integration_tests/test_pruned_node.py index 02311f88bb..3a9e5f913f 100644 --- a/tests/integration_tests/test_pruned_node.py +++ b/tests/integration_tests/test_pruned_node.py @@ -4,6 +4,7 @@ from eth_bloom import BloomFilter from eth_utils import abi, big_endian_to_int from hexbytes import HexBytes +from web3 import Web3 from web3.datastructures import AttributeDict from .network import setup_custom_ethermint @@ -43,11 +44,11 @@ def test_pruned_node(pruned): {"from": ADDRS["validator"]} ) signed = sign_transaction(w3, tx, KEYS["validator"]) - txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + txhash = w3.eth.send_raw_transaction(signed.raw_transaction) print("wait for prunning happens") w3_wait_for_new_blocks(w3, 15) - tx_receipt = w3.eth.get_transaction_receipt(txhash.hex()) + tx_receipt = w3.eth.get_transaction_receipt(Web3.to_hex(txhash)) assert len(tx_receipt.logs) == 1 data = "0x000000000000000000000000000000000000000000000000000000000000000a" data = HexBytes(data) diff --git a/tests/integration_tests/test_set_code_tx.py b/tests/integration_tests/test_set_code_tx.py new file mode 100644 index 0000000000..acb11ed748 --- /dev/null +++ b/tests/integration_tests/test_set_code_tx.py @@ -0,0 +1,621 @@ +from concurrent.futures import ThreadPoolExecutor, as_completed +from pathlib import Path + +import pytest +from hexbytes import HexBytes +from web3 import Web3, exceptions + +from .bytecode_deployer import deploy_runtime_bytecode +from .network import setup_custom_ethermint +from .utils import derive_new_account, fund_acc, send_transaction + +DELEGATION_PREFIX = "0xef0100" + + +@pytest.fixture(scope="module") +def custom_ethermint(tmp_path_factory): + path = tmp_path_factory.mktemp("setcodetx") + yield from setup_custom_ethermint( + path, 26500, Path(__file__).parent / "configs/default.jsonnet" + ) + + +@pytest.fixture(scope="module", params=["ethermint", "geth"]) +def cluster(request, custom_ethermint, geth): + """ + run on both ethermint and geth + """ + provider = request.param + if provider == "ethermint": + yield custom_ethermint + elif provider == "geth": + yield geth + else: + raise NotImplementedError + + +def address_to_delegation(address: str): + return DELEGATION_PREFIX + address[2:] + + +def test_set_code_tx_basic(custom_ethermint): + w3: Web3 = custom_ethermint.w3 + + account_code = "0x4Cd241E8d1510e30b2076397afc7508Ae59C66c9" + + # use an new account for the test + # genisis accounts are default BaseAccount, with no code hash storage + acc = derive_new_account(n=2) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + + auth = { + "chainId": chain_id, + "address": account_code, + "nonce": nonce + 1, + } + + signed_auth = acc.sign_authorization(auth) + + setcode_tx = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth], + } + + signed_tx = acc.sign_transaction(setcode_tx) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + + code = w3.eth.get_code(acc.address, "latest") + expected_code = address_to_delegation(account_code) + expected_code_hex = HexBytes(expected_code) + assert code == expected_code_hex, f"Expected code {expected_code_hex}, got {code}" + # Verify the nonce was incremented correctly + new_nonce = w3.eth.get_transaction_count(acc.address) + assert new_nonce == nonce + 2, f"Expected nonce {nonce + 2}, got {new_nonce}" + + +# replicate the test +# https://github.com/ethereum/go-ethereum/blob/0af6c9899f11949e452a1baf90f2281c0d4fe46a/core/blockchain_test.go#L4067 +# ethermint and geth will both succeed +def test_eip7702_delegation_with_storage(cluster): + """ + TestEIP7702 equivalent: deploys two delegation designations and calls them. + It writes one value to storage which is verified after. + + The test creates: + 1. addr1 delegated to 0xaaaa (which calls addr2) + 2. addr2 delegated to 0xbbbb (which stores 42 in slot 42) + + The transaction flow becomes: + 1. tx -> addr1 which is delegated to 0xaaaa + 2. addr1:0xaaaa calls into addr2:0xbbbb + 3. addr2:0xbbbb writes to storage + """ + w3: Web3 = cluster.w3 + chain_id = w3.eth.chain_id + + deployer = derive_new_account(n=9) + addr1 = derive_new_account(n=10) + addr2 = derive_new_account(n=11) + addr1_nonce = w3.eth.get_transaction_count(addr1.address) + addr2_nonce = w3.eth.get_transaction_count(addr2.address) + + fund_acc(w3, deployer) + fund_acc(w3, addr1) + fund_acc(w3, addr2) + + addr2_hex = addr2.address[2:].lower() + # getCode from the original geth test + aa_bytecode = "0x6000600060006000600173" + addr2_hex + "5af1" + aa = deploy_runtime_bytecode(w3, aa_bytecode, deployer, deployer) + + # Sstore(0x42, 0x42) - stores value 42 in slot 42 + bb_bytecode = "0x6042604255" + bb = deploy_runtime_bytecode(w3, bb_bytecode, deployer, deployer) + + aa_deployed_code = w3.eth.get_code(aa, "latest") + bb_deployed_code = w3.eth.get_code(bb, "latest") + + assert aa_deployed_code == HexBytes(aa_bytecode), ( + f"aa deployed code incorrect: got {Web3.to_hex(aa_deployed_code)}, " + f"want {aa_bytecode}" + ) + assert bb_deployed_code == HexBytes(bb_bytecode), ( + f"bb deployed code incorrect: got {Web3.to_hex(bb_deployed_code)}, " + f"want {bb_bytecode}" + ) + + auth1 = { + "chainId": chain_id, + "address": aa, + "nonce": addr1_nonce + 1, # Next nonce after the SetCode transaction + } + + # auth2: addr2 delegates to bb contract + auth2 = {"chainId": chain_id, "address": bb, "nonce": addr2_nonce} + + signed_auth1 = addr1.sign_authorization(auth1) + signed_auth2 = addr2.sign_authorization(auth2) + + setcode_tx = { + "chainId": chain_id, + "type": 4, + "to": addr1.address, + "value": 0, + "gas": 500000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": addr1_nonce, + "authorizationList": [signed_auth1, signed_auth2], + } + + signed_tx = addr1.sign_transaction(setcode_tx) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + + assert receipt.status == 1, f"Transaction failed: {receipt}" + + addr1_code = w3.eth.get_code(addr1.address, "latest") + delegation1 = address_to_delegation(auth1["address"]) + assert addr1_code == HexBytes( + delegation1 + ), f"addr1 code incorrect: got {Web3.to_hex(addr1_code)}, want {delegation1}" + + addr2_code = w3.eth.get_code(addr2.address, "latest") + delegation2 = address_to_delegation(auth2["address"]) + assert addr2_code == HexBytes( + delegation2 + ), f"addr2 code incorrect: got {Web3.to_hex(addr2_code)}, want {delegation2}" + + # Verify delegation executed the correct code and stored value 42 in slot 42 + # Check storage at addr2, slot 0x42 + storage_value = w3.eth.get_storage_at(addr2.address, 0x42, "latest") + expected_value = HexBytes( + "0x0000000000000000000000000000000000000000000000000000000000000042" + ) + + assert storage_value == expected_value, ( + f"addr2 storage wrong: expected {Web3.to_hex(expected_value)}, " + f"got {Web3.to_hex(storage_value)}" + ) + + +def test_set_code_tx_auth_list_empty(ethermint, geth): + # TODO: web3.py has inner validation for auth list, can't send empty auth list + return + + def process(w3): + # use an new account for the test + # genisis accounts are default BaseAccount, with no code hash storage + acc = derive_new_account(n=2) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + setcode_tx = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + } + + res = send_transaction(w3, setcode_tx, acc.key) + return res + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert res[0] == res[-1], res + + +def test_set_code_tx_to_empty(ethermint, geth): + def process(w3): + # use an new account for the test + # genisis accounts are default BaseAccount, with no code hash storage + acc = derive_new_account(n=2) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + auth = { + "chainId": chain_id, + "address": derive_new_account(n=1).address, + "nonce": nonce + 1, + } + signed_auth = acc.sign_authorization(auth) + setcode_tx = { + "chainId": chain_id, + "type": 4, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth], + } + + res = send_transaction(w3, setcode_tx, acc.key) + return res + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.exception() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert all(isinstance(e, exceptions.Web3RPCError) for e in res) + assert str(res[0]) == str(res[-1]) + + +def test_set_code_tx_get_receipt(ethermint, geth): + def process(w3): + acc = derive_new_account(n=3) + target_acc = derive_new_account(n=4) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + + auth_addr = target_acc.address + auth = { + "chainId": chain_id, + "address": auth_addr, + "nonce": nonce + 1, + } + signed_auth = acc.sign_authorization(auth) + + setcode_tx = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth], + } + + signed_tx = acc.sign_transaction(setcode_tx) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + + assert receipt.status == 1, f"transaction failed: {receipt}" + + code = w3.eth.get_code(acc.address, "latest") + expected_code = HexBytes(address_to_delegation(auth_addr)) + assert ( + code == expected_code + ), f"code incorrect: got {Web3.to_hex(code)}, want {expected_code}" + + receipt = w3.eth.get_transaction_receipt(tx_hash) + + return receipt + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert res[0]["from"] == res[-1]["from"], res + assert res[0]["to"] == res[-1]["to"], res + assert res[0]["status"] == res[-1]["status"] == 1, res + assert res[0]["type"] == res[-1]["type"] == 4, res + + +def test_set_code_tx_signature_invalid(ethermint, geth): + def process(w3): + acc = derive_new_account(n=3) + target_acc = derive_new_account(n=4) + fund_acc(w3, acc) + acc_code = w3.eth.get_code(acc.address, "latest") + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + + auth1_addr = target_acc.address + auth1 = { + "chainId": chain_id, + "address": auth1_addr, + "nonce": nonce + 1, + } + + acc_2 = derive_new_account(n=5) + # use a different account to sign the auth + signed_auth1 = acc_2.sign_authorization(auth1) + + setcode_tx1 = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth1], + } + + signed_tx = acc.sign_transaction(setcode_tx1) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + + if receipt.status != 1: + raise Exception(f"transaction failed: {receipt}") + + code = w3.eth.get_code(acc.address, "latest") + # the code will remain unchanged + assert ( + code == acc_code + ), f"code incorrect: got {Web3.to_hex(code)}, want {acc_code}" + + return receipt + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + + +def test_set_code_tx_auth_invalid_nonce(ethermint, geth): + def process(w3): + acc = derive_new_account(n=3) + target_acc = derive_new_account(n=4) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + + auth1_addr = target_acc.address + auth1 = { + "chainId": chain_id, + "address": auth1_addr, + "nonce": nonce + 1, + } + signed_auth1 = acc.sign_authorization(auth1) + + setcode_tx1 = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth1], + } + + signed_tx1 = acc.sign_transaction(setcode_tx1) + tx_hash1 = w3.eth.send_raw_transaction(signed_tx1.raw_transaction) + receipt1 = w3.eth.wait_for_transaction_receipt(tx_hash1, timeout=30) + + if receipt1.status != 1: + raise Exception(f"First transaction failed: {receipt1}") + + code = w3.eth.get_code(acc.address, "latest") + expected_code = HexBytes(address_to_delegation(auth1_addr)) + assert ( + code == expected_code + ), f"code incorrect: got {Web3.to_hex(code)}, want {expected_code}" + + # second tx will error, nonce is lower than current nonce + auth_addr2 = derive_new_account(n=5).address + auth2 = { + "chainId": chain_id, + "address": auth_addr2, + "nonce": nonce + 1, + } + signed_auth2 = acc.sign_authorization(auth2) + nonce2 = w3.eth.get_transaction_count(acc.address) + setcode_tx2 = { + "chainId": chain_id, + "type": 4, + "to": acc.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce2, + "authorizationList": [signed_auth2], + } + + res = send_transaction(w3, setcode_tx2, acc.key) + + # second tx with success, but the code won't be set (errors ignored in auth tx) + code = w3.eth.get_code(acc.address, "latest") + expected_code = HexBytes(address_to_delegation(auth1["address"])) + assert ( + code == expected_code + ), f"code incorrect: got {Web3.to_hex(code)}, want {expected_code}" + + return res + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + + +def test_set_code_tx_estimate_gas(ethermint, geth): + def process(w3): + acc = derive_new_account(n=3) + target_acc = derive_new_account(n=4) + fund_acc(w3, acc) + + chain_id = w3.eth.chain_id + nonce = w3.eth.get_transaction_count(acc.address) + + auth_addr = target_acc.address + auth = { + "chainId": chain_id, + "address": auth_addr, + "nonce": nonce + 1, + } + signed_auth = acc.sign_authorization(auth) + + setcode_tx = { + "chainId": chain_id, + "type": 4, + "from": acc.address, + "to": acc.address, + "value": 0, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": nonce, + "authorizationList": [signed_auth], + } + + gas = w3.eth.estimate_gas(setcode_tx) + return gas + + providers = [ethermint.w3, geth.w3] + with ThreadPoolExecutor(len(providers)) as exec: + tasks = [exec.submit(process, w3) for w3 in providers] + res = [future.result() for future in as_completed(tasks)] + assert len(res) == len(providers) + assert res[0] == res[-1], res + + +def test_set_code_tx_delegate_auth_call_using_different_account(cluster): + """ + Test that a delegate auth call using a different account than + the one used to sign the auth works. + """ + w3: Web3 = cluster.w3 + + auth_account = derive_new_account(n=30) + sender_account = derive_new_account(n=31) + delegate_account = derive_new_account(n=32) + + fund_acc(w3, auth_account) + fund_acc(w3, sender_account) + + chain_id = w3.eth.chain_id + auth_nonce = w3.eth.get_transaction_count(auth_account.address) + sender_nonce = w3.eth.get_transaction_count(sender_account.address) + + auth = { + "chainId": chain_id, + "address": delegate_account.address, + "nonce": auth_nonce, + } + signed_auth = auth_account.sign_authorization(auth) + + setcode_tx = { + "chainId": chain_id, + "type": 4, + "from": sender_account.address, + "to": auth_account.address, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": sender_nonce, + "authorizationList": [signed_auth], + } + + signed_tx = sender_account.sign_transaction(setcode_tx) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + + assert receipt.status == 1, f"Transaction failed: {receipt}" + + code = w3.eth.get_code(auth_account.address, "latest") + expected_code = address_to_delegation(delegate_account.address) + expected_code_hex = HexBytes(expected_code) + assert code == expected_code_hex, f"Expected code {expected_code_hex}, got {code}" + + new_auth_nonce = w3.eth.get_transaction_count(auth_account.address) + assert new_auth_nonce == auth_nonce + 1, ( + f"Expected auth_account nonce {auth_nonce + 1}, got {new_auth_nonce}" + ) + + new_sender_nonce = w3.eth.get_transaction_count(sender_account.address) + assert new_sender_nonce == sender_nonce + 1, ( + f"Expected sender_account nonce {sender_nonce + 1}, got {new_sender_nonce}" + ) + + +def generate_signed_auth(w3, acc, delegate_addr, nonce): + chain_id = w3.eth.chain_id + auth = { + "chainId": chain_id, + "address": delegate_addr, + "nonce": nonce, + } + return acc.sign_authorization(auth) + + +def send_setcode_tx(w3, sender_acc, to, signed_auth): + setcode_tx = { + "chainId": w3.eth.chain_id, + "type": 4, + "to": to, + "value": 0, + "gas": 100000, + "maxFeePerGas": 1000000000000, + "maxPriorityFeePerGas": 10000, + "nonce": w3.eth.get_transaction_count(sender_acc.address), + "authorizationList": [signed_auth], + } + + signed_tx = sender_acc.sign_transaction(setcode_tx) + tx_hash = w3.eth.send_raw_transaction(signed_tx.raw_transaction) + receipt = w3.eth.wait_for_transaction_receipt(tx_hash, timeout=30) + return receipt + + +def test_set_code_tx_revoke_delegation(cluster): + """ + send a setcode tx, and then send an empty setcode tx to revoke the auth + expect the code to be set to 0x + """ + w3: Web3 = cluster.w3 + acc = derive_new_account(n=30) + delegate_addr = derive_new_account(n=31).address + + fund_acc(w3, acc) + nonce = w3.eth.get_transaction_count(acc.address) + + signed_auth = generate_signed_auth(w3, acc, delegate_addr, nonce=nonce + 1) + receipt = send_setcode_tx(w3, acc, acc.address, signed_auth) + + assert receipt.status == 1, f"Transaction failed: {receipt}" + + code = w3.eth.get_code(acc.address, "latest") + expected_code = address_to_delegation(delegate_addr) + expected_code_hex = HexBytes(expected_code) + assert code == expected_code_hex, f"Expected code {expected_code_hex}, got {code}" + + nonce = w3.eth.get_transaction_count(acc.address) + # send new auth to clear the code + signed_auth = generate_signed_auth( + w3, acc, "0x0000000000000000000000000000000000000000", nonce=nonce + 1 + ) + receipt = send_setcode_tx(w3, acc, acc.address, signed_auth) + + assert receipt.status == 1, f"Transaction failed: {receipt}" + + code = w3.eth.get_code(acc.address, "latest") + expected_code = "0x" + assert Web3.to_hex(code) == expected_code, ( + f"Expected code {expected_code}, got {Web3.to_hex(code)}" + ) diff --git a/tests/integration_tests/test_tracers.py b/tests/integration_tests/test_tracers.py index 10e6703256..a3cb592047 100644 --- a/tests/integration_tests/test_tracers.py +++ b/tests/integration_tests/test_tracers.py @@ -3,7 +3,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed import pytest -from web3 import Web3 +from web3 import Web3, exceptions from .expected_constants import ( EXPECTED_BLOCK_OVERRIDES_TRACERS, @@ -32,15 +32,16 @@ def test_out_of_gas_error(ethermint, geth): method = "debug_traceTransaction" tracer = {"tracer": "callTracer"} - iterations = 1 + iterations = 10 acc = derive_random_account() def process(w3): # fund new sender to deploy contract with same address fund_acc(w3, acc) contract, _ = deploy_contract(w3, CONTRACTS["TestMessageCall"], key=acc.key) - tx = contract.functions.test(iterations).build_transaction({"gas": 21204}) - tx_hash = send_transaction(w3, tx)["transactionHash"].hex() + # increase gas to pass EIP-7623: Floor Data Gas + tx = contract.functions.test(iterations).build_transaction({"gas": 21510}) + tx_hash = Web3.to_hex(send_transaction(w3, tx)["transactionHash"]) res = [] call = w3.provider.make_request resp = call(method, [tx_hash, tracer]) @@ -66,7 +67,7 @@ def process(w3): fund_acc(w3, acc) tx = create_contract_transaction(w3, CONTRACTS["TestMessageCall"], key=acc.key) tx["gas"] = 210000 - tx_hash = send_transaction(w3, tx, key=acc.key)["transactionHash"].hex() + tx_hash = Web3.to_hex(send_transaction(w3, tx, key=acc.key)["transactionHash"]) res = [] call = w3.provider.make_request resp = call(method, [tx_hash, tracer]) @@ -93,7 +94,7 @@ def process(w3): fund_acc(w3, acc) call = w3.provider.make_request tx = {"to": ADDRS["community"], "value": 100, "gasPrice": price} - tx_hash = send_transaction(w3, tx)["transactionHash"].hex() + tx_hash = Web3.to_hex(send_transaction(w3, tx)["transactionHash"]) tx_res = call(method, [tx_hash]) assert tx_res["result"] == EXPECTED_STRUCT_TRACER, "" tx_res = call(method, [tx_hash, tracer]) @@ -105,7 +106,7 @@ def process(w3): assert tx_res["result"] == EXPECTED_CALLTRACERS, "" call = w3.provider.make_request _, tx = deploy_contract(w3, CONTRACTS["TestERC20A"], key=acc.key) - tx_hash = tx["transactionHash"].hex() + tx_hash = Web3.to_hex(tx["transactionHash"]) w3_wait_for_new_blocks(w3, 1) tx_res = call(method, [tx_hash, tracer]) return json.dumps(tx_res["result"], sort_keys=True) @@ -144,7 +145,7 @@ def process(w3): fund_acc(w3, acc) contract, _ = deploy_contract(w3, CONTRACTS["TestMessageCall"], key=acc.key) tx = contract.functions.test(iterations).build_transaction() - tx_hash = send_transaction(w3, tx)["transactionHash"].hex() + tx_hash = Web3.to_hex(send_transaction(w3, tx)["transactionHash"]) res = [] call = w3.provider.make_request with ThreadPoolExecutor(len(tracers)) as exec: @@ -180,13 +181,13 @@ def test_trace_tx_reverse_transfer(ethermint): "nonce": nonce, } ) - raw_transactions.append(sign_transaction(w3, tx, acc.key).rawTransaction) + raw_transactions.append(sign_transaction(w3, tx, acc.key).raw_transaction) tx = tx | {"nonce": nonce + 1} - raw_transactions.append(sign_transaction(w3, tx, acc.key).rawTransaction) + raw_transactions.append(sign_transaction(w3, tx, acc.key).raw_transaction) w3_wait_for_new_blocks(w3, 1) sended_hash_set = send_raw_transactions(w3, raw_transactions) for h in sended_hash_set: - tx_hash = h.hex() + tx_hash = Web3.to_hex(h) tx_res = w3.provider.make_request( method, [tx_hash, tracer], @@ -226,7 +227,7 @@ def test_destruct(ethermint): } ) ) - raw_transactions.append(sign_transaction(w3, tx, acc.key).rawTransaction) + raw_transactions.append(sign_transaction(w3, tx, acc.key).raw_transaction) nonce += 1 sended_hash_set = send_raw_transactions(w3, raw_transactions) @@ -235,7 +236,7 @@ def wait_balance(): wait_for_fn("wait_balance", wait_balance) for h in sended_hash_set: - tx_hash = h.hex() + tx_hash = Web3.to_hex(h) res = w3.provider.make_request( method, [tx_hash, tracer], @@ -740,7 +741,7 @@ def process(w3): res = [] call = w3.provider.make_request with ThreadPoolExecutor(len(sended_hash_set)) as exec: - params = [[tx_hash.hex(), tracer] for tx_hash in sended_hash_set] + params = [[Web3.to_hex(tx_hash), tracer] for tx_hash in sended_hash_set] exec_map = exec.map(call, itertools.repeat(method), params) res = [json.dumps(resp["result"], sort_keys=True) for resp in exec_map] return res @@ -748,6 +749,8 @@ def process(w3): providers = [ethermint.w3, geth.w3] with ThreadPoolExecutor(len(providers)) as exec: tasks = [exec.submit(process, w3) for w3 in providers] - res = [future.result() for future in as_completed(tasks)] + res = [future.exception() for future in as_completed(tasks)] assert len(res) == len(providers) - assert res[0] == res[-1], res + assert isinstance(res[0], exceptions.ContractLogicError) + assert isinstance(res[-1], exceptions.ContractLogicError) + assert str(res[0]) == str(res[-1]) == "('execution reverted', '0x')" diff --git a/tests/integration_tests/test_types.py b/tests/integration_tests/test_types.py index d29b775b92..7dcc9de2b5 100644 --- a/tests/integration_tests/test_types.py +++ b/tests/integration_tests/test_types.py @@ -70,7 +70,7 @@ def wait_blk(): # Get existing block, no transactions eth_rsp = eth_rpc.make_request( "eth_getBlockByHash", - [ethermint_blk["hash"].hex(), with_transactions], + [Web3.to_hex(ethermint_blk["hash"]), with_transactions], ) geth_rsp = geth_rpc.make_request( "eth_getBlockByHash", @@ -212,7 +212,7 @@ def send_tnx(w3, tx_value=10): def send_and_get_hash(w3, tx_value=10): - return send_tnx(w3, tx_value)["transactionHash"].hex() + return Web3.to_hex(send_tnx(w3, tx_value)["transactionHash"]) def test_get_proof(ethermint_rpc_ws, geth): diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index c230a16ef7..9819da9140 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -193,7 +193,7 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint, tmp_path): for h in [target_height - 1, target_height, target_height + 1]: res = contract.caller.getBlockHash(h).hex() blk = w3.eth.get_block(h) - assert f"0x{res}" == blk.hash.hex(), res + assert res == blk.hash.hex(), res height = w3.eth.block_number for h in [ @@ -201,4 +201,4 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint, tmp_path): height + 100, # num64 >= upper ]: res = contract.caller.getBlockHash(h).hex() - assert f"0x{res}" == "0x" + "0" * 64, res + assert res == "0" * 64, res diff --git a/tests/integration_tests/test_websockets.py b/tests/integration_tests/test_websockets.py index 5c127c4b40..884a8b7383 100644 --- a/tests/integration_tests/test_websockets.py +++ b/tests/integration_tests/test_websockets.py @@ -6,6 +6,7 @@ from eth_utils import abi from hexbytes import HexBytes from pystarport import ports +from web3 import Web3 from .network import Ethermint from .utils import ( @@ -139,8 +140,8 @@ async def logs_test(c: Client, w3, contract): in msg["topics"] == [ topic, - HexBytes(b"\x00" * 12 + HexBytes(sender)).hex(), - HexBytes(b"\x00" * 12 + HexBytes(recipient)).hex(), + Web3.to_hex(HexBytes(b"\x00" * 12 + HexBytes(sender))), + Web3.to_hex(HexBytes(b"\x00" * 12 + HexBytes(recipient))), ] ) await assert_unsubscribe(c, sub_id) diff --git a/tests/integration_tests/utils.py b/tests/integration_tests/utils.py index 9e2f8f55c5..6a22e18089 100644 --- a/tests/integration_tests/utils.py +++ b/tests/integration_tests/utils.py @@ -16,6 +16,7 @@ from dotenv import load_dotenv from eth_account import Account from hexbytes import HexBytes +from web3 import Web3 from web3._utils.transactions import fill_nonce, fill_transaction_defaults from web3.exceptions import TimeExhausted @@ -46,6 +47,7 @@ "TestBlockTxProperties": "TestBlockTxProperties.sol", "FeeCollector": "FeeCollector.sol", "SelfDestruct": "SelfDestruct.sol", + "BytecodeDeployer": "BytecodeDeployer.sol", } @@ -200,7 +202,7 @@ def send_transaction(w3, tx, key=KEYS["validator"], i=0): if i > 3: raise TimeExhausted signed = sign_transaction(w3, tx, key) - txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + txhash = w3.eth.send_raw_transaction(signed.raw_transaction) try: return w3.eth.wait_for_transaction_receipt(txhash, timeout=20) except TimeExhausted: @@ -212,7 +214,7 @@ def send_txs(w3, txs): raw_transactions = [] for key in txs: signed = sign_transaction(w3, txs[key], key) - raw_transactions.append(signed.rawTransaction) + raw_transactions.append(signed.raw_transaction) # wait block update w3_wait_for_new_blocks(w3, 1, sleep=0.1) # send transactions @@ -224,7 +226,7 @@ def send_successful_transaction(w3, i=0): if i > 3: raise TimeExhausted signed = sign_transaction(w3, {"to": ADDRS["community"], "value": 1000}) - txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + txhash = w3.eth.send_raw_transaction(signed.raw_transaction) try: receipt = w3.eth.wait_for_transaction_receipt(txhash, timeout=20) assert receipt.status == 1 @@ -292,7 +294,9 @@ def modify_command_in_supervisor_config(ini: Path, fn, **kwargs): def build_batch_tx(w3, cli, txs, key=KEYS["validator"]): "return cosmos batch tx and eth tx hashes" signed_txs = [sign_transaction(w3, tx, key) for tx in txs] - tmp_txs = [cli.build_evm_tx(signed.rawTransaction.hex()) for signed in signed_txs] + tmp_txs = [ + cli.build_evm_tx(Web3.to_hex(signed.raw_transaction)) for signed in signed_txs + ] msgs = [tx["body"]["messages"][0] for tx in tmp_txs] fee = sum(int(tx["auth_info"]["fee"]["amount"][0]["amount"]) for tx in tmp_txs) @@ -389,3 +393,11 @@ def contract_address(addr, nonce): )[12:] ) ) + + +def fund_acc(w3, acc, fund=3000000000000000000): + addr = acc.address + if w3.eth.get_balance(addr, "latest") == 0: + tx = {"to": addr, "value": fund, "gasPrice": w3.eth.gas_price} + send_transaction(w3, tx) + assert w3.eth.get_balance(addr, "latest") == fund diff --git a/x/evm/handler_test.go b/x/evm/handler_test.go index 92c230cfab..dab4f7e3fe 100644 --- a/x/evm/handler_test.go +++ b/x/evm/handler_test.go @@ -20,6 +20,7 @@ import ( "github.com/ethereum/go-ethereum/core/tracing" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -481,7 +482,12 @@ func (suite *HandlerTestSuite) TestERC20TransferReverted() { ethCfg := evmParams.GetChainConfig().EthereumConfig(nil) baseFee := suite.App.EvmKeeper.GetBaseFee(suite.Ctx, ethCfg) - fees, err := keeper.VerifyFee(tx, "aphoton", baseFee, true, true, true, suite.Ctx.IsCheckTx()) + rules := params.Rules{ + IsHomestead: true, + IsIstanbul: true, + IsShanghai: true, + } + fees, err := keeper.VerifyFee(tx, "aphoton", baseFee, rules, suite.Ctx.IsCheckTx()) suite.Require().NoError(err) err = k.DeductTxCostsFromUserBalance(suite.Ctx, fees, tx.GetSender()) suite.Require().NoError(err) diff --git a/x/evm/keeper/set_code_authorizations.go b/x/evm/keeper/set_code_authorizations.go new file mode 100644 index 0000000000..301352bb7e --- /dev/null +++ b/x/evm/keeper/set_code_authorizations.go @@ -0,0 +1,70 @@ +package keeper + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" +) + +// validateAuthorization validates an EIP-7702 authorization against the state. +func (k *Keeper) validateAuthorization(auth *types.SetCodeAuthorization, stateDB vm.StateDB) (authority common.Address, err error) { + // Verify chain ID is null or equal to current chain ID. + if !auth.ChainID.IsZero() && auth.ChainID.CmpBig(k.eip155ChainID) != 0 { + return authority, core.ErrAuthorizationWrongChainID + } + // Limit nonce to 2^64-1 per EIP-2681. + if auth.Nonce+1 < auth.Nonce { + return authority, core.ErrAuthorizationNonceOverflow + } + // Validate signature values and recover authority. + authority, err = auth.Authority() + if err != nil { + return authority, fmt.Errorf("%w: %v", core.ErrAuthorizationInvalidSignature, err) + } + // Check the authority account + // 1) doesn't have code or has exisiting delegation + // 2) matches the auth's nonce + // + // Note it is added to the access list even if the authorization is invalid. + stateDB.AddAddressToAccessList(authority) + code := stateDB.GetCode(authority) + if _, ok := types.ParseDelegation(code); len(code) != 0 && !ok { + return authority, core.ErrAuthorizationDestinationHasCode + } + if have := stateDB.GetNonce(authority); have != auth.Nonce { + return authority, core.ErrAuthorizationNonceMismatch + } + return authority, nil +} + +// applyAuthorization applies an EIP-7702 code delegation to the state. +func (k *Keeper) applyAuthorization(auth *types.SetCodeAuthorization, stateDB vm.StateDB) error { + authority, err := k.validateAuthorization(auth, stateDB) + if err != nil { + return err + } + + // If the account already exists in state, refund the new account cost + // charged in the intrinsic calculation. + if stateDB.Exist(authority) { + stateDB.AddRefund(params.CallNewAccountGas - params.TxAuthTupleGas) + } + + // Update nonce and account code. + stateDB.SetNonce(authority, auth.Nonce+1, tracing.NonceChangeAuthorization) + if auth.Address == (common.Address{}) { + // Delegation to zero address means clear. + stateDB.SetCode(authority, nil) + return nil + } + + // Otherwise install delegation to auth.Address. + stateDB.SetCode(authority, types.AddressToDelegation(auth.Address)) + + return nil +} diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 61545f0196..a081906b0d 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -426,6 +426,13 @@ func (k *Keeper) ApplyMessageWithConfig( ret, _, leftoverGas, vmErr = evm.Create(sender, msg.Data, leftoverGas, uint256.MustFromBig(msg.Value)) stateDB.SetNonce(sender, oldNonce, tracing.NonceChangeUnspecified) } else { + if msg.SetCodeAuthorizations != nil { + for _, auth := range msg.SetCodeAuthorizations { + // Note errors are ignored, we simply skip invalid authorizations here. + k.applyAuthorization(&auth, stateDB) //nolint:errcheck + } + } + ret, leftoverGas, vmErr = evm.Call(sender, *msg.To, msg.Data, leftoverGas, uint256.MustFromBig(msg.Value)) } diff --git a/x/evm/keeper/utils.go b/x/evm/keeper/utils.go index ca71a2340f..ca31fce590 100644 --- a/x/evm/keeper/utils.go +++ b/x/evm/keeper/utils.go @@ -21,6 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" @@ -97,7 +98,7 @@ func VerifyFee( msg *types.MsgEthereumTx, denom string, baseFee *big.Int, - homestead, istanbul, shanghai, isCheckTx bool, + rules params.Rules, isCheckTx bool, ) (sdk.Coins, error) { tx := msg.AsTransaction() isContractCreation := tx.To() == nil @@ -105,12 +106,20 @@ func VerifyFee( gasLimit := tx.Gas() accessList := tx.AccessList() - intrinsicGas, err := core.IntrinsicGas(tx.Data(), accessList, tx.SetCodeAuthorizations(), isContractCreation, homestead, istanbul, shanghai) + intrinsicGas, err := core.IntrinsicGas( + tx.Data(), + accessList, + tx.SetCodeAuthorizations(), + isContractCreation, + rules.IsHomestead, + rules.IsIstanbul, + rules.IsShanghai, + ) if err != nil { return nil, errorsmod.Wrapf( err, "failed to retrieve intrinsic gas, contract creation = %t; homestead = %t, istanbul = %t, shanghai = %t", - isContractCreation, homestead, istanbul, shanghai, + isContractCreation, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai, ) } @@ -122,6 +131,17 @@ func VerifyFee( ) } + // Gas limit suffices for the floor data cost (EIP-7623) + if isCheckTx && rules.IsPrague { + floorDataGas, err := core.FloorDataGas(tx.Data()) + if err != nil { + return nil, err + } + if gasLimit < floorDataGas { + return nil, errorsmod.Wrapf(core.ErrFloorDataGas, "gas %v, minimum needed %v", tx.Gas(), floorDataGas) + } + } + if baseFee != nil && tx.GasFeeCap().Cmp(baseFee) < 0 { return nil, errorsmod.Wrapf(errortypes.ErrInsufficientFee, "the tx gasfeecap is lower than the tx baseFee: %s (gasfeecap), %s (basefee) ", diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index f180feb560..ab51b5feba 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/tracing" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" ethparams "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/evmd" "github.com/evmos/ethermint/testutil" @@ -503,7 +504,12 @@ func (suite *UtilsTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() { baseFee := suite.App.EvmKeeper.GetBaseFee(suite.Ctx, ethCfg) priority := evmtypes.GetTxPriority(tx, baseFee) - fees, err := keeper.VerifyFee(tx, evmtypes.DefaultEVMDenom, baseFee, false, false, false, suite.Ctx.IsCheckTx()) + rules := params.Rules{ + IsHomestead: false, + IsIstanbul: false, + IsShanghai: false, + } + fees, err := keeper.VerifyFee(tx, evmtypes.DefaultEVMDenom, baseFee, rules, suite.Ctx.IsCheckTx()) if tc.expectPassVerify { suite.Require().NoError(err, "valid test %d failed - '%s'", i, tc.name) if tc.enableFeemarket { diff --git a/x/evm/migrations/v4/types/params_v4.pb.go b/x/evm/migrations/v4/types/params_v4.pb.go index 3a93df5dd6..4b9992e8cb 100644 --- a/x/evm/migrations/v4/types/params_v4.pb.go +++ b/x/evm/migrations/v4/types/params_v4.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - v0types "github.com/evmos/ethermint/x/evm/migrations/v0/types" + github_com_evmos_ethermint_x_evm_migrations_v0_types "github.com/evmos/ethermint/x/evm/migrations/v0/types" io "io" math "math" math_bits "math/bits" @@ -36,7 +36,7 @@ type V4Params struct { // extra_eips defines the additional EIPs for the vm.Config ExtraEIPs ExtraEIPs `protobuf:"bytes,4,opt,name=extra_eips,json=extraEips,proto3" json:"extra_eips"` // chain_config defines the EVM chain configuration parameters - ChainConfig v0types.V0ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config"` + ChainConfig github_com_evmos_ethermint_x_evm_migrations_v0_types.V0ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3,customtype=github.com/evmos/ethermint/x/evm/migrations/v0/types.V0ChainConfig" json:"chain_config"` // 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"` @@ -103,13 +103,6 @@ func (m *V4Params) GetExtraEIPs() ExtraEIPs { return ExtraEIPs{} } -func (m *V4Params) GetChainConfig() v0types.V0ChainConfig { - if m != nil { - return m.ChainConfig - } - return v0types.V0ChainConfig{} -} - func (m *V4Params) GetAllowUnprotectedTxs() bool { if m != nil { return m.AllowUnprotectedTxs @@ -171,35 +164,36 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/params_v4.proto", fileDescriptor_33bcd56473e886c3) } var fileDescriptor_33bcd56473e886c3 = []byte{ - // 434 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xcf, 0x8a, 0xd3, 0x40, - 0x18, 0x6f, 0x6c, 0x5d, 0xda, 0xe9, 0x0a, 0xeb, 0x58, 0x35, 0xac, 0x90, 0x84, 0x1c, 0x96, 0x82, - 0x90, 0x6c, 0xd7, 0x05, 0x45, 0x10, 0x24, 0xb5, 0xa0, 0x07, 0x61, 0x09, 0xba, 0x07, 0x2f, 0xc3, - 0x34, 0xfb, 0xd9, 0x06, 0x66, 0x32, 0x21, 0x33, 0x3b, 0x76, 0xaf, 0x3e, 0x81, 0x8f, 0xb5, 0xc7, - 0x3d, 0x7a, 0x0a, 0x92, 0xbe, 0x41, 0x9f, 0x40, 0x66, 0x5a, 0xdb, 0x75, 0xf7, 0x36, 0xdf, 0xf7, - 0xfb, 0x93, 0x7c, 0x3f, 0x7e, 0x28, 0x00, 0x35, 0x87, 0x8a, 0xe7, 0x85, 0x8a, 0x41, 0xf3, 0x58, - 0x8f, 0xe2, 0x92, 0x56, 0x94, 0x4b, 0xa2, 0x4f, 0xa3, 0xb2, 0x12, 0x4a, 0xe0, 0x83, 0x2d, 0x23, - 0x02, 0xcd, 0x23, 0x3d, 0x3a, 0x1c, 0xcc, 0xc4, 0x4c, 0x58, 0x30, 0x36, 0xaf, 0x35, 0xef, 0xf0, - 0xe8, 0x9e, 0x53, 0x36, 0xa7, 0x79, 0x41, 0x32, 0x51, 0x7c, 0xcf, 0x67, 0x44, 0x1f, 0xaf, 0x79, - 0xe1, 0xcf, 0x36, 0xea, 0x9e, 0x9f, 0x9e, 0xd9, 0xaf, 0xe0, 0x11, 0xea, 0x81, 0xe6, 0xe4, 0x02, - 0x0a, 0xc1, 0x5d, 0x27, 0x70, 0x86, 0xbd, 0x64, 0xb0, 0xaa, 0xfd, 0x83, 0x2b, 0xca, 0xd9, 0xdb, - 0x70, 0x0b, 0x85, 0x69, 0x17, 0x34, 0xff, 0x60, 0x9e, 0xf8, 0x1d, 0x7a, 0x04, 0x05, 0x9d, 0x32, - 0x20, 0x59, 0x05, 0x54, 0x81, 0xfb, 0x20, 0x70, 0x86, 0xdd, 0xc4, 0x5d, 0xd5, 0xfe, 0x60, 0x23, - 0xbb, 0x0d, 0x87, 0xe9, 0xfe, 0x7a, 0x1e, 0xdb, 0x11, 0xbf, 0x46, 0xfd, 0x7f, 0x38, 0x65, 0xcc, - 0x6d, 0x5b, 0xf1, 0xb3, 0x55, 0xed, 0xe3, 0xff, 0xc5, 0x94, 0xb1, 0x30, 0x45, 0x1b, 0x29, 0x65, - 0x0c, 0x7f, 0x46, 0x08, 0x16, 0xaa, 0xa2, 0x04, 0xf2, 0x52, 0xba, 0x9d, 0xc0, 0x19, 0xf6, 0x4f, - 0x5e, 0x44, 0x77, 0xc3, 0x89, 0x26, 0x86, 0x33, 0xf9, 0x74, 0x26, 0x93, 0xc7, 0xd7, 0xb5, 0xdf, - 0x6a, 0x6a, 0xbf, 0xb7, 0x5d, 0xa5, 0x3d, 0xeb, 0x30, 0xc9, 0x4b, 0x89, 0x3f, 0xa2, 0xfd, 0xdb, - 0xf9, 0xb8, 0x0f, 0xad, 0xa1, 0x7f, 0xdf, 0xf0, 0xfc, 0x78, 0x6c, 0x78, 0x63, 0x4b, 0x4b, 0x3a, - 0xc6, 0x34, 0xed, 0x67, 0xbb, 0x15, 0x3e, 0x41, 0x4f, 0x29, 0x63, 0xe2, 0x07, 0xb9, 0x2c, 0x4c, - 0xc2, 0x90, 0x29, 0xb8, 0x20, 0x6a, 0x21, 0xdd, 0x3d, 0x73, 0x5b, 0xfa, 0xc4, 0x82, 0x5f, 0x77, - 0xd8, 0x97, 0x85, 0x0c, 0xdf, 0xa0, 0xdd, 0x5f, 0xe1, 0x97, 0xa8, 0x63, 0x6f, 0x72, 0x82, 0xf6, - 0xb0, 0x9d, 0x3c, 0x6f, 0x6a, 0xbf, 0x63, 0xf6, 0xab, 0xda, 0xef, 0x6f, 0x32, 0xc9, 0x4b, 0x19, - 0xa6, 0x96, 0x94, 0xbc, 0xbf, 0x6e, 0x3c, 0xe7, 0xa6, 0xf1, 0x9c, 0x3f, 0x8d, 0xe7, 0xfc, 0x5a, - 0x7a, 0xad, 0x9b, 0xa5, 0xd7, 0xfa, 0xbd, 0xf4, 0x5a, 0xdf, 0x8e, 0x66, 0xb9, 0x9a, 0x5f, 0x4e, - 0xa3, 0x4c, 0x70, 0xd3, 0x00, 0x21, 0xe3, 0x5d, 0x23, 0x16, 0xb6, 0x13, 0xea, 0xaa, 0x04, 0x39, - 0xdd, 0xb3, 0x3d, 0x78, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x07, 0x2c, 0x12, 0x7b, 0x02, - 0x00, 0x00, + // 458 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4f, 0x6b, 0x13, 0x4d, + 0x18, 0xcf, 0xbe, 0xc9, 0x5b, 0x92, 0x49, 0x85, 0x3a, 0x46, 0x5d, 0x2a, 0xec, 0x2c, 0x7b, 0x28, + 0x01, 0x61, 0x37, 0xa9, 0x05, 0x45, 0x10, 0x64, 0x63, 0x0e, 0x0a, 0x42, 0x59, 0xb4, 0x07, 0x2f, + 0xcb, 0x64, 0x3b, 0x6e, 0x06, 0x66, 0x76, 0x96, 0x9d, 0xe9, 0x98, 0x7e, 0x09, 0xf1, 0x63, 0xd5, + 0x5b, 0x8f, 0xe2, 0x61, 0x91, 0xcd, 0x37, 0xc8, 0x27, 0x90, 0x99, 0xc4, 0xa4, 0xb5, 0x07, 0x6f, + 0xcf, 0xf3, 0xfc, 0xfe, 0x0c, 0xcf, 0xef, 0x19, 0xe0, 0x13, 0x35, 0x27, 0x15, 0xa7, 0x85, 0x8a, + 0x88, 0xe6, 0x91, 0x1e, 0x47, 0x25, 0xae, 0x30, 0x97, 0xa9, 0x3e, 0x09, 0xcb, 0x4a, 0x28, 0x01, + 0x0f, 0xb6, 0x8c, 0x90, 0x68, 0x1e, 0xea, 0xf1, 0xe1, 0x20, 0x17, 0xb9, 0xb0, 0x60, 0x64, 0xaa, + 0x35, 0xef, 0xf0, 0xe8, 0x8e, 0x53, 0x36, 0xc7, 0xb4, 0x48, 0x33, 0x51, 0x7c, 0xa6, 0x79, 0xaa, + 0x47, 0x6b, 0x5e, 0xf0, 0xbd, 0x0d, 0xba, 0x67, 0x27, 0xa7, 0xf6, 0x15, 0x38, 0x06, 0x3d, 0xa2, + 0x79, 0x7a, 0x4e, 0x0a, 0xc1, 0x5d, 0xc7, 0x77, 0x86, 0xbd, 0x78, 0xb0, 0xaa, 0xd1, 0xc1, 0x25, + 0xe6, 0xec, 0x65, 0xb0, 0x85, 0x82, 0xa4, 0x4b, 0x34, 0x7f, 0x63, 0x4a, 0xf8, 0x0a, 0xdc, 0x23, + 0x05, 0x9e, 0x31, 0x92, 0x66, 0x15, 0xc1, 0x8a, 0xb8, 0xff, 0xf9, 0xce, 0xb0, 0x1b, 0xbb, 0xab, + 0x1a, 0x0d, 0x36, 0xb2, 0x9b, 0x70, 0x90, 0xec, 0xaf, 0xfb, 0x89, 0x6d, 0xe1, 0x73, 0xd0, 0xff, + 0x83, 0x63, 0xc6, 0xdc, 0xb6, 0x15, 0x3f, 0x5a, 0xd5, 0x08, 0xde, 0x16, 0x63, 0xc6, 0x82, 0x04, + 0x6c, 0xa4, 0x98, 0x31, 0xf8, 0x1e, 0x00, 0xb2, 0x50, 0x15, 0x4e, 0x09, 0x2d, 0xa5, 0xdb, 0xf1, + 0x9d, 0x61, 0xff, 0xf8, 0x49, 0xf8, 0x77, 0x38, 0xe1, 0xd4, 0x70, 0xa6, 0x6f, 0x4f, 0x65, 0x7c, + 0xff, 0xaa, 0x46, 0xad, 0xa6, 0x46, 0xbd, 0xed, 0x28, 0xe9, 0x59, 0x87, 0x29, 0x2d, 0x25, 0xfc, + 0xea, 0x80, 0xfd, 0x9b, 0x01, 0xb9, 0xff, 0x5b, 0x47, 0x74, 0xd7, 0xf1, 0x6c, 0x34, 0x31, 0xbc, + 0x89, 0xa5, 0xc5, 0xef, 0x8c, 0xeb, 0xcf, 0x1a, 0xc5, 0x39, 0x55, 0xf3, 0x8b, 0x59, 0x98, 0x09, + 0x6e, 0xf2, 0x16, 0x32, 0xda, 0xe5, 0xbf, 0xb0, 0x17, 0xe0, 0x34, 0xaf, 0xb0, 0xa2, 0xa2, 0x90, + 0x91, 0x1e, 0x45, 0xea, 0xb2, 0x24, 0xf2, 0xb6, 0x57, 0xd2, 0xcf, 0x76, 0x0d, 0x3c, 0x06, 0x0f, + 0x31, 0x63, 0xe2, 0x4b, 0x7a, 0x51, 0x98, 0x43, 0x91, 0x4c, 0x91, 0xf3, 0x54, 0x2d, 0xa4, 0xbb, + 0x67, 0x22, 0x4a, 0x1e, 0x58, 0xf0, 0xe3, 0x0e, 0xfb, 0xb0, 0x90, 0xc1, 0x0b, 0xb0, 0x5b, 0x0e, + 0x3e, 0x05, 0x1d, 0x1b, 0x8d, 0xe3, 0xb7, 0x87, 0xed, 0xf8, 0x71, 0x53, 0xa3, 0x8e, 0x99, 0xaf, + 0x6a, 0xd4, 0xdf, 0x44, 0x4b, 0x4b, 0x19, 0x24, 0x96, 0x14, 0xbf, 0xbe, 0x6a, 0x3c, 0xe7, 0xba, + 0xf1, 0x9c, 0x5f, 0x8d, 0xe7, 0x7c, 0x5b, 0x7a, 0xad, 0xeb, 0xa5, 0xd7, 0xfa, 0xb1, 0xf4, 0x5a, + 0x9f, 0x8e, 0xfe, 0xb9, 0x98, 0x5d, 0x65, 0xb6, 0x67, 0xbf, 0xd3, 0xb3, 0xdf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xc4, 0xfc, 0x46, 0xdf, 0xc2, 0x02, 0x00, 0x00, } func (m *V4Params) Marshal() (dAtA []byte, err error) { @@ -233,11 +227,11 @@ func (m *V4Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x30 } { - size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.ChainConfig.Size() + i -= size + if _, err := m.ChainConfig.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintParamsV4(dAtA, i, uint64(size)) } i-- diff --git a/x/evm/types/auth_list.go b/x/evm/types/auth_list.go new file mode 100644 index 0000000000..7afae49969 --- /dev/null +++ b/x/evm/types/auth_list.go @@ -0,0 +1,54 @@ +package types + +import ( + sdkmath "cosmossdk.io/math" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/holiman/uint256" +) + +type AuthList []SetCodeAuthorization + +func NewAuthList(ethAuthList *[]ethtypes.SetCodeAuthorization) AuthList { + if ethAuthList == nil { + return nil + } + + al := make([]SetCodeAuthorization, len(*ethAuthList)) + for i, auth := range *ethAuthList { + chainID := sdkmath.NewIntFromBigInt(auth.ChainID.ToBig()) + + al[i] = SetCodeAuthorization{ + ChainID: &chainID, + Address: auth.Address.String(), + Nonce: auth.Nonce, + V: []byte{auth.V}, + R: auth.R.Bytes(), + S: auth.S.Bytes(), + } + } + return al +} + +func (al AuthList) ToEthAuthList() *[]ethtypes.SetCodeAuthorization { + ethAuthList := make([]ethtypes.SetCodeAuthorization, len(al)) + + for i, auth := range al { + chainID := new(uint256.Int) + chainID.SetFromBig(auth.ChainID.BigInt()) + + r := uint256.NewInt(0).SetBytes(auth.R) + s := uint256.NewInt(0).SetBytes(auth.S) + + ethAuthList[i] = ethtypes.SetCodeAuthorization{ + ChainID: *chainID, + Address: common.HexToAddress(auth.Address), + Nonce: auth.Nonce, + V: auth.V[0], + R: *r, + S: *s, + } + } + + return ðAuthList +} diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index babecead77..acef01c2a0 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -68,6 +68,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &DynamicFeeTx{}, &AccessListTx{}, &LegacyTx{}, + &SetCodeTx{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index d21da53da3..9e147483a1 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -310,17 +310,18 @@ func (msg *MsgEthereumTx) AsTransaction() *ethtypes.Transaction { func (msg *MsgEthereumTx) AsMessage(baseFee *big.Int) *core.Message { tx := msg.AsTransaction() ethMsg := &core.Message{ - Nonce: tx.Nonce(), - GasLimit: tx.Gas(), - GasPrice: new(big.Int).Set(tx.GasPrice()), - GasFeeCap: new(big.Int).Set(tx.GasFeeCap()), - GasTipCap: new(big.Int).Set(tx.GasTipCap()), - To: tx.To(), - Value: tx.Value(), - Data: tx.Data(), - AccessList: tx.AccessList(), - SkipNonceChecks: false, - SkipFromEOACheck: false, + Nonce: tx.Nonce(), + GasLimit: tx.Gas(), + GasPrice: new(big.Int).Set(tx.GasPrice()), + GasFeeCap: new(big.Int).Set(tx.GasFeeCap()), + GasTipCap: new(big.Int).Set(tx.GasTipCap()), + To: tx.To(), + Value: tx.Value(), + Data: tx.Data(), + AccessList: tx.AccessList(), + SetCodeAuthorizations: tx.SetCodeAuthorizations(), + SkipNonceChecks: false, + SkipFromEOACheck: false, From: common.BytesToAddress(msg.From), } diff --git a/x/evm/types/msg_test.go b/x/evm/types/msg_test.go index f2ff8992f2..028f38ccb7 100644 --- a/x/evm/types/msg_test.go +++ b/x/evm/types/msg_test.go @@ -8,6 +8,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + "github.com/holiman/uint256" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client" @@ -653,6 +654,37 @@ func (suite *MsgsTestSuite) TestFromEthereumTx() { suite.Require().NoError(err) return tx }}, + {"success, setCodeTx", true, func() *ethtypes.Transaction { + + key1, _ := crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + key2, _ := crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a") + + aa := common.HexToAddress("0x000000000000000000000000000000000000aaaa") + bb := common.HexToAddress("0x000000000000000000000000000000000000bbbb") + + auth1, _ := ethtypes.SignSetCode(key1, ethtypes.SetCodeAuthorization{ + ChainID: *uint256.MustFromBig(suite.chainID), + Address: aa, + Nonce: 1, + }) + auth2, _ := ethtypes.SignSetCode(key2, ethtypes.SetCodeAuthorization{ + Address: bb, + Nonce: 0, + }) + + tx := ethtypes.NewTx(ðtypes.SetCodeTx{ + Nonce: 0, + Data: nil, + To: suite.to, + Value: uint256.NewInt(0), + Gas: 500000, + AuthList: []ethtypes.SetCodeAuthorization{auth1, auth2}, + + }) + tx, err := ethtypes.SignTx(tx, ethtypes.NewPragueSigner(suite.chainID), ethPriv) + suite.Require().NoError(err) + return tx + }}, } for _, tc := range testCases { diff --git a/x/evm/types/set_code_authorization.pb.go b/x/evm/types/set_code_authorization.pb.go new file mode 100644 index 0000000000..780a437dc2 --- /dev/null +++ b/x/evm/types/set_code_authorization.pb.go @@ -0,0 +1,540 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ethermint/evm/v1/set_code_authorization.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// SetCodeAuthorization is an authorization from an account to deploy code at its address. +type SetCodeAuthorization struct { + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + V []byte `protobuf:"bytes,4,opt,name=v,proto3" json:"v,omitempty"` + R []byte `protobuf:"bytes,5,opt,name=r,proto3" json:"r,omitempty"` + S []byte `protobuf:"bytes,6,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *SetCodeAuthorization) Reset() { *m = SetCodeAuthorization{} } +func (m *SetCodeAuthorization) String() string { return proto.CompactTextString(m) } +func (*SetCodeAuthorization) ProtoMessage() {} +func (*SetCodeAuthorization) Descriptor() ([]byte, []int) { + return fileDescriptor_364f7d29ca8c0183, []int{0} +} +func (m *SetCodeAuthorization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetCodeAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetCodeAuthorization.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetCodeAuthorization) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetCodeAuthorization.Merge(m, src) +} +func (m *SetCodeAuthorization) XXX_Size() int { + return m.Size() +} +func (m *SetCodeAuthorization) XXX_DiscardUnknown() { + xxx_messageInfo_SetCodeAuthorization.DiscardUnknown(m) +} + +var xxx_messageInfo_SetCodeAuthorization proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SetCodeAuthorization)(nil), "ethermint.evm.v1.SetCodeAuthorization") +} + +func init() { + proto.RegisterFile("ethermint/evm/v1/set_code_authorization.proto", fileDescriptor_364f7d29ca8c0183) +} + +var fileDescriptor_364f7d29ca8c0183 = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xbd, 0x4e, 0xfb, 0x30, + 0x14, 0x47, 0xe3, 0xff, 0xbf, 0x1f, 0x10, 0x75, 0x40, 0x51, 0x91, 0x2c, 0x86, 0xa4, 0x62, 0x40, + 0x5d, 0xb0, 0x55, 0xb1, 0x31, 0x41, 0xcb, 0x52, 0xc6, 0xb0, 0xb1, 0x54, 0xa9, 0x6d, 0x35, 0x16, + 0xb2, 0x6f, 0x65, 0xbb, 0x16, 0xf0, 0x04, 0x8c, 0x3c, 0x02, 0xcf, 0xc2, 0xc4, 0xd8, 0x11, 0x31, + 0x54, 0x28, 0xdd, 0x78, 0x0a, 0xe4, 0x84, 0xaf, 0xed, 0x77, 0x74, 0x8f, 0xee, 0x70, 0xe2, 0x63, + 0xe1, 0x4a, 0x61, 0x94, 0xd4, 0x8e, 0x0a, 0xaf, 0xa8, 0x1f, 0x51, 0x2b, 0xdc, 0x8c, 0x01, 0x17, + 0xb3, 0x62, 0xe5, 0x4a, 0x30, 0xf2, 0xbe, 0x70, 0x12, 0x34, 0x59, 0x1a, 0x70, 0x90, 0xec, 0xfd, + 0xe8, 0x44, 0x78, 0x45, 0xfc, 0xe8, 0xa0, 0xbf, 0x80, 0x05, 0xd4, 0x47, 0x1a, 0x56, 0xe3, 0x1d, + 0x3e, 0xa3, 0xb8, 0x7f, 0x25, 0xdc, 0x04, 0xb8, 0x38, 0xff, 0xfb, 0x26, 0xb9, 0x8c, 0x77, 0x58, + 0x59, 0x48, 0x3d, 0x93, 0x1c, 0xa3, 0x01, 0x1a, 0xee, 0x8e, 0xe9, 0xdb, 0x26, 0xdb, 0x67, 0x60, + 0x15, 0x58, 0xcb, 0x6f, 0x88, 0x04, 0xaa, 0x0a, 0x57, 0x92, 0xa9, 0x76, 0xd5, 0x26, 0xeb, 0x4e, + 0x82, 0x3c, 0xbd, 0xf8, 0xd8, 0x64, 0x5d, 0xd6, 0xcc, 0xfc, 0x6b, 0xf0, 0x04, 0xc7, 0xdd, 0x82, + 0x73, 0x23, 0xac, 0xc5, 0xff, 0xc2, 0xab, 0xfc, 0x1b, 0x93, 0x7e, 0xdc, 0xd6, 0xa0, 0x99, 0xc0, + 0xff, 0x07, 0x68, 0xd8, 0xca, 0x1b, 0x48, 0x7a, 0x31, 0xf2, 0xb8, 0x35, 0x40, 0xc3, 0x5e, 0x8e, + 0x7c, 0x20, 0x83, 0xdb, 0x0d, 0x99, 0x40, 0x16, 0x77, 0x1a, 0xb2, 0xa7, 0xad, 0x87, 0xa7, 0x2c, + 0x1a, 0x9f, 0xbd, 0x54, 0x29, 0x5a, 0x57, 0x29, 0x7a, 0xaf, 0x52, 0xf4, 0xb8, 0x4d, 0xa3, 0xf5, + 0x36, 0x8d, 0x5e, 0xb7, 0x69, 0x74, 0x7d, 0xb4, 0x90, 0xae, 0x5c, 0xcd, 0x09, 0x03, 0x15, 0xb2, + 0x81, 0xa5, 0xbf, 0x19, 0x6f, 0xeb, 0x90, 0xee, 0x6e, 0x29, 0xec, 0xbc, 0x53, 0xd7, 0x38, 0xf9, + 0x0c, 0x00, 0x00, 0xff, 0xff, 0x21, 0xd2, 0x59, 0x4b, 0x66, 0x01, 0x00, 0x00, +} + +func (m *SetCodeAuthorization) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetCodeAuthorization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetCodeAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x32 + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x2a + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x22 + } + if m.Nonce != 0 { + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSetCodeAuthorization(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSetCodeAuthorization(dAtA []byte, offset int, v uint64) int { + offset -= sovSetCodeAuthorization(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SetCodeAuthorization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovSetCodeAuthorization(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovSetCodeAuthorization(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovSetCodeAuthorization(uint64(m.Nonce)) + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovSetCodeAuthorization(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovSetCodeAuthorization(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovSetCodeAuthorization(uint64(l)) + } + return n +} + +func sovSetCodeAuthorization(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSetCodeAuthorization(x uint64) (n int) { + return sovSetCodeAuthorization(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SetCodeAuthorization) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetCodeAuthorization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetCodeAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + 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 ErrInvalidLengthSetCodeAuthorization + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + 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 ErrInvalidLengthSetCodeAuthorization + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSetCodeAuthorization(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSetCodeAuthorization + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSetCodeAuthorization(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSetCodeAuthorization + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSetCodeAuthorization + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSetCodeAuthorization + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSetCodeAuthorization + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSetCodeAuthorization = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSetCodeAuthorization = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSetCodeAuthorization = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/evm/types/set_code_tx.go b/x/evm/types/set_code_tx.go new file mode 100644 index 0000000000..01397dbd56 --- /dev/null +++ b/x/evm/types/set_code_tx.go @@ -0,0 +1,304 @@ +package types + +import ( + "math/big" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/evmos/ethermint/types" +) + +func newSetCodeTx(tx *ethtypes.Transaction) (*SetCodeTx, error) { + txData := &SetCodeTx{ + Nonce: tx.Nonce(), + Data: tx.Data(), + GasLimit: tx.Gas(), + } + + v, r, s := tx.RawSignatureValues() + if to := tx.To(); to != nil { + txData.To = to.Hex() + } + + if tx.Value() != nil { + amountInt, err := types.SafeNewIntFromBigInt(tx.Value()) + if err != nil { + return nil, err + } + txData.Amount = &amountInt + } + + if tx.GasFeeCap() != nil { + gasFeeCapInt, err := types.SafeNewIntFromBigInt(tx.GasFeeCap()) + if err != nil { + return nil, err + } + txData.GasFeeCap = &gasFeeCapInt + } + + if tx.GasTipCap() != nil { + gasTipCapInt, err := types.SafeNewIntFromBigInt(tx.GasTipCap()) + if err != nil { + return nil, err + } + txData.GasTipCap = &gasTipCapInt + } + + if tx.AccessList() != nil { + al := tx.AccessList() + txData.Accesses = NewAccessList(&al) + } + + if tx.SetCodeAuthorizations() != nil { + al := tx.SetCodeAuthorizations() + txData.AuthList = NewAuthList(&al) + } + + txData.SetSignatureValues(tx.ChainId(), v, r, s) + return txData, nil +} + +// TxType returns the tx type +func (tx *SetCodeTx) TxType() uint8 { + return ethtypes.SetCodeTxType +} + +// Copy returns an instance with the same field values +func (tx *SetCodeTx) Copy() TxData { + return &SetCodeTx{ + ChainID: tx.ChainID, + Nonce: tx.Nonce, + GasTipCap: tx.GasTipCap, + GasFeeCap: tx.GasFeeCap, + GasLimit: tx.GasLimit, + To: tx.To, + Amount: tx.Amount, + Data: common.CopyBytes(tx.Data), + Accesses: tx.Accesses, + V: common.CopyBytes(tx.V), + R: common.CopyBytes(tx.R), + S: common.CopyBytes(tx.S), + } +} + +// GetChainID returns the chain id field from the SetCodeTx +func (tx *SetCodeTx) GetChainID() *big.Int { + if tx.ChainID == nil { + return nil + } + + return tx.ChainID.BigInt() +} + +// GetAccessList returns the AccessList field. +func (tx *SetCodeTx) GetAccessList() ethtypes.AccessList { + if tx.Accesses == nil { + return nil + } + return *tx.Accesses.ToEthAccessList() +} + +// GetAuthList returns the AuthList field. +func (tx *SetCodeTx) GetAuthList() *[]ethtypes.SetCodeAuthorization { + if tx.AuthList == nil { + return nil + } + return tx.AuthList.ToEthAuthList() +} + +// GetData returns the a copy of the input data bytes. +func (tx *SetCodeTx) GetData() []byte { + return common.CopyBytes(tx.Data) +} + +// GetGas returns the gas limit. +func (tx *SetCodeTx) GetGas() uint64 { + return tx.GasLimit +} + +// GetGasPrice returns the gas fee cap field. +func (tx *SetCodeTx) GetGasPrice() *big.Int { + return tx.GetGasFeeCap() +} + +// GetGasTipCap returns the gas tip cap field. +func (tx *SetCodeTx) GetGasTipCap() *big.Int { + if tx.GasTipCap == nil { + return nil + } + return tx.GasTipCap.BigInt() +} + +// GetGasFeeCap returns the gas fee cap field. +func (tx *SetCodeTx) GetGasFeeCap() *big.Int { + if tx.GasFeeCap == nil { + return nil + } + return tx.GasFeeCap.BigInt() +} + +// GetValue returns the tx amount. +func (tx *SetCodeTx) GetValue() *big.Int { + if tx.Amount == nil { + return nil + } + + return tx.Amount.BigInt() +} + +// GetNonce returns the account sequence for the transaction. +func (tx *SetCodeTx) GetNonce() uint64 { return tx.Nonce } + +// GetTo returns the pointer to the recipient address. +func (tx *SetCodeTx) GetTo() *common.Address { + if tx.To == "" { + return nil + } + to := common.HexToAddress(tx.To) + return &to +} + +// AsEthereumData returns an SetCodeTx transaction tx from the proto-formatted +// TxData defined on the Cosmos EVM. +func (tx *SetCodeTx) AsEthereumData() ethtypes.TxData { + v, r, s := tx.GetRawSignatureValues() + return ðtypes.SetCodeTx{ + ChainID: BigToUint256(tx.GetChainID()), + Nonce: tx.GetNonce(), + GasTipCap: BigToUint256(tx.GetGasTipCap()), + GasFeeCap: BigToUint256(tx.GetGasFeeCap()), + Gas: tx.GetGas(), + To: *tx.GetTo(), + Value: BigToUint256(tx.GetValue()), + Data: tx.GetData(), + AuthList: *tx.GetAuthList(), + AccessList: tx.GetAccessList(), + V: BigToUint256(v), + R: BigToUint256(r), + S: BigToUint256(s), + } +} + +// GetRawSignatureValues returns the V, R, S signature values of the transaction. +// The return values should not be modified by the caller. +func (tx *SetCodeTx) GetRawSignatureValues() (v, r, s *big.Int) { + return rawSignatureValues(tx.V, tx.R, tx.S) +} + +// SetSignatureValues sets the signature values to the transaction. +func (tx *SetCodeTx) SetSignatureValues(chainID, v, r, s *big.Int) { + if v != nil { + tx.V = v.Bytes() + } + if r != nil { + tx.R = r.Bytes() + } + if s != nil { + tx.S = s.Bytes() + } + if chainID != nil { + chainIDInt := sdkmath.NewIntFromBigInt(chainID) + tx.ChainID = &chainIDInt + } +} + +// Validate performs a stateless validation of the tx fields. +func (tx SetCodeTx) Validate() error { + if len(tx.To) == 0 { + return errorsmod.Wrap(core.ErrSetCodeTxCreate, "to address cannot be empty") + } + + if len(tx.AuthList) == 0 { + return errorsmod.Wrap(core.ErrEmptyAuthList, "auth list cannot be empty") + } + + if tx.GasTipCap == nil { + return errorsmod.Wrap(ErrInvalidGasCap, "gas tip cap cannot nil") + } + + if tx.GasFeeCap == nil { + return errorsmod.Wrap(ErrInvalidGasCap, "gas fee cap cannot nil") + } + + if tx.GasTipCap.IsNegative() { + return errorsmod.Wrapf(ErrInvalidGasCap, "gas tip cap cannot be negative %s", tx.GasTipCap) + } + + if tx.GasFeeCap.IsNegative() { + return errorsmod.Wrapf(ErrInvalidGasCap, "gas fee cap cannot be negative %s", tx.GasFeeCap) + } + + if !types.IsValidInt256(tx.GetGasTipCap()) { + return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") + } + + if !types.IsValidInt256(tx.GetGasFeeCap()) { + return errorsmod.Wrap(ErrInvalidGasCap, "out of bound") + } + + if tx.GasFeeCap.LT(*tx.GasTipCap) { + 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 errorsmod.Wrap(ErrInvalidGasFee, "out of bound") + } + + amount := tx.GetValue() + // Amount can be 0 + if amount != nil && amount.Sign() == -1 { + return errorsmod.Wrapf(ErrInvalidAmount, "amount cannot be negative %s", amount) + } + if !types.IsValidInt256(amount) { + return errorsmod.Wrap(ErrInvalidAmount, "out of bound") + } + + if tx.To != "" { + if err := types.ValidateAddress(tx.To); err != nil { + return errorsmod.Wrap(err, "invalid to address") + } + } + + if tx.GetChainID() == nil { + return errorsmod.Wrap( + errortypes.ErrInvalidChainID, + "chain ID must be present on AccessList txs", + ) + } + + return nil +} + +// Fee returns gasprice * gaslimit. +func (tx SetCodeTx) Fee() *big.Int { + return fee(tx.GetGasFeeCap(), tx.GasLimit) +} + +// Cost returns amount + gasprice * gaslimit. +func (tx SetCodeTx) Cost() *big.Int { + return cost(tx.Fee(), tx.GetValue()) +} + +// EffectiveGasPrice returns the effective gas price +func (tx *SetCodeTx) EffectiveGasPrice(baseFee *big.Int) *big.Int { + return EffectiveGasPrice(baseFee, tx.GasFeeCap.BigInt(), tx.GasTipCap.BigInt()) +} + +// EffectiveFee returns effective_gasprice * gaslimit. +func (tx SetCodeTx) EffectiveFee(baseFee *big.Int) *big.Int { + return fee(tx.EffectiveGasPrice(baseFee), tx.GasLimit) +} + +// EffectiveCost returns amount + effective_gasprice * gaslimit. +func (tx SetCodeTx) EffectiveCost(baseFee *big.Int) *big.Int { + return cost(tx.EffectiveFee(baseFee), tx.GetValue()) +} diff --git a/x/evm/types/set_code_tx_test.go b/x/evm/types/set_code_tx_test.go new file mode 100644 index 0000000000..88376569ae --- /dev/null +++ b/x/evm/types/set_code_tx_test.go @@ -0,0 +1,648 @@ +package types + +import ( + "math/big" + "testing" + + sdkmath "cosmossdk.io/math" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/evmos/ethermint/tests" + "github.com/holiman/uint256" + "github.com/stretchr/testify/suite" +) + +type SetCodeTxTestSuite struct { + suite.Suite + + sdkInt sdkmath.Int + uint64 uint64 + hexUint64 hexutil.Uint64 + uint256Int *uint256.Int + sdkZeroInt sdkmath.Int + sdkMinusOneInt sdkmath.Int + invalidAddr string + addr common.Address + hexAddr string + hexDataBytes hexutil.Bytes + hexInputBytes hexutil.Bytes +} + +func (suite *SetCodeTxTestSuite) SetupTest() { + suite.sdkInt = sdkmath.NewInt(100) + suite.uint64 = suite.sdkInt.Uint64() + suite.hexUint64 = hexutil.Uint64(100) + suite.uint256Int = uint256.NewInt(1) + suite.sdkZeroInt = sdkmath.ZeroInt() + suite.sdkMinusOneInt = sdkmath.NewInt(-1) + suite.invalidAddr = "123456" + suite.addr = tests.GenerateAddress() + suite.hexAddr = suite.addr.Hex() + suite.hexDataBytes = hexutil.Bytes([]byte("data")) + suite.hexInputBytes = hexutil.Bytes([]byte("input")) +} + +func TestSetCodeTxTestSuite(t *testing.T) { + suite.Run(t, new(SetCodeTxTestSuite)) +} + +func (suite *SetCodeTxTestSuite) TestNewSetCodeTx() { + testCases := []struct { + name string + tx *ethtypes.Transaction + }{ + { + "non-empty tx", + ethtypes.NewTx(ðtypes.SetCodeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: uint256.NewInt(1), + AccessList: ethtypes.AccessList{}, + AuthList: []ethtypes.SetCodeAuthorization{}, + To: suite.addr, + V: suite.uint256Int, + R: suite.uint256Int, + S: suite.uint256Int, + }), + }, + } + for _, tc := range testCases { + tx, err := newSetCodeTx(tc.tx) + suite.Require().NoError(err) + suite.Require().NotEmpty(tx) + suite.Require().Equal(uint8(4), tx.TxType()) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxAsEthereumData() { + feeConfig := ðtypes.SetCodeTx{ + Nonce: 1, + Data: []byte("data"), + Gas: 100, + Value: uint256.NewInt(1), + AccessList: ethtypes.AccessList{}, + To: suite.addr, + V: suite.uint256Int, + R: suite.uint256Int, + S: suite.uint256Int, + } + + tx := ethtypes.NewTx(feeConfig) + + SetCodeTx, err := newSetCodeTx(tx) + suite.Require().NoError(err) + + res := SetCodeTx.AsEthereumData() + resTx := ethtypes.NewTx(res) + + suite.Require().Equal(feeConfig.Nonce, resTx.Nonce()) + suite.Require().Equal(feeConfig.Data, resTx.Data()) + suite.Require().Equal(feeConfig.Gas, resTx.Gas()) + suite.Require().Equal(feeConfig.Value.ToBig(), resTx.Value()) + suite.Require().Equal(feeConfig.AccessList, resTx.AccessList()) + suite.Require().Equal(feeConfig.To, *resTx.To()) +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxCopy() { + tx := &SetCodeTx{} + txCopy := tx.Copy() + + suite.Require().Equal(&SetCodeTx{}, txCopy) +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetChainID() { + testCases := []struct { + name string + tx SetCodeTx + exp *big.Int + }{ + { + "empty chainID", + SetCodeTx{ + ChainID: nil, + }, + nil, + }, + { + "non-empty chainID", + SetCodeTx{ + ChainID: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetChainID() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetAccessList() { + testCases := []struct { + name string + tx SetCodeTx + exp ethtypes.AccessList + }{ + { + "empty accesses", + SetCodeTx{ + Accesses: nil, + }, + nil, + }, + { + "nil", + SetCodeTx{ + Accesses: NewAccessList(nil), + }, + nil, + }, + { + "non-empty accesses", + SetCodeTx{ + Accesses: AccessList{ + { + Address: suite.hexAddr, + StorageKeys: []string{}, + }, + }, + }, + ethtypes.AccessList{ + { + Address: suite.addr, + StorageKeys: []common.Hash{}, + }, + }, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetAccessList() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetData() { + testCases := []struct { + name string + tx SetCodeTx + }{ + { + "non-empty transaction", + SetCodeTx{ + Data: nil, + }, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetData() + + suite.Require().Equal(tc.tx.Data, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetGas() { + testCases := []struct { + name string + tx SetCodeTx + exp uint64 + }{ + { + "non-empty gas", + SetCodeTx{ + GasLimit: suite.uint64, + }, + suite.uint64, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGas() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetGasPrice() { + testCases := []struct { + name string + tx SetCodeTx + exp *big.Int + }{ + { + "non-empty gasFeeCap", + SetCodeTx{ + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasPrice() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetGasTipCap() { + testCases := []struct { + name string + tx SetCodeTx + exp *big.Int + }{ + { + "empty gasTipCap", + SetCodeTx{ + GasTipCap: nil, + }, + nil, + }, + { + "non-empty gasTipCap", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasTipCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetGasFeeCap() { + testCases := []struct { + name string + tx SetCodeTx + exp *big.Int + }{ + { + "empty gasFeeCap", + SetCodeTx{ + GasFeeCap: nil, + }, + nil, + }, + { + "non-empty gasFeeCap", + SetCodeTx{ + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetGasFeeCap() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetValue() { + testCases := []struct { + name string + tx SetCodeTx + exp *big.Int + }{ + { + "empty amount", + SetCodeTx{ + Amount: nil, + }, + nil, + }, + { + "non-empty amount", + SetCodeTx{ + Amount: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetValue() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetNonce() { + testCases := []struct { + name string + tx SetCodeTx + exp uint64 + }{ + { + "non-empty nonce", + SetCodeTx{ + Nonce: suite.uint64, + }, + suite.uint64, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetNonce() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxGetTo() { + testCases := []struct { + name string + tx SetCodeTx + exp *common.Address + }{ + { + "empty suite.address", + SetCodeTx{ + To: "", + }, + nil, + }, + { + "non-empty suite.address", + SetCodeTx{ + To: suite.hexAddr, + }, + &suite.addr, + }, + } + + for _, tc := range testCases { + actual := tc.tx.GetTo() + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxSetSignatureValues() { + testCases := []struct { + name string + chainID *big.Int + r *big.Int + v *big.Int + s *big.Int + }{ + { + "empty values", + nil, + nil, + nil, + nil, + }, + { + "non-empty values", + big.NewInt(1), + big.NewInt(2), + big.NewInt(3), + big.NewInt(4), + }, + } + + for _, tc := range testCases { + tx := &SetCodeTx{} + tx.SetSignatureValues(tc.chainID, tc.v, tc.r, tc.s) + + v, r, s := tx.GetRawSignatureValues() + chainID := tx.GetChainID() + + suite.Require().Equal(tc.v, v, tc.name) + suite.Require().Equal(tc.r, r, tc.name) + suite.Require().Equal(tc.s, s, tc.name) + suite.Require().Equal(tc.chainID, chainID, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxValidate() { + testCases := []struct { + name string + tx SetCodeTx + expError bool + }{ + { + "empty", + SetCodeTx{}, + true, + }, + { + "gas tip cap is nil", + SetCodeTx{ + GasTipCap: nil, + }, + true, + }, + { + "gas fee cap is nil", + SetCodeTx{ + GasTipCap: &suite.sdkZeroInt, + }, + true, + }, + { + "gas tip cap is negative", + SetCodeTx{ + GasTipCap: &suite.sdkMinusOneInt, + GasFeeCap: &suite.sdkZeroInt, + }, + true, + }, + { + "gas tip cap is negative", + SetCodeTx{ + GasTipCap: &suite.sdkZeroInt, + GasFeeCap: &suite.sdkMinusOneInt, + }, + true, + }, + { + "gas fee cap < gas tip cap", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkZeroInt, + }, + true, + }, + { + "amount is negative", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkMinusOneInt, + }, + true, + }, + { + "to suite.address is invalid", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.invalidAddr, + }, + true, + }, + { + "chain ID not present on AccessList txs", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.hexAddr, + ChainID: nil, + }, + true, + }, + { + "to address is empty", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: "", + }, + true, + }, + { + "auth list is empty", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.hexAddr, + ChainID: &suite.sdkInt, + }, + true, + }, + { + "no errors", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + Amount: &suite.sdkInt, + To: suite.hexAddr, + ChainID: &suite.sdkInt, + AuthList: []SetCodeAuthorization{ + { + ChainID: &suite.sdkInt, + Address: suite.addr.Hex(), + Nonce: suite.uint64, + V: []byte{1}, + R: []byte{2}, + S: []byte{3}, + }, + }, + }, + false, + }, + } + + for _, tc := range testCases { + err := tc.tx.Validate() + + if tc.expError { + suite.Require().Error(err, tc.name) + continue + } + + suite.Require().NoError(err, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxEffectiveGasPrice() { + testCases := []struct { + name string + tx SetCodeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveGasPrice(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxEffectiveFee() { + testCases := []struct { + name string + tx SetCodeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + GasLimit: uint64(1), + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveFee(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxEffectiveCost() { + testCases := []struct { + name string + tx SetCodeTx + baseFee *big.Int + exp *big.Int + }{ + { + "non-empty dynamic fee tx", + SetCodeTx{ + GasTipCap: &suite.sdkInt, + GasFeeCap: &suite.sdkInt, + GasLimit: uint64(1), + Amount: &suite.sdkZeroInt, + }, + (&suite.sdkInt).BigInt(), + (&suite.sdkInt).BigInt(), + }, + } + + for _, tc := range testCases { + actual := tc.tx.EffectiveCost(tc.baseFee) + + suite.Require().Equal(tc.exp, actual, tc.name) + } +} + +func (suite *SetCodeTxTestSuite) TestSetCodeTxFeeCost() { + tx := &SetCodeTx{} + suite.Require().Panics(func() { tx.Fee() }, "should panic") + suite.Require().Panics(func() { tx.Cost() }, "should panic") +} diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index e889b73d00..ba9a97f612 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -261,6 +261,70 @@ func (m *DynamicFeeTx) XXX_DiscardUnknown() { var xxx_messageInfo_DynamicFeeTx proto.InternalMessageInfo +// SetCodeTx implements the EIP-7702 transaction type. +type SetCodeTx struct { + // chain_id of the destination EVM chain + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.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 + GasTipCap *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_tip_cap,omitempty"` + // gas_fee_cap defines the max value for the gas fee + GasFeeCap *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=cosmossdk.io/math.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"` + // 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 *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,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"` + // auth_list is a list of tuples that indicate what code the signer of each tuple desires to execute in the context of + // their EOA + AuthList AuthList `protobuf:"bytes,10,rep,name=auth_list,json=authList,proto3,castrepeated=AuthList" json:"authList"` + // v defines the signature value + V []byte `protobuf:"bytes,11,opt,name=v,proto3" json:"v,omitempty"` + // r defines the signature value + R []byte `protobuf:"bytes,12,opt,name=r,proto3" json:"r,omitempty"` + // s define the signature value + S []byte `protobuf:"bytes,13,opt,name=s,proto3" json:"s,omitempty"` +} + +func (m *SetCodeTx) Reset() { *m = SetCodeTx{} } +func (m *SetCodeTx) String() string { return proto.CompactTextString(m) } +func (*SetCodeTx) ProtoMessage() {} +func (*SetCodeTx) Descriptor() ([]byte, []int) { + return fileDescriptor_f75ac0a12d075f21, []int{4} +} +func (m *SetCodeTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetCodeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetCodeTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetCodeTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetCodeTx.Merge(m, src) +} +func (m *SetCodeTx) XXX_Size() int { + return m.Size() +} +func (m *SetCodeTx) XXX_DiscardUnknown() { + xxx_messageInfo_SetCodeTx.DiscardUnknown(m) +} + +var xxx_messageInfo_SetCodeTx proto.InternalMessageInfo + // ExtensionOptionsEthereumTx is an extension option for ethereum transactions type ExtensionOptionsEthereumTx struct { } @@ -269,7 +333,7 @@ func (m *ExtensionOptionsEthereumTx) Reset() { *m = ExtensionOptionsEthe func (m *ExtensionOptionsEthereumTx) String() string { return proto.CompactTextString(m) } func (*ExtensionOptionsEthereumTx) ProtoMessage() {} func (*ExtensionOptionsEthereumTx) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{4} + return fileDescriptor_f75ac0a12d075f21, []int{5} } func (m *ExtensionOptionsEthereumTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -322,7 +386,7 @@ func (m *MsgEthereumTxResponse) Reset() { *m = MsgEthereumTxResponse{} } func (m *MsgEthereumTxResponse) String() string { return proto.CompactTextString(m) } func (*MsgEthereumTxResponse) ProtoMessage() {} func (*MsgEthereumTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{5} + return fileDescriptor_f75ac0a12d075f21, []int{6} } func (m *MsgEthereumTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -364,7 +428,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{6} + return fileDescriptor_f75ac0a12d075f21, []int{7} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -416,7 +480,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f75ac0a12d075f21, []int{7} + return fileDescriptor_f75ac0a12d075f21, []int{8} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -450,6 +514,7 @@ func init() { proto.RegisterType((*LegacyTx)(nil), "ethermint.evm.v1.LegacyTx") proto.RegisterType((*AccessListTx)(nil), "ethermint.evm.v1.AccessListTx") proto.RegisterType((*DynamicFeeTx)(nil), "ethermint.evm.v1.DynamicFeeTx") + proto.RegisterType((*SetCodeTx)(nil), "ethermint.evm.v1.SetCodeTx") proto.RegisterType((*ExtensionOptionsEthereumTx)(nil), "ethermint.evm.v1.ExtensionOptionsEthereumTx") proto.RegisterType((*MsgEthereumTxResponse)(nil), "ethermint.evm.v1.MsgEthereumTxResponse") proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.evm.v1.MsgUpdateParams") @@ -459,74 +524,79 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 1064 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0xeb, 0x5f, 0x63, 0x37, 0xad, 0x46, 0x89, 0xba, 0xb6, 0x88, 0xd7, 0x6c, 0xf9, - 0xe1, 0x16, 0x65, 0x57, 0x0d, 0xa8, 0x52, 0x73, 0x22, 0xdb, 0x24, 0x50, 0x94, 0x88, 0x6a, 0x71, - 0x2f, 0x80, 0x64, 0x4d, 0x76, 0x27, 0xeb, 0x55, 0xbd, 0x3b, 0xab, 0x9d, 0xb1, 0xb1, 0x91, 0x90, - 0xaa, 0x9e, 0x38, 0x52, 0xf1, 0x0f, 0x70, 0xe6, 0xd4, 0x43, 0xcf, 0x5c, 0xb8, 0x54, 0x9c, 0x2a, - 0xb8, 0xa0, 0x1e, 0x0c, 0x4a, 0x90, 0x2a, 0x72, 0xe4, 0xcc, 0x01, 0xcd, 0xcc, 0x3a, 0xb6, 0x6b, - 0x9c, 0x40, 0x25, 0xb8, 0xcd, 0x9b, 0xf7, 0xbd, 0x99, 0xf7, 0xbe, 0x6f, 0xf6, 0xbd, 0x05, 0x55, - 0xcc, 0x3a, 0x38, 0x09, 0x83, 0x88, 0x59, 0xb8, 0x1f, 0x5a, 0xfd, 0xeb, 0x16, 0x1b, 0x98, 0x71, - 0x42, 0x18, 0x81, 0x97, 0x4e, 0x5d, 0x26, 0xee, 0x87, 0x66, 0xff, 0x7a, 0xed, 0xb2, 0x4b, 0x68, - 0x48, 0xa8, 0x15, 0x52, 0x9f, 0x23, 0x43, 0xea, 0x4b, 0x68, 0xad, 0x2a, 0x1d, 0x6d, 0x61, 0x59, - 0xd2, 0x48, 0x5d, 0x2b, 0x3e, 0xf1, 0x89, 0xdc, 0xe7, 0xab, 0x74, 0xf7, 0x15, 0x9f, 0x10, 0xbf, - 0x8b, 0x2d, 0x14, 0x07, 0x16, 0x8a, 0x22, 0xc2, 0x10, 0x0b, 0x48, 0x34, 0x8e, 0xa9, 0xa6, 0x5e, - 0x61, 0x1d, 0xf4, 0x0e, 0x2d, 0x14, 0x0d, 0x53, 0xd7, 0x95, 0xb9, 0x7c, 0x91, 0xeb, 0x62, 0x4a, - 0xdb, 0xac, 0x17, 0x77, 0x71, 0x0a, 0xaa, 0xcd, 0x81, 0xba, 0x64, 0x9c, 0xea, 0xda, 0x9c, 0x2f, - 0x46, 0x09, 0x0a, 0xd3, 0xab, 0x8d, 0xfb, 0x19, 0x70, 0x61, 0x9f, 0xfa, 0x3b, 0x1c, 0x84, 0x7b, - 0x61, 0x6b, 0x00, 0x9b, 0x40, 0xf5, 0x10, 0x43, 0x9a, 0xd2, 0x50, 0x9a, 0xe5, 0x8d, 0x15, 0x53, - 0xe6, 0x66, 0x8e, 0x73, 0x33, 0xb7, 0xa2, 0xa1, 0x23, 0x10, 0xb0, 0x0a, 0x54, 0x1a, 0x7c, 0x8e, - 0xb5, 0x4c, 0x43, 0x69, 0x2a, 0x76, 0xee, 0x64, 0xa4, 0x2b, 0xeb, 0x8e, 0xd8, 0x82, 0xef, 0x80, - 0x8b, 0x1e, 0x8e, 0x13, 0xec, 0x22, 0x86, 0xbd, 0x76, 0x07, 0xd1, 0x8e, 0x96, 0x6d, 0x28, 0xcd, - 0x92, 0x5d, 0xfe, 0x63, 0xa4, 0x17, 0x92, 0x6e, 0xbc, 0x69, 0xac, 0x1b, 0xce, 0xf2, 0x04, 0xf3, - 0x3e, 0xa2, 0x1d, 0xf8, 0xd6, 0x4c, 0xd4, 0x61, 0x42, 0x42, 0x4d, 0x15, 0x51, 0x19, 0x4d, 0x99, - 0x06, 0xef, 0x26, 0x24, 0x84, 0x10, 0xa8, 0x02, 0x91, 0x6b, 0x28, 0xcd, 0x8a, 0x23, 0xd6, 0xf0, - 0x35, 0x90, 0x4d, 0xd0, 0x67, 0x5a, 0x9e, 0x6f, 0xd9, 0xf0, 0xc9, 0x48, 0x5f, 0x7a, 0x36, 0xd2, - 0xc1, 0xa4, 0x38, 0x87, 0xbb, 0x37, 0x2f, 0x7c, 0xf9, 0x8d, 0xbe, 0xf4, 0xe0, 0xf9, 0xa3, 0x6b, - 0x22, 0xc8, 0x78, 0x98, 0x01, 0xc5, 0x3d, 0xec, 0x23, 0x77, 0xd8, 0x1a, 0xc0, 0x15, 0x90, 0x8b, - 0x48, 0xe4, 0x62, 0x51, 0xbe, 0xea, 0x48, 0x03, 0xde, 0x00, 0x25, 0x1f, 0x71, 0xb9, 0x03, 0x57, - 0x96, 0x5b, 0xb2, 0xab, 0xcf, 0x46, 0xfa, 0xaa, 0x54, 0x9e, 0x7a, 0xf7, 0xcc, 0x80, 0x58, 0x21, - 0x62, 0x1d, 0xf3, 0x76, 0xc4, 0x9c, 0xa2, 0x8f, 0xe8, 0x1d, 0x0e, 0x85, 0x75, 0x90, 0xf5, 0x11, - 0x15, 0xa5, 0xab, 0x76, 0xe5, 0x68, 0xa4, 0x17, 0xdf, 0x43, 0x74, 0x2f, 0x08, 0x03, 0xe6, 0x70, - 0x07, 0x5c, 0x06, 0x19, 0x46, 0x64, 0x8d, 0x4e, 0x86, 0x11, 0x78, 0x13, 0xe4, 0xfa, 0xa8, 0xdb, - 0xc3, 0xa2, 0xa8, 0x92, 0x7d, 0x65, 0xe1, 0x1d, 0x47, 0x23, 0x3d, 0xbf, 0x15, 0x92, 0x5e, 0xc4, - 0x1c, 0x19, 0xc1, 0xe9, 0x10, 0xb2, 0xe5, 0x25, 0x1d, 0x42, 0xa0, 0x0a, 0x50, 0xfa, 0x5a, 0x41, - 0x6c, 0x28, 0x7d, 0x6e, 0x25, 0x5a, 0x51, 0x5a, 0x09, 0xb7, 0xa8, 0x56, 0x92, 0x16, 0xdd, 0x5c, - 0xe6, 0x94, 0xfc, 0xf0, 0x78, 0x3d, 0xdf, 0x1a, 0x6c, 0x23, 0x86, 0x8c, 0xef, 0xb2, 0xa0, 0xb2, - 0x25, 0x1e, 0xda, 0x5e, 0x40, 0x59, 0x6b, 0x00, 0x3f, 0x00, 0x45, 0xb7, 0x83, 0x82, 0xa8, 0x1d, - 0x78, 0x82, 0x9a, 0x92, 0x6d, 0x9d, 0x95, 0x5c, 0xe1, 0x16, 0x07, 0xdf, 0xde, 0x3e, 0x19, 0xe9, - 0x05, 0x57, 0x2e, 0x9d, 0x74, 0xe1, 0x4d, 0x38, 0xce, 0x2c, 0xe4, 0x38, 0xfb, 0xaf, 0x39, 0x56, - 0xcf, 0xe6, 0x38, 0x37, 0xcf, 0x71, 0xfe, 0xa5, 0x39, 0x2e, 0x4c, 0x71, 0xfc, 0x09, 0x28, 0xca, - 0x2f, 0x12, 0x53, 0xad, 0xd8, 0xc8, 0x36, 0xcb, 0x1b, 0x6b, 0xe6, 0x8b, 0x8d, 0xc4, 0x94, 0x54, - 0xb6, 0xf8, 0x27, 0x6b, 0x37, 0xf8, 0xb3, 0x3c, 0x19, 0xe9, 0x00, 0x9d, 0xf2, 0xfb, 0xed, 0x2f, - 0x3a, 0x98, 0xb0, 0xed, 0x9c, 0x1e, 0x28, 0x05, 0x2c, 0xcd, 0x08, 0x08, 0x66, 0x04, 0x2c, 0x2f, - 0x12, 0xf0, 0xcf, 0x2c, 0xa8, 0x6c, 0x0f, 0x23, 0x14, 0x06, 0xee, 0x2e, 0xc6, 0xff, 0x8b, 0x80, - 0x37, 0x41, 0x99, 0x0b, 0xc8, 0x82, 0xb8, 0xed, 0xa2, 0xf8, 0x7c, 0x09, 0xb9, 0xdc, 0xad, 0x20, - 0xbe, 0x85, 0xe2, 0x71, 0xe8, 0x21, 0xc6, 0x22, 0x54, 0xfd, 0x27, 0xa1, 0xbb, 0x18, 0xf3, 0xd0, - 0x54, 0xfe, 0xdc, 0xd9, 0xf2, 0xe7, 0xe7, 0xe5, 0x2f, 0xbc, 0xb4, 0xfc, 0xc5, 0x05, 0xf2, 0x97, - 0xfe, 0x13, 0xf9, 0xc1, 0x8c, 0xfc, 0xe5, 0x19, 0xf9, 0x2b, 0x8b, 0xe4, 0x37, 0x40, 0x6d, 0x67, - 0xc0, 0x70, 0x44, 0x03, 0x12, 0x7d, 0x18, 0x8b, 0x59, 0x33, 0xe9, 0x82, 0x9b, 0x2a, 0x47, 0x1b, - 0xdf, 0x2b, 0x60, 0x75, 0xa6, 0xf5, 0x3b, 0x98, 0xc6, 0x24, 0xa2, 0xa2, 0x50, 0xd1, 0xb2, 0xc5, - 0x3b, 0x71, 0xc4, 0x1a, 0x5e, 0x05, 0x6a, 0x97, 0xf8, 0x54, 0xcb, 0x88, 0x22, 0x57, 0xe7, 0x8b, - 0xdc, 0x23, 0xbe, 0x23, 0x20, 0xf0, 0x12, 0xc8, 0x26, 0x98, 0x89, 0x07, 0x50, 0x71, 0xf8, 0x12, - 0x56, 0x41, 0xb1, 0x1f, 0xb6, 0x71, 0x92, 0x90, 0x24, 0xed, 0x76, 0x85, 0x7e, 0xb8, 0xc3, 0x4d, - 0xee, 0xe2, 0xd2, 0xf7, 0x28, 0xf6, 0xa4, 0x88, 0x4e, 0xc1, 0x47, 0xf4, 0x2e, 0xc5, 0x1e, 0x5c, - 0x03, 0xe0, 0xa0, 0x4b, 0xdc, 0x7b, 0x72, 0x7e, 0xc8, 0xc6, 0x56, 0x12, 0x3b, 0x7c, 0x5a, 0xa4, - 0x55, 0x3c, 0x54, 0xc0, 0xc5, 0x7d, 0xea, 0xdf, 0x8d, 0x3d, 0xc4, 0xf0, 0x1d, 0x31, 0xda, 0x78, - 0x2b, 0x41, 0x3d, 0xd6, 0x21, 0x49, 0xc0, 0x86, 0xe9, 0x63, 0xd7, 0x7e, 0x7c, 0xbc, 0xbe, 0x92, - 0x0e, 0xea, 0x2d, 0xcf, 0x4b, 0x30, 0xa5, 0x1f, 0xb1, 0x24, 0x88, 0x7c, 0x67, 0x02, 0x85, 0x37, - 0x40, 0x5e, 0x0e, 0x47, 0xf1, 0xb0, 0xcb, 0x1b, 0xda, 0x7c, 0x95, 0xf2, 0x06, 0x5b, 0xe5, 0x2a, - 0x3a, 0x29, 0x7a, 0x73, 0x99, 0x0f, 0x93, 0xc9, 0x39, 0x46, 0x15, 0x5c, 0x7e, 0x21, 0xa5, 0x31, - 0xb5, 0x1b, 0xbf, 0x2b, 0x20, 0xbb, 0x4f, 0x7d, 0xf8, 0x05, 0x98, 0x1a, 0x4b, 0x50, 0x9f, 0xbf, - 0x68, 0x46, 0x99, 0xda, 0x9b, 0xe7, 0x00, 0xc6, 0xe7, 0x1b, 0xaf, 0x3f, 0xf8, 0xe9, 0xb7, 0xaf, - 0x33, 0xba, 0xb1, 0x66, 0xcd, 0xcd, 0x7d, 0x9c, 0xa2, 0xdb, 0x6c, 0x00, 0x3f, 0x05, 0x95, 0x19, - 0xc6, 0x5e, 0xfd, 0xdb, 0xf3, 0xa7, 0x21, 0xb5, 0xab, 0xe7, 0x42, 0xc6, 0x49, 0xd4, 0x72, 0xf7, - 0x9f, 0x3f, 0xba, 0xa6, 0xd8, 0xef, 0x3e, 0x39, 0xaa, 0x2b, 0x4f, 0x8f, 0xea, 0xca, 0xaf, 0x47, - 0x75, 0xe5, 0xab, 0xe3, 0xfa, 0xd2, 0xd3, 0xe3, 0xfa, 0xd2, 0xcf, 0xc7, 0xf5, 0xa5, 0x8f, 0xdf, - 0xf0, 0x03, 0xd6, 0xe9, 0x1d, 0x98, 0x2e, 0x09, 0x79, 0x76, 0x84, 0x4e, 0x65, 0x3b, 0x10, 0xf9, - 0xb2, 0x61, 0x8c, 0xe9, 0x41, 0x5e, 0xfc, 0x75, 0xbc, 0xfd, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xb5, 0x29, 0xc9, 0x6e, 0xb6, 0x09, 0x00, 0x00, + // 1147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0xeb, 0x5f, 0x63, 0x27, 0xad, 0x46, 0x89, 0xba, 0xb6, 0x1a, 0xaf, 0x71, 0xa1, + 0xb8, 0x45, 0xb1, 0xd5, 0x80, 0x2a, 0x35, 0x27, 0xbc, 0xf9, 0x01, 0x45, 0x89, 0xa8, 0xb6, 0xee, + 0x05, 0x90, 0xac, 0xc9, 0xee, 0x64, 0xbd, 0xaa, 0x77, 0x67, 0xb5, 0x33, 0x36, 0x76, 0x25, 0xa4, + 0xaa, 0x27, 0x8e, 0x54, 0xfc, 0x03, 0x9c, 0x39, 0xf5, 0xd0, 0x33, 0x17, 0x2e, 0x15, 0xa7, 0x0a, + 0x2e, 0xa8, 0x42, 0x06, 0x25, 0x48, 0x15, 0x39, 0x72, 0xe6, 0x80, 0x66, 0x66, 0x1d, 0xdb, 0x5d, + 0x9c, 0x40, 0x25, 0x90, 0x90, 0x7a, 0x9b, 0x37, 0xef, 0x7b, 0x33, 0xef, 0x7d, 0xdf, 0xdb, 0x9d, + 0x07, 0x8a, 0x98, 0x75, 0x70, 0xe8, 0xb9, 0x3e, 0x6b, 0xe0, 0xbe, 0xd7, 0xe8, 0x5f, 0x6b, 0xb0, + 0x41, 0x3d, 0x08, 0x09, 0x23, 0xf0, 0xfc, 0x89, 0xab, 0x8e, 0xfb, 0x5e, 0xbd, 0x7f, 0xad, 0x74, + 0xc1, 0x22, 0xd4, 0x23, 0xb4, 0xe1, 0x51, 0x87, 0x23, 0x3d, 0xea, 0x48, 0x68, 0xa9, 0x28, 0x1d, + 0x6d, 0x61, 0x35, 0xa4, 0x11, 0xb9, 0x96, 0x1d, 0xe2, 0x10, 0xb9, 0xcf, 0x57, 0xd1, 0xee, 0x45, + 0x87, 0x10, 0xa7, 0x8b, 0x1b, 0x28, 0x70, 0x1b, 0xc8, 0xf7, 0x09, 0x43, 0xcc, 0x25, 0xfe, 0x38, + 0xa6, 0x18, 0x79, 0x85, 0xb5, 0xdf, 0x3b, 0x68, 0x20, 0x7f, 0x18, 0xb9, 0x2e, 0xc5, 0xf2, 0x45, + 0x96, 0x85, 0x29, 0x6d, 0xb3, 0x5e, 0xd0, 0xc5, 0x11, 0xa8, 0x14, 0x03, 0x75, 0xc9, 0x38, 0xd5, + 0xd5, 0x98, 0x2f, 0x40, 0x21, 0xf2, 0xc6, 0x57, 0xaf, 0xc5, 0xdc, 0x14, 0xb3, 0xb6, 0x45, 0x6c, + 0xdc, 0x46, 0x3d, 0xd6, 0x21, 0xa1, 0x7b, 0x4f, 0xa4, 0x2a, 0xe1, 0xd5, 0xfb, 0x09, 0xb0, 0xb8, + 0x47, 0x9d, 0x6d, 0x1e, 0x84, 0x7b, 0x5e, 0x6b, 0x00, 0x6b, 0x40, 0xb5, 0x11, 0x43, 0x9a, 0x52, + 0x51, 0x6a, 0xf9, 0xf5, 0xe5, 0xba, 0x2c, 0xa5, 0x3e, 0x2e, 0xa5, 0xde, 0xf4, 0x87, 0xa6, 0x40, + 0xc0, 0x22, 0x50, 0xa9, 0x7b, 0x0f, 0x6b, 0x89, 0x8a, 0x52, 0x53, 0x8c, 0xd4, 0xf1, 0x48, 0x57, + 0xd6, 0x4c, 0xb1, 0x05, 0xdf, 0x01, 0xe7, 0x6c, 0x1c, 0x84, 0xd8, 0x42, 0x0c, 0xdb, 0xed, 0x0e, + 0xa2, 0x1d, 0x2d, 0x59, 0x51, 0x6a, 0x39, 0x23, 0xff, 0xfb, 0x48, 0xcf, 0x84, 0xdd, 0x60, 0xa3, + 0xba, 0x56, 0x35, 0x97, 0x26, 0x98, 0xf7, 0x11, 0xed, 0xc0, 0xb7, 0x66, 0xa2, 0x0e, 0x42, 0xe2, + 0x69, 0xaa, 0x88, 0x4a, 0x68, 0xca, 0x34, 0x78, 0x27, 0x24, 0x1e, 0x84, 0x40, 0x15, 0x88, 0x54, + 0x45, 0xa9, 0x15, 0x4c, 0xb1, 0x86, 0xaf, 0x83, 0x64, 0x88, 0x3e, 0xd5, 0xd2, 0x7c, 0xcb, 0x80, + 0x4f, 0x46, 0xfa, 0xc2, 0xb3, 0x91, 0x0e, 0x26, 0xc5, 0x99, 0xdc, 0xbd, 0xb1, 0xf8, 0xf9, 0x57, + 0xfa, 0xc2, 0x83, 0xe7, 0x8f, 0xae, 0x8a, 0xa0, 0xea, 0xc3, 0x04, 0xc8, 0xee, 0x62, 0x07, 0x59, + 0xc3, 0xd6, 0x00, 0x2e, 0x83, 0x94, 0x4f, 0x7c, 0x0b, 0x8b, 0xf2, 0x55, 0x53, 0x1a, 0xf0, 0x3a, + 0xc8, 0x39, 0x88, 0x77, 0x87, 0x6b, 0xc9, 0x72, 0x73, 0x46, 0xf1, 0xd9, 0x48, 0x5f, 0x91, 0x8d, + 0x42, 0xed, 0xbb, 0x75, 0x97, 0x34, 0x3c, 0xc4, 0x3a, 0xf5, 0x9b, 0x3e, 0x33, 0xb3, 0x0e, 0xa2, + 0xb7, 0x38, 0x14, 0x96, 0x41, 0xd2, 0x41, 0x54, 0x94, 0xae, 0x1a, 0x85, 0xc3, 0x91, 0x9e, 0x7d, + 0x0f, 0xd1, 0x5d, 0xd7, 0x73, 0x99, 0xc9, 0x1d, 0x70, 0x09, 0x24, 0x18, 0x91, 0x35, 0x9a, 0x09, + 0x46, 0xe0, 0x0d, 0x90, 0xea, 0xa3, 0x6e, 0x0f, 0x8b, 0xa2, 0x72, 0xc6, 0xa5, 0xb9, 0x77, 0x1c, + 0x8e, 0xf4, 0x74, 0xd3, 0x23, 0x3d, 0x9f, 0x99, 0x32, 0x82, 0xd3, 0x21, 0x64, 0x4b, 0x4b, 0x3a, + 0x84, 0x40, 0x05, 0xa0, 0xf4, 0xb5, 0x8c, 0xd8, 0x50, 0xfa, 0xdc, 0x0a, 0xb5, 0xac, 0xb4, 0x42, + 0x6e, 0x51, 0x2d, 0x27, 0x2d, 0xba, 0xb1, 0xc4, 0x29, 0xf9, 0xee, 0xf1, 0x5a, 0xba, 0x35, 0xd8, + 0x42, 0x0c, 0x55, 0xbf, 0x49, 0x82, 0x42, 0x53, 0xf4, 0xe5, 0xae, 0x4b, 0x59, 0x6b, 0x00, 0x3f, + 0x00, 0x59, 0xab, 0x83, 0x5c, 0xbf, 0xed, 0xda, 0x82, 0x9a, 0x9c, 0xd1, 0x38, 0x2d, 0xb9, 0xcc, + 0x26, 0x07, 0xdf, 0xdc, 0x3a, 0x1e, 0xe9, 0x19, 0x4b, 0x2e, 0xcd, 0x68, 0x61, 0x4f, 0x38, 0x4e, + 0xcc, 0xe5, 0x38, 0xf9, 0x8f, 0x39, 0x56, 0x4f, 0xe7, 0x38, 0x15, 0xe7, 0x38, 0xfd, 0xd2, 0x1c, + 0x67, 0xa6, 0x38, 0xfe, 0x18, 0x64, 0xe5, 0x07, 0x8c, 0xa9, 0x96, 0xad, 0x24, 0x6b, 0xf9, 0xf5, + 0xd5, 0xfa, 0x8b, 0xff, 0x9d, 0xba, 0xa4, 0xb2, 0xc5, 0xbf, 0x70, 0xa3, 0xc2, 0xdb, 0xf2, 0x78, + 0xa4, 0x03, 0x74, 0xc2, 0xef, 0xd7, 0x3f, 0xeb, 0x60, 0xc2, 0xb6, 0x79, 0x72, 0xa0, 0x14, 0x30, + 0x37, 0x23, 0x20, 0x98, 0x11, 0x30, 0x3f, 0x4f, 0xc0, 0x3f, 0x92, 0xa0, 0xb0, 0x35, 0xf4, 0x91, + 0xe7, 0x5a, 0x3b, 0x18, 0xff, 0x27, 0x02, 0xde, 0x00, 0x79, 0x2e, 0x20, 0x73, 0x83, 0xb6, 0x85, + 0x82, 0xb3, 0x25, 0xe4, 0x72, 0xb7, 0xdc, 0x60, 0x13, 0x05, 0xe3, 0xd0, 0x03, 0x8c, 0x45, 0xa8, + 0xfa, 0x77, 0x42, 0x77, 0x30, 0xe6, 0xa1, 0x91, 0xfc, 0xa9, 0xd3, 0xe5, 0x4f, 0xc7, 0xe5, 0xcf, + 0xbc, 0xb4, 0xfc, 0xd9, 0x39, 0xf2, 0xe7, 0xfe, 0x15, 0xf9, 0xc1, 0x8c, 0xfc, 0xf9, 0x19, 0xf9, + 0x0b, 0xf3, 0xe4, 0xff, 0x49, 0x05, 0xb9, 0xdb, 0x98, 0x6d, 0x12, 0xfb, 0x95, 0xf6, 0xff, 0x4f, + 0xed, 0x11, 0xc8, 0xf1, 0xf7, 0xba, 0xdd, 0x75, 0x29, 0xd3, 0x80, 0x38, 0xfd, 0x72, 0xfc, 0xf4, + 0x48, 0xe3, 0xe6, 0xf4, 0xcb, 0x6e, 0x5c, 0x8c, 0xae, 0xc9, 0xf2, 0x03, 0xa2, 0x4b, 0xb2, 0xcd, + 0x68, 0x6d, 0x9e, 0xec, 0xca, 0xf6, 0xca, 0xcf, 0xb4, 0x57, 0x61, 0xa6, 0xbd, 0x16, 0xe7, 0xb5, + 0x57, 0x15, 0x94, 0xb6, 0x07, 0x0c, 0xfb, 0xd4, 0x25, 0xfe, 0x87, 0x81, 0x98, 0x7c, 0x26, 0x8f, + 0xec, 0x86, 0xca, 0xd1, 0xd5, 0x6f, 0x15, 0xb0, 0x32, 0x33, 0x59, 0x98, 0x98, 0x06, 0xc4, 0xa7, + 0x82, 0x4b, 0x31, 0x11, 0x88, 0x56, 0x34, 0xc5, 0x1a, 0x5e, 0x01, 0x6a, 0x97, 0x38, 0x54, 0x4b, + 0x88, 0x4a, 0x57, 0xe2, 0x95, 0xee, 0x12, 0xc7, 0x14, 0x10, 0x78, 0x1e, 0x24, 0x43, 0xcc, 0x44, + 0x8f, 0x15, 0x4c, 0xbe, 0x84, 0x45, 0x90, 0xed, 0x7b, 0x6d, 0x1c, 0x86, 0x24, 0x8c, 0x1e, 0xd3, + 0x4c, 0xdf, 0xdb, 0xe6, 0x26, 0x77, 0xf1, 0xee, 0xea, 0x51, 0x6c, 0xcb, 0x3e, 0x31, 0x33, 0x0e, + 0xa2, 0x77, 0x28, 0xb6, 0xe1, 0x2a, 0x00, 0xfb, 0x5d, 0x62, 0xdd, 0x95, 0xe3, 0x89, 0x7c, 0x37, + 0x73, 0x62, 0x87, 0x0f, 0x23, 0x51, 0x15, 0x0f, 0x15, 0x70, 0x6e, 0x8f, 0x3a, 0x77, 0x02, 0x1b, + 0x31, 0x7c, 0x4b, 0x0c, 0x5a, 0xfc, 0xa5, 0x8a, 0x46, 0x29, 0x36, 0x8c, 0xbe, 0x27, 0xed, 0xfb, + 0xc7, 0x6b, 0xcb, 0xd1, 0xd8, 0xd8, 0xb4, 0xed, 0x10, 0x53, 0x7a, 0x9b, 0x85, 0xae, 0xef, 0x98, + 0x13, 0x28, 0xbc, 0x0e, 0xd2, 0x72, 0x54, 0x13, 0xdf, 0x4e, 0x7e, 0x5d, 0x8b, 0x57, 0x29, 0x6f, + 0x30, 0x54, 0xae, 0xa0, 0x19, 0xa1, 0x37, 0x96, 0xf8, 0xac, 0x32, 0x39, 0xa7, 0x5a, 0x04, 0x17, + 0x5e, 0x48, 0x69, 0x4c, 0xed, 0xfa, 0x6f, 0x0a, 0x48, 0xee, 0x51, 0x07, 0x7e, 0x06, 0xa6, 0xa6, + 0x1e, 0xa8, 0xc7, 0x2f, 0x9a, 0x51, 0xa6, 0xf4, 0xe6, 0x19, 0x80, 0xf1, 0xf9, 0xd5, 0x37, 0x1e, + 0xfc, 0xf0, 0xeb, 0x97, 0x09, 0xbd, 0xba, 0xda, 0x88, 0x8d, 0x99, 0x38, 0x42, 0xb7, 0xd9, 0x00, + 0x7e, 0x02, 0x0a, 0x33, 0x8c, 0xbd, 0xf6, 0x97, 0xe7, 0x4f, 0x43, 0x4a, 0x57, 0xce, 0x84, 0x8c, + 0x93, 0x28, 0xa5, 0xee, 0x3f, 0x7f, 0x74, 0x55, 0x31, 0xde, 0x7d, 0x72, 0x58, 0x56, 0x9e, 0x1e, + 0x96, 0x95, 0x5f, 0x0e, 0xcb, 0xca, 0x17, 0x47, 0xe5, 0x85, 0xa7, 0x47, 0xe5, 0x85, 0x1f, 0x8f, + 0xca, 0x0b, 0x1f, 0x5d, 0x76, 0x5c, 0xd6, 0xe9, 0xed, 0xd7, 0x2d, 0xe2, 0xf1, 0xec, 0x08, 0x9d, + 0xca, 0x76, 0x20, 0xf2, 0x65, 0xc3, 0x00, 0xd3, 0xfd, 0xb4, 0x18, 0x6a, 0xdf, 0xfe, 0x33, 0x00, + 0x00, 0xff, 0xff, 0xe8, 0x95, 0x8e, 0xe7, 0x44, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1063,6 +1133,150 @@ func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SetCodeTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetCodeTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetCodeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.S) > 0 { + i -= len(m.S) + copy(dAtA[i:], m.S) + i = encodeVarintTx(dAtA, i, uint64(len(m.S))) + i-- + dAtA[i] = 0x6a + } + if len(m.R) > 0 { + i -= len(m.R) + copy(dAtA[i:], m.R) + i = encodeVarintTx(dAtA, i, uint64(len(m.R))) + i-- + dAtA[i] = 0x62 + } + if len(m.V) > 0 { + i -= len(m.V) + copy(dAtA[i:], m.V) + i = encodeVarintTx(dAtA, i, uint64(len(m.V))) + i-- + dAtA[i] = 0x5a + } + if len(m.AuthList) > 0 { + for iNdEx := len(m.AuthList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuthList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.Accesses) > 0 { + for iNdEx := len(m.Accesses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accesses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x42 + } + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x32 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x28 + } + if m.GasFeeCap != nil { + { + size := m.GasFeeCap.Size() + i -= size + if _, err := m.GasFeeCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.GasTipCap != nil { + { + size := m.GasTipCap.Size() + i -= size + if _, err := m.GasTipCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ExtensionOptionsEthereumTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1413,6 +1627,69 @@ func (m *DynamicFeeTx) Size() (n int) { return n } +func (m *SetCodeTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovTx(uint64(m.Nonce)) + } + if m.GasTipCap != nil { + l = m.GasTipCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasFeeCap != nil { + l = m.GasFeeCap.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Accesses) > 0 { + for _, e := range m.Accesses { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.AuthList) > 0 { + for _, e := range m.AuthList { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.V) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.R) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.S) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func (m *ExtensionOptionsEthereumTx) Size() (n int) { if m == nil { return 0 @@ -2874,6 +3151,474 @@ func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { } return nil } +func (m *SetCodeTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetCodeTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetCodeTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasTipCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasTipCap = &v + if err := m.GasTipCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasFeeCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.GasFeeCap = &v + if err := m.GasFeeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v cosmossdk_io_math.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accesses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accesses = append(m.Accesses, AccessTuple{}) + if err := m.Accesses[len(m.Accesses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthList = append(m.AuthList, SetCodeAuthorization{}) + if err := m.AuthList[len(m.AuthList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field V", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.V = append(m.V[:0], dAtA[iNdEx:postIndex]...) + if m.V == nil { + m.V = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field R", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.R = append(m.R[:0], dAtA[iNdEx:postIndex]...) + if m.R == nil { + m.R = []byte{} + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field S", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.S = append(m.S[:0], dAtA[iNdEx:postIndex]...) + if m.S == nil { + m.S = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ExtensionOptionsEthereumTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/tx_args.go b/x/evm/types/tx_args.go index a1357ddd8f..13b1fe1a5d 100644 --- a/x/evm/types/tx_args.go +++ b/x/evm/types/tx_args.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" ethermint "github.com/evmos/ethermint/types" + "github.com/holiman/uint256" ) // TransactionArgs represents the arguments to construct a new transaction @@ -49,7 +50,9 @@ type TransactionArgs struct { // Introduced by AccessListTxType transaction. AccessList *types.AccessList `json:"accessList,omitempty"` - ChainID *hexutil.Big `json:"chainId,omitempty"` + // For SetCodeTxType + AuthorizationList []types.SetCodeAuthorization `json:"authorizationList"` + ChainID *hexutil.Big `json:"chainId,omitempty"` } // String return the struct in a string format @@ -80,6 +83,23 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx { var data types.TxData switch { + case args.AuthorizationList != nil: + al := types.AccessList{} + if args.AccessList != nil { + al = *args.AccessList + } + data = &types.SetCodeTx{ + To: *args.To, + ChainID: uint256.MustFromBig(args.ChainID.ToInt()), + Nonce: uint64(*args.Nonce), + Gas: uint64(*args.Gas), + GasFeeCap: uint256.MustFromBig((*big.Int)(args.MaxFeePerGas)), + GasTipCap: uint256.MustFromBig((*big.Int)(args.MaxPriorityFeePerGas)), + Value: uint256.MustFromBig((*big.Int)(args.Value)), + Data: args.GetData(), + AccessList: al, + AuthList: args.AuthorizationList, + } case args.MaxFeePerGas != nil: al := types.AccessList{} if args.AccessList != nil { @@ -196,18 +216,19 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (* } msg := &core.Message{ - From: addr, - To: args.To, - Nonce: nonce, - Value: value, - GasLimit: gas, - GasPrice: gasPrice, - GasFeeCap: gasFeeCap, - GasTipCap: gasTipCap, - Data: data, - AccessList: accessList, - SkipNonceChecks: true, - SkipFromEOACheck: true, + From: addr, + To: args.To, + Nonce: nonce, + Value: value, + GasLimit: gas, + GasPrice: gasPrice, + GasFeeCap: gasFeeCap, + GasTipCap: gasTipCap, + Data: data, + AccessList: accessList, + SetCodeAuthorizations: args.AuthorizationList, + SkipNonceChecks: true, + SkipFromEOACheck: true, } return msg, nil } diff --git a/x/evm/types/tx_data.go b/x/evm/types/tx_data.go index 99243d5e09..4e5dcb6992 100644 --- a/x/evm/types/tx_data.go +++ b/x/evm/types/tx_data.go @@ -26,6 +26,7 @@ var ( _ TxData = &LegacyTx{} _ TxData = &AccessListTx{} _ TxData = &DynamicFeeTx{} + _ TxData = &SetCodeTx{} ) // TxData implements the Ethereum transaction tx structure. It is used @@ -72,6 +73,8 @@ func NewTxDataFromTx(tx *ethtypes.Transaction) (TxData, error) { txData, err = newDynamicFeeTx(tx) case ethtypes.AccessListTxType: txData, err = newAccessListTx(tx) + case ethtypes.SetCodeTxType: + txData, err = newSetCodeTx(tx) default: txData, err = newLegacyTx(tx) } diff --git a/x/evm/types/utils.go b/x/evm/types/utils.go index da075df587..cf2390474d 100644 --- a/x/evm/types/utils.go +++ b/x/evm/types/utils.go @@ -24,6 +24,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/gogoproto/proto" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" + "github.com/holiman/uint256" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -251,3 +252,12 @@ func GetBaseFee(height int64, ethCfg *params.ChainConfig, feemarketParams *feema } return baseFee } + +func BigToUint256(b *big.Int) *uint256.Int { + if b == nil { + return nil + } + u := uint256.NewInt(0) + u.SetFromBig(b) + return u +}