Skip to content

Commit

Permalink
updated write end-point to have support for all types (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanW3 authored Nov 1, 2023
1 parent bf0d2ae commit dd4ad4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/server/api/contract/write/write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const writeRequestBodySchema = Type.Object({
}),
Type.Tuple([Type.String(), Type.String()]),
Type.Object({}),
Type.Array(Type.Any()),
Type.Any(),
]),
),
...txOverridesForWriteRequest.properties,
Expand All @@ -32,7 +34,7 @@ const writeRequestBodySchema = Type.Object({
// Adding example for Swagger File
writeRequestBodySchema.examples = [
{
function_name: "transferFrom",
functionName: "transferFrom",
args: [
"0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473",
"0x3EcDBF3B911d0e9052b64850693888b008e18373",
Expand Down
4 changes: 3 additions & 1 deletion src/worker/tasks/processTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!,
Expand Down

0 comments on commit dd4ad4f

Please sign in to comment.