Using Remix
Remix IDE
Setting up Remix IDE
- Remix is an online IDE to develop smart contracts.
- You need to choose Solidity Compiler and Deploy and Run Transactions.
- Using the File Explorer, create a new file and name it, PulseNetClone.sol
The smart contract
- Copy and paste the below smart contract example into the PulseNetClone.sol file you have just created on Remix
- Token Template
- Be sure to modify the ‘name’, ‘symbol’, ‘decimals’ and ‘totalSupply’ to suit your needs
On the first line you will see, pragma solidity ^0.5.16, this dictates that the written source code is for a Solidity version greater than ^0.5.16
A smart contract is simply a collection of code (or functions) and data (or state) which lives at a specific address on the blockchain. You can learn more about the constructor or memory in the documentation
How to compile the smart contract
- 1: Click the button to move to the compiler page
- 2: Select the ‘PRC20Token’ contract
- 3: Select ‘Auto Compile’ and ‘Enable optimization’
- 4: Select ‘ABI’ to copy the contract ABI and save it
It’s now time to deploy the smart contract on the PulseNet, for this we need to connect to the world of web3 using Metamask. Use the following link to get started, tutorial to setup a Metamask Account
- Open Metamask and select the network dropdown
- At the bottom select ‘Add Network’
- Fill in the required information with the following
Testnet * RPC URLs * ChainID: 00000 * Symbol: PULSE *
Mainnet * RPC URLs * ChainID: 00000 * Symbol: PULSE *
- Click save
- Copy your Metamask wallet address
- Head to the Faucet and request some test PULSE
- Lets deploy the smart contract on the
PulseNet Testnet - In the environment dropdown in Remix, select ‘injected Web3’
- Accept the connection request once your wallet pops up
- Now that your wallet is connected to Remix, when ‘Deploying’ your smart contract, your wallet will once again popup requesting confirmation of the transaction.
You have now successfully deployed your first smart contract which you can check the status of at