Welcome to Dev3
  • ➕Create a Dev3 App
  • 🤖SDK
    • 📖Introduction
    • ⚙️Initialization
    • ➡️Importing Contracts
    • 🤝User Authentication
      • Options
    • 🔍Query Contracts
      • Function Parameters
    • ⚡Execute Contracts
      • Execution Options
    • 🛠️Deploy Contracts
      • Deployment Options
    • 📖Address Book
    • ❓FAQ
      • Out of gas error
  • INTEGRATIONS
    • 🔷Chainlink Feeds
    • 🔷Chainlink Subscriptions
      • 🎲VRF Subscriptions
      • 🧮Functions Subscriptions
      • 🤖Upkeep Subscriptions
    • 🎆OriginTrail DKG
    • 📽️OriginTrail DKG Video Tutorial
    • 📊Polyflow Analytics
  • Pricing
    • 💸Dev3 Pricing Plans
    • 💸Polyflow Pricing Plans
  • 🚀Guides
    • 👾Launching an NFT Collection
      • Step 1: Upload assets
      • Step 2: Upload metadata
      • Step 3: Deploy contracts
  • 🏫Resources
    • 👨‍💻Developer Resources
Powered by GitBook
On this page
  1. SDK

Importing Contracts

PreviousInitializationNextUser Authentication

Last updated 2 years ago

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 (), 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".

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.

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.

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:

🤖
➡️
see here
Import Action
Providing the data for smart contract import
Imported Chainlink BTC Price Feed