Contracts API provides Contract Self Desctruct and Contract Create endpoints which allow pulling the corresponding contract actions.

Contract Create endpoint

Contract Create endpoint provides access to all Contract Creates:

  • of the specified transaction Origin address, or with any Origin, if not specified
  • of the specified Caller address, or of any Caller, if not specified
  • on a specified Contract, or on any Contract, if not specified
    (at least one of Origin, Called, or Contrac should be specified)
  • within a specified block/time range or across all history, if not specified

Now, let's dive into the examples of how this endpoint might be used.

Get the transaction where USDC token smart contract was created

Let us say we want to see all Uniswap pairs. To do that, we will look for all the contracts created by the Uniswap factory contract.

This request will pull every Contract Create that was ever called from the Uniswap factory contract on ETH Mainnet. Make sure to replace YOUR_API_KEY with your actual API key.

curl --request GET \
     --url 'https://api.parsiq.net/tsunami/eip155-1/v1/contracts/creates?block_number_start=1&block_number_end=latest&caller=0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f&limit=100' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_API_KEY'

Contract Self Desctruct endpoint

Contract Self Destruct endpoint provides access to all Contract Self Destructs:

  • of the specified transaction Origin address, or with any Origin, if not specified
  • of the specified Caller address, or of any Caller, if not specified
  • on a specified Contract, or on any Contract, if not specified
    (at least one of Origin, Called, or Contrac should be specified)
  • within a specified block/time range or across all history, if not specified

Now, let's dive into the examples of how this endpoint might be used.

Get all Self-Destructs done from the specified wallet

Let us say we want to pull all the Self-Destructs the specified wallet (a public wallet of the developer of the project that we monitor, for instance) have ever done.

This request will pull every Self-Destruct that were ever triggered by the specified address on ETH Mainnet. Make sure to replace YOUR_API_KEY with your actual API key.

curl --request GET \
     --url 'https://api.parsiq.net/tsunami/eip155-1/v1/contracts/self-destructs?origin=0xcc2c2cd417a9c39cf0e48622988dbec0b1b37064&block_number_start=1&block_number_end=latest&limit=100' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer YOUR_API_KEY'