mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add signature parameter retrieval to graphql interface
This commit is contained in:
parent
a1313b5b1e
commit
fc38db5059
2 changed files with 30 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue