2021-11-28 13:15:08 +01:00
2021-08-26 16:59:56 +02:00
2021-06-04 16:17:21 +02:00
2021-06-04 16:17:21 +02:00
2021-06-04 16:17:21 +02:00
2021-08-26 16:59:56 +02:00
2021-06-04 16:17:21 +02:00
2021-11-10 18:34:23 +01:00
2021-11-28 13:04:32 +01:00

InterRep contracts

InterRep Solidity smart contracts.

Github license GitHub Workflow test Coveralls Linter eslint Code style prettier Repository top language


If you want an overwiew of InterRep, read our announcement post: https://jaygraber.medium.com/introducing-interrep-255d3f56682. For more details, please see our documentation website.

⚠️ Notice: interrep.link and ropsten.interrep.link still refer to the old MVP version of interRep. They will soon be updated. You can find an updated version at kovan.interrep.link (staging env).

Deployed contracts

Kovan Ropsten Arbitrum One
ReputationBadge (Twitter) 0xe0fC...798d 0x2F4d...BC11 0x2F4d...BC11
ReputationBadge (Github) 0x1495...2311
ReputationBadge (Reddit) 0x55d2...B4Cf
Groups 0x06d5...Cdcc

Install

Clone this repository and install the dependencies:

$ git clone https://github.com/InterRep/contracts.git
$ cd contracts
$ yarn # or `npm i`

Usage

Copy the .env.example file and rename it .env.

Compile

Compile the smart contracts with Hardhat:

yarn compile

This should generate the TypeChain typings. If you want to generate them manually run:

yarn typechain

Lint

Lint the Solidity or the TypeScript code:

yarn lint:sol
yarn lint:ts
# or yarn lint to lint both.

And check if the code is well formatted:

yarn prettier

Test

Run the Mocha tests:

yarn test

Coverage

Generate the code coverage report:

yarn coverage

Report Gas

See the gas usage per unit test and average gas per method call:

REPORT_GAS=true yarn test

Clean

Delete the smart contract artifacts, the coverage reports and the Hardhat cache:

yarn clean

Deploy

Deploy the contracts:

yarn deploy:reputation-badge --name "InterRep Twitter Badge" --symbol iTWITT
yarn deploy:groups

If you want to deploy contracts in a specific network you can set up the DEFAULT_NETWORK variable in your .env file with the name of one of our supported networks (hardhat, localhost, ropsten, kovan, arbitrum). Or you can specify it as option:

yarn deploy:groups --network kovan // Kovan testnet
yarn deploy:groups --network localhost // Local network

If you want to deploy the contracts on Ropsten, Kovan or Arbitrum remember to provide a valid private key and an Infura API in your .env file.

Preparing a local network

Run a Hardhat Network in a stand-alone fashion:

yarn start

Deploy mocked contracts:

yarn mocks --network localhost

You can omit --network localhost if your DEFAULT_NETWORK env variable is equal to localhost.

Description
No description provided
Readme MIT 7.4 MiB
Languages
TypeScript 64%
Solidity 36%