diff --git a/src/eth/fee_market.yaml b/src/eth/fee_market.yaml index 24c845207..bf0483223 100644 --- a/src/eth/fee_market.yaml +++ b/src/eth/fee_market.yaml @@ -12,6 +12,20 @@ result: name: Gas price value: '0x3e8' +- name: eth_baseFee + summary: Returns the base fee per gas of the next block in wei. + params: [] + result: + name: Base fee + schema: + title: Base fee + $ref: '#/components/schemas/uint' + examples: + - name: eth_baseFee example + params: [] + result: + name: Base fee + value: '0x3b9aca00' - name: eth_blobBaseFee summary: Returns the base fee per blob gas in wei. params: [] diff --git a/tests/eth_baseFee/get-current-basefee.io b/tests/eth_baseFee/get-current-basefee.io new file mode 100644 index 000000000..2e6962dde --- /dev/null +++ b/tests/eth_baseFee/get-current-basefee.io @@ -0,0 +1,3 @@ +// gets the base fee of the next block in wei +>> {"jsonrpc":"2.0","id":1,"method":"eth_baseFee"} +<< {"jsonrpc":"2.0","id":1,"result":"0x4c9114a"} diff --git a/tools/go.mod b/tools/go.mod index 8c709d82c..39ebb2415 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -5,7 +5,7 @@ go 1.25.0 require ( github.com/alexflint/go-arg v1.4.3 github.com/cespare/cp v1.1.1 - github.com/ethereum/go-ethereum v1.17.3-0.20260413114535-ecae519972c0 + github.com/ethereum/go-ethereum v1.17.4-0.20260519060500-1149f76dca22 github.com/holiman/uint256 v1.3.2 github.com/mattn/go-jsonpointer v0.0.1 github.com/open-rpc/meta-schema v0.0.0-20210416041958-626a15d0a618 @@ -46,6 +46,7 @@ require ( github.com/emicklei/dot v1.6.2 // indirect github.com/ethereum/c-kzg-4844/v2 v2.1.6 // indirect github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect + github.com/ethereum/hid v1.0.1-0.20260421154323-c2ab8d9bf68a // indirect github.com/fatih/color v1.16.0 // indirect github.com/ferranbt/fastssz v0.1.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -75,7 +76,6 @@ require ( github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect - github.com/karalabe/hid v1.0.1-0.20260315100226-f5d04adeffeb // indirect github.com/kilic/bls12-381 v0.1.0 // indirect github.com/klauspost/compress v1.17.8 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect @@ -120,6 +120,7 @@ require ( go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/otel v1.40.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 // indirect go.opentelemetry.io/otel/metric v1.40.0 // indirect go.opentelemetry.io/otel/sdk v1.40.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index 2117c45d6..09829740d 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -80,8 +80,10 @@ github.com/ethereum/c-kzg-4844/v2 v2.1.6 h1:xQymkKCT5E2Jiaoqf3v4wsNgjZLY0lRSkZn2 github.com/ethereum/c-kzg-4844/v2 v2.1.6/go.mod h1:8HMkUZ5JRv4hpw/XUrYWSQNAUzhHMg2UDb/U+5m+XNw= github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJhy07IMfEKuARQ9TKojGqLVNxQajaXEp/BoqSk= github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8= -github.com/ethereum/go-ethereum v1.17.3-0.20260413114535-ecae519972c0 h1:S9+NVTpdkUWUN5+Idxzg+gxo8d5AQe4C/O6pwFKPuNA= -github.com/ethereum/go-ethereum v1.17.3-0.20260413114535-ecae519972c0/go.mod h1:KHcRXfGOUfUmKg51IhQ0IowiqZ6PqZf08CMtk0g5K1o= +github.com/ethereum/go-ethereum v1.17.4-0.20260519060500-1149f76dca22 h1:CnmrTYrqoLYy985jIpQ+84V9H6JWkVhPMoSXFU3sUrE= +github.com/ethereum/go-ethereum v1.17.4-0.20260519060500-1149f76dca22/go.mod h1:f2EhRwqewIZkGoQekywI2Y2RZAMTSavLNkD9qItFy1A= +github.com/ethereum/hid v1.0.1-0.20260421154323-c2ab8d9bf68a h1:eIFUceK3U/z9UV0D/kAI6cxA27eH7MPqt2ks7fbzj/k= +github.com/ethereum/hid v1.0.1-0.20260421154323-c2ab8d9bf68a/go.mod h1:nABYy4hsKZpuN0mu0uybdjrIOuGb1eE7b1lci/ezUAo= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= @@ -174,8 +176,6 @@ github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7 github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/karalabe/hid v1.0.1-0.20260315100226-f5d04adeffeb h1:Ag83At00qa4FLkcdMgrwHVSakqky/eZczOlxd4q336E= -github.com/karalabe/hid v1.0.1-0.20260315100226-f5d04adeffeb/go.mod h1:qk1sX/IBgppQNcGCRoj90u6EGC056EBoIc1oEjCWla8= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -340,6 +340,8 @@ go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 h1:wVZXIWjQSeSmMoxF74LzAnpVQOAFDo3pPji9Y4SOFKc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0/go.mod h1:khvBS2IggMFNwZK/6lEeHg/W57h/IX6J4URh57fuI40= go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= diff --git a/tools/testgen/generators.go b/tools/testgen/generators.go index 94e9dca68..d572977bc 100644 --- a/tools/testgen/generators.go +++ b/tools/testgen/generators.go @@ -90,6 +90,7 @@ var AllMethods = []MethodTests{ DebugGetRawBlock, DebugGetRawReceipts, DebugGetRawTransaction, + EthBaseFee, EthBlobBaseFee, NetVersion, TestingBuildBlockV1, @@ -1838,6 +1839,21 @@ var EthMaxPriorityFeePerGas = MethodTests{ }, } +var EthBaseFee = MethodTests{ + "eth_baseFee", + []Test{ + { + Name: "get-current-basefee", + About: "gets the base fee of the next block in wei", + Run: func(ctx context.Context, t *T) error { + var result hexutil.Big + err := t.rpc.CallContext(ctx, &result, "eth_baseFee") + return err + }, + }, + }, +} + var EthBlobBaseFee = MethodTests{ "eth_blobBaseFee", []Test{ @@ -6788,4 +6804,3 @@ var TxpoolContentFrom = MethodTests{ }, }, } -