Skip to content

openschool-dao/v1-core

Repository files navigation

OpenSchool DAO

Welcome to OpenSchool git repository.

Git flow

This is our git flow

Usage

First install dependencies:

yarn install

Compile

Compile smart contracts with hardhat compile:

$ yarn compile

Lint

Actually run lint:sol and prettier. Lint solidity code:

$ yarn lint

Test

Run the Mocha/Chai tests:

$ yarn test

How to call contract from hardhat console

const provider = new ethers.providers.JsonRpcProvider() // using default http://localhost:8545
const signer = new ethers.Wallet(privkey, provider)
const osSkill = await ethers.getContractAt('OsSkill', contractAddress, signer)
const out = await osSkill.balanceOf(walletAddress) // or any contract's function
console.log(out)

How to create a proposal

const mintCalldata = osSkill.interface.encodeFunctionData('mintSkill', [Address, skillIndex]);
await governor.propose(
  [osSkill.address],
  [0],
  [mintCalldata],
  “Proposal #1: Give grant to team”,
);

Hardhat Commands

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/sample-script.js
npx hardhat help
Roadmap
  • ERC721 (NFT) or ERC1155 (multi NFT & tokens) for each track
  • Voting system to allow NFT holder to vote on attribution for new applicant
  • Complete test for every Contracts and functions