8000 GitHub - TonGarcia/ERC20: ERC20 Smart Contract
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TonGarcia/ERC20

Repository files navigation

ERC20 SmartContract

Creating Smart Contract

  1. Remix Ethereum
  2. On deploy tab select the "Injected Web3" which integrates with Ropsten network
  3. The Smart Contract account it displayed on the "Deploy" tab.

Sample Running Smart Contract

Deployed Contract

  1. ERC20.sol: ipfs://QmejdqNJpxrRweqo9rLZEKBkU14TP64aDeQ1PmyNWyrQgn
  2. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.0.0/contracts/token/ERC20/ERC20.sol: ipfs://QmXGhsAPeemtVQ8ip5CsParvX3sgpMm4Lq8EccS3YaTtwA
  3. metadata.json: ipfs://QmZyBwDhNeKzFPFxTVAEi4Z49L6oNcrwp3gGF9nYJH8HdL

Sample Running Address: 0xC44bf84C7d877A286b179Af92C400aA16CaEC251

Gas Estimator (1GAS = 1GWEI): https://br.beincrypto.com/converter/gas-to-usd?amount=1

Run and Simulate Contract through Remix IDE

Remix is an online ide to create a solidity smart contract. It also has the feature to compile run, deploy and simulate smart contracts.

  1. Open Remix IDE.
  2. Select environment Solidity
  3. Go to File Explorer Tab and create a file Lottery.sol
  4. Get the Contract Code
  5. Go to Solidity Compiler Tab and Select
  6. Compiler Version to 0.8.10
  7. Language as Solidity
  8. EVM as Compiler Default
  9. Now click Compile ERC20.sol
  10. You can enable auto-compile by check the checkbox Auto Compile
  11. Go to Deploy And Run Transaction Tab and Deploy the contract in local EVM
  12. Your contract functionality will be available in Deploy And Run Tracsaction tab, under the Deployed Contract section

Deploy the contract to Rinkeby Network through Remix Ide

Testnets provide developers a place to kick the smart contract and test before the real assets being involved. These Testnets behave very much like the main-net and does not require actual money(ether). Here we are going to try Rinkeby Testnet.

  1. Make sure you run the Lottery contract using previous section instructions
  2. Open Metamask, put the password and make sure, you are connected to the Rinkeby network.
  3. Go to Deployed And Run Transaction tab and select
  4. Environment is Injected Web3
  5. As account, your Metamask wallet address should be selected
  6. Make sure you have enough ether in your wallet to deploy the contract
  7. Now click Deploy. This will deploy your contract to the Rinkeby network.
  8. In the Remix IDE, check Log Section and grab the Transaction Hash and store it.
  9. Go to Ether Scan and search for the Transaction Hash. You will get the Deployed Contract Address. Also, this Contract Address will be required further.

About

ERC20 Smart Contract

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0