【问题标题】:Is posible get price Token using uniswap v3 way contract read?是否可以使用 uniswap v3 方式读取价格令牌?
【发布时间】:2022-01-04 10:49:52
【问题描述】:

我知道在 SushiSwap 中,可以通过读取 getAmountsOut 的紧密合约来获取代币的价格,然后通过 etherjs 库将其发送到 from。 https://etherscan.io/address/0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f#readContract

Uniswap V3 的 v3 版本可以这样做吗? https://docs.uniswap.org/protocol/introduction

或者还有其他方法吗?

【问题讨论】:

    标签: solidity ethers.js


    【解决方案1】:

    您可以从以下位置使用 getOutputAmount: pool - getOutputAmount

    使用示例: https://github.com/Uniswap/v3-sdk/issues/78

    【讨论】:

      猜你喜欢
      • 2021-02-18
      • 2021-04-15
      • 2021-04-11
      • 1970-01-01
      • 1970-01-01
      • 2019-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多