New answers tagged

0

without having any ETH Impossible; an account must own ETH in order to execute a transaction. The only thing that you can do is to transfer tokens (or ETH) back to the sender account at the end of the transaction, in order to compensate it for the initial payment.


0

actually there's no need to waste gas on this. address is available and can be used in constructor using address(this)


0

As said previously, you can swap eth for weth on uniswap. But if you want, the smart contract address for weth in Rinkeby is 0xc778417E063141139Fce010982780140Aa0cD5Ab


1

The error is likely that you don't allocate sufficient gas to the transaction. In fact you have to pay for the ETH transfer (21000 gas) + for the storage operation done inside the fallback function. Therefore try to increase the transaction gas in Metamask options. Note that the fallback function implementation has been changed in the 0.6 Solidity release (...


0

Here is an example. Contract 0x00000000002bde777710c370e08fc83d61b2b8e1 is killed in tx : https://etherscan.io/tx/0x026a971c7cf5476c93be05742abe56fe640331eb9bb36c53926ff95cb0529b62, and new contract at same address is created in tx: https://etherscan.io/tx/0x272dd4eb0b2073d3e5ecee1c62155790760ec818e6f37c86df02e60d75d7be2f#internal


1

getBalance is a function of the Ether.js blockchain provider object, it is used this way : const balance = await provider.getBalance("address"); Note that you can use contract.address to obtain the address of the contract instance.


0

If you are only sending Ethers directly to a user's wallet the gas usage is always 21000. But if you are sending Ethers to a contract it may be arbitrary. Most clients offer functionality to estimate the gas usage in advance. Note that this is only an estimation and sometimes it's not possible to make even an estimate. If you mean only the gas price, you can ...


1

Is it possible to broadcast transactions specific or a small number of miners? Broadcast, no. Send your transaction via an endpoint to a backroom mining service, yes. (If you can find one and can afford it.) From your question it sounds like you've read one or other of Ethereum is a Dark Forest, or its sequel, Escaping the Dark Forest. The crux of the ...


2

I believe you are referring to this article: https://www.google.com/amp/s/samczsun.com/escaping-the-dark-forest/amp/ (or if you're not, you should read it). To summarize the article: white hat hackers broadcast a transaction only to a mining pool which promised not to broadcast it publicly. The pool's miners mine the transaction and it gets revealed to ...


0

Nodes broadcast transactions to their peers, and within seconds the whole network knows about them. Furthermore the consensus algorithm needs the transactions to be validated and executed by the majority of the full-nodes before being added to the blockchain. As goodvibration said in his comment, such feature of broadcasting transactions only to a ...


0

I think the issue is on their side, when there is too much demand. There is nothing you can do other than trying some other day. Today, it worked for me, where the other week I had the same issue as you.


0

In my opinion, it is preferable to adapt to the EVM's use of integers where possible. It is nearly always possible. For example, here is a simple pattern for handling a percentage with two high-precision integers (one could be an exchange rate and the other a transaction volume). First, convert each input to an 18-decimal integer. So 1.0 would be 1 * 10 ** ...


0

Updated version of @k06a's answer for Solidity version 0.6 and above: function addressFrom(address _origin, uint _nonce) public pure returns (address _address) { bytes memory data; if(_nonce == 0x00) data = abi.encodePacked(byte(0xd6), byte(0x94), _origin, byte(0x80)); else if(_nonce <= 0x7f) data = abi....


0

Look at this examples: > Web3.utils.toChecksumAddress("0x03fB09251eC05ee9Ca36c98644070B89111D4b3F".toLowerCase()); '0x03FB09251eC05ee9Ca36c98644070B89111D4b3F' > Web3.utils.toChecksumAddress("0x03fB09251eC05ee9Ca36c98644070B89111D4b3f".toLowerCase()); '0x03FB09251eC05ee9Ca36c98644070B89111D4b3F' > Web3.utils.toChecksumAddress(&...


1

This is a bug in geth that was resolved in v1.9.13. The original issue can be found in Issue #16999 and the fix can be found in PR #20783. The issue was basically that geth was subtracting 0 by (gasLimit * gasPrice), which underflowed and resulted in the large number you saw. In your case, you were probably using the default Remix values of gasPrice = ...


0

Yes. Once the transaction is mined, click on the block number you can see in the tx details to access the block details. The address of the miner is indicated in "Mined by".


0

Change parameter Value in object txObject to value ( without capital letter ). Silly mistake, but happens a lot :)


Top 50 recent answers are included