Deploy the Smart Contract

After the contract has compiled sucessfully (without any errors), you can deploy it to the Blockchain network where you need it. Remix IDE offers you the option to deploy it to a built-in Ethereum Virtual Machine (EVM) so that you can test the functionality before deploying it to your network.

You can select the default EVM (named Cancun). Multiple dummy account with ether balances are provided for you to test with.

Once you have selected your deployment options, click on the Deploy button.

After the contract has deployed successfully you will see it in the Deployed Contracts section. You will see the Contract Address, which is required in external application code (such as the web app) to inetract with the contract. You can copy the Contract Address directly from the IDE and paste it into your code as required.

Deploying to an external network

When you have your Devnet nodes up and running, you can deploy the contract to your Devnet using the Custom - External Http Provider option under Environment (instead of selecting one of the in-built EVMs).

You have to first connect to your Devnet by specifying the URL and port number for any one of the nodes on your Devnet (you need to deploy to any one node and it is accessible to all nodes on the network). The screenshot below shows the default which is your local computer and the default port.

Once your are connected you will see the accounts set up on that node, with their ether balances. You can select the account you want to deploy the contract from and click on Deploy.