Please refer to the project wiki for all documentation.
tree src/
src/
├── Engine.sol
├── interfaces
│ ├── IEngine.sol
│ ├── synthetix
│ │ ├── IERC7412.sol
│ │ ├── IPerpsMarketProxy.sol
│ │ └── ISpotMarketProxy.sol
│ └── tokens
│ └── IERC20.sol
├── libraries
│ ├── ConditionalOrderHashLib.sol
│ ├── MathLib.sol
│ └── SignatureCheckerLib.sol
└── utils
├── EIP712.sol
├── EIP7412.sol
└── MulticallablePayable.sol
- Install dependencies
npm i
-
Build project
npm run compile
- Execute forge tests (requires rpc url(s) to be set in
.env
)
npm run test
- Run specific forge test
forge test --fork-url $(grep BASE_RPC_URL .env | cut -d '=' -f2) --match-test TEST_NAME -vvv
- Decode a custom error defined by Synthetix v3
ex:
npm run decode-custom-error -- 0x01de5522...
npm run decode-custom-error -- <error hash 0x...>
- Run hardhat tests
project must be compiled first (see step 2)
npm run test:hh
See
deployments/
folder
- Optimism deployments found in
deployments/Optimism.json
- Optimism Goerli deployments found in
deployments/OptimismGoerli.json
- Base deployments found in
deployments/Base.json
- Base Goerli deployments found in
deployments/BaseGoerli.json
See
audits/
folder
- Internal audits found in
audits/internal/
- External audits found in
audits/external/