Deploying a Neo Contract to Testnet
Deploying the Smart Contract
You can deploy your smart contract to the TestNet using different methods:
- Linkd Dev Tools extension for Visual Studio Code
- Neo Nova.
- Neo SDKs
- Available in Javascript, Python, Java, and Go.
- Neo CLI
- Neo Go
- Neo GUI
Deploying a Contract using the Linkd Dev Tools Extension
Find the _deploy
method in the smart contract file and click on the Deploy to Remote
button. The extension will ask you to select an account. Select one that has at least 10 TestNet $GAS. The extension will compile the smart contract and deploy it to the TestNet.
Deploying a Contract using Neo Nova
Neo Nova is a tool developed by the Rentfuse team. It allows you to deploy smart contracts using a web interface. Neo Nova supports both Neo Line and Neon Wallet.
To deploy a contract using Neo Nova, follow these steps:
- Visit the Neo Nova website.
- Select the Contract tab in the left sidebar.
- Click on
Select Wallet
in the top right corner.- Select the wallet you want to use.
- Click
Connect
.
- Once the wallet is connected, click
Import
.- Click to import the
NEF
andManifest
.
- Click to import the
- Click
Deploy
.
If the deployment fails, try other methods.
Deploying a Contract using the Neo SDKs using a WIF
Use the following code to deploy a smart contract using the Neo SDKs. Replace the wif
value with your private key. The code exposes the user’s private key and should not be used in production.
Note: The code above is for demonstration purposes only. It exposes the user’s private key and should not be used in production.
Verifying the Deployment
After deploying the smart contract, visit the Dora Explorer and search for your contract.
- Visit the Dora Explorer website.
- Alternatively, you can use One Gate TestNet Explorer or Neo Tube.
- Click the Contracts tab.
- Change the filter to
TestNet
.
You should see your contract on the list. Click on it to see the contract details. If you can’t find your contract, it means that the transaction has failed. Ensure that the account you are using has more than 10 TestNet $GAS.