This commit is contained in:
Amit Shah 2020-02-04 13:36:02 -05:00
parent a1313b5b1e
commit c83565c45c
2 changed files with 30 additions and 0 deletions

View file

@ -314,6 +314,33 @@ func (t *Transaction) Logs(ctx context.Context) (*[]*Log, error) {
return &ret, nil
}
func (t *Transaction) R(ctx context.Context) (hexutil.Big, error){
tx, err:= t.resolve(ctx)
if err!= nil || tx == nil{
return hexutil.Big{}, err
}
r,_,_ := tx.RawSignatureValues()
return hexutil.Big(*r),nil
}
func (t *Transaction) S(ctx context.Context) (hexutil.Big, error){
tx, err:= t.resolve(ctx)
if err!= nil || tx == nil{
return hexutil.Big{}, err
}
_,s,_ := tx.RawSignatureValues()
return hexutil.Big(*s),nil
}
func (t *Transaction) V(ctx context.Context) (hexutil.Big, error){
tx, err:= t.resolve(ctx)
if err!= nil || tx == nil{
return hexutil.Big{}, err
}
_,_,v := tx.RawSignatureValues()
return hexutil.Big(*v),nil
}
type BlockType int
// Block represents an Ethereum block.

View file

@ -115,6 +115,9 @@ const schema string = `
# Logs is a list of log entries emitted by this transaction. If the
# transaction has not yet been mined, this field will be null.
logs: [Log!]
r: BigInt!
s: BigInt!
v: BigInt!
}
# BlockFilterCriteria encapsulates log filter criteria for a filter applied