Get receipt CID and block data for logs.
This commit is contained in:
committed by
Arijit Das
parent
42f066772b
commit
18266c4f9d
@@ -91,6 +91,8 @@ type Log struct {
|
||||
backend *eth.Backend
|
||||
transaction *Transaction
|
||||
log *types.Log
|
||||
cid string
|
||||
ipldBlock []byte
|
||||
}
|
||||
|
||||
func (l *Log) Transaction(ctx context.Context) *Transaction {
|
||||
@@ -117,6 +119,14 @@ func (l *Log) Data(ctx context.Context) hexutil.Bytes {
|
||||
return hexutil.Bytes(l.log.Data)
|
||||
}
|
||||
|
||||
func (l *Log) Cid(ctx context.Context) string {
|
||||
return l.cid
|
||||
}
|
||||
|
||||
func (l *Log) IpldBlock(ctx context.Context) hexutil.Bytes {
|
||||
return hexutil.Bytes(l.ipldBlock)
|
||||
}
|
||||
|
||||
// Transaction represents an Ethereum transaction.
|
||||
// backend and hash are mandatory; all others will be fetched when required.
|
||||
type Transaction struct {
|
||||
|
||||
@@ -66,6 +66,12 @@ const schema string = `
|
||||
data: Bytes!
|
||||
# Transaction is the transaction that generated this log entry.
|
||||
transaction: Transaction!
|
||||
|
||||
# CID for the Receipt IPLD block this Log exists in.
|
||||
cid: String!
|
||||
|
||||
# IPLD block data for the Receipt this Log exists in.
|
||||
ipldBlock: Bytes!
|
||||
}
|
||||
|
||||
# Transaction is an Ethereum transaction.
|
||||
|
||||
Reference in New Issue
Block a user