Skip to content
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: 2 additions & 2 deletions core/types/tx_state_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)

// StateSyncTx is the system transaction of Bor to introduce fetched state sync events from Heimdall
// StateSyncTx is a system transaction in Bor that introduces state sync events.
type StateSyncTx struct {
StateSyncData []*StateSyncData
}
Expand Down Expand Up @@ -109,5 +109,5 @@ func (tx *StateSyncTx) decode(b []byte) error {
}

func (tx *StateSyncTx) sigHash(chainID *big.Int) common.Hash {
panic("StateSyncTx has no sigHash")
panic("sigHash called on StateSyncTx")
}
4 changes: 2 additions & 2 deletions graphql/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (t *Transaction) MaxFeePerGas(ctx context.Context) *hexutil.Big {
return nil
}
switch tx.Type() {
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType:
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType, types.StateSyncTxType:
return (*hexutil.Big)(tx.GasFeeCap())
default:
return nil
Expand All @@ -331,7 +331,7 @@ func (t *Transaction) MaxPriorityFeePerGas(ctx context.Context) *hexutil.Big {
return nil
}
switch tx.Type() {
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType:
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType, types.StateSyncTxType:
return (*hexutil.Big)(tx.GasTipCap())
default:
return nil
Expand Down
6 changes: 6 additions & 0 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,12 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
result.GasPrice = (*hexutil.Big)(tx.GasFeeCap())
}
result.AuthorizationList = tx.SetCodeAuthorizations()

case types.StateSyncTxType:
yparity := hexutil.Uint64(v.Sign())
result.YParity = &yparity
result.GasFeeCap = (*hexutil.Big)(tx.GasFeeCap())
result.GasTipCap = (*hexutil.Big)(tx.GasTipCap())
}

return result
Expand Down
Loading