[英]Uniswap v2 swap() function. What are balance0 & balance1?
我正在學習 Uniswapv2 合約是如何工作的,但我似乎無法全神貫注於swap() function。 參考: https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol#L173 第 173-174 行包 ...
[英]Uniswap v2 swap() function. What are balance0 & balance1?
我正在學習 Uniswapv2 合約是如何工作的,但我似乎無法全神貫注於swap() function。 參考: https://github.com/Uniswap/v2-core/blob/master/contracts/UniswapV2Pair.sol#L173 第 173-174 行包 ...
[英]Is there a way to get the value of a crypto in another one with uniswap
我是區塊鏈/加密貨幣世界的初學者,我想知道是否有辦法在 uniswap 上獲取另一個加密貨幣的價值(就像在圖像中我們可以在 uniswap 上看到的那樣 1 ETH = 2997 1INCH)。 ,例如使用 SDK 或路由器 ecc.. 如果您有任何建議,請幫助我。 我嘗試使用 uniswap s ...
[英]Is it possible in solidity to check if a contract has specific function before calling it and not revert or avoid revert 0x0dfe1681
我正在實施一種代幣,該代幣在買賣時收取費用,但在轉讓時不收取費用。 我依靠檢查“從”和“到”作為 uniswap 對(V2 或 V3)來將其檢測為買賣交易。 對於 V2,它相當簡單,因為我可以使用工廠 function 來獲取配對地址。 但是對於V3礦池來說,組合更多,未來可能會增加更多的費用。 ...
[英]Does Uniswap Router02's getAmountsOut function consider pool fees when calculating a quote?
我想知道 Uniswap V2 Router02 合約上的 getAmountsOut function 在計算出金額時是否考慮了代幣的池費用,還是我必須自己計算? 文檔在這方面非常模糊https://docs.uniswap.org/contracts/v2/reference/smart-co ...
[英]ethers.js, Swap on uniswapV3 failed tx
我正在嘗試將exactInput() function 用於 UniV3 接口,但是當嘗試執行代碼時,交易失敗https://goerli.etherscan.io/tx/0xb0d5e4b491610b9db8d98cc938008ba2a4e1a06e67b05ed87ac6c0ca3ad61 ...
[英]Hardhat, ether.js. TypeError: deployer.sendTransaction is not a function error. Trying to execute exactInput UniswapV3 function
我正在嘗試使用 UniswapV3 界面執行交換以購買 Uni。 它向我發送了與sendTransaction() function 相關的錯誤,我不明白為什么我看到的很多例子都是這樣使用的。 如您所見,我正在使用安全帽,並從另一個腳本調用getToken()並在 goerli.network 上 ...
[英]in web3py, any function to call static?
我想使用 Uniswap V3 Quoter function,但它是一個寫入 function。我必須撥打 static 以避免 gas 成本。 我在 web3py 文檔中沒有看到任何 static 調用。 有什么建議嗎? 先謝謝了! ...
[英]I face Uniswap: K error when I use swapExactTokensForETH function
我在 Node.js 中使用 swapExactETHForTokens 和 swapExactTokensForETH。 但是 swapExactETHForTokens 運行良好,但 swapExactTokensForETH 面臨錯誤。 這是我的代碼。 並且已經在其他功能上獲得批准。(Unis ...
[英]Can I tell how much fees are sent in the UI with swapExactTokensForETHSupportingFeeOnTransferTokens?
當實施 swapExactTokensForETHSupportingFeeOnTransferTokens 時,Uniswap UI 是否顯示發送了多少費用? ...
[英]Can't see balance of the tokens of the smart contract in remix when run the seeBalance function
pragma solidity =0.7.6; pragma abicoder v2; 導入“https://github.com/Uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol”; 接口 IERC20 { function b ...
[英]What's purpose to forbid delegate call in UniswapV3
我正在研究 Uniswap V3 並注意到UniswapV3Pool使用NoDeletageCall合約,它禁止使用另一個存儲執行 Uniswap 的代碼。 我的問題是:這種限制的目的是什么? 因為從我的角度來看,這種限制是無用的,基本合同不會發生任何事情。 ...
[英]keep getting dai.balanceOf() is not a function
所以我正在嘗試制作一個機器人,它會不斷地自動從 dai 交換到 usdc,直到我錢包中的 dai 余額減少 10%。 所以現在我試圖在 Goeril test.net 上測試這個,我在那里部署了 Multiswap 智能合約,該合約將交換到 Uniswap usdc 和 Dai 礦池。 但是我在實 ...
[英]How do i break the loop for this UniswapV3 bot when my balance has decreased by 10% from original balance
所以我做了一個機器人,它會在 Uniswap V3 DAI 和 USDC 0.05% 池上連續進行多跳交換,因此機器人進行的每筆交易都會讓我每次損失大約 0.10% 的余額。 當我的當前余額是我開始時的原始余額的 90% 時,我希望機器人停止交易,但我不知道該怎么做。 到目前為止,我已經將 90% ...
[英]Babel Error on using useEffect with Async function in React
我正在嘗試調用 API 並使用 useEffect 更新 React Typescript 項目中的 state。 基礎項目在“react-script@4.0.3”和 typescript typescript@latest上運行我正在嘗試向 Uniswap Repo 添加一個新組件 -> ...
[英]Uniswap V3: what does price mean at a given tick?
我正在查看說明此示例的uniswap 文檔: 在 WETH / USDC 池中查找 WETH 價格的示例,其中 WETH 為 token0,USDC 為 token1: 您有一個 oracle 讀數,顯示 tickCumulative 的返回值為 [70_000, 1_070_000],兩次觀察之 ...
[英]Error while trying to add Liquidity in uniswap pair
我正在使用 Hardhat framewrok 並使用 erc20 合約進行一些測試:我使用該教程來分叉https://hardhat.org/hardhat.network/docs/guides/forking-other.networks 。 我正在嘗試使用 uniswap 在 mai.net ...
[英]How to get access to ETH/UNI pool in uniswap v3 on Goerli testnet?
我想在 Goerli tes.net 上的 Uniswap V3 中獲取 ETH/UNI 池的池實例。 我嘗試將Goerli中的WETH代幣地址傳遞給getPool() function,但返回0x0,表示沒有該池。 另外,我試圖獲取我錢包地址的 WETH 余額,但它也返回 0。不過我有一些 WE ...
[英]How can I get pool with ETH in Uniswap v3?
我想獲得 ETH 池(ETH/UNI、ETH/USDC,...)。 我試圖用 0x000000000000000000000000000000000000000 調用 uniswap 工廠合約的 getPool() function,但它返回 0x0,這意味着沒有礦池。 ...
[英]Uniswap V2 pool priceImpact
你如何計算對 Uniswap v2 礦池的價格影響? 我找不到可以幫助我的文檔。 當您 select 兩個要交換的代幣時,價格影響會出現在 UI 上。 ...
[英]decoding uniswap event data in python with ABI?
我前兩天開始接觸以太坊區塊鏈,所以我的知識還是有點遍地開花。 盡管如此,我還是成功地連接到了一個節點,提取了一些通用的塊數據等等。 作為下一個難度級別,我嘗試開始構建事件過濾器,以查看更具體類型的歷史數據(明確地說,我不想獲取實時數據,我寧願查詢整個鏈,並獲取各種類型數據的歷史樣本提取)。 在這里 ...