How to deploy a simple contract on Kiln testnet #TestTheMerge

So.. Test The Merge, get an NFT? Sounds good!

You can get a higher value NFT if you deploy a contract and test it out!

So let’s get on with it and see how we can deploy a contract on Kiln testnet.

Steps to deploy a contract on Kiln:

1. First of all, you would need to add Kiln to MM and also get some Kiln testnet ETH.

2. Next up, head to www.remix.ethereum.org and in the lefthand side pane, select the Deploy & run transactions tab. In Environment, select Injected Web3 and this should pop up a Metamask plugin window asking to select the address. Select the address you want to use. Make sure you are on the Kiln network. Remix should now show your MM address in the Account section.

3. Now select File Explorer in the left hand side menu, and click on Create New file.

Create a new contract file
Create a new contract file

Give the file name as “NewContract.sol” and press enter. The blank file should open up on the right hand side window.

4. In the blank contract window page, enter the following test code:

// TestingTheMerge 
pragma solidity >=0.5.0 <0.7.0;
contract HelloGM {
    function gm()public pure returns (string memory){
        return 'Hello gm.xyz';
    }
    
}
  1. Now click on Solidity Compiler in the left hand side window, and select the compiler version to be the same as solidity version shown in the code above.
Select the compiler version
Select the compiler version

Now click on “Compile NewContract.sol” and you should get a green check box ✅ in the left hand pane, indicating everything is good.

6. The next step is to deploy this test contract on the Kiln testnet. For this, click on Deploy & run transactions in the left hand menu (the same page where you had configured MetaMask earlier). Ensure that the environment is Injected Web3, your MetaMask wallet is selected correctly and in the Contract section, the NewContract.sol file is selected.

Now you are ready to deploy by clicking the orange Deploy button. It should bring up the Metamask confirmation box. Ensure you have testnet Eth from the faucet for gas, and confirm the transaction. On completion, you can see the status in the console window.

That’s it! You have deployed a test contract on Kiln to Test the Merge and will become eligible for a separate NFT for deploying a contract!

Subscribe to web3magnetic
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.