Skip to content

Tokemak/v2-core-ctf

Repository files navigation

Tokemak Autopilot

Github Actions Foundry semantic-release: conventional commits protected by: gitleaks License: MIT

Contracts for the Tokemak Autopilot System Details on the system can be found here.

Getting Started

Install the same version of foundry that the CI will use. Ensures formatting stays consistent

 foundryup --version nightly-fdd321bac95f0935529164a88faf99d4d5cfa321

From there:

npm install

Additional setup info:

  • If you are going to be making commits, you will want to install Gitleaks locally. For details: https://github.com/zricethezav/gitleaks#installing.
  • This repo also enforces Conventional Commits. Locally, this is enforced via Husky. GitHub CI is setup to enforce it there as well. If a commit does not follow the guidelines, the build/PR will be rejected.
  • Formatting for Solidity files is provided via forge. Other files are formatted via prettier. Linting is provided by solhint and eslint.
  • Semantic versioning drives tag and release information when commits are pushed to main. Your commit will automatically tagged with the version number, and a release will be created in GitHub with the change log.
  • Slither will run automatically in CI. To run the scan:slither command locally you'll need to ensure you have Slither installed: https://github.com/crytic/slither#how-to-install. If slither reports any issue, your PR will not pass.

Running Tests

Basic unit tests, integrations tests, and Foundry based fuzz tests with a low default run count can be execute via:

forge test

ERC4626 prop fuzz tests from a16z can be executed against the Autopool with:

forge test --match-path test/fuzz/vault/Autopool.t.sol --fuzz-runs 10000

Deployment

Mainnet

forge script script/01_SystemDeploy.s.sol --rpc-url mainnet --sender $V2DEPLOY2

Base

forge script script/01_SystemDeploy.s.sol --rpc-url mainnet --sender $V2DEPLOY2 --account v2-base-guarded

Sepolia

forge script script/sepolia/01_InitToke.s.sol --rpc-url sepolia --sender $SENDER_SEPOLIA --account v2-sepolia

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published