provider.getNetwork().chainId: 1 (Mainnet)tokenAddress: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (WETH)result:{ tokenInAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", (USDC) tokenOutAddress: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", (WETH) tokenInDecimals: 6, tokenOutDecimals: 18, rate: 0.000583026, (1 USDC = 0.000583026 ETH) => (1 x (10^6) USDC (in the smallest units) = 0.000583026 x (10^18) WEI)};
Generated using TypeDoc
Example