Skip to content

Commit ee21c4a

Browse files
authored
fix: add from address to claimTo to support merkle proofs (#631)
1 parent 8edb398 commit ee21c4a

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/server/routes/contract/extensions/erc1155/write/claimTo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export async function erc1155claimTo(fastify: FastifyInstance) {
8080
});
8181
const transaction = claimTo({
8282
contract,
83+
from: fromAddress as Address,
8384
to: receiver,
8485
quantity: BigInt(quantity),
8586
tokenId: BigInt(tokenId),

src/server/routes/contract/extensions/erc20/write/claimTo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export async function erc20claimTo(fastify: FastifyInstance) {
7777
});
7878
const transaction = claimTo({
7979
contract,
80+
from: fromAddress as Address,
8081
to: recipient,
8182
quantity: amount,
8283
});

src/server/routes/contract/extensions/erc721/write/claimTo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export async function erc721claimTo(fastify: FastifyInstance) {
7676
});
7777
const transaction = claimTo({
7878
contract,
79+
from: fromAddress as Address,
7980
to: receiver,
8081
quantity: BigInt(quantity),
8182
});

src/worker/tasks/sendTransactionWorker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ const _sendTransaction = async (
162162
} catch (e: unknown) {
163163
// If the transaction will revert, error.message contains the human-readable error.
164164
const errorMessage = (e as Error)?.message ?? `${e}`;
165+
job.log(`Failed to estimate gas: ${errorMessage}`);
165166
return {
166167
...queuedTransaction,
167168
status: "errored",

0 commit comments

Comments
 (0)