Pull out data on all instances of contract being created and self-destructed

Get Contract Self Destructs

The 'Get Contract Self Destructs' endpoint provides access to all instances of contract being self-destructed. At least one of these parameters must be specified: 'origin', 'caller', 'contract'.

  • Origin: obtain all instances of contract being self-destructed by a specific transaction origin address OR return them from any origin if not specified.
  • Caller: extract all instances of contract being self-destructed by a particular caller address OR get them by any caller if not specified.
  • Contract: retrieve all instances of contract being self-destructed by a certain contract address OR return them from any contract if not specified.
  • Block/Time Range: define a range of blocks or a time interval within which contract being self-destructed occurred.

Let's explore some examples that demonstrate how to utilize this endpoint effectively.

Get all Self-Destructs initiated from a particular wallet

Suppose you want to pull out all instances of contract being self-destructed, initiated by a particular wallet address. Let's assume that this is a public wallet belonging to a developer of the project we are monitoring.

The request shown below extracts every instance of contract being self-destructed that has ever been triggered by the specified address on the Ethereum Mainnet. Be 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'

Get Contract Create

The 'Get Contract Create' endpoint provides access to all instances of contract being created. At least one of these parameters must be specified: 'origin', 'caller', 'contract'.

  • Origin: obtain all instances of contract being created based on the transaction origin address OR return them from any origin if not specified.
  • Caller: extract all instances of contract being created by a particular caller address OR get them by any caller if not specified.
  • Contract: retrieve all instances of contract being created specific to a particular contract address OR return them from any contract if not specified.
  • Block/Time Range: define a range of blocks or a time interval within which all instances of contract being created occurred.

Let's dive into some examples that demonstrate how to utilize this endpoint effectively.

Get the transaction where USDC token smart contract was created

Suppose you want to see all Uniswap pairs. In order to do that, search for all instances of contract being created by a Uniswap factory contract.

The request demonstrated below pulls out every instance of contract being created that has ever been called from the given Uniswap factory contract on the Ethereum Mainnet. Be 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'