Compile, Deploy, Run Smart Contract

Last modified: 2023-03-26

Blockchain Ethereum Web3

When we created smart contract, we need to compile it and deploy to Ethereum. There are various way to do that.

Ethereum Remix Extension in VS Code

Ethereum Remix extension is the VS Code plugin that can perform a variety of tasks such as verifying contracts.

1. Connect

In the left pane, click Explorer tab and open the "REMIX" field at the bottom. Then choose "Run & Deploy" and select "Activate". The "Run & Deploy" window opens.
In Connection field, enter the address and click Connect.

2. Compile

Next, select the file you want to compile, and click Compile.

3. Deploy

After compiling, select the contract you want to deploy, then click Deploy.

4. Run

If deploying the contract successfully, we can see functions of the contract.
Click TRANSACT or CALL at the function you want to.
After that, we can see the output at the bottom.