Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP4844 related fields to block header #1722

Merged
merged 1 commit into from
Feb 26, 2024
Merged
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: 3 additions & 1 deletion adapters/sn2core/sn2core.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ func AdaptBlock(response *starknet.Block, sig *starknet.Signature) (*core.Block,
EventCount: eventCount,
EventsBloom: core.EventsBloom(receipts),
GasPrice: response.GasPriceETH(),
GasPriceSTRK: response.GasPriceSTRK,
GasPriceSTRK: response.GasPriceSTRK(),
L1DAMode: core.L1DAMode(response.L1DAMode),
L1DataGasPrice: (*core.GasPrice)(response.L1DataGasPrice),
Signatures: sigs,
},
Transactions: txns,
Expand Down
23 changes: 23 additions & 0 deletions adapters/sn2core/sn2core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func TestAdaptBlock(t *testing.T) {
sig *starknet.Signature
gasPriceWEI *felt.Felt
gasPriceSTRK *felt.Felt
l1DAGasPriceWEI *felt.Felt
l1DAGasPriceFRI *felt.Felt
}{
{
number: 147,
Expand Down Expand Up @@ -57,6 +59,21 @@ func TestAdaptBlock(t *testing.T) {
gasPriceWEI: utils.HexToFelt(t, "0x3b9aca08"),
gasPriceSTRK: utils.HexToFelt(t, "0x2540be400"),
},
{
number: 330363,
network: utils.Integration,
protocolVersion: "0.13.1",
sig: &starknet.Signature{
Signature: []*felt.Felt{
utils.HexToFelt(t, "0x7685fbcd4bacae7554ad17c6962221143911d894d7b8794d29234623f392562"),
utils.HexToFelt(t, "0x343e605de3957e664746ba8ef82f2b0f9d53cda3d75dcb078290b8edd010165"),
},
},
gasPriceWEI: utils.HexToFelt(t, "0x3b9aca0a"),
gasPriceSTRK: utils.HexToFelt(t, "0x2b6fdb70"),
l1DAGasPriceWEI: utils.HexToFelt(t, "0x5265a14ef"),
l1DAGasPriceFRI: utils.HexToFelt(t, "0x3c0c00c87"),
},
}

ctx := context.Background()
Expand Down Expand Up @@ -101,6 +118,12 @@ func TestAdaptBlock(t *testing.T) {

assert.Equal(t, test.gasPriceSTRK, block.GasPriceSTRK)
assert.Equal(t, test.gasPriceWEI, block.GasPrice)
if test.l1DAGasPriceFRI != nil {
assert.Equal(t, test.l1DAGasPriceFRI, block.L1DataGasPrice.PriceInFri)
}
if test.l1DAGasPriceFRI != nil {
assert.Equal(t, test.l1DAGasPriceWEI, block.L1DataGasPrice.PriceInWei)
}
})
}
}
Expand Down
18 changes: 17 additions & 1 deletion clients/feeder/feeder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,28 @@ func TestBlockHeaderV013Unmarshal(t *testing.T) {
require.Equal(t, utils.HexToFelt(t, "0x2a6b9a8b60e1de80dc50e6b704b415a38e8fd03d82244cec92cbff0821a8975"), block.StateRoot)
require.Equal(t, "ACCEPTED_ON_L2", block.Status)
require.Equal(t, utils.HexToFelt(t, "0x3b9aca08"), block.GasPriceETH())
require.Equal(t, utils.HexToFelt(t, "0x2540be400"), block.GasPriceSTRK)
require.Equal(t, utils.HexToFelt(t, "0x2540be400"), block.GasPriceSTRK())
require.Equal(t, uint64(1700075354), block.Timestamp)
require.Equal(t, utils.HexToFelt(t, "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8"), block.SequencerAddress)
require.Equal(t, "0.13.0", block.Version)
}

