runtime:
  shutdown_timeout_seconds: 15

grpc:
  network: tcp
  address: ":50070"
  advertise_host: "sendico_chain_gateway"
  enable_reflection: true
  enable_health: true

metrics:
  address: ":9406"

database:
  driver: mongodb
  settings:
    host_env: CHAIN_GATEWAY_MONGO_HOST
    port_env: CHAIN_GATEWAY_MONGO_PORT
    database_env: CHAIN_GATEWAY_MONGO_DATABASE
    user_env: CHAIN_GATEWAY_MONGO_USER
    password_env: CHAIN_GATEWAY_MONGO_PASSWORD
    auth_source_env: CHAIN_GATEWAY_MONGO_AUTH_SOURCE
    replica_set_env: CHAIN_GATEWAY_MONGO_REPLICA_SET

messaging:
  driver: NATS
  settings:
    url_env: NATS_URL
    host_env: NATS_HOST
    port_env: NATS_PORT
    username_env: NATS_USER
    password_env: NATS_PASSWORD
    broker_name: Chain Gateway Service
    max_reconnects: 10
    reconnect_wait: 5
    buffer_size: 1024

chains:
  - name: arbitrum_one
    chain_id: 42161
    native_token: ETH
    rpc_url_env: CHAIN_GATEWAY_RPC_URL

    gas_topup_policy:
      buffer_percent: 0.15
      min_native_balance: 0.005
      rounding_unit: 0.001
      max_topup: 0.05

    tokens:
      - symbol: USDT
        contract: "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"
      - symbol: USDC
        contract: "0xaf88d065e77c8cc2239327c5edb3a432268e5831"

service_wallet:
  chain: arbitrum_one
  address_env: CHAIN_GATEWAY_SERVICE_WALLET_ADDRESS
  private_key_env: CHAIN_GATEWAY_SERVICE_WALLET_KEY

key_management:
  driver: vault
  settings:
    address: "https://vault.sendico.io"
    token_env: VAULT_TOKEN
    namespace: ""
    mount_path: kv
    key_prefix: gateway/chain/wallets

cache:
  wallet_balance_ttl_seconds: 120
  rpc_request_timeout_seconds: 15
