- Clone this repo
- Set up your environment variables (see
.env.example
) - Ensure you have foundry installed (see https://book.getfoundry.sh/getting-started/installation)
- Navigate to
script/Deploy.Optimism.s.sol
- Update 'owner' to your address (or an address you want to use to call withdraw accrued fees) on Optimism
- Update 'perpsV2ExchangeRate' to the address of the PerpetualsV2ExchangeRate contract on Optimism
- Follow the steps in the file to deploy the contract
- Add the deployed contract address to your README under "Deployment Addresses"
- Navigate to
script/Deploy.OptimismGoerli.s.sol
- Update 'owner' to your address (or an address you want to use to call withdraw accrued fees) on Optimism Goerli
- Update 'perpsV2ExchangeRate' to the address of the PerpetualsV2ExchangeRate contract on Optimism Goerli
- Follow the steps in the file to deploy the contract
- Add the deployed contract address to your README under "Deployment Addresses"
src/OrderExecution.sol
├── src/interfaces/IAccount.sol
└── src/interfaces/IPerpsV2ExchangeRate.sol
└── src/interfaces/IPyth.sol