Skip to content

Commit

Permalink
chore: Add Sample config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdubey521 committed Jun 12, 2024
1 parent e91fc55 commit 373fd92
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Cargo.lock

.env
*.swp
config.yaml
51 changes: 51 additions & 0 deletions config.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
chains:
- id: 1
name: Ethereum
is_enabled: true
- id: 56
name: Binance Smart Chain
is_enabled: true
tokens:
- symbol: ETH
is_enabled: true
by_chain:
1:
is_enabled: true
decimals: 18
address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
56:
is_enabled: true
decimals: 18
address: '0x2170Ed0880ac9A755fd29B2688956BD959F933F8'
- symbol: BNB
is_enabled: true
by_chain:
1:
is_enabled: false
decimals: 18
address: '0xB8c77482e45F1F44dE1745F52C74426C631bDD52'
56:
is_enabled: true
decimals: 18
address: '0xEEeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
buckets:
- from_chain_id: 1
to_chain_id: 56
from_token: ETH
to_token: BNB
is_smart_contract_deposit_supported: true
token_amount_from_usd: 0.1
token_amount_to_usd: 100
bungee:
base_url: 'https://api.bungee.exchange'
api_key: 'my-api'
covalent:
base_url: 'https://api.bungee.exchange'
api_key: 'my-api'
coingecko:
base_url: 'https://api.coingecko.com'
infra:
redis_url: 'redis://localhost:6379'
rabbitmq_url: 'amqp://localhost:5672'
mongo_url: 'mongodb://localhost:27017'
is_indexer: true
4 changes: 2 additions & 2 deletions crates/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ pub struct BucketConfig {
// Whether the bucket should only index routes that support smart contracts or just EOAs
pub is_smart_contract_deposit_supported: bool,
// Lower bound of the token amount to be transferred from the source chain to the destination chain
#[validate(minimum = 1)]
#[validate(minimum = 1.0)]
pub token_amount_from_usd: f64,
// Upper bound of the token amount to be transferred from the source chain to the destination chain
#[validate(minimum = 1)]
#[validate(minimum = 1.0)]
pub token_amount_to_usd: f64,
}

Expand Down

0 comments on commit 373fd92

Please sign in to comment.