0

When searching for newly created tokens using factory.on("PairCreated", async (token0, token1, addressPair) is there any way to get the Txn Hash of each new pair to use in conjunction with .getTransactionReceipt?

1 Answer 1

2

is there any way to get the Txn Hash of each new pair to use in conjunction with .getTransactionReceipt ?

Yes, just use :

factory.on("PairCreated", async (token0, token1, addressPair, event) => {});

And you can read the tx hash in event.transactionHash or call event.getTransactionReceipt directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.