diff --git a/starknet/block.go b/starknet/block.go index 39ad3ad55..ceabe842a 100644 --- a/starknet/block.go +++ b/starknet/block.go @@ -53,22 +53,6 @@ func (b *Block) L1GasPriceSTRK() *felt.Felt { return b.GasPriceFRI } -// TODO: Fix when we have l2 gas price -func (b *Block) L2GasPriceETH() *felt.Felt { - if b.L2GasPrice != nil { - return b.L2GasPrice.PriceInWei - } - return &felt.Zero -} - -// TODO: Fix when we have l2 gas price -func (b *Block) L2GasPriceSTRK() *felt.Felt { - if b.L2GasPrice != nil { - return b.L2GasPrice.PriceInFri - } - return &felt.Zero -} - type L1DAMode uint const ( diff --git a/starknet/block_test.go b/starknet/block_test.go deleted file mode 100644 index 73dd158ba..000000000 --- a/starknet/block_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package starknet_test - -import ( - "testing" - - "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/starknet" - "github.com/stretchr/testify/assert" -) - -func TestL2GasPrice(t *testing.T) { - t.Run("L2GasPrice is not set", func(t *testing.T) { - block := starknet.Block{} - assert.Equal(t, &felt.Zero, block.L2GasPriceETH()) - assert.Equal(t, &felt.Zero, block.L2GasPriceSTRK()) - }) - - t.Run("L2GasPrice is set", func(t *testing.T) { - gasPriceWei := new(felt.Felt).SetUint64(100) - gasPriceFri := new(felt.Felt).SetUint64(50) - block := starknet.Block{ - L2GasPrice: &starknet.GasPrice{ - PriceInWei: gasPriceWei, - PriceInFri: gasPriceFri, - }, - } - assert.Equal(t, gasPriceWei, block.L2GasPriceETH()) - assert.Equal(t, gasPriceFri, block.L2GasPriceSTRK()) - }) -}