Welcome to Dev3
Search
K
➡️

Importing Contracts

To start interacting with the already deployed smart contracts, you can import them using the Dev3 Dashboard, which is automatically going to expose the contract to the SDK. Dev3 will try to recognize and match the imported smart contract functions with some of the interfaces and smart contracts stored in the publicly available Dev3 contracts base (see here), and if there's no match found for the implementation, Dev3 will try to decompile the data at the given contract address and use the smart detection to guess the function names and parameters. To import the contract, go to your workspace on the Dev3 Dashboard and click on "Import Deployed".
Import Action
Then provide the address of the contract and give it a human friendly alias.
Alias is a name under which the contract is exposed to the SDK.
Providing the data for smart contract import
When you're done, hit import and Dev3 will take care of the rest. Once the contract is imported, you will be able to find it in the "My Contracts" section as shown below.
Imported Chainlink BTC Price Feed
You can play with the contract directly on the dashboard, but you can also use the contract alias to communicate with the smart contract via the SDK. For example, to call a function on the imported Chainlink price feed via the SDK, we can use the following code snippet (live example):
And here's the frontend part where you can actually test the code and fetch the BTC price from one of the Chainlink Oracles deployed on Mumbai network, which we've imported on the Dev3 Dashboard: