How to deploy a smart contract on Scroll Testnet 📃

In this article, you will learn how to deploy a smart contract on the Scroll Testnet.

If you’re brand new to Scroll, make sure to try the Scroll Alpha Testnet first. Available on Earn3.


So, here is how to deploy a smart contract on Scroll Testnet:

First, go to Remix 👇🏻

Remix is a toolset for developing, deploying, debugging, and testing Ethereum and EVM-compatible smart contracts.


Create a new workspace 👇🏻


Now click on the “Contracts” folder and create a new file. Give the new file a name. You can give it any name you want. Just make sure it ends with the “.sol” extension.


Once the file is created, paste the below code 👇🏻

pragma solidity 0.8.17;

// SPDX-License-Identifier: MIT

contract AirdropAdventure { string public name = "Scroll Airdrop"; string public symbol = "SA"; uint8 public decimals = 18; uint256 public totalSupply = 100000000;

mapping (address => uint256) public balances; address public owner;

constructor() { owner = msg.sender; balances[owner] = totalSupply; }

function transfer(address recipient, uint256 amount) public { require(balances[msg.sender] >= amount, "Insufficient balance."); balances[msg.sender] -= amount; balances[recipient] += amount; } }


Now click on OK 👇🏻


Change the Contract name and symbol. You can change it to any name you want.


Now go to the “Solidity Compiler” page and click on compile 👇🏻


If there is no error, you’ll see a green check mark 👇🏻


Now go to the “Deploy” page and choose “Injected Provider” and click on the “Deploy” button.

Make sure you’ve got the Scroll testnet added to your Metamask wallet. If not, check the tutorial first.


After clicking on the "Deploy" button, you will be prompted to confirm a transaction on Metamask. Upon successful completion of the transaction, your deployed contract will be visible on the lower left-hand side of the screen.


Congratulations! 🎉🚀 You have successfully deployed a contract on the Scroll Alpha testnet! This achievement may prove to be invaluable in the future when Scroll launches on the mainnet. Well done!


That’s it for now. Make sure to join us on Telegram to remain updated with Scroll airdrop and more.


Discover and track 100+ airdrops 👇🏻

Subscribe to Airdrop Adventure 🧭
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.