Git Product home page Git Product logo

iq-ethereum's Introduction

✨ IQ ERC20 ✨

INSTALL

yarn

TEST

yarn test

SCRIPTS

Next is the list of npm scripts you can execute.

Some of them relies on ./scripts.js to allow parameterizing it via command line argument (have a look inside if you need modifications).

yarn prepare

As a standard lifecycle npm script, it is executed automatically upon install. It generates a config file and typechain to get you started with type-safe contract interactions.

yarn lint, yarn lint:fix, yarn format and yarn format:fix

These commands will lint and format your code. The :fix version will modifiy the files to match the requirement specified in .eslintrc and .prettierrc.

yarn compile

These will compile your contracts.

yarn void:deploy

This will deploy your contracts to an in-memory hardhat network and exit, leaving no trace. Quick way to ensure that deployments work as intended without consequences.

yarn test [mocha args...]

These will execute your tests using mocha. You can pass extra arguments to mocha.

yarn coverage

These will produce a coverage report in the coverage/ folder.

yarn gas

These will produce a gas report for function used in the tests.

yarn dev

These will run a local hardhat network on localhost:8545 and deploy your contracts on it. Plus it will watch for any changes and redeploy them.

yarn local:dev

This assumes a local node it running on localhost:8545. It will deploy your contracts on it. Plus it will watch for any changes and redeploy them.

yarn exec <network> <file.ts> [args...]

Example:

yarn run exec goerli scripts/setMinter 0x1D03DB46AAA6f95a303E3a16F3f0Ba2F78c60F54

This will execute the script <file.ts> against the specified network.

yarn deploy <network> [args...]

Examples:

yarn deploy goerli --tags DummyERC20
yarn deploy goerli

This will deploy the contract on the specified network.

Behind the scene it uses hardhat deploy command, so you can append any argument for it.

yarn export <network> <file.json>

This will export the abi+address of deployed contract to <file.json>.

yarn fork:run <network> [--blockNumber <blockNumber>] [--deploy] <file.ts> [args...]

This will execute the script <file.ts> against a temporary fork of the specified network.

If --deploy flag is used, deploy scripts will be executed.

yarn fork:deploy <network> [--blockNumber <blockNumber>] [args...]

This will deploy the contract against a temporary fork of the specified network.

Behind the scene it uses hardhat deploy command so you can append any argument for it.

yarn fork:test <network> [--blockNumber <blockNumber>] [mocha args...]

This will test the contract against a temporary fork of the specified network.

yarn fork:dev <network> [--blockNumber <blockNumber>] [args...]

This will deploy the contract against a fork of the specified network and it will keep running as a node.

Behind the scene it uses hardhat node command so you can append any argument for it.

Deploy Example (Rinkeby)

Install dependencies:

yarn

Deploy pIQ contract:

yarn run exec rinkeby scripts/deployDummyERC20

Add erc20 addresss to hardhat.config.ts file for pIQ and deploy other contracts:

yarn deploy rinkeby

Verify:

npx hardhat --network rinkeby etherscan-verify --api-key xxxxxx

iq-ethereum's People

Contributors

emmanueldmlr avatar fortisfortuna avatar justincast avatar kesar avatar zer0blockchain avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iq-ethereum's Issues

ENS wiki

Edits is a series of attestations of facts

Instead of having free form text like wikipedia and everipedia, the ENS wiki is just a bunch of attestable facts like:
vitalik.eth
founder of <ethereum.eth>
born <>
gender

data needs to have a format to allow indexing

and the editing wallet signs signature of each attestation off chain like a snapshot.page pushing bulkdata to IPFS / arweave

"It needs to be very fun, easy to attest/edit things, it needs to be free, and it needs to not require smart contract fees/transactions immediately unless you are settling something"

"we basically want to be the sum total of human attestations in a fun way like how wikipedia is the sum total of human knowledge"

ens wiki attestation should start by a new API that allows to sign attestations in the same way that snapshot api does and push that data to IPFS / wherever

then build a simple ui that uses that API to showcase viewing & editing

reputation for phase 2 as module

hiIQ NFT Raffles

Solving

  • multichain hiIQ holders
  • passive way for hiIQ holders to participate
  • gas efficient way to run NFT raffles

Proposed Solution

  • multichain snapshot of hiIQ holders at a predefined block
  • all hiIQ holders will be entered into the raffle proportional to their hiIQ holdings at the time of snapshot
  • this allows hiIQ holders a way to passively hold and participate
  • minimal gas cost for holding a Raffle and scales well
  • snapshot stored on IPFS and hash pushed onchain as part of raffle (is this possible to push a ZKP onchain?)
  • raffle drawing will use randomness from PRNG or chainlink to resolve the raffle
  • winner will receive the NFT

Onchain info

  • IPFS hash of all hiIQ holders and their raffle ticket numbers
  • IPFS snapshot block number
  • Raffle start datetime
  • Raffle end datetime
  • resolution (could have multiple winners?)
  • prize contract (ERC721 contract addr and tokenID)

Gauges Smart Contracts

Implementation

  • Uniswap IQ/FRAX Gauge
  • Uniswap IQ/ETH Gauge
  • Wiki Editing Gauge
  • Other ideas for gauges?

Testing

  • Voting cool down
  • Voting activation (period passes)
  • LP token staking (IQ/FRAX Gauge, IQ/ETH Gauge)
  • Uni Gauge Rewards Distribution

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.