Get smart contract transfer history (Eth/Poly)?

I see we have qn_getTransfersByNFT RPC Method | Ethereum Documentation

Is there a way to get transfers of the smart contract itself instead of for a specific NFT? I tried to just omit the tokenId but that comes in as malformed.

Want to be able to see all transfers of a eth/poly smart-contract to determine all past/present owner wallets of said smart-contract

Hey Llama,

The GraphAPI would be better suited for this. The Graph API enables you to do deeper custom queries on data.

query Ethereum($contractAddress: String!) {
  ethereum {
    contract(contractAddress: $contractAddress) {
      tokenEvents {
        totalCount
        pageInfo {
          endCursor
          hasNextPage
          hasPreviousPage
        }
        edges {
          node {
            ... on TokenTransferEvent {
              blockNumber
              transactionHash
              transferIndex
              timestamp
              type
              fromAddress
              toAddress
              from {
                address
              }
              to {
                address
              }
              transaction {
                hash
              }
              contractAddress
              contractERCStandard
              tokenId
              tokenQuantity
              
            }
          }
        }
      }
    }
  }
}

-Nick

Appreciate you Nick. Gonna take a look at the graph api, that definitely seems like the right direction.

Of note, I think your request gets tokenTransfers whereas I’m looking for contract ownership transfers/information. Ex: Wallet-address-A created a 721||1155 contract => Wallet-address-A transferred contract ownership to Wallet-address-B

Hey Llama,

You may find qn_fetchNFTCollectionDetails (v2) RPC Method | Ethereum Documentation useful because it returns genesisTransaction which you can then use to lookup details like what wallet initiated the contract.

-Nick

1 Like

Calling owner on the contract would give the current owner’s address. We don’t currently index ownership transfers.

If those events are of interest in real-time, you may utilize QuickAlerts to listen for OwnershipTransferred events on smart contracts. Not all contracts follow the same conventions, but many do.

-Nick

1 Like