forked from cerc-io/plugeth
graphql: add yParity field for transactions (#27882)
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
7ec60d5f0c
commit
10d9f9377b
@ -566,6 +566,16 @@ func (t *Transaction) V(ctx context.Context) hexutil.Big {
|
|||||||
return hexutil.Big(*v)
|
return hexutil.Big(*v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *Transaction) YParity(ctx context.Context) (*hexutil.Uint64, error) {
|
||||||
|
tx, _ := t.resolve(ctx)
|
||||||
|
if tx == nil || tx.Type() == types.LegacyTxType {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
v, _, _ := tx.RawSignatureValues()
|
||||||
|
ret := hexutil.Uint64(v.Int64())
|
||||||
|
return &ret, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (t *Transaction) Raw(ctx context.Context) (hexutil.Bytes, error) {
|
func (t *Transaction) Raw(ctx context.Context) (hexutil.Bytes, error) {
|
||||||
tx, _ := t.resolve(ctx)
|
tx, _ := t.resolve(ctx)
|
||||||
if tx == nil {
|
if tx == nil {
|
||||||
|
@ -151,6 +151,7 @@ const schema string = `
|
|||||||
r: BigInt!
|
r: BigInt!
|
||||||
s: BigInt!
|
s: BigInt!
|
||||||
v: BigInt!
|
v: BigInt!
|
||||||
|
yParity: Long
|
||||||
# Envelope transaction support
|
# Envelope transaction support
|
||||||
type: Long
|
type: Long
|
||||||
accessList: [AccessTuple!]
|
accessList: [AccessTuple!]
|
||||||
|
Loading…
Reference in New Issue
Block a user