runtime:
  shutdown_timeout_seconds: 15

grpc:
  network: tcp
  address: ":50071"
  advertise_host: "dev-tron-gateway"
  enable_reflection: true
  enable_health: true

metrics:
  address: ":9408"

database:
  driver: mongodb
  settings:
    host_env: TRON_GATEWAY_MONGO_HOST
    port_env: TRON_GATEWAY_MONGO_PORT
    database_env: TRON_GATEWAY_MONGO_DATABASE
    user_env: TRON_GATEWAY_MONGO_USER
    password_env: TRON_GATEWAY_MONGO_PASSWORD
    auth_source_env: TRON_GATEWAY_MONGO_AUTH_SOURCE
    replica_set_env: TRON_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: TRON Gateway Service
    max_reconnects: 10
    reconnect_wait: 5
    buffer_size: 1024

chains:
  - name: tron_nile
    chain_id: 3448148188 # Nile testnet
    native_token: TRX
    rpc_url_env: TRON_GATEWAY_RPC_URL
    grpc_url_env: TRON_GATEWAY_GRPC_URL
    grpc_token_env: TRON_GATEWAY_GRPC_TOKEN
    gas_topup_policy:
      buffer_percent: 0.10
      min_native_balance_trx: 10
      rounding_unit_trx: 1
      max_topup_trx: 100
    tokens:
      - symbol: USDT
        contract: "TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf"

service_wallet:
  chain: tron_nile
  address_env: TRON_GATEWAY_SERVICE_WALLET_ADDRESS
  private_key_env: TRON_GATEWAY_SERVICE_WALLET_KEY

key_management:
  driver: vault
  settings:
    address: "http://dev-vault:8200"
    token_env: VAULT_TOKEN
    namespace: ""
    mount_path: kv
    key_prefix: gateway/tron/wallets

cache:
  wallet_balance_ttl_seconds: 120
  rpc_request_timeout_seconds: 15
