Skip to content

Commit

Permalink
Add support for RPC v0.6-rc2 (#1427)
Browse files Browse the repository at this point in the history
while also removing support for the legacy v0.4

Co-authored-by: Ömer Faruk IRMAK <[email protected]>
  • Loading branch information
joshklop and omerfirmak authored Nov 27, 2023
1 parent 4e4af10 commit dd66ec4
Show file tree
Hide file tree
Showing 5 changed files with 1,134 additions and 202 deletions.
6 changes: 3 additions & 3 deletions rpc/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func (b *BlockID) UnmarshalJSON(data []byte) error {
}

type ResourcePrice struct {
InStark *felt.Felt `json:"price_in_strk,omitempty"`
InWei *felt.Felt `json:"price_in_wei,omitempty"`
InStark *felt.Felt `json:"price_in_strk"`
InWei *felt.Felt `json:"price_in_wei"`
}

// https://github.com/starkware-libs/starknet-specs/blob/a789ccc3432c57777beceaa53a34a7ae2f25fda0/api/starknet_api_openrpc.json#L1072
Expand All @@ -85,7 +85,7 @@ type BlockHeader struct {
NewRoot *felt.Felt `json:"new_root,omitempty"`
Timestamp uint64 `json:"timestamp"`
SequencerAddress *felt.Felt `json:"sequencer_address,omitempty"`
L1GasPrice *ResourcePrice `json:"l1_gas_price,omitempty"`
L1GasPrice *ResourcePrice `json:"l1_gas_price"`
StarknetVersion string `json:"starknet_version,omitempty"`
}

Expand Down
Loading

0 comments on commit dd66ec4

Please sign in to comment.