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/