ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

Can't detect tcontract creation in mempool after upgrade

Open HugoMag opened this issue 1 year ago • 1 comments

Ethers Version

6.13.1

Search Terms

contract creation

Describe the Problem

Hi, I've upgraded from v5 to v6 and the code that was working and getting the "creates" or "contractAddress" are no longer present in transactions when I call provider.getTransaction(tx). I'm calling this method for all transactions in the mempool.

This happens with several different providers (alchemy, chainnodes, noderpc, etc).

Code Snippet

let transaction = await provider.getTransaction(tx);
const {creates: createsTr, contractAddress } = transaction;
      const creates = createsTr || contractAddress;
      if (!creates) {
        console.log(
          `Something went wrong getting new contract info from mempool. Can't find creates parameter `
        );
        return false;
      }

Contract ABI

No response

Errors

No response

Environment

node.js (v12 or newer)

Environment (Other)

No response

HugoMag avatar Jul 16 '24 14:07 HugoMag

Can you provide an example tx hash that doesn't work?

ricmoo avatar Jul 25 '24 21:07 ricmoo