Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}
Expand Down Expand Up @@ -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")),
}
}
}
Expand Down
49 changes: 47 additions & 2 deletions src/specs/0.10.0/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
@@ -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": {}
},
Expand Down Expand Up @@ -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": [
Expand All @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/specs/0.10.0/starknet_trace_api_openrpc.json
Original file line number Diff line number Diff line change
@@ -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": {}
},
Expand Down
2 changes: 1 addition & 1 deletion src/specs/0.10.0/starknet_write_api.json
Original file line number Diff line number Diff line change
@@ -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": {}
},
Expand Down
2 changes: 1 addition & 1 deletion src/specs/0.10.0/starknet_ws_api.json
Original file line number Diff line number Diff line change
@@ -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": {}
},
Expand Down