What You’ll Learn
- How to retrieve smart contracts events
Prerequisites
Before you get started, please follow this guide to install CDP SDK.Smart Contract Events
List Smart Contract Events
To start, create a CDP API key. Then, initialize the CDP SDK by passing your downloaded API key file, and retrieve smart contracts events.- Typescript
Smart Contract ABI Management
Authentication
To get started, create a secret API key in the Portal’s API Key section if you don’t already have one. Suppose you store your secret API key at~/Downloads/cdp_api_key.json
Before making any SDK calls, import the necessary package and authenticate using your downloaded API key.
- Python
- Typescript
Register A Smart Contract
Below is an example of a smart contract registration call. You can upload the smart contract you’re interested in. Remember to replace the network, contract address, contract name and abi with your own values. Note that attempting to register the same contract again will result in an error.- Python
- Typescript
List Smart Contracts
Below is an example call that lists all of your smart contracts.- Python
- Typescript
Update The Smart Contract
Below is an example of a smart contract update call. Remember to replace network, contract address, contract name and abi with your own values. Currently, only the ABI and contract name can be updated. You should perform the update call on an existing Smart Contract object.- Python
- Typescript