Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion configs/indexer-avalanche.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ network:
contract: "0x0Ac28BcDcef8D8C95c4a079418dbC34e4AD4DF1D"
chain_id: 43114
index_period: 20s # period of contract calls for fetching events, should be > average_block_time
use_websocket: true
ws: "wss://api.avax.network/ext/bc/C/ws"
override_last_block: "28986738" # if set, updates the last block in DB and catches up from it; need to use on sync problems and disable after restoring normal sync
request_timeout: 7s
request_timeout: 7s
block_range: 2047
4 changes: 3 additions & 1 deletion configs/indexer-fuji.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ network:
contract: "0xCb4c864ec5355E6E01dB7118547cD0b355b8A2f4"
chain_id: 43113
index_period: 20s # period of contract calls for fetching events, should be > average_block_time
use_websocket: true
ws: "wss://api.avax-test.network/ext/bc/C/ws" # required to subscribe to blocks
# optional fields
# block_range: 3000 # max difference between start and end block for eth_getLogs call, e.g. for Fuji Ankr RPC it's 3000, for Infura see https://docs.infura.io/infura/networks/ethereum/json-rpc-methods/eth_getlogs#limitations
block_range: 2047 # max difference between start and end block for eth_getLogs call, e.g. for Fuji Ankr RPC it's 3000, for Infura see https://docs.infura.io/infura/networks/ethereum/json-rpc-methods/eth_getlogs#limitations
override_last_block: "21037746" # if set, updates the last block in DB and catches up from it; need to use on sync problems and disable after restoring normal sync
request_timeout: 7s
2 changes: 2 additions & 0 deletions configs/indexer-goerli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ network:
contract: "0x873264D287b44f9DaCAfB1Ef0b775bF25b573A15"
chain_id: 5
index_period: 30s
use_websocket: true
ws: "wss://goerli.infura.io/ws/v3/YOUR_API_KEY" # required to subscribe to blocks
# on troubles see more fields in indexer-fuji.yaml
request_timeout: 7s
override_last_block: "8850604"
2 changes: 2 additions & 0 deletions configs/indexer-q-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ network:
contract: "0x37987Dc60534e1bAfd463ac49b88812ABEb17718"
chain_id: 35443
index_period: 30s
use_websocket: false
ws: "" # required to subscribe to blocks
# on troubles see more fields in indexer-fuji.yaml
override_last_block: "5975165"
request_timeout: 7s
2 changes: 2 additions & 0 deletions configs/indexer-sepolia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ network:
contract: "0xc453792E6C896f0808BC45E271F811d2010cA62e"
chain_id: 11155111
index_period: 30s
use_websocket: true
ws: "wss://sepolia.infura.io/ws/v3/YOUR_API_KEY" # required to subscribe to blocks
# on troubles see more fields in indexer-fuji.yaml
request_timeout: 7s
override_last_block: "3313750"
6 changes: 6 additions & 0 deletions configs/order-aggregator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ listener:
chains:
url: "http://swapica/v1/chains"

notifications:
push_url: "https://backend.epns.io/apis" # prod; use https://backend-staging.epns.io/apis for staging
channel_address: ""
push_comm_address: "0xb3971bcef2d791bc4027bbfedfb47319a4aaaaaa" # Ethereum Mainnet and Goerli
private_key: ""

cop:
disabled: false
endpoint: "http://cop"
Expand Down
42 changes: 42 additions & 0 deletions configs/relayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
log:
level: debug
disable_sentry: true

listener:
addr: :80

transactor:
private_key: ""

token_chains:
url: "http://swapica/v1/token_chains"

chains:
list:
- name: "avalanche"
contract: "0xa651EdBbF77e1A2678DEfaE08A33c5004b491457" # relayer contract
rpc: "http://rpc-proxy/integrations/rpc-proxy/avalanche"
chain_id: 43114
- name: "goerli"
contract: "0xfBDf531661B4Cbe5aa36fF485199dDa3F5e32577"
rpc: "http://rpc-proxy/integrations/rpc-proxy/goerli"
chain_id: 5
- name: "q-testnet"
contract: "0x1c58aEeA2D5E6EB9DFAA0c800F6B5E84ECDf5513"
rpc: "http://rpc-proxy/integrations/rpc-proxy/q_testnet"
chain_id: 35443
- name: "sepolia"
contract: "0x70bDc294B11dbB44b45b0f5dEff174A81cd7701f"
rpc: "http://rpc-proxy/integrations/rpc-proxy/sepolia"
chain_id: 11155111
- name: "fuji"
contract: "0xf7ed68014159b2668De5556B21453E0221E138dc"
rpc: "http://rpc-proxy/integrations/rpc-proxy/fuji"
chain_id: 43113

cop:
disabled: false
endpoint: "http://cop"
upstream: "http://relayer"
service_name: relayer
service_port: 80
16 changes: 14 additions & 2 deletions configs/swapica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ log:
listener:
addr: :80

runner:
use_relayer: true
relayer_endpoint: "http://relayer/integrations/relayer"
timeout: 3s
aggregator:
endpoint: "http://order-aggregator/integrations/order-aggregator"
ws: "ws://order-aggregator/ws"

data:
tokens: # list of supported tokens
- id: "1"
Expand Down Expand Up @@ -71,6 +79,7 @@ data:
icon: "https://raw.githubusercontent.com/Swapica/assets/master/chains/avalanche/avalanche.png"
type: "evm"
swap_contract: "0xCb4c864ec5355E6E01dB7118547cD0b355b8A2f4"
relayer_contract: "0xf7ed68014159b2668De5556B21453E0221E138dc" # address of automatic relayer contract
rpc_endpoint: "http://rpc-proxy/integrations/rpc-proxy/fuji" # internal: for RPC calls
confirmations: 12
chain_params:
Expand All @@ -87,6 +96,7 @@ data:
icon: "https://raw.githubusercontent.com/Swapica/assets/master/chains/ethereum/ethereum.png"
type: "evm"
swap_contract: "0x873264D287b44f9DaCAfB1Ef0b775bF25b573A15"
relayer_contract: "0xfBDf531661B4Cbe5aa36fF485199dDa3F5e32577"
rpc_endpoint: "http://rpc-proxy/integrations/rpc-proxy/goerli"
confirmations: 12
chain_params:
Expand All @@ -103,6 +113,7 @@ data:
icon: "https://raw.githubusercontent.com/Swapica/assets/master/chains/ethereum/ethereum.png"
type: "evm"
swap_contract: "0xc453792E6C896f0808BC45E271F811d2010cA62e"
relayer_contract: "0x70bDc294B11dbB44b45b0f5dEff174A81cd7701f"
rpc_endpoint: "http://rpc-proxy/integrations/rpc-proxy/sepolia"
confirmations: 12
chain_params:
Expand All @@ -118,12 +129,13 @@ data:
name: "Q Testnet"
icon: "https://raw.githubusercontent.com/Swapica/assets/master/chains/q/q.png"
swap_contract: "0x37987Dc60534e1bAfd463ac49b88812ABEb17718"
relayer_contract: "0x1c58aEeA2D5E6EB9DFAA0c800F6B5E84ECDf5513"
rpc_endpoint: "http://rpc-proxy/integrations/rpc-proxy/q_testnet"
type: "evm"
confirmations: 12
chain_params:
chain_id: 35443
native_symbol: "Q "
native_symbol: "Q"
native_decimals: 18
rpc: "http://rpc-proxy/integrations/rpc-proxy/q_testnet"
explorer_url: "https://explorer.qtestnet.org/"
Expand All @@ -134,6 +146,7 @@ data:
name: "Avalanche Mainnet"
icon: "https://raw.githubusercontent.com/Swapica/assets/master/chains/avalanche/avalanche.png"
swap_contract: "0x0Ac28BcDcef8D8C95c4a079418dbC34e4AD4DF1D"
relayer_contract: "0xa651EdBbF77e1A2678DEfaE08A33c5004b491457"
rpc_endpoint: "http://rpc-proxy/integrations/rpc-proxy/avalanche"
type: "evm"
confirmations: 12
Expand All @@ -147,7 +160,6 @@ data:
chain_type: "mainnet"
public_rpc: "https://api.avax.network/ext/bc/C/rpc"


