Coder Social home page Coder Social logo

evm-onboarding-sp23-main's Introduction

Illini Blockchain EVM Onboarding

Last updated for Spring 2023.

Motivation

We want to ramp up new developers to be able to meaningfully contribute to EVM projects.

Goals:

  • Become familiar with EVM development workflow
  • Get familiar with the most important EVM concepts
  • Implement some smart contracts with Solidity
  • Write some client code to interact with smart contracts

Content Outline

Day 1

Steps for Ex 3:

  1. Create a new hardhat project under the directory 'my-counter'

  2. Configure your .env file and hardat.config file like before - make sure the wallet you are using has some test eth

  3. Delete the existing smart contracts in the smart contracts folder

  4. Create a basic counter smart contract.

    1. It should have 1 global state variable count and 2 public functions, one to increment, and one to get the count.
    2. Maybe write some test cases in the run.js folder?
  5. Deploy to Goerli and verify your contract on etherscan. Increment the count a few times using the etherscan ui.

  6. Clone the following repository and create a branch git checkout -b <your-name-counter>

  7. cd into the repository, install dependencies and start on local host

    npm i
    npm start
    
  8. Get the Alchemy API key from step one, you will need to use it to connect to the Georli network!

  9. Head into the App.js folder, and make updates so that it connects to your smart contract, and so getCount() works

  10. Push your changes and make a PR.

  11. All Done!

Day 2

Solidity!

  • Resources
  • Exercise: Implement a simplified version of ERC20!
    1. Create a new branch for day 2 and get the skeleton code
      git checkout main
      git pull
      git checkout -b <yourname-day-2>
      git fetch origin day-2
      git rebase origin/day-2
      
    2. Checkout the following files:
      • simple-token/contracts/IERC20Simple.sol is the interface contract for our simplified token.
      • simple-token/contracts/ERC20Simple.sol is our implementation of our token interface.
      • simple-token/test/ERC20Simple.js is our file for testing our implementation.
    3. Implement the _mint, _burn, _transfer functions in simple-token/contracts/ERC20Simple.sol
      • Note: you will need to implement _mint before tests for _transfer will work!
    4. Deploy and verify your contract on Goerli Testnet use your token contract through the Etherscan UI
Day 3

Client side!

  • Resources
  • Exercise: Implement a UI to interact with ERC20Simple (deployed here)!
    1. Create a new branch for day 3 and get the skeleton code
      git checkout main
      git pull
      git checkout -b <yourname-day-3>
      git fetch origin day-3
      git rebase origin/day-3
      
    2. Checkout simple-token-app, most notably simple-token-app/app/src/pages/App.js
    3. You will need to..
      • Allow your frontend to import the contract ABI
      • Implement the connectWallet, mint, transfer, and burn

evm-onboarding-sp23-main's People

Contributors

antony-ss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.