export default () => ({
  port: parseInt(process.env.PORT || '3020', 10),
  chainId: parseInt(process.env.CHAIN_ID || '8888', 10),
  rpcUrl: process.env.RPC_URL || 'http://localhost:8545',
  wsUrl: process.env.WS_URL || 'ws://localhost:8546',
  cometbftUrl: process.env.COMETBFT_URL || 'http://localhost:26657',
  databaseUrl: process.env.DATABASE_URL || 'postgresql://genex:password@localhost:5432/genex_enterprise',
  rateLimit: {
    public: parseInt(process.env.RATE_LIMIT_PUBLIC || '60', 10),
    institutional: parseInt(process.env.RATE_LIMIT_INSTITUTIONAL || '600', 10),
  },
  contracts: {
    couponFactory: process.env.COUPON_FACTORY_ADDRESS || '',
    coupon: process.env.COUPON_ADDRESS || '',
    compliance: process.env.COMPLIANCE_ADDRESS || '',
    settlement: process.env.SETTLEMENT_ADDRESS || '',
    treasury: process.env.TREASURY_ADDRESS || '',
    governance: process.env.GOVERNANCE_ADDRESS || '',
  },
});