signer:
eth_signer: "private key of address from getSigners contract method"

Expand Down
28 changes: 19 additions & 9 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
ports:
- "8000:80"
swapica:
image: swapica/swapica:v1.0.0-rc.10
image: swapica/swapica:v1.0.0-rc.20
restart: unless-stopped
depends_on:
- cop
Expand All @@ -48,22 +48,22 @@ services:
- ./configs/rpc-proxy.yaml:/config.yaml
entrypoint: sh -c "rpc-proxy-svc run service"
landing:
image: swapica/landing:v1.0.0-rc.10
image: swapica/landing:v1.0.0-rc.11
restart: unless-stopped
volumes:
- ./configs/client.js:/usr/share/nginx/html/env.js
ports:
- "8070:80"
web_client:
image: swapica/web:v1.0.0-rc.24
image: swapica/web:v1.0.0-rc.25
restart: unless-stopped
volumes:
- ./configs/client.js:/usr/share/nginx/html/env.js
ports:
- "8060:80"

indexer-goerli:
image: swapica/indexer:v0.1.0-rc.1
image: swapica/indexer:v0.1.0-rc.5
restart: unless-stopped
depends_on:
- order-aggregator
Expand All @@ -73,7 +73,7 @@ services:
- ./configs/indexer-goerli.yaml:/config.yaml
entrypoint: sh -c "indexer-svc run service"
indexer-fuji:
image: swapica/indexer:v0.1.0-rc.1
image: swapica/indexer:v0.1.0-rc.5
restart: unless-stopped
depends_on:
- order-aggregator
Expand All @@ -83,7 +83,7 @@ services:
- ./configs/indexer-fuji.yaml:/config.yaml
entrypoint: sh -c "indexer-svc run service"
indexer-sepolia:
image: swapica/indexer:v0.1.0-rc.1
image: swapica/indexer:v0.1.0-rc.5
restart: unless-stopped
depends_on:
- order-aggregator
Expand All @@ -93,7 +93,7 @@ services:
- ./configs/indexer-sepolia.yaml:/config.yaml
entrypoint: sh -c "indexer-svc run service"
indexer-q-testnet:
image: swapica/indexer:v0.1.0-rc.1
image: swapica/indexer:v0.1.0-rc.5
restart: unless-stopped
depends_on:
- order-aggregator
Expand All @@ -103,7 +103,7 @@ services:
- ./configs/indexer-q-testnet.yaml:/config.yaml
entrypoint: sh -c "indexer-svc run service"
indexer-avalanche:
image: swapica/indexer:v0.1.0-rc.1
image: swapica/indexer:v0.1.0-rc.5
restart: unless-stopped
depends_on:
- order-aggregator
Expand All @@ -114,7 +114,7 @@ services:
entrypoint: sh -c "indexer-svc run service"

order-aggregator:
image: swapica/order-aggregator:v0.1.0-rc.1
image: swapica/order-aggregator:v0.1.0-rc.9
restart: unless-stopped
depends_on:
- orders_db
Expand All @@ -135,6 +135,16 @@ services:
- PGDATA=/pgdata
volumes:
- orders-data:/pgdata
relayer:
image: swapica/relayer:v0.1.0-rc.2
restart: unless-stopped
depends_on:
- cop
environment:
- KV_VIPER_FILE=/config.yaml
volumes:
- ./configs/relayer.yaml:/config.yaml
entrypoint: sh -c "relayer-svc run service"

volumes:
orders-data: