From cace6928f251d7b67f0210742138bcba91e2ddc1 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 16 Jan 2024 14:35:08 +0330 Subject: [PATCH 1/2] eth: fix signTx result, add fillTx --- src/eth/fill.yaml | 11 +++++++++++ src/eth/sign.yaml | 4 ++-- src/schemas/transaction.yaml | 26 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/eth/fill.yaml diff --git a/src/eth/fill.yaml b/src/eth/fill.yaml new file mode 100644 index 00000000..aad77e44 --- /dev/null +++ b/src/eth/fill.yaml @@ -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' diff --git a/src/eth/sign.yaml b/src/eth/sign.yaml index 0d6f50d2..713da04a 100644 --- a/src/eth/sign.yaml +++ b/src/eth/sign.yaml @@ -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' diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 52a9b592..ef85bbe4 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -421,3 +421,29 @@ GenericTransaction: 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' +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/TransactionUnsigned' From 3dc0471aa49f7bd22eb5dfb46ac06aa0e064d22f Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Fri, 9 Feb 2024 16:35:18 +0100 Subject: [PATCH 2/2] filled tx --- src/schemas/transaction.yaml | 48 +++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index ef85bbe4..e5793b10 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -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 @@ -417,6 +444,18 @@ 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. @@ -434,6 +473,13 @@ SignTransactionResult: 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. @@ -446,4 +492,4 @@ FillTransactionResult: $ref: '#/components/schemas/byte' tx: title: tx - $ref: '#/components/schemas/TransactionUnsigned' + $ref: '#/components/schemas/FilledTransaction'