Giter VIP home page Giter VIP logo

porter-v1-core's Introduction

Porter Smart Contracts Porter Smart Contracts

app docs discord blog twitter

Security

Please report any security issues to [email protected]

Contracts:

Mainnet

BondFactory: https://etherscan.io/address/0x9f20521ef789fd2020e708390b1e6c701d8218ba

Rinkeby

BondFactory: 0x0ae42cF40Fb46A926e2dcCE92b2Fe785d2D1E0A0

V1

Smart Contracts powering the Porter protocol.

Development

For local development there are environment variables necessary to enable some hardhat plugins.

Deployment

Using hardhat-deploy all of the scripts in the ./deploy folder are run. This will run the whole integration flow as well which includes deploying of the factory, tokens, creating bonds, doing bond actions, and starting auctions. If that is not desired, add a tags flag with what you want to deploy.

npx hardhat deploy --tags main-deployment # deploy bond factory
npx hardhat deploy --tags test-deployment # and deploy tokens
npx hardhat deploy --tags permissions # and grant roles & permissions
npx hardhat deploy --tags bonds # and deploy test bonds
npx hardhat deploy --tags auctions # and start bond auctions
npx hardhat deploy --tags actions # and do bond actions

Additionally, all of the above commands can be run with --network rinkeby to deploy to the Rinkeby test network.

Note: The deploy script will run with the npx hardhat node as well as the npx hardhat test tasks.

Verification

Verify deployed contracts with hardhat-etherscan.

npx hardhat verify <address>

Testing

Running the hardhat test suite

npx hardhat test

Fork testing requires first running the mainnet-fork

npx hardhat node

and making the target for testing the local node

npx hardhat test --network localhost

Running the fuzzing test suite with Echidna

Other useful commands

npx hardhat help
npx hardhat compile # create contract artifacts
npx hardhat clean # removes artifacts and maybe other things
npx hardhat coverage # runs the contract coverage report
npx hardhat integration # runs the integration task
npx hardhat settle-auction --auctionId <auctionId> # settles an auction
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md,ts}' --write
npx solhint 'contracts/**/*.sol' --fix

porter-v1-core's People

Contributors

namaskar-1f64f avatar russeii avatar luckyrobot avatar emersoncloud 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.