New answers tagged

0

If you do not want to install "Microsoft C++ Build Tools", You can download prebuilt bitarray here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#bitarray Then execute pip3 install bitarray‑2.3.4‑cp310‑cp310‑win_amd64.whl, dependends on the python version you used.


1

ok, I figured that out, to explicitly make a call but not a transaction you need to pass all arguments in "call" method like that: price = quoter.quoteExactInputSingle.call( token0, token1, feeTier, decimals, 0 )


1

The problem is that the polygon contract 0x308e44cA2153C61103b0DC67Fd038De650912b73 is a proxy, so its ABI doesn't have the full implementation. The polygonscan page says the proxy is pointing to the contract at 0x66a9abb8e32d7c7056a886ee4b3b3eb3cc92b54b. To decode the transaction input you should use the ABI from that contract instead.


0

Try using this solidity code: https://github.com/PatrickAlphaC/brownie_fund_me/issues/1 // SPDX-License-Identifier: MIT pragma solidity ^0.6.6; import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; import "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol"; contract FundMe { using SafeMathChainlink ...


0

I found the answer... pancakeswap has some pairs quoted in maaany decimal places, so the output is not in tokens but in 1/1000000000000 of a token.


1

I asked Etherscan support and got the answer. We unfortunately do not have an endpoint that returns the "Transaction Action" information at this point of time. It is a popular one by request, and we will definitely consider to add it in a future update. btw API Pro doc is located at https://etherscan.io/apidocs#APIpro , I checked it as well, ...


0

The logs get converted to human-readable output via ABI. You can construct Contract instances in web3.py and then use event methods to parse the output from raw JSON-RPC data to human-readable data structures. In this case, you need to parse Swap (Uniswap) and Transfer events (ERC-20). You will find ABI files in the respective repositories of the projects on ...


0

See this: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ You need a C compiler to install dependencies web3.py is using.


1

Seems like your private key is "mywalletprivatekey". Private keys shall be hexadecimal (only hex chars) and 64 chars long ! Using private_key = "4d9e599423f0a37115c35f1dc4b749a4754545e4172d3901260a484512eee4d6" (this dont hold any ether) shall work !


0

When you make a swap, you're likely to get a little less than the expected amount ( if other people sell/buy while your tx is being processed the price will be different that the one calculated by getAmountsOut(), that's called slippage, you probably already heard the word). If you're doing this as a test project i suggest setting minAmountOut to 0, if you'...


0

You have to estimate on the built tx, not the signed. For your code that would be the transaction variable.


0

I solved my problem, problem was in bscTestnet_url wrong node url.


0

If you have the contract ABI and address, you can use web3.py to call the contract and fetch its past emitted events. Based on this information, you can construct on the Python side what has happened and what is the current contract state. More information in Web3.py documentation how to interact with the contracts.


0

In order to send ETH to a function, the function in the contract must be marked as PAYABLE ("allowed to receive ether") if the function is not payable, value must be 0 'value': 0, A payable function is something like this: function deposit() payable { // do something }


Top 50 recent answers are included