Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth: add eth_fillTransaction, fix result of eth_signTransaction #512

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/eth/fill.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: eth_fillTransaction
summary: Fills in missing transaction fields to be signed and submitted.
params:
- name: Transaction
required: true
schema:
$ref: '#/components/schemas/GenericTransaction'
result:
name: Transaction result
schema:
$ref: '#/components/schemas/FillTransactionResult'
4 changes: 2 additions & 2 deletions src/eth/sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
schema:
$ref: '#/components/schemas/GenericTransaction'
result:
name: Encoded transaction
name: Transaction result
schema:
$ref: '#/components/schemas/bytes'
$ref: '#/components/schemas/SignTransactionResult'
72 changes: 72 additions & 0 deletions src/schemas/transaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,33 @@ Transaction4844Unsigned:
title: chainId
description: Chain ID that this transaction is valid on.
$ref: '#/components/schemas/uint'
Transaction4844UnsignedWithSidecar:
title: Unsigned 4844 transaction with sidecar
type: object
allOf:
- $ref: '#/components/schemas/Transaction4844Unsigned'
- title: EIP-4844 transaction signature properties.
required:
- blobs
- commitments
- proofs
properties:
blobs:
title: blobs
description: Raw blob data.
type: array
items:
$ref: '#/components/schemas/bytes'
commitments:
title: Blob commitments.
type: array
items:
$ref: '#/components/schemas/bytes'
proofs:
title: Blob proofs.
type: array
items:
$ref: '#/components/schemas/bytes'
AccessListEntry:
title: Access list entry
type: object
Expand Down Expand Up @@ -417,7 +444,52 @@ GenericTransaction:
type: array
items:
$ref: '#/components/schemas/bytes'
commitments:
title: commitments
description: List of blob commitments as per EIP-4844.
type: array
items:
$ref: '#/components/schemas/bytes'
proofs:
title: proofs
description: List of blob proofs as per EIP-4844.
type: array
items:
$ref: '#/components/schemas/bytes'
chainId:
title: chainId
description: Chain ID that this transaction is valid on.
$ref: '#/components/schemas/uint'
SignTransactionResult:
type: object
title: Encoded and raw signed transaction object.
required:
- raw
- tx
properties:
raw:
title: raw
$ref: '#/components/schemas/byte'
tx:
title: tx
$ref: '#/components/schemas/TransactionSigned'
FilledTransaction:
oneOf:
- $ref: '#/components/schemas/Transaction4844UnsignedWithSidecar'
- $ref: '#/components/schemas/Transaction4844Unsigned'
- $ref: '#/components/schemas/Transaction1559Unsigned'
- $ref: '#/components/schemas/Transaction2930Unsigned'
- $ref: '#/components/schemas/TransactionLegacyUnsigned'
FillTransactionResult:
type: object
title: Encoded and raw unsigned transaction object.
required:
- raw
- tx
properties:
raw:
title: raw
$ref: '#/components/schemas/byte'
tx:
title: tx
$ref: '#/components/schemas/FilledTransaction'
Loading