- Clone the repo:
git clone [email protected]:Cyfrin/chainlink-gmx-automation.git - Install dependencies:
cd chainlink-gmx-automation forge install - Install GMX dependencies:
cd lib/gmx-synthetics yarn cd ../.. - Build:
forge build - Setup environment:
Enter your RPC URL into the
cp .env.example .envARBITRUM_GOERLI_URLin .env - Run the tests:
forge test
| Automation Contract | Event | Log Type | Log Name | OrderType Enum | Execution Contract | Execute Function |
|---|---|---|---|---|---|---|
MarketAutomation.sol |
Market Swap | emitEventLog2 |
OrderCreated |
0 | OrderHandler |
executeOrder |
| - | Market Increase | emitEventLog2 |
OrderCreated |
2 | OrderHandler |
executeOrder |
| - | Market Decrease | emitEventLog2 |
OrderCreated |
4 | OrderHandler |
executeOrder |
DepositAutomation.sol |
Deposit | emitEventLog1 |
DepositCreated |
- | DepositHandler |
executeDeposit |
WithdrawalAutomation.sol |
Withdrawal | emitEventLog1 |
WithdrawalCreated |
- | WathdrawalHandler |
executeWithdrawal |