Importing a smart contract already deployed on the blockchain
You can import on Starton smart contracts that are already deployed on the blockchain. To do so, you will need:
- the address and network of the contract
- the ABI of the contract
Be sure to replace x-api-key value
with your own API key!
- From Code
- From Webapp
const axios = require("axios")
const axiosInstance = axios.create({
baseURL: "https://api.starton.com",
headers: {
"x-api-key": "PUT HERE YOUR API KEY",
},
})
axiosInstance
.post("/v3/smart-contract/import-existing", {
abi: "[]",
network: "",
description: "",
name: "",
address: "",
})
.then((response) => {
console.log(response.data)
})
- From Dashboard, go to Smart Contract.
- Click + Smart Contract.
- Fill in Smart Contract information:
- Enter your Smart Contract Name
- Select a Blockchain
- Select a Network
- Enter the address.
- Paste your Smart Contract ABI.