From dd4ad4f56aa9f382708a6ec0964396b7604a518a Mon Sep 17 00:00:00 2001 From: farhanW3 <132962163+farhanW3@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:04:00 -0700 Subject: [PATCH] updated write end-point to have support for all types (#280) --- src/server/api/contract/write/write.ts | 4 +++- src/worker/tasks/processTx.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/api/contract/write/write.ts b/src/server/api/contract/write/write.ts index b32c9866f..4391f6115 100644 --- a/src/server/api/contract/write/write.ts +++ b/src/server/api/contract/write/write.ts @@ -24,6 +24,8 @@ const writeRequestBodySchema = Type.Object({ }), Type.Tuple([Type.String(), Type.String()]), Type.Object({}), + Type.Array(Type.Any()), + Type.Any(), ]), ), ...txOverridesForWriteRequest.properties, @@ -32,7 +34,7 @@ const writeRequestBodySchema = Type.Object({ // Adding example for Swagger File writeRequestBodySchema.examples = [ { - function_name: "transferFrom", + functionName: "transferFrom", args: [ "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "0x3EcDBF3B911d0e9052b64850693888b008e18373", diff --git a/src/worker/tasks/processTx.ts b/src/worker/tasks/processTx.ts index 264549a02..c6c4d1555 100644 --- a/src/worker/tasks/processTx.ts +++ b/src/worker/tasks/processTx.ts @@ -225,7 +225,9 @@ export const processTx = async () => { if (rpcRes.result) { const txHash = rpcRes.result; const txRes = await provider.getTransaction(txHash); - + logger.worker.info( + `[Transaction] [${tx.queueId}] Sent tx ${txHash}, with Nonce ${txRes.nonce}`, + ); return { status: TransactionStatusEnum.Submitted, queueId: tx.queueId!,