func TestBlockHeaderV0131Unmarshal(t *testing.T) {
client := feeder.NewTestClient(t, &utils.Integration)
block, err := client.Block(context.Background(), "330363")
require.NoError(t, err)

require.Equal(t, utils.HexToFelt(t, "0x8ab8117e952f95efd96de0bc66dc6f13fe68dfda14b95fe1972759dee283a8"), block.Hash)
require.Equal(t, utils.HexToFelt(t, "0x13367121d0b7e34a9b10c8a5a1c269811cd9afc3ce680c88888f1a22d2f017a"), block.TransactionCommitment)
require.Equal(t, utils.HexToFelt(t, "0x1090dd2ab2aa22bd5fc5a59d3b1394d54461bb2a80156c4b2c2622d2c474ca2"), block.EventCommitment)
require.Equal(t, utils.HexToFelt(t, "0x3b9aca0a"), block.GasPriceETH())
require.Equal(t, utils.HexToFelt(t, "0x2b6fdb70"), block.GasPriceSTRK())
require.Equal(t, utils.HexToFelt(t, "0x5265a14ef"), block.L1DataGasPrice.PriceInWei)
require.Equal(t, utils.HexToFelt(t, "0x3c0c00c87"), block.L1DataGasPrice.PriceInFri)
require.Equal(t, starknet.Blob, block.L1DAMode)
require.Equal(t, "0.13.1", block.Version)
}

