Deploy smart contracts
Instructions on how to deploy a smart contract using EVM playgrounds
To deploy a smart contract using EVM playgrounds, you need to compile your smart contract in your preferred development framework so that you have the ABI bundle available to upload.
Open the Upload tab in the EVM playgrounds. Here you can upload an ABI bundle of the smart contract that you want to deploy. This will allow you to use it to deploy the smart contract:
EVM playgrounds => Upload
Nameof your smart contract. You will be able to identify the smart contract in the
Deploytab with it, once it gets uploaded.
To upload the ABI bundle itself, you can either drag and drop it into the upload section, or click on the section and select the file.
EVM playgrounds => Upload => Add file
Once you have selected the correct ABI bundle, the methods of the smart contract should be displayed. You can verify that the correct methods are listed and press
Uploadto upload the ABI bundle.
The ABI bundles that you uploaded in the
Uploadtab can be seen here:
EVM playgrounds => Deploy
The methods available for an ABI bundle can be seen by expanding the
ABImenu. This can be helpful if you have multiple bundles uploaded and you want to be sure that you will be interacting with the right one.
EVM playgrounds => Deploy => Expand ABI section
When you have verified that you are interacting with the ABI bundle that has the correct methods available, you can click
Deploy, which should open a deployment interface:
EVM Playgrounds => Deploy => Deploy selected ABI bundle
The interface consists of the following components:
- Button to connect to your EVM wallet (this is why connecting MetaMask to the EVM+ is a prerequisite for this entry)
- Smart contract name, that can be changed, so you can deploy the same ABI bundle multiple times and easily differentiate between them
- ABI bundle identifications
- Fields to input the smart contract constructor parameters
- Value field to determine wether to send some of the native currency with the deploy transaction
Deploybutton to deploy the smart contract once you are satisfied with the deployment parameters
button will prompt your EVM wallet to connect to the site. You can select the account that you want to use with the EVM playgrounds and connect it.
The selected account should be displayed at the top of the page now:
Displayed deployment account
Depending on the requirements, you can modify the deployment parameters of your smart contract. It is required to fill out the constructor parameters, but modifying other values is optional.
Filled out deployment values
Once the values are filled out and double checked, the smart contract is ready to be deployed.
validUntilfield value has to be higher than the current block number, or the deployment transaction will fail, due to the validator treating it as outdated. You can verify the current block number in a block explorer.
Once the parameters of deployment are ready, you can deploy the smart contract by pressing the
Deploybutton. This should prompt your EVM wallet to confirm your deployment transaction:
Confirming the deployment transaction
The deployed smart contract can now be seen in the
Executetab, which is further explained in the next entry.