Unverified Commit d73df893 authored by Sina Mahmoodi's avatar Sina Mahmoodi Committed by GitHub

graphql: add rawReceipt field to transaction type (#24738)

* graphql: add tx receiptsRLP field

* use MarshalBinary
Co-authored-by: 's avatarRyan Schneider <ryanleeschneider@gmail.com>

* update schema
Co-authored-by: 's avatarRyan Schneider <ryanleeschneider@gmail.com>

* rename to rawReceipt

* indent fix
Co-authored-by: 's avatarRyan Schneider <ryanleeschneider@gmail.com>
parent 8d84a701
...@@ -514,6 +514,14 @@ func (t *Transaction) V(ctx context.Context) (hexutil.Big, error) { ...@@ -514,6 +514,14 @@ func (t *Transaction) V(ctx context.Context) (hexutil.Big, error) {
return hexutil.Big(*v), nil return hexutil.Big(*v), nil
} }
func (t *Transaction) RawReceipt(ctx context.Context) (hexutil.Bytes, error) {
receipt, err := t.getReceipt(ctx)
if err != nil || receipt == nil {
return nil, err
}
return receipt.MarshalBinary()
}
type BlockType int type BlockType int
// Block represents an Ethereum block. // Block represents an Ethereum block.
......
...@@ -137,9 +137,12 @@ const schema string = ` ...@@ -137,9 +137,12 @@ const schema string = `
r: BigInt! r: BigInt!
s: BigInt! s: BigInt!
v: BigInt! v: BigInt!
#Envelope transaction support # Envelope transaction support
type: Int type: Int
accessList: [AccessTuple!] accessList: [AccessTuple!]
# RawReceipt is the binary encoding of the receipt. For post EIP-2718 typed transactions
# this is equivalent to TxType || ReceiptEncoding.
rawReceipt: Bytes!
} }
# BlockFilterCriteria encapsulates log filter criteria for a filter applied # BlockFilterCriteria encapsulates log filter criteria for a filter applied
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment