Skip to content

ahmedstahir/web3-practice01

Repository files navigation

Web3 Practice

Step #1:
Read an account's ether balance on Ethereum Mainnet

Step #2:
Read data from the ERC20 UNI token contract deployed on Ethereum Mainnet

Step #3:
Transfer 0.1 ETH from one account to another on Ropsten Testnet

Step #4:
Deployed a simple contract, on Ropsten Testnet, that has a uint256 state variable and the following four functions:

  • setNumber to set a specific value in the variable
  • increment will increase the value of the variable by 1
  • decrement will decrease the value by 1
  • getNumber returns the current value

Address of the deployed contract is 0x5Bdc2d267058F861a609da09fB81a075395B520C

Step #5:
Calling functions of the smart contract deployed in previous step

Step #6:
Read events from the ERC20 UNI token contract deployed on Ethereum Mainnet

Step #7:
To inspect the content within a block, the following three functions are implemented:

  • getLatestBlockNumber to display number of the latest block
  • getLatestBlock displays content of the latest block
  • getLastBlocks shows the block number and hash of the latest x blocks (where x is a number provided as a parameter to the function)

Step #8:
The following Web3 Utilities had been explored:

  • getAverageGasPrice gets the average gas price currently for the network
  • generateHash displays sha3 and keccak256 hashes of the provided string
  • generateRandomHex generates a random hexadecimal number of the provided bytes
  • useUnderscoreJsLibrary uses the contains function of the Underscore.js library

This tutorial is being used as reference for this exercise.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published