π» How to quickly deploy a smart contract on Script Blockchain
Last updated
Last updated
Below we show a quick Solidity smart contract example, compiled using Remix and deployed through the Metamask web wallet.
(A) Pre-requisites :
Install Metamask in your browser
Guide to add a Custom Network with the parameters
Network Name: Script Testnet
New RPC URL: https://testeth-rpc-api.script.tv/rpc
Chain ID: 742
Currency Symbol (optional): SPAY
Block Explorer URL (optional): https://explorer.script.tv/
Now, Weβll walk through this process step by step.
Open Remix IDE in your browser
Next, Create a new file in Remix of your choice and copy/paste the code from the source you want or write the code their itself. Once the code is entered, click the Solidity Compiler button on the far left.
Next, Youβll need to set the Compiler to the version you have used to write the code, and in the Contract field respective contract is selected. Then click the blue button that says βCompile {FILE_NAME}.solβ.
Next, You'll need to switch to deployment button on the far left and configure or select few parameters
Select "Injected - Provider Metamask" from Environment dropdown which will help to connect with metamask.(Make sure to switch to script network before proceed for deployment and also make sure to have SPAY token on connected address to pay gas fees)
Select the main contract of your compiled contract where all the function were called or inherited into it from Contract dropdown.
Click the Deploy button to execute the process.
Click confirm button to process the contract transaction in the metamask pop-up enabled.
After few seconds you will get the confirmation pop up for the successful transaction and contract creation in metamask transaction activity area as well as a section enabled on remix with contract address and their respective functions.
Verification of smartcontract on script explorer
Copy the contract address from remix and search it on explorer.
Switch to contract section which is next to transaction table.
Copy & paste the contract code and ABI compiled from remix
Click verify and Publish to confirm for verification
After verification you will get to see the functions enabled on explorer corresponding to deployed contract with contract details.