8000 GitHub - beskay/cap-contracts: CAP v4 Solidity Contracts
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

beskay/cap-contracts

 
 

Repository files navigation

CAP v4 Solidity Contracts

TODO

  • Merge incrementClpSupply and incrementUserClpBalance
  • Require Chainlink feed for added markets and disable changing the feed after a market is created
  • Add constants to mitigate attack scenarios where keys are compromised. Max fee, max oracle fee, max chainlink deviation, max liqThreshold, max pool drawdown, etc.
  • Add automated tests, including fuzzy, to achieve > 90% coverage
  • Refactor and document code while maintaining readability
  • Deploy and test locally with the Client to make sure everything is working as expected
  • Create / update local and production deploy scripts

Compiling

npx hardhat compile

Testing

Foundry

FOUNDRY_PROFILE=lite forge test --match-contract <test_contract_name> -vvvv
FOUNDRY_PROFILE=lite forge test --match-test <test_function_name> -vvvv

Static code analysis with slither

slither .

Deploying locally

npx hardhat node
npx hardhat run test --network localhost

(should be updated to use a dedicated local deploy script)

Deploying

Set environment variables in .env (required in hardhat.config.js) and load them with

source .env

Example command to deploy and verify contracts on Arbitrum:

npx hardhat run scripts/deploy.js --network arbitrum

About

CAP v4 Solidity Contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 66.2%
  • JavaScript 33.8%
0