Deploy a smart contract instance
Follow these steps to deploy a smart contract instance using MARCO Console.
Before you begin
Before you start, you must have:
- A user with the
MANAGERrole at the organization level or higher permissions.
- A smart contract template created on your organization.
- A wallet created on your organization.
Step by step
To deploy a smart contract instance:
Open MARCO Console.
On the left sidebar, go to Smart Contracts > Templates > List template.
Select the smart contract template you want to deploy.
Choose the specification version you want to deploy.
Review the smart contract template details and click Deploy smart contract instance.
Enter the smart contract instance details:
- Ledger to deploy: The network where the smart contract instance will be deployed. For more information, see DLTs.
- Smart contract instance name: The name of the smart contract instance.
- Contract deployment parameters: The constructor parameters required to deploy the smart contract instance. The parameters vary depending on the smart contract specification requirements.
- Wallet: The wallet that will deploy the smart contract instance.
- Unlock password: The password to unlock the wallet.
Click Deploy Instance.
Wait for the smart contract instance to be Deployed.
The deployment process can take a few minutes, and you need to refresh the page to see the updated status.
You can check the deployment details in the Smart Contracts > Templates > List instances section.
To interact with the smart contract instance, you need to grant permissions to the service account that will call the smart contract. For more information, see the Authorize a service account to use a smart contract guide.
If the smart contract status remains on Pending for a long time, check the following list of common issues:
Refresh the page: The deployment process can take a few minutes, and you need to refresh the page to see the status.
Invalid wallet password: If you have set an incorrect password, the deployment will fail silently. To fix this, you need to deploy the smart contract instance again with the correct password.
Invalid network: You are deploying the smart contract instance to the correct network. For example, suppose you are deploying a smart contract instance on the
finboot-clique-v1network. In that case, you must ensure the wallet is also defined on the
finboot-clique-v1network. To fix this, you need to deploy the smart contract instance again using the network that matches your wallet.
Insufficient funds: If you are deploying a smart contract instance to a public network, the wallet deploying the instance needs funds to deploy it. To fix this, you must send enough native currency to the wallet to deploy the smart contract instance.note
finboot-clique-v1is a private network. Therefore, wallets do not need to own native currency to deploy a smart contract instance.