2021-11-01 11:22:20 +01:00
2021-06-04 16:17:21 +02:00
2021-08-26 16:59:56 +02:00
2021-08-26 16:59:56 +02:00
2021-10-04 19:33:10 +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-08-26 16:59:56 +02:00
2021-06-04 16:17:21 +02:00
2021-06-04 16:17:21 +02:00
2021-10-29 13:15:22 +02:00
2021-08-26 16:59:56 +02:00

InterRep contracts

InterRep Solidity smart contracts.

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) 0xF685...1E07 0x2F4d...BC11 0x2F4d...BC11
ReputationBadge (Github) 0xD6B4...2E18
ReputationBadge (Reddit) 0x55d2...B4Cf
InterRepGroups 0xD2C9...735B 0xa2A7...6419

Install

Clone this repository and install the dependencies:

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

Usage

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 to Hardhat Network:

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

or run yarn deploy:mocks if you want a short command to simulate the previous command for testing purposes.

Set your .env file and deploy the contracts to a specific network, such as the Ropsten testnet:

$ NODE_ENV=production yarn deploy:reputation-badge --name "InterRep Twitter Badge" --symbol iTWITT --network ropsten
$ NODE_ENV=production yarn deploy:interrep-groups --network ropsten

You can find a copy of the .env file in the .env.example file.

Syntax Highlighting

If you use VSCode, you can enjoy syntax highlighting for your Solidity code via the vscode-solidity extension. The recommended approach to set the compiler version is to add the following fields to your VSCode user settings:

{
    "solidity.compileUsingRemoteVersion": "v0.8.4+commit.c7e474f2",
    "solidity.defaultCompiler": "remote"
}

Where of course v0.8.4+commit.c7e474f2 can be replaced with any other version.

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