New answers tagged

0

From a development standpoint, Python has fewer keywords than C and C++. Python also has an easier syntax whereas C is more difficult to write. But from a performance standpoint, Python is slower than C as it takes significant CPU time for interpretation. So, speed-wise C is a better option. You can imagine that this is important in a miner that would like ...


0

So I solved the problem. There were two mistakes: For the "REWARD_DECIMAL" and the "TOKEN_DECIMAL" I should use 10 to the power of the number, and not the numbers themselves. Prices in ETH retrieved from the call to the API api.thegraph.com are wrong for some reason. So I replaced by calls to Binance API to get the prices in ETH. Bellow ...


0

It depends on when you want to set the price. You can use msg.value to make sure they send you ETH (or whatever your native smart contract token is) On mint: You just add a require statement under your minting function. ie: function mint() public { require(msg.value > [SOME_PRICE_IN_WEI]); . . . On "resell" You could also force the transfer ...


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

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.


0

This is an official answer from geth. You need to fork the code and figure out how to remove all non-txpool related functionality. This is not something that we are going to support in go-ethereum though. https://github.com/ethereum/go-ethereum/issues/23537#issuecomment-913654323


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 ran into a similar issue a while back. This error most likely results from accidentally using the Infura "project secret" as the private key when you should use an ETH and LINK funded wallet private key. Make sure to get test ETH and LINK tokens into the wallet first.


0

swapExactTokensForETHSupportingFeeOnTransferTokens is used to sell fee on transfer tokens (e.g. Safemoon) for BNB (on the BSC of course). Its counterpart (swapExactETHForTokensSupportingFeeOnTransferTokens) is probably what you're looking for if you're trying to buy that kind of tokens with BNB (it also works with "normal" tokens but costs more gas ...


1

from web3 import Web3 string_content = Web3.toText(bytes_content)


Top 50 recent answers are included