Are you a smart contract developer on Ethereum? If yes, you can now develop a smart contract on Bitcoin with the tools you already know using Rootstock. In this tutorial, we will be using Ethereum-related tools to create and deploy smart contracts on Rootstock. Prerequisites Web browser Metamask Wallet What Is Rootstock? Rootstock is an EVM-compatible chain, merging the benefits of Bitcoin with the benefits of Ethereum. The beautiful part is Rootstock has a token called RBTC which is equal to BTC. Being an EVM-compatible chain, it lowers development barriers because tools used in an EVM-compatible chain can also be used at Rootstock. Setting up Metamask Wallet With Rootstock Since it is an EVM chain, we will be using ChainList to add Rootstock to Metamask Visit ChainList EVM Filtered link where Rootstock has been searched in networks. Make sure Include Testnets is checked. Click on the connect wallet button; this will pop up a Metamask modal to connect to ChainList. Clicking on Connect Wallet changed the Connect Wallet to Add to Metamask Click Add to Metamask for Rootstock Mainnet. Click Add to Metamask for Rootstock Testnet; this popup is a modal by Metamask to approve and later switch the network. Getting Rootstock Testnet Native Token (tRBTC) Visit Rootstock faucet, and copy and paste your Metamask wallet address. Check the I'm not a robot, Click the Get test RBTC button. After a few seconds, check your wallet, and you will see the balance. Checking Your First Transaction on Testnet Explorer Visit Rootstock Testnet Explorer at explorer.testnet.rootstock.io, enter your wallet address, and press enter key to search. The Testnet faucet transaction is shown in the screenshot below. Writing First Smart Contract Using Remix We will be using the Remix IDE to write our first smart contract. Visit https://remix.ethereum.org/ Create a new file called SimpleStorage.sol. Copy and paste the code below in the newly created SimpleStorage.sol file. // SPDX-License-Identifier: MIT // compiler version must be greater than or equal to 0.8.24 and less than 0.9.0 pragma solidity ^0.8.24; contract SimpleStorage { uint storedData; function set(uint x) public { storedData = x; } function get() public view returns (uint) { return storedData; } } Compile SimpleStorage.sol on Remix Click on the Solidity logo Icon by the left menu. Check the Auto compile. Click the Compile SimpleStorage button. Deploying the Smart Contract on Rootstock In your MetaMask switch your MetaMask network to Rootstock Testnet. Click the deploy & run transaction button. Select Inject Provider - MetaMask. Make sure the account you select the account with balance. Select the smart contract in this example SimpleStorage. Click the Deploy button. Verifying Smart Contract Transaction on Rootstock Testnet Explorer Visit explorer.testnet.rootstock.io Copy your smart contract address, and paste the address into the search input; press enter to search What Next? All the tools and languages used on Ethereum are compatible with Bitcoin thanks to Rootstock, you can now port your favorite Ethereum protocol to Bitcoin. Take your learning to the next level at https://dev.rootstock.io/ Are you a smart contract developer on Ethereum? If yes, you can now develop a smart contract on Bitcoin with the tools you already know using Rootstock. In this tutorial, we will be using Ethereum-related tools to create and deploy smart contracts on Rootstock. Prerequisites Prerequisites Web browser Metamask Wallet Web browser Metamask Wallet What Is Rootstock? What Is Rootstock? Rootstock is an EVM-compatible chain, merging the benefits of Bitcoin with the benefits of Ethereum. The beautiful part is Rootstock has a token called RBTC which is equal to BTC. Being an EVM-compatible chain, it lowers development barriers because tools used in an EVM-compatible chain can also be used at Rootstock. Rootstock Setting up Metamask Wallet With Rootstock Setting up Metamask Wallet With Rootstock Since it is an EVM chain, we will be using ChainList to add Rootstock to Metamask Visit ChainList EVM Filtered link where Rootstock has been searched in networks. Make sure Include Testnets is checked. Click on the connect wallet button; this will pop up a Metamask modal to connect to ChainList. Visit ChainList EVM Filtered link where Rootstock has been searched in networks. Visit ChainList EVM Filtered link where Rootstock has been searched in networks. ChainList EVM Filtered Make sure Include Testnets is checked. Make sure Include Testnets is checked. Click on the connect wallet button; this will pop up a Metamask modal to connect to ChainList. Click on the connect wallet button; this will pop up a Metamask modal to connect to ChainList. Clicking on Connect Wallet changed the Connect Wallet to Add to Metamask Click Add to Metamask for Rootstock Mainnet. Click Add to Metamask for Rootstock Testnet; this popup is a modal by Metamask to approve and later switch the network. Click Add to Metamask for Rootstock Mainnet. Click Add to Metamask for Rootstock Mainnet. Click Add to Metamask for Rootstock Testnet; this popup is a modal by Metamask to approve and later switch the network. Click Add to Metamask for Rootstock Testnet; this popup is a modal by Metamask to approve and later switch the network. Getting Rootstock Testnet Native Token (tRBTC) Getting Rootstock Testnet Native Token (tRBTC) Visit Rootstock faucet, and copy and paste your Metamask wallet address. Check the I'm not a robot, Click the Get test RBTC button. After a few seconds, check your wallet, and you will see the balance. Visit Rootstock faucet, and copy and paste your Metamask wallet address. Visit Rootstock faucet , and copy and paste your Metamask wallet address. Rootstock faucet Check the I'm not a robot, Check the I'm not a robot, Click the Get test RBTC button. After a few seconds, check your wallet, and you will see the balance. Click the Get test RBTC button. After a few seconds, check your wallet, and you will see the balance. Checking Your First Transaction on Testnet Explorer Checking Your First Transaction on Testnet Explorer Visit Rootstock Testnet Explorer at explorer.testnet.rootstock.io , enter your wallet address, and press enter key to search. The Testnet faucet transaction is shown in the screenshot below. Rootstock Testnet Explorer explorer.testnet.rootstock.io Writing First Smart Contract Using Remix Writing First Smart Contract Using Remix We will be using the Remix IDE to write our first smart contract. Remix IDE Visit https://remix.ethereum.org/ Create a new file called SimpleStorage.sol. Copy and paste the code below in the newly created SimpleStorage.sol file. Visit https://remix.ethereum.org/ Visit https://remix.ethereum.org/ https://remix.ethereum.org/ Create a new file called SimpleStorage.sol. Create a new file called SimpleStorage.sol. Copy and paste the code below in the newly created SimpleStorage.sol file. Copy and paste the code below in the newly created SimpleStorage.sol file. // SPDX-License-Identifier: MIT // compiler version must be greater than or equal to 0.8.24 and less than 0.9.0 pragma solidity ^0.8.24; contract SimpleStorage { uint storedData; function set(uint x) public { storedData = x; } function get() public view returns (uint) { return storedData; } } // SPDX-License-Identifier: MIT // compiler version must be greater than or equal to 0.8.24 and less than 0.9.0 pragma solidity ^0.8.24; contract SimpleStorage { uint storedData; function set(uint x) public { storedData = x; } function get() public view returns (uint) { return storedData; } } Compile SimpleStorage.sol on Remix Compile SimpleStorage.sol on Remix Click on the Solidity logo Icon by the left menu. Check the Auto compile. Click the Compile SimpleStorage button. Click on the Solidity logo Icon by the left menu. Click on the Solidity logo Icon by the left menu. Check the Auto compile. Check the Auto compile. Click the Compile SimpleStorage button. Click the Compile SimpleStorage button. Deploying the Smart Contract on Rootstock Deploying the Smart Contract on Rootstock In your MetaMask switch your MetaMask network to Rootstock Testnet. Click the deploy & run transaction button. Select Inject Provider - MetaMask. Make sure the account you select the account with balance. Select the smart contract in this example SimpleStorage. Click the Deploy button. Click the deploy & run transaction button. Click the deploy & run transaction button. Select Inject Provider - MetaMask. Select Inject Provider - MetaMask. Make sure the account you select the account with balance. Make sure the account you select the account with balance. Select the smart contract in this example SimpleStorage. Select the smart contract in this example SimpleStorage. Click the Deploy button. Click the Deploy button. Verifying Smart Contract Transaction on Rootstock Testnet Explorer Verifying Smart Contract Transaction on Rootstock Testnet Explorer Visit explorer.testnet.rootstock.io Copy your smart contract address, and paste the address into the search input; press enter to search Visit explorer.testnet.rootstock.io Visit explorer.testnet.rootstock.io explorer.testnet.rootstock.io Copy your smart contract address, and paste the address into the search input; press enter to search Copy your smart contract address, and paste the address into the search input; press enter to search What Next? What Next? All the tools and languages used on Ethereum are compatible with Bitcoin thanks to Rootstock, you can now port your favorite Ethereum protocol to Bitcoin. Take your learning to the next level at https://dev.rootstock.io/ https://dev.rootstock.io/