Skip to content

FelixFan1992/chainlink-gmx-automation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chainlink <> GMX Automation

Prerequisites

  1. Git
  2. Foundry
  3. Yarn
  4. Arbitrum Goerli RPC URL

Installation

  1. Clone the repo:
    git clone [email protected]:Cyfrin/chainlink-gmx-automation.git
    
  2. Install dependencies:
    cd chainlink-gmx-automation
    forge install
    
  3. Install GMX dependencies:
    cd lib/gmx-synthetics
    yarn
    cd ../..
    
  4. Build:
    forge build
    
  5. Setup environment:
    cp .env.example .env
    
    Enter your RPC URL into the ARBITRUM_GOERLI_URL in .env
  6. Run the tests:
    forge test
    

Automation Contracts

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%