quote

node v18.11.0
version: 2.0.0
endpointsharetweet
const { quote } = require("wido") const quoteResult = await quote({ fromChainId: 1, // Mainnet toChainId: 1, // Mainnet fromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC toToken: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c", // yvWETH user: "0xaCfE4511CE883C14c4eA40563F176C3C09b4c47C", // User amount: String(100e6), // 100$, USDC has 6 decimals }) console.log(quoteResult.to) // WidoRouter console.log(quoteResult.data) // Unsigned tx that will give WidoTokenManager permission to spend your tokens console.log(quoteResult) // Full object that includes route metadata
Loading…

no comments

    sign in to comment