diff --git a/rpc/types.go b/rpc/types.go index 6aa7d239b9..57f13e0354 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -128,7 +128,7 @@ const ( ) // UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: -// - "latest", "earliest" or "pending" as string arguments +// - "latest", "earliest", "pending" and "confirmed" as string arguments // - the block number // Returned errors: // - an invalid block number error when the given argument isn't a known strings @@ -147,6 +147,7 @@ func (bn *BlockNumber) UnmarshalJSON(data []byte) error { return nil case "confirmed": *bn = ConfirmedBlockNumber + return nil } blckNum, err := hexutil.DecodeUint64(input)