diff --git a/README.md b/README.md index b8b1506..c8ad145 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Tool for generating the Starknet JSON-RPC code used in `starknet-rs`. Starknet s Run the tool and choose which version of the specification to use: ```console -$ cargo run -- generate --spec 0.10.0-rc.1 +$ cargo run -- generate --spec 0.10.0 ``` and generated code will be emitted to `stdout`. @@ -23,7 +23,7 @@ The following versions are supported: - `0.7.1` - `0.8.1` - `0.9.0` -- `0.10.0-rc.1` +- `0.10.0` ## License diff --git a/src/main.rs b/src/main.rs index a767a6f..5d79c23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,7 +134,7 @@ impl FromStr for SpecVersion { "0.7.1" | "v0.7.1" => Self::V0_7_1, "0.8.1" | "v0.8.1" => Self::V0_8_1, "0.9.0" | "v0.9.0" => Self::V0_9_0, - "0.10.0-rc.1" | "v0.10.0-rc.1" => Self::V0_10_0, + "0.10.0" | "v0.10.0" => Self::V0_10_0, _ => anyhow::bail!("unknown spec version: {}", s), }) } @@ -169,7 +169,7 @@ impl ValueEnum for SpecVersion { Self::V0_7_1 => Some(PossibleValue::new("0.7.1").alias("v0.7.1")), Self::V0_8_1 => Some(PossibleValue::new("0.8.1").alias("v0.8.1")), Self::V0_9_0 => Some(PossibleValue::new("0.9.0").alias("v0.9.0")), - Self::V0_10_0 => Some(PossibleValue::new("0.10.0-rc.1").alias("v0.10.0-rc.1")), + Self::V0_10_0 => Some(PossibleValue::new("0.10.0").alias("v0.10.0")), } } } diff --git a/src/specs/0.10.0/starknet_api_openrpc.json b/src/specs/0.10.0/starknet_api_openrpc.json index 95e62a7..98b33b7 100644 --- a/src/specs/0.10.0/starknet_api_openrpc.json +++ b/src/specs/0.10.0/starknet_api_openrpc.json @@ -1,7 +1,7 @@ { "openrpc": "1.0.0-rc2", "info": { - "version": "0.10.0-rc.1", + "version": "0.10.0", "title": "Starknet Node API", "license": {} }, @@ -1608,6 +1608,44 @@ "title": "Starknet version", "description": "Semver of the current Starknet protocol", "type": "string" + }, + "event_commitment": { + "title": "Event commitment", + "description": "The root of Merkle Patricia trie for events in the block. For blocks where this data is not available (e.g., old blocks), use 0x0", + "$ref": "#/components/schemas/FELT" + }, + "transaction_commitment": { + "title": "Transaction commitment", + "description": "The root of Merkle Patricia trie for transactions in the block. For blocks where this data is not available (e.g., old blocks), use 0x0", + "$ref": "#/components/schemas/FELT" + }, + "receipt_commitment": { + "title": "Receipt commitment", + "description": "The root of Merkle Patricia trie for receipts in the block. For blocks where this data is not available (e.g., old blocks), use 0x0", + "$ref": "#/components/schemas/FELT" + }, + "state_diff_commitment": { + "title": "State diff commitment", + "description": "The state diff commitment hash in the block. For blocks where this data is not available (e.g., old blocks), use 0x0", + "$ref": "#/components/schemas/FELT" + }, + "event_count": { + "title": "Event count", + "description": "The number of events in the block", + "type": "integer", + "minimum": 0 + }, + "transaction_count": { + "title": "Transaction count", + "description": "The number of transactions in the block", + "type": "integer", + "minimum": 0 + }, + "state_diff_length": { + "title": "State diff length", + "description": "The length of the state diff in the block. For blocks where this data is not available (e.g., old blocks), compute from state diff if possible, otherwise use 0", + "type": "integer", + "minimum": 0 } }, "required": [ @@ -1621,7 +1659,14 @@ "l2_gas_price", "l1_data_gas_price", "l1_da_mode", - "starknet_version" + "starknet_version", + "event_commitment", + "transaction_commitment", + "receipt_commitment", + "state_diff_commitment", + "event_count", + "transaction_count", + "state_diff_length" ] }, "PRE_CONFIRMED_BLOCK_HEADER": { diff --git a/src/specs/0.10.0/starknet_trace_api_openrpc.json b/src/specs/0.10.0/starknet_trace_api_openrpc.json index beb5bde..c30a1c1 100644 --- a/src/specs/0.10.0/starknet_trace_api_openrpc.json +++ b/src/specs/0.10.0/starknet_trace_api_openrpc.json @@ -1,7 +1,7 @@ { "openrpc": "1.0.0-rc1", "info": { - "version": "0.10.0-rc.1", + "version": "0.10.0", "title": "Starknet Trace API", "license": {} }, diff --git a/src/specs/0.10.0/starknet_write_api.json b/src/specs/0.10.0/starknet_write_api.json index 37bfe1d..93a897c 100644 --- a/src/specs/0.10.0/starknet_write_api.json +++ b/src/specs/0.10.0/starknet_write_api.json @@ -1,7 +1,7 @@ { "openrpc": "1.0.0-rc1", "info": { - "version": "0.10.0-rc.1", + "version": "0.10.0", "title": "Starknet Node Write API", "license": {} }, diff --git a/src/specs/0.10.0/starknet_ws_api.json b/src/specs/0.10.0/starknet_ws_api.json index ce284fb..1e99f1a 100644 --- a/src/specs/0.10.0/starknet_ws_api.json +++ b/src/specs/0.10.0/starknet_ws_api.json @@ -1,7 +1,7 @@ { "openrpc": "1.3.2", "info": { - "version": "0.10.0-rc.1", + "version": "0.10.0", "title": "StarkNet WebSocket RPC API", "license": {} },