Add a SushiSwap stack #482

Merged
prathamesh0 merged 9 commits from pm-sushiswap-stack into main 2023-08-10 08:27:07 +00:00
prathamesh0 commented 2023-08-03 11:20:49 +00:00 (Migrated from github.com)

Part of https://github.com/cerc-io/watcher-ts/issues/399

  • An end-to-end SushiSwap stack that runs a Lotus chain (using fixturenet-lotus), a SushiSwap watcher and the info app
  • fixturenet-lotus stack improvements:
    • Add a health check to Lotus client nodes
    • Use a Lotus release in build to avoid future Dockerfile conflicts
Part of https://github.com/cerc-io/watcher-ts/issues/399 - An end-to-end SushiSwap stack that runs a Lotus chain (using `fixturenet-lotus`), a SushiSwap watcher and the info app - `fixturenet-lotus` stack improvements: - Add a health check to Lotus client nodes - Use a Lotus release in build to avoid future Dockerfile conflicts
ashwinphatak commented 2023-08-10 11:23:42 +00:00 (Migrated from github.com)
> docker exec -it sushiswap-sushi-watcher-server-1 bash -c "export TOKEN0_ADDRESS=$TOKEN0_ADDRESS && export TOKEN1_ADDRESS=$TOKEN1_ADDRESS && export UNISWAP_CALLEE_ADDRESS=$UNISWAP_CALLEE_ADDRESS && yarn smoke-test"
    ✓ should have a watched Factory contract (103ms)
  vulcanize:client Subscription client connected successfully +0ms
    ✓ should create pool (5242ms)
  vulcanize:client Subscription client connected successfully +5s
    ✓ should initialize pool (4356ms)
  vulcanize:client Subscription client connected successfully +31s
    ✓ should mint specified amount (31470ms)
  vulcanize:client Subscription client connected successfully +5s
    ✓ should burn specified amount (4618ms)
  vulcanize:client Subscription client connected successfully +5s
    ✓ should swap pool tokens (4498ms)
    ✓ should have a watched NFPM contract (58ms)
  vulcanize:client Subscription client connected successfully +5s
  vulcanize:client Subscription client connected successfully +21s
  vulcanize:client Subscription client connected successfully +33s
    ✓ should mint specified amount: nfpm (58498ms)
  vulcanize:client Subscription client connected successfully +5s
    ✓ should increase liquidity (4203ms)
    ✓ should decrease liquidity (4315ms)
    ✓ should collect fees (22637ms)


  11 passing (2m)

> docker exec -it sushiswap-sushi-info-watcher-server-1 bash -c "export TOKEN0_ADDRESS=$TOKEN0_ADDRESS && export TOKEN1_ADDRESS=$TOKEN1_ADDRESS && export UNISWAP_CALLEE_ADDRESS=$UNISWAP_CALLEE_ADDRESS && yarn smoke-test"

  uni-info-watcher
    PoolCreatedEvent
      ✓ should not have Token entities
      ✓ should trigger PoolCreatedEvent (22145ms)
      ✓ should create Token entities (43ms)
      ✓ should create a Factory entity
      ✓ should create a Bundle entity
      ✓ should create a Pool entity
    InitializeEvent
      ✓ should not have pool entity initialized
      ✓ should trigger InitializeEvent (26833ms)
      ✓ should update Pool entity
      ✓ should update PoolDayData entity
    MintEvent
      ✓ should trigger MintEvent (24477ms)
      ✓ should update Token entities (48ms)
      ✓ should update Factory entity
      ✓ should update Pool entity
      ✓ should create a Transaction entity
      ✓ should create a Mint entity
      ✓ should create Tick entities
      ✓ should update UniswapDayData entity
      ✓ should update PoolDayData entity
      ✓ should update TokenDayData entities
      ✓ should update TokenHourData entities
    BurnEvent
      ✓ should trigger BurnEvent (28281ms)
      ✓ should update Token entities (38ms)
      ✓ should update Factory entity
      ✓ should update Pool entity
      ✓ should create a Transaction entity
      ✓ should create a Burn entity
      ✓ should update Tick entities
      ✓ should update UniswapDayData entity
      ✓ should update PoolDayData entity
      ✓ should update TokenDayData entities
      ✓ should update TokenHourData entities
    SwapEvent
      ✓ should trigger SwapEvent (28108ms)
      ✓ should update Token entities
      ✓ should update Factory entity
      ✓ should update Pool entity
      ✓ should create a Transaction entity
      ✓ should create a Swap entity
      ✓ should update UniswapDayData entity
      ✓ should update PoolDayData entity
      ✓ should update TokenDayData entities
      ✓ should update TokenHourData entities
    TransferEvent
      ✓ should trigger TransferEvent (22255ms)
      ✓ should create a Transaction entity (84ms)
      ✓ should create a Position entity
    IncreaseLiquidityEvent
      ✓ should trigger IncreaseLiquidityEvent (24925ms)
      ✓ should create a Transaction entity
      ✓ should update Position entity
    DecreaseLiquidityEvent
      ✓ should trigger DecreaseLiquidityEvent (31715ms)
      ✓ should create a Transaction entity
      ✓ should update Position entity
    CollectEvent
      ✓ should trigger CollectEvent (30297ms)
      ✓ should create a Transaction entity


  53 passing (5m)