func TestClassV0Unmarshal(t *testing.T) {
client := feeder.NewTestClient(t, &utils.Mainnet)

Expand Down
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/block/330363.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_hash": "0x8ab8117e952f95efd96de0bc66dc6f13fe68dfda14b95fe1972759dee283a8", "parent_block_hash": "0x2ef5b8b01ad9345f2b6be196005034baf42362c7406a89d8788b5969efaea1", "block_number": 330363, "state_root": "0x4406dc46518501c7530a13236d5620c8edbc53771c3b9080c148788ad76fd0c", "transaction_commitment": "0x13367121d0b7e34a9b10c8a5a1c269811cd9afc3ce680c88888f1a22d2f017a", "event_commitment": "0x1090dd2ab2aa22bd5fc5a59d3b1394d54461bb2a80156c4b2c2622d2c474ca2", "status": "ACCEPTED_ON_L1", "l1_da_mode": "BLOB", "l1_gas_price": {"price_in_wei": "0x3b9aca0a", "price_in_fri": "0x2b6fdb70"}, "l1_data_gas_price": {"price_in_wei": "0x5265a14ef", "price_in_fri": "0x3c0c00c87"}, "transactions": [{"transaction_hash": "0x1ffcecfdae93215db398482d3e91e065816bdeda116ef8d3e68f2f6c01a0e22", "version": "0x3", "signature": ["0x4de1bca2906135e43869ae416d6e5410660c2d1412678a743d3ab5f66bf78b0", "0x5b2f18362a175878089b2f69b2953e3427bb9135fc64d6c50f7f3efe4e5d6fb"], "nonce": "0xd0e", "nonce_data_availability_mode": 0, "fee_data_availability_mode": 0, "resource_bounds": {"L1_GAS": {"max_amount": "0x4c4b40", "max_price_per_unit": "0x5af3107a4000"}, "L2_GAS": {"max_amount": "0x0", "max_price_per_unit": "0x0"}}, "tip": "0x0", "paymaster_data": [], "sender_address": "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "calldata": ["0x2", "0x1305509ce387ad1b83a47c85a0ff3e82cb3be71f39e8c8753589f10f60ecde4", "0x1a8e87e9d2008fcd3ce423ae5219c21e49be18d05d72825feb7e2bb687ba35c", "0x2", "0xa5bbc76ce4df888a29eda0b0a330ab03", "0x60b205737c37d74ad955261cbadab5a", "0x1305509ce387ad1b83a47c85a0ff3e82cb3be71f39e8c8753589f10f60ecde4", "0x2fd9126ee011f3a837cea02e32ae4ee73342d827e216998e5616bab88d8b7ea", "0x1", "0x2fd9126ee011f3a837cea02e32ae4ee73342d827e216998e5616bab88d8b7ea"], "account_deployment_data": [], "type": "INVOKE_FUNCTION"}, {"transaction_hash": "0x176d3c945cfd1617a173023dd08904964a28d4047207a55890d535ecebeb855", "version": "0x3", "signature": ["0x64ac3d82149ae762db30b40a7bf62bcdda3e7766a50b277ab8fc310a5fa7573", "0xaf92c9be805d0032253e7bacbd0ac374e50e5a81dfd473c5f34a132b49592f"], "nonce": "0xd0f", "nonce_data_availability_mode": 0, "fee_data_availability_mode": 0, "resource_bounds": {"L1_GAS": {"max_amount": "0x4c4b40", "max_price_per_unit": "0x5af3107a4000"}, "L2_GAS": {"max_amount": "0x0", "max_price_per_unit": "0x0"}}, "tip": "0x0", "paymaster_data": [], "sender_address": "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "calldata": ["0x2", "0x1305509ce387ad1b83a47c85a0ff3e82cb3be71f39e8c8753589f10f60ecde4", "0x1136789e1c76159d9b9eca06fcef05bdcf77f5d51bd4d9e09f2bc8d7520d8e6", "0x2", "0x5b4484f4c3ac6b3e36f40d58b8a4898f", "0x47ed253dc74560135faa58a3f5b1dafd", "0x4e18c9f8a657466bfe60e23e590fc1e60cb465bf6a8ca8587b6a35f3b53db20", "0x1a8e87e9d2008fcd3ce423ae5219c21e49be18d05d72825feb7e2bb687ba35c", "0x2", "0x98c0f992deda4c98c7c897429c4a0bef", "0xd65041cb57428e00fcd0493c36ebf439"], "account_deployment_data": [], "type": "INVOKE_FUNCTION"}, {"transaction_hash": "0x1026a5617deaf998b8cd2ee8c74ccee9691bedbdcabb20681f148918a67c579", "version": "0x1", "max_fee": "0x354a6ba7a18000", "signature": ["0x789e321106ca0461f6cb87c402b16ab728bcc9585f5c2933e3a1eafe388318a", "0x68832f809f3eeda9b3605436337d8e65a96705cd4837edd48bcba7dc60bb75e"], "nonce": "0xd10", "sender_address": "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "calldata": ["0x2", "0x232438a37dc1e45f6cf278b308db7d1868016a5a6a2f6c4d3da746b4d13d891", "0x3d7905601c217734671143d457f0db37f7f8883112abd34b92c4abfeafde0c3", "0x2", "0x4cbc5a746176a23a47175d24e8649e04e2964ecc03bc1acbc7bffe874f42d29", "0x476f6db708731413479d252509fc9f09287ae8bc0f950e1d9cb2a104df3f1d4", "0x3b73e1773ce95172c5f525f29d4d1eb2b407429559bceaa7dec815deb6c0028", "0x2913ee03e5e3308c41e308bd391ea4faac9b9cb5062c76a6b3ab4f65397e106", "0xb", "0x7", "0x18211d912741bc54c285b2d9e064677d9583d23d1c13cd6315badbb075631f3", "0x616a09e59f254563a69a8ec20eabbf00f63ab8298ec88b70bbe32b72cc64699", "0x6967836d5ad89ce9d3ae655ceb419900910450d32a5c258ae81cd8f45f44e5d", "0x14f718f63db1f6b0485079a6100b7ffc9e28916799c1df3b57088a8bb2a9789", "0x353a201b0153a4e83ba63adfc59e952dcc5b59d9c99cda7b941b544fdca845a", "0x171f281c5b58f4e8065c0a62ed1d593509a8716b239af914b96556cc7c50845", "0x345fd24f3305953bcd73901a2948cc4f8dde03373f893d2f310491bf0773c8c", "0x2", "0x1aa3586a2df68cdd16b828652af188839a563222f2f554602eca15b99988ce", "0x7f7f98f280212b5dabcf57d77cc81f9ce1f4d9e1d72c3c24df954edf98b7725"], "type": "INVOKE_FUNCTION"}, {"transaction_hash": "0x4c2d8153bc1869b19e72cc54e093dab2e3ceb1ade34b0a7b3200259dcfa03f2", "version": "0x1", "max_fee": "0x354a6ba7a18000", "signature": ["0x4d82a74f09ddef3863f7185707bbdf7e14e47bdbe72c24ad6c5bbc1064a2213", "0x100f5c4cd679818b1a79922b8e26dc4c9d0ddba213e0669b212c3e24b6d255c"], "nonce": "0xd11", "sender_address": "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "calldata": ["0x2", "0x4e18c9f8a657466bfe60e23e590fc1e60cb465bf6a8ca8587b6a35f3b53db20", "0x2468d193cd15b621b24c2a602b8dbcfa5eaa14f88416c40c09d7fd12592cb4b", "0x0", "0x1305509ce387ad1b83a47c85a0ff3e82cb3be71f39e8c8753589f10f60ecde4", "0x1136789e1c76159d9b9eca06fcef05bdcf77f5d51bd4d9e09f2bc8d7520d8e6", "0x2", "0x22ba9c150f70a0710980f011720f8bcf", "0x9859d9b143ea8473a96ca0f0cae406d4"], "type": "INVOKE_FUNCTION"}], "timestamp": 1708331964, "sequencer_address": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", "transaction_receipts": [{"execution_status": "SUCCEEDED", "transaction_index": 0, "transaction_hash": "0x1ffcecfdae93215db398482d3e91e065816bdeda116ef8d3e68f2f6c01a0e22", "l2_to_l1_messages": [], "events": [{"from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", "keys": ["0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9", "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8"], "data": ["0x1e5204243c0", "0x0"]}, {"from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", "keys": ["0xa9fa878c35cd3d0191318f89033ca3e5501a3d90e21e3cc9256bdd5cd17fdd"], "data": ["0xca46d96b37266650e0a8b79938d9300037337cad82ea4f45a921ad68b6a5f9", "0x265ebac9efe21a8d", "0x0", "0x265ebcaf10245e4d", "0x0"]}], "execution_resources": {"n_steps": 10432, "builtin_instance_counter": {"ec_op_builtin": 3, "range_check_builtin": 421, "pedersen_builtin": 24}, "n_memory_holes": 0, "data_availability": {"l1_gas": 0, "l1_data_gas": 128}}, "actual_fee": "0x1e5204243c0"}, {"execution_status": "SUCCEEDED", "transaction_index": 1, "transaction_hash": "0x176d3c945cfd1617a173023dd08904964a28d4047207a55890d535ecebeb855", "l2_to_l1_messages": [], "events": [{"from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", "keys": ["0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9", "0x14c5c28581c68f64c9a3d86b919094a5209fe0ccb454f776b3be2c3968cd91d", "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8"], "data": ["0x1e67bc11f40", "0x0"]}, {"from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", "keys": ["0xa9fa878c35cd3d0191318f89033ca3e5501a3d90e21e3cc9256bdd5cd17fdd"], "data": ["0xca46d96b37266650e0a8b79938d9300037337cad82ea4f45a921ad68b6a5f9", "0x265ebcaf10245e4d", "0x0", "0x265ebe958be57d8d", "0x0"]}], "execution_resources": {"n_steps": 13918, "builtin_instance_counter": {"pedersen_builtin": 25, "ec_op_builtin": 3, "range_check_builtin": 708}, "n_memory_holes": 0, "data_availability": {"l1_gas": 0, "l1_data_gas": 128}}, "actual_fee": "0x1e67bc11f40"}, {"execution_status": "SUCCEEDED", "transaction_index": 2, "transaction_hash": "0x1026a5617deaf998b8cd2ee8c74ccee9691bedbdcabb20681f148918a67c579", "l2_to_l1_messages": [], "events": [{"from_address": "0x3b73e1773ce95172c5f525f29d4d1eb2b407429559bceaa7dec815deb6c0028", "keys": ["0x18211d912741bc54c285b2d9e064677d9583d23d1c13cd6315badbb075631f3", "0x616a09e59f254563a69a8ec20eabbf00f63ab8298ec88b70bbe32b72cc64699", "0x6967836d5ad89ce9d3ae655ceb419900910450d32a5c258ae81cd8f45f44e5d", "0x14f718f63db1f6b0485079a6100b7ffc9e28916799c1df3b57088a8bb2a9789", "0x353a201b0153a4e83ba63adfc59e952dcc5b59d9c99cda7b941b544fdca845a", "0x171f281c5b58f4e8065c0a62ed1d593509a8716b239af914b96556cc7c50845", "0x345fd24f3305953bcd73901a2948cc4f8dde03373f893d2f310491bf0773c8c"], "data": ["0x1aa3586a2df68cdd16b828652af188839a563222f2f554602eca15b99988ce", "0x7f7f98f280212b5dabcf57d77cc81f9ce1f4d9e1d72c3c24df954edf98b7725"]}], "execution_resources": {"n_steps": 7254, "builtin_instance_counter": {"ec_op_builtin": 3, "range_check_builtin": 186, "pedersen_builtin": 34}, "n_memory_holes": 0, "data_availability": {"l1_gas": 0, "l1_data_gas": 256}}, "actual_fee": "0x52b3dc781d2"}, {"execution_status": "SUCCEEDED", "transaction_index": 3, "transaction_hash": "0x4c2d8153bc1869b19e72cc54e093dab2e3ceb1ade34b0a7b3200259dcfa03f2", "l2_to_l1_messages": [], "events": [], "execution_resources": {"n_steps": 10625, "builtin_instance_counter": {"range_check_builtin": 474, "poseidon_builtin": 1, "pedersen_builtin": 23, "ec_op_builtin": 3}, "n_memory_holes": 0, "data_availability": {"l1_gas": 0, "l1_data_gas": 128}}, "actual_fee": "0x299b1f89098"}], "starknet_version": "0.13.1"}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/330363.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 330363, "signature": ["0x7685fbcd4bacae7554ad17c6962221143911d894d7b8794d29234623f392562", "0x343e605de3957e664746ba8ef82f2b0f9d53cda3d75dcb078290b8edd010165"], "signature_input": {"block_hash": "0x8ab8117e952f95efd96de0bc66dc6f13fe68dfda14b95fe1972759dee283a8", "state_diff_commitment": "0x2661bc5a84a6ee84586df7aa9d3fc084df80d46bfd873e03ec46352a1886fc"}}
16 changes: 16 additions & 0 deletions core/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ type Header struct {
Signatures [][]*felt.Felt
// Amount of STRK charged per Gas spent
GasPriceSTRK *felt.Felt
// The mode of the L1 data availability
L1DAMode L1DAMode
// The gas price for L1 data availability
L1DataGasPrice *GasPrice
}

type L1DAMode uint

const (
Calldata L1DAMode = iota
Blob
)

type GasPrice struct {
PriceInWei *felt.Felt
PriceInFri *felt.Felt
}

type Block struct {
Expand Down
6 changes: 6 additions & 0 deletions core/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ func TestBlockHash(t *testing.T) {
chain: utils.Goerli2,
name: "Block 110238 with version 0.11.1",
},
// https://external.integration.starknet.io/feeder_gateway/get_block?blockNumber=330363
{
number: 330363,
chain: utils.Integration,
name: "Block 330363 with version 0.13.1",
},
}

for _, testcase := range tests {
Expand Down
71 changes: 57 additions & 14 deletions starknet/block.go
Original file line number Diff line number Diff line change
@@ -1,31 +1,74 @@
package starknet

import "github.com/NethermindEth/juno/core/felt"
import (
"errors"

"github.com/NethermindEth/juno/core/felt"
)

// Block object returned by the feeder in JSON format for "get_block" endpoint
type Block struct {
Hash *felt.Felt `json:"block_hash"`
ParentHash *felt.Felt `json:"parent_block_hash"`
Number uint64 `json:"block_number"`
StateRoot *felt.Felt `json:"state_root"`
Status string `json:"status"`
Transactions []*Transaction `json:"transactions"`
Timestamp uint64 `json:"timestamp"`
Version string `json:"starknet_version"`
Receipts []*TransactionReceipt `json:"transaction_receipts"`
SequencerAddress *felt.Felt `json:"sequencer_address"`
GasPriceSTRK *felt.Felt `json:"strk_l1_gas_price"`
Hash *felt.Felt `json:"block_hash"`
ParentHash *felt.Felt `json:"parent_block_hash"`
Number uint64 `json:"block_number"`
StateRoot *felt.Felt `json:"state_root"`
TransactionCommitment *felt.Felt `json:"transaction_commitment"`
EventCommitment *felt.Felt `json:"event_commitment"`
Status string `json:"status"`
Transactions []*Transaction `json:"transactions"`
Timestamp uint64 `json:"timestamp"`
Version string `json:"starknet_version"`
Receipts []*TransactionReceipt `json:"transaction_receipts"`
SequencerAddress *felt.Felt `json:"sequencer_address"`
L1GasPrice *GasPrice `json:"l1_gas_price"`
L1DAMode L1DAMode `json:"l1_da_mode"`
L1DataGasPrice *GasPrice `json:"l1_data_gas_price"`

// TODO we can remove the GasPrice method and the GasPriceLegacy field
// once v0.13 lands on mainnet. In the meantime, we include both to support
// pre-v0.13 jsons, where `eth_l1_gas_price` was called `gas_price`.
GasPriceLegacy *felt.Felt `json:"gas_price"`
GasPriceWEI *felt.Felt `json:"eth_l1_gas_price"`
// TODO these fields were replaced by `l1_gas_price` in v0.13.1
GasPriceWEI *felt.Felt `json:"eth_l1_gas_price"`
GasPriceFRI *felt.Felt `json:"strk_l1_gas_price"`
}

func (b *Block) GasPriceETH() *felt.Felt {
if b.GasPriceWEI != nil {
if b.L1GasPrice != nil {
return b.L1GasPrice.PriceInWei
} else if b.GasPriceWEI != nil {
return b.GasPriceWEI
}
return b.GasPriceLegacy
}

func (b *Block) GasPriceSTRK() *felt.Felt {
if b.L1GasPrice != nil {
return b.L1GasPrice.PriceInFri
}
return b.GasPriceFRI
}

type L1DAMode uint

const (
Calldata L1DAMode = iota
Blob
)

func (m *L1DAMode) UnmarshalJSON(data []byte) error {
switch string(data) {
case `"CALLDATA"`:
*m = Calldata

Check warning on line 62 in starknet/block.go

View check run for this annotation

Codecov / codecov/patch

starknet/block.go#L61-L62

Added lines #L61 - L62 were not covered by tests
case `"BLOB"`:
*m = Blob
default:
return errors.New("unknown L1DAMode")

Check warning on line 66 in starknet/block.go

View check run for this annotation

Codecov / codecov/patch

starknet/block.go#L65-L66

Added lines #L65 - L66 were not covered by tests
}
return nil
}

type GasPrice struct {
PriceInWei *felt.Felt `json:"price_in_wei"`
PriceInFri *felt.Felt `json:"price_in_fri"`
}
Loading