13

You'll need to add chainId to your transaction object to save your tx from being replayed on other chains. tx = { 'chainId': 3, // for ropsten 'nonce': nonce, 'to': account_2, 'value': web3.toWei(float_amount, 'ether'), 'gas': 21000, 'gasPrice': web3.toWei(50, 'gwei') } Check here for chain IDs of all EVM based chain


13

EIP-1559 transactions are typed transactions (see EIP-2718), where the type for EIP-1559 transactions is specified as 0x02. The payload of the EIP-1559 transactions consists of (as JSON): { "gas": "0x5208", // = gasLimit "maxFeePerGas": "0xb2d05e00", "maxPriorityFeePerGas": "0xb2d05e00", &...


7

It is most likely a transaction that cancels another one. You can cancel a transaction by sending another transaction from the same address with the same nonce, with a gas price at least 10% greater than the gas price of the cancelled transaction. If you want to reduce the gas cost of your cancelling transaction to the minimum, making a transfer to yourself ...


6

If you want to do it programmatically, you can query the contract for the uniswap pool for your token. For example, take USDC token. You can query the uniswap usdc-eth contract to get the # of usdc and eth: the price of eth is then (number of usdc) / (number of eth). In this case, I'm using the ethers.js library. You can also do this with web3. import { ...


6

"Technological limits" is a quite broad term, but some other relevant limits are, for example: Maximum contract size of 24 kB (see in this article) Limited stack depth of 1024 (see deprecated Call Depth Attack) And most importantly, every computation requires gas, which is limited by your gas limit (see gas costs for EVM instructions) For a more ...


5

UI Tools cleanunicorn.github.io/santoku etid.wtd.ru ethtx.info moesif.com/solidity-abi-hex-decoder/decode Note for these you will need the ABI of the contract. Node Packages @ethersproject/abi (part of the umbrella package ethers) abi-decoder ethereum-input-data-decoder Recommendation Use @ethersproject/abi, it's the safest approach of all. Ethers is ...


4

The error-message INSUFFICIENT_OUTPUT_AMOUNT is thrown from the contract function, not from the transaction. It therefore has nothing to do with your gas-limit and gas-price configuration, and it most certainly has nothing to do with ETH/USD price. This error-message tells you that the output amount is smaller than the minimum that you've requested for (in ...


4

First question - There are two options here: The backend forms a transaction, and geth signs and sends it to the Ethereum network The backend forms and signs the transaction, and the geth sends it to the network Second question - maybe 2 options: The backend requests new blocks from the geth, extracts events from them and selects the necessary ones The ...


4

In the last transaction (https://etherscan.io/tx/0xfc95b0c4026ab356b36076ca624d3bf49ace40bdf3ca54a91ddad0ef128330af), multiple token transfers of ERC20 is due to the specific nature of the FLAMA contract, every time when _transfer is called in FLAMA, three events are emitted: (burns some amount, stakes some amount and transfers the rest) emit ...


4

When you create a transaction you set two parameters: gas: Maximum amount of gas to be used gasPrice: Price to pay for each gas unit To execute the transaction your account needs to have at least gas * gasPrice ether. Before executing your account is charged with gas * gasPrice. After the transaction has completed its execution unused gas and refunded gas ...


4

but how exactly are all of these transaction fees sent to the miner who mines the block? They are not really sent anywhere - they don't need to be. When a block is mined by a given miner, the consensus protocol ensures that the rest of the network becomes (eventually) consistent, meaning that all other miners accept the approved block, and get on with ...


4

But what is the actual number of blocks that were invalidated by this hard fork? And how many transactions approximately? No blocks were invalidated and nothing was rolled back. Instead, EIP-779: Hardfork Meta: DAO Fork (i.e. the hard fork resulting from the attack on theDAO), performed an irregular state change. The state change involved removing the ETH ...


4

Did you update your web3 version ? As you can see on this page you need Web3JS >=1.5.0 : https://github.com/ChainSafe/web3.js/releases Then your call seems right and you should get back a receipt specifying type: 0x2


4

Theoretically anyone can broadcast signed transactions, yes. The signed transaction contains the gas price (and gas limit) that the sender is willing to pay to for getting the transaction included in a block. Usually transactions with a gas price of 0 or below a certain threshold would get ignored by miners. However, there are exceptions like Flashbots ...


3

Note that, in Truffle console, you should try naming() just like: A_instance.naming.sendTransaction() or A_instance.naming() This sends a transaction to network that causes your desired code be run. This process mutates ledger and contracts' states. Using .call() instead .sendTransaction() just makes an interaction between two contracts without mutating ...


3

The payload tells the contract which function you want to call, and the respective argument values to execute that call. Structure of a payload A payload comprises of 2 main parts - the function selector and its argument values. Let's say you want to call a particular function in a specific contract: transfer(address,uint256) This is how the payload is ...


3

A pending transaction can be cancelled by using a wallet that supports it. For example, here are instructions from the MetaMask wallet with diagrams. https://metamask.zendesk.com/hc/en-us/articles/360015489251-How-to-Speed-Up-or-Cancel-a-Pending-Transaction Click the Cancel button. The other answers explain more about what happens behind the scenes.


3

My situation: I met the same error while I'm working on my project on localhost (reactjs) with local Ganache blockchain. Reading data from chain works fine but writing data causes Metamask to show the exact same error: Error: [ethjs-query] while formatting outputs from RPC '{ "value":{"code":-32603, ... } At the same time, Metamask ...


3

this is maybe too simple - but in my case, restarting my react app and my local blockchain solved this problem. Also I recognized that I run into that issue a lot while using Firefox. It also helped me to switch the browser to Google Chrome. The Renaissance and I got to the conclusion, that switching to any Chromium browser (eg Chrome, Chromium, Brave, and I ...


3

In Ethereum 1.0, yes, it is a miner who includes the transaction in the blockchain. Read about Proof-of-work (Pow). In Ethereum 2.0, it is a "validator" who includes the transaction in a block of a shard. Read about Proof-of-stake (PoS). At the time of writing this answer, Ethereum 1.0 is still the "main" network. Ethereum 2.0 kicked off ...


3

Your biggest problem is that a contract can only receive assets which are inside the blockchain. You can't send regular money ($, €, any fiat) in blockchain and you can't send goods in blockchain. What you'd basically need is some way for an external party to tell the contract about the state of the assets (money and goods) outside blockchain. But it's ...


3

It could be the Oracle that traces the delivery - many DHL-type delivery networks provide APIs to their information systems. Although there are certain subtleties with determining the identifier of the tracked "package".


3

Gas prices rise based on people trying to outbid each other to make transactions faster. There is no direct tie to eth price, but it is typical to see more congestion when eth prices are higher, because there is more interest in the eth market. If congestion in the network (ie number of people trying to make transactions) is constant and people are not ...


3

They own the contracts. For example, one of the Tether contracts is named BlackList. This contains a mapping: mapping (address => bool) public isBlackListed; ...which can be updated by the owners using addBlackList(). When an address is added to the blacklist, that address can no longer use its Tether balance.


3

Swapping and providing liquidity are two different things, and you have different functions in Router02 depending on what you need to achieve. If you want to swap token for eth, you can use: function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); On ...


3

I had this error because I hadn't removed 0x from the prefix of the private key.


3

Basically, what you want is to have a confirmation that a given block was included in the canonical chain. I assume that you do not need very high security because based on your examples a confirmation of only one block would be enough for your need. I think that expending your second option could be a solution. Alternative 1 - Validate double blocks with ...


3

This looks like a "sandwich" (aka front running) attack executed in the same block Yes. How come "pre" and "post" transactions have 0 fee yet they appear at the very top of the block and right around the "victim" tx? Is it the miner creating those transactions themselves? The miner was paid directly, rather than ...


3

It depends, really. Some miners on the Ethereum chain, like Ethermine, use non-conventional ordering for their benefit, aka they generally don't do the by-gas sort. Other miners can choose to sort by gas and nonce, others can choose to sort by gas and first-seen-time, others can first sort by gas and then randomize the order, others can sort by gas first and ...


3

This is actually not so much of a transaction question, but a question about Uniswap code. Uniswap will basically cast the given address to an ERC20 interface, after which it assumes it has ERC20 functionality. After that it calls the address's transferFrom function - but since that doesn't exist, the transaction will be reverted. So you will only lose some ...


Only top voted, non community-wiki answers of a minimum length are eligible