This repo houses the index-coop's Solidity smart contracts which are built on Set Protocol V2. There is a separate repository for Index Protocol, a good-fath fork of Set V2 that Index Coop will continue to develop. Head over to that repo to find our newer smart contracts.
yarn
yarn chain
yarn compile
yarn build
yarn test
to run compiled contracts (executes on network localhost, you need to have yarn chain
running)
OR yarn test:clean
if contract typings need to be updated
yarn chain:fork:ethereum
in one terminal to run chain fork. replace ethereum with polygon if needed, see package.json
yarn test:integration:ethereum
in another terminal, replace chain again as needed
To run an individual test on e.g. a later block, use (replace path):
LATESTBLOCK=15508111 INTEGRATIONTEST=true VERBOSE=true npx hardhat test ./test/integration/ethereum/flashMintWrappedIntegration.spec.ts --network localhost
yarn coverage
index-coop
publishes its contracts as well as hardhat and typechain compilation
artifacts to npm.
The distribution comes with fixtures for mocking and testing interactions with other protocols
including Uniswap and Compound. To use these you'll need to install the peer dependencies listed in package.json
.
npm install @indexcoop/index-coop-smart-contracts
We highly encourage participation from the community to help shape the development of Index-Coop. If you are interested in developing on index-coop
or have any questions, please ping us on Discord.
Set Protocol V2 has undergone multiple audits. For more information see https://index-coop.gitbook.io/index-coop-community-handbook/protocols/security-and-audits
If you believe you’ve found a security vulnerability in one of our contracts or platforms, we encourage you to submit it through our ImmuneFi Bug Bounty program.