Questions tagged [receipts]
The receipts tag has no usage guidance.
86
questions
1
vote
1
answer
15
views
Hardhat - Cannot read properties of undefined (reading '0') error in event log
I wanted to study the events on hardhat by following this lesson.
npx version: 9.5.1
node version: v12.22.9
Here's my contract code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract ...
0
votes
1
answer
25
views
Created CA when there are no logs
Sometimes there are TX that create a Contract but its receipt doesn't contain any logs, for example:
https://basescan.org/tx/0xb9d3c35f59132b6172812834a7540de7c49fdb8ff207700f15b5eba3be609808
returns ...
0
votes
1
answer
222
views
Why does awaiting a transaction receipt hang when auto-mining is disabled in Hardhat?
I am working on a Hardhat project and need to mine multiple transactions in the same block for testing. To achieve this, I disabled auto-mining and interval mining using the following code:
await ...
0
votes
1
answer
117
views
Receiving no events in contract receipt web3js
In my contract interaction with web3js I have a
.once("receipt", async (receipt) => {
console.log("receipt:", receipt);
I run this with a firebase function. ...
1
vote
1
answer
1k
views
How to get internal transactions using JSON-RPC methods
In etherscan I noticed that there are transactions that have "internal transactions" inside of them, see this link: etherscan transaction.
Screenshot of the transaction:
My question is: how ...
0
votes
1
answer
153
views
How to detect if a transaction failed before Byzantium fork [duplicate]
In short:
I'd love to understand how to detect if a transaction failed before the Byzantium fork.
Explanation:
After the Byzantium fork it's easy to understand if a transaction failed or not, I just ...
1
vote
1
answer
273
views
How to identify contracts created using deployer contracts from the logs?
I am interested in keeping track of each new contract created on Ethereum. So far, I have been looking at the transaction logs, there is a field to if this field has no value, that means it is a ...
0
votes
2
answers
206
views
How do does the trasaction error catching work?
I am trying to understand how errors, specially custom-errors, are being handled when Ethereum transactions are reverted.
From what I know, both successful and reverted transactions are mined into the ...
0
votes
1
answer
30
views
Up to date receipt proof functionality?
I think this repo is a bit out of date: https://github.com/zmitton/eth-proof.
Is there an up to date version that provides receipt proofs for Ethereum?
1
vote
0
answers
27
views
What is the process through which transactions and transaction receipts are found on a Ethereum database
Transactions and transaction receipts are constructed into Merkle Patricia Tries using the rlp encoded index with which they appear in a block. Once all tx information is rlp & hex prefix encoded ...
1
vote
1
answer
438
views
Web3.py Transaction Keeps Timing Out
I'm attempting to send a transaction using web3.py between an address I created & my metamask account on goerli. Everything seems to go well until confirming the transaction, at which point w3.eth....
0
votes
1
answer
326
views
What is and where to see in transaction in Etherscan the fields result.contractAddress and result.confirmations in API?
When I download data from a contract using API there are 2 fields that i cannot understand in which part of transaction in Etherscan are these numbers and maybe give me the definition of those fields:
...
1
vote
0
answers
360
views
eth_getTransactionReceipt with null block hash
I am getting receipts with null for blockHash and blockNumber.
That means I am somehow getting a receipt before the block is mined.
Is this an expected result?
If so, what is the use of it?
9
votes
1
answer
3k
views
How do I retrieve the exact gas costs spent for a transaction with ethers.js?
Running
const receipt = await contract.mint(4)
console.log(receipt)
gives me the following transaction receipt
{
hash: '...
0
votes
2
answers
3k
views
Code example: How to get transaction hash before sending transaction
I know their might be examples online, but they do not really solve my issue.
So let us say I have the code below:
this.factoryContract = new ethers.Contract(
"factoryContractAddress",
...
0
votes
0
answers
144
views
Transaction Receipt: Confirmation Time
I am discovering transaction details on Ethersan and trying to understand how "Timestamp" can be used to calculate how long a particular transaction waited in the pending pool.
In other ...
2
votes
1
answer
1k
views
How to recognize failed transaction in a block?
I am trying to decode transactions from a block, and I noticed that failed transactions are included in a block.
Is there any specific information within failed transaction data or within block that ...
1
vote
0
answers
93
views
Transaction receipt can be missing for mined transaction?
ETH Node: Geth
I am subscribing to new blocks, check each block & add transactions related to my node to database.
Before adding i check if transaction have receipt and the have gasPrice or not.
...
1
vote
0
answers
107
views
Building receipts proofs using only information from RPC
I tried to build a proof of inclusion for a particular receipt in a block, but I noticed that in some cases, the receipt was serialised together with the partial state root hash after executing this ...
3
votes
1
answer
674
views
How to get the error message from a failed transaction with web3?
My smart contract has the following piece of code:
# check if the election has begun. begin and end time must be in the future and in unix timestamp
assert block.timestamp < self.elections[...
1
vote
1
answer
569
views
How do I find the transaction success from a receipt?
Here is an example of a sucess:
{
"hash": "0x17e0b789c7645eef46316d475419c02391181881f70eb0451bb13c29a2dd5133",
"nonce": "0x14d",
"blockHash": &...
1
vote
1
answer
197
views
Transaction status true when sent to an address which doesn't have anything
When you create a transaction calling a function in a smart contract the transaction status is true if it's executed correctly and false if it isn't
When testing in Hyperledger Besu, if a transaction ...
2
votes
1
answer
97
views
Racing condition when replacing transactions
I'm writing a bot that monitors a DeFi protocol for liquidation opportunities. The bot behaves like in the pseudo-code below:
let pending_txs: [];
for every_new_block in Ethereum {
// Check the ...
0
votes
1
answer
470
views
Hoe to get the gas used by each transaction in a block in a single API call?
I am working on service which monitors Ethereum based blockchains using web3 API calls. For each new mined block, it has to parse each of the transactions in the block. In addition, it needs to parse ...
1
vote
1
answer
541
views
where is receipt tree stored?
Simple question.
I know that state trie is stored in each node's drive. but they are not stored on actual state.
Question 1) What about receipt tree ? do they get stored separately too from the chain ...
6
votes
1
answer
18k
views
how to decode log event of my transaction log?
I receive a transaction event in my log of my Ethereum transaction.
.on('receipt', function(receipt){
console.log("address: " + receipt.logs[0].address);
console.log(&...
1
vote
1
answer
1k
views
A way to capture actual gas used per transaction
Two questions, related:
Is the getGasUsed() on the TransactionReceipt truly the actual gas used, not the gasLimit or the gas estimate? Looks like it but...
Is the actual gas used obtainable ("...
4
votes
1
answer
2k
views
How to get require() error message?
I can see the error message on Etherscan.
But I can't find it in getTransactionRecept().
Is there any special settings that I need set in my Genesis.json before I can see it?
0
votes
1
answer
265
views
How do i get the actual transaction receipt if initial receipt was for an uncle?
Say I make some transaction with web3 which is picked up and validated by two miners A and B. A produced what turned out to be an uncle block and B contributed to the main-chain. If web3 gave me the ...
0
votes
1
answer
43
views
Does receiving a transaction receipt guarantee the transaction will be executed?
As the question says -
Does receiving a transaction receipt guarantee the transaction will be executed, assuming the transaction has a reasonable gas price, there are few enough transactions with a ...
0
votes
1
answer
396
views
Transaction response doesn't contain "receipt" value
i'm doing this send function
let result = await myContract.methods.myMethod().send({from: account});
console.log("result:", result);
using web3.js ^1.2.2 on testRPC with Ganache, hardfork Byzantium, ...
1
vote
0
answers
499
views
UnhandledPromiseRejectionWarning TypeError when deploying multiple contracts (>200) at the same time
I get the following error:
(node:6540) UnhandledPromiseRejectionWarning: TypeError: this.removeListener is not a function
at Object.receipt (c:\Users\pruto\OneDrive\Documents\Smart contracts\...
7
votes
1
answer
210
views
Why using Merkle Patricia trie for keeping transactions and receipts instead of Merkle trie?
Using Merkle Patricia trie for keeping Ethereum states has the advantage of fewer changes in the data structure during the updates in the states compared to Merkle trie.
But what is the advantage of ...
2
votes
1
answer
127
views
SAI - DAI Symbol Not Captured Right Web3.py
trying to capture the symbol of the receipts of transaction using web3.py. I am getting the DAI, DAI and DAI... while this should return SAI, SAI, DAI. Although, I checked that the correct SAI ...
7
votes
1
answer
5k
views
Getting Tokens Transferred from Web3.py
I'm trying to find how etherscan finds the "Tokens Transferred" using the logs of a given transaction. Using this 0x52caaf79bf913064a70a6c9d917fd4190cdb099fe79e7d3a9dfe0600e1cfbc81 arbitrary ...
2
votes
1
answer
1k
views
Why do transaction receipts not include the value of Ether transferred?
I'm writing some logic to identify the currency used in an ethereum transaction, and am wondering the following:
web3.eth.getTransaction returns a value field that indicates the value transferred in ...
2
votes
2
answers
453
views
If a transaction ends up in an orphaned/forked block, what happens to subsequent transactions?
Suppose I sign and send several transactions using the following function:
async function send(web3, account, transaction) {
const options = {
to : transaction._parent._address,
...
0
votes
0
answers
144
views
No response from live networks except ganache when interacting with truffle-contract
I am developing a Web3 app for a private Ethereum network. Throughout the development I used ganache-cli and now I wanted to test in the private live network. I can successfully interact with the ...
2
votes
0
answers
359
views
Web3 method getTransactionReceipt() does not return token transfer value for particular token transaction
I've tested getTransactionReceipt(), to get all detail about transaction with amount of token transfer. Also tested getTransaction but it returns only Ether transferred value. Is there any other ...
5
votes
0
answers
586
views
`eth_getTransactionReceipt` returns the transaction hash not the receipt
I use sol-coverage in a truffle project. Ganache is my development blockchain. I have a lot of tests which end up doing more than a few thousand JSON RPC calls.
Due to unbeknownst reasons, the ...
0
votes
1
answer
34
views
When is the Receipt's identifier generated?
Like stated within the question.
When does Ethereum generate an identifier of a receipt which can be used to retrieve the transaction result. Is it generated instantly upon reception of the ...
1
vote
1
answer
152
views
Are transactions to EOA included in a block guaranteed to be successful?
Regardless of the source of the transaction (externally owned address / smart contract) and the data included within the transaction, if the destination is an EOA and the transaction was included in a ...
2
votes
1
answer
194
views
Are transactions with zero data included within a block guaranteed to be successful?
I know there are transaction receipts to verify that a transaction included in a block was executed successfully and funds were actually transferred.
But can receipt verification be skipped if I'm ...
0
votes
1
answer
1k
views
Viewing transaction events by using web3 on geth console
According to https://web3py.readthedocs.io/en/stable/contracts.html#web3.contract.ContractEvents.myEvent
web3 allows to extract the pertinent logs from a transaction receipt:
tx_hash = contract....
1
vote
2
answers
522
views
How are the stored transactions receipts referred from the block?
Based on the data structure of Ethereum blocks and transactions which is also represented here, we know the following sentences about the transactions receipts:
1- The transactions receipts are ...
1
vote
1
answer
557
views
What should I call the object returned from a Truffle contract function-call
When I perform a contract function-call via Truffle, and then resolve the returned promise, I get something like this:
{
"tx": "0x...",
"receipt": {
"transactionHash": "0x...",
...
0
votes
3
answers
2k
views
Sending Signed Transaction returns pending and event:undefined
I am trying to send a signed transaction using web3 1.0 and Infura.io through the browser. When I run it I dont get any errors but the transaction never hits the blockchain so I am confused on whats ...
4
votes
2
answers
381
views
Understanding the formal description of a transaction and its associated refunds
Excerpt from page 8 of the yellow paper:
I fully understand that contracts can self-destruct and, when that happens, according to this thread, all the balance is refunded to the address specified as ...
1
vote
1
answer
185
views
Why isn't the information in transaction receipt stored in the transaction itself?
The yellow paper says:
Transaction Receipt. In order to encode information
about a transaction concerning which it may be useful
to form a zero-knowledge proof, or index and search, we
...
1
vote
0
answers
186
views
Why do are the 'type' & 'removed' fields in receipt logs different between Ganache and Geth?
When I run a particular transaction and log the receipt, I am getting different results depending on if my EVM is Geth or Ganache. Specifically, Ganache returns receipt.logs[0].type: 'mined' while in ...