ContractRepository class for managing contracts associated with your Tenderly project. The ContractRepository allows you to add, update, and remove contracts, as well as verify them.
With the Tenderly SDK initialized, you can use the contracts namespace to access the ContractRepository instance.
Adding a contract
To add a new contract, use theadd method of the contracts namespace:
example.jsx
Updating a contract
To update an existing contract, use theupdate method of the contracts namespace:
example.jsx
Removing a contract
To remove a contract, use theremove method of the contracts namespace:
example.jsx
Verifying a contract
To verify a contract, you can useverify method of the contracts namespace.
There are three examples that show the usage of tenderly.contracts.verify method:
- First example shows the verification of a simple
Countercontract with no dependencies. - Second example shows the verification of a
MyTokencontract that has multiple dependencies which are other contracts. - Third example shows the verification of a
LibraryTokencontract that has a library dependency.
tenderly-sdk repo along with the instructions on how to start them. Here will be shown only a MyToken contract with a few dependencies so you can see how to import them:
example.js