``` > docker exec -it sushiswap-sushi-watcher-server-1 bash -c "export TOKEN0_ADDRESS=$TOKEN0_ADDRESS && export TOKEN1_ADDRESS=$TOKEN1_ADDRESS && export UNISWAP_CALLEE_ADDRESS=$UNISWAP_CALLEE_ADDRESS && yarn smoke-test" ``` ``` ✓ should have a watched Factory contract (103ms) vulcanize:client Subscription client connected successfully +0ms ✓ should create pool (5242ms) vulcanize:client Subscription client connected successfully +5s ✓ should initialize pool (4356ms) vulcanize:client Subscription client connected successfully +31s ✓ should mint specified amount (31470ms) vulcanize:client Subscription client connected successfully +5s ✓ should burn specified amount (4618ms) vulcanize:client Subscription client connected successfully +5s ✓ should swap pool tokens (4498ms) ✓ should have a watched NFPM contract (58ms) vulcanize:client Subscription client connected successfully +5s vulcanize:client Subscription client connected successfully +21s vulcanize:client Subscription client connected successfully +33s ✓ should mint specified amount: nfpm (58498ms) vulcanize:client Subscription client connected successfully +5s ✓ should increase liquidity (4203ms) ✓ should decrease liquidity (4315ms) ✓ should collect fees (22637ms) 11 passing (2m) ``` ``` > docker exec -it sushiswap-sushi-info-watcher-server-1 bash -c "export TOKEN0_ADDRESS=$TOKEN0_ADDRESS && export TOKEN1_ADDRESS=$TOKEN1_ADDRESS && export UNISWAP_CALLEE_ADDRESS=$UNISWAP_CALLEE_ADDRESS && yarn smoke-test" ``` ``` uni-info-watcher PoolCreatedEvent ✓ should not have Token entities ✓ should trigger PoolCreatedEvent (22145ms) ✓ should create Token entities (43ms) ✓ should create a Factory entity ✓ should create a Bundle entity ✓ should create a Pool entity InitializeEvent ✓ should not have pool entity initialized ✓ should trigger InitializeEvent (26833ms) ✓ should update Pool entity ✓ should update PoolDayData entity MintEvent ✓ should trigger MintEvent (24477ms) ✓ should update Token entities (48ms) ✓ should update Factory entity ✓ should update Pool entity ✓ should create a Transaction entity ✓ should create a Mint entity ✓ should create Tick entities ✓ should update UniswapDayData entity ✓ should update PoolDayData entity ✓ should update TokenDayData entities ✓ should update TokenHourData entities BurnEvent ✓ should trigger BurnEvent (28281ms) ✓ should update Token entities (38ms) ✓ should update Factory entity ✓ should update Pool entity ✓ should create a Transaction entity ✓ should create a Burn entity ✓ should update Tick entities ✓ should update UniswapDayData entity ✓ should update PoolDayData entity ✓ should update TokenDayData entities ✓ should update TokenHourData entities SwapEvent ✓ should trigger SwapEvent (28108ms) ✓ should update Token entities ✓ should update Factory entity ✓ should update Pool entity ✓ should create a Transaction entity ✓ should create a Swap entity ✓ should update UniswapDayData entity ✓ should update PoolDayData entity ✓ should update TokenDayData entities ✓ should update TokenHourData entities TransferEvent ✓ should trigger TransferEvent (22255ms) ✓ should create a Transaction entity (84ms) ✓ should create a Position entity IncreaseLiquidityEvent ✓ should trigger IncreaseLiquidityEvent (24925ms) ✓ should create a Transaction entity ✓ should update Position entity DecreaseLiquidityEvent ✓ should trigger DecreaseLiquidityEvent (31715ms) ✓ should create a Transaction entity ✓ should update Position entity CollectEvent ✓ should trigger CollectEvent (30297ms) ✓ should create a Transaction entity 53 passing (5m) ```
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#482
No description provided.