Giter VIP home page Giter VIP logo

encode-bootcamp-w3's Introduction

Week 3

This repository contains my work as part of Week 3 within the Encode Solidity Bootcamp, which is a selective 8 week intensive Bootcamp in which Solidity and blockchain programming is taught.

We have implemented a votable ERC20 contract that can be used to vote on tokenized ballots.

Deployment scripts have been developed to deploy these on the Goerli network.

Deploy ERC20Votes contract go Goerli:

yarn hardhat deploy --network goerli --tags ERC20Votes

Deploy TokenizedBallot contract go Goerli:

yarn hardhat deploy --network goerli --tags TokenizedBallot

Function call scripts have been developed to interact with deployed instances on the Goerli network.

Examples to interact with the contracts are:

Mint 100 MTK ERC20 tokens:

yarn run ts-node scripts/CallERC20VotesFunctions.ts 0xA1D703118fe5b3C2dC00835d6169e448B7e8183C mint 0x1337A77B69027114d6bCDCA81A617Eb0d5FAE75c 100

Delegate to activate votes:

yarn run ts-node scripts/CallERC20VotesFunctions.ts 0xA1D703118fe5b3C2dC00835d6169e448B7e8183C delegate 0x1337A77B69027114d6bCDCA81A617Eb0d5FAE75c

Cast vote using 100 weight (MTK tokens) to proposal 2:

yarn run ts-node scripts/CallTokenizedBallotFunctions.ts 0xD6771480e78fc5979634362D8f15063Ddc2e3b95 vote 1 100

An instance of the ERC20 voting contract has been deployed to Goerli at 0xA1D703118fe5b3C2dC00835d6169e448B7e8183C and the Tokenized ballot contract at 0xD6771480e78fc5979634362D8f15063Ddc2e3b95

encode-bootcamp-w3's People

Contributors

boninggong avatar

Watchers

 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.