Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
668 views

Sending transactions to smart contract every 3 seconds

I have been trying to solve this issue for a while now and would really appreciate any help i can get. i am essentially trying to create a loop that doesnt stop after one succesful tx. End goal is to ...
0 votes
0 answers
28 views

Web3py and Uniswap issue, transacction reverted

import json from web3 import Web3 # Set up your connection to Ethereum infura_url = 'https://sepolia.infura.io/v3/apikey' web3 = Web3(Web3.HTTPProvider(infura_url)) if not web3.is_connected(): ...
1 vote
1 answer
28 views

What is the difference between transaction revert and status:0?

After running transaction = abi_func(**func_args).build_transaction({ 'chainId': 1337, 'gas': 200000, 'gasPrice': w3.eth.gas_price, 'nonce': w3.eth....
2 votes
2 answers
2k views

How can I find the block where a user enacted a certain event on a contract?

I'm trying to build a web3.py program to take in a given user's address, and return the amount of ETH traded since they added liquidity to a Uniswap exchange. Uniswap is a smart contract on the ...
0 votes
1 answer
411 views

Conversion from Wei to Ether gives different results

I'm trying to analyze the transaction of this contract, but sometimes when I try to convert from wei to ether value of tokens I got comma in different position than expected. This is how I proceed: 1)...
1 vote
1 answer
71 views

How to know why Uniswap cancelled my transaction?

I am not pro, but can someone check please why my transaction was cancelled on Ethereum after sending to Swap token on Uniswap v2? https://etherscan.io/tx/...
1 vote
1 answer
481 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
83 views

Is there Uniswap V2/V3 function to get initial token supply amount in pool?

I need to get initial token supply when liquidity pool was created by querying Ethereum node (RPC) or Uniswap contract and not Mint() function, is it possible to do (python)? To get reserves on any ...
0 votes
2 answers
1k views

Wait for a transaction to be mined ends too soon

I got a simple python script that sends a signed transaction then wait for the transaction receipt. All is working perfectly, but when I poll my wallet (a metamask wallet) just after the reception of ...
0 votes
1 answer
43 views

Etherscans ABI and transaction receipt topic[0] are different. Bug?

I need simply to get Transfer data values from transaction with 1 log https://etherscan.io/tx/0x6465187a7bb43a6db42ee63e5f5cc30fb094393957a7f1ce6c08b5afddf3e0bc. It sends +7,601.747 LINK. The problem ...
0 votes
0 answers
64 views

Etherscan API doesn't return internal transaction (although it has)

Here is transaction https://etherscan.io/tx/0x33e0dab83aa27ba8b2a08b3c69d61a34911a4adb6e7a35dd30cf11383f43fcc3 with simple Transfer() some GALA tokens. Etherscan shows 1 internal transaction: But it'...
0 votes
1 answer
67 views

Why Etherscan's API missing ABI functions?

Here is transaction https://etherscan.io/tx/0x0db6f8036ca7ea58bf4a8799bbf62bb30e3431d644d37d4030c27ac0d22f7542#eventlog In logs we can see 3rd function SendToInjectiveEvent(). It is interaction with ...
1 vote
1 answer
722 views

Ethereum transactions: how decode already decoded input data?

Here is transaction https://etherscan.io/tx/0x1a70dafba58e5cbc10adecb18e2489613b298a4aab0ecb2cbbbfd2ba184cdc39 It makes Swap 0.095 ETH for 1,125.066 VDO on Uniswap V2. If to scroll down, press More ...
3 votes
0 answers
77 views

How to create a "Transaction history" part of a Wallet App?

guys! Right now I am working on web3 project, which has a wallet as it's one parts. Can you give me advices on how to create this Transaction History for user, because I am kind of stuck on it. First ...
1 vote
2 answers
2k views

Get Transaction details using Python

I'm trying to get details of a given transaction (Datetime, Sender, Receiver, Name of Token Transerref, quantity). This is an example. I don't know any API or method can allow me to get these data. I ...
2 votes
0 answers
50 views

Can i append the ethereum transaction's data input when generating a QR Code? Is there a better way to track transactions?

My application manages sales with local payment methods and Ethereum/Bitcoin. When using crypto payments a QR Code will be displayed for the customer, with the wallet's address and amount. The issue I'...
8 votes
4 answers
12k views

Tracking tokenholders of a token with web3

If I have a token address how can I navigate and find certain things like: tokenholder addresses transactions for the token holders including when they made the transaction I'm new to smart ...
0 votes
3 answers
822 views

I am trying to create a store_transaction and change the Blockchain by passing a value

I am trying to create a store_transaction that is later on signed and sent and trying to receive a transaction receipt. I am getting error while creating a store transaction while trying to build it. ...
2 votes
1 answer
997 views

Web3Py 'TRANSFER_FROM_FAILED' error when executing a swap even if tokens spending have been approved

I tried to execute a swap using Web3py with the following function: def swap(node, account_address, pvt_key, contract_address, contract_abi, action_type, amount_in, amount_out_min): #load USDC and ...
2 votes
0 answers
69 views

Get addresses of transfers from transactions Web3Py

I am facing issue while trying to retreive data from Goerli (basically, Ethereum). I am trying to fetch transaction from this contract. For every transaction it creates a new airdrop by creating a new ...
0 votes
0 answers
413 views

How do I fetch the entire transaction-history of an address in the fastest way possible?

I just built myself a hardware full node at home. It's running geth and I'm accessing the on-chain data through the JSON RPC API. I'm using web3.py because of convenience. I want to have a "...
0 votes
1 answer
735 views

error: {'code': -32000, 'message': 'invalid sender'}

I have my smart contract deployed on BSC Testnet: https://testnet.bscscan.com/address/0x01AbBD3c43d447dA73CDee8d138697Df36f785d2 If I connect my Metamask on bscscan, I can use all the write contract ...
0 votes
1 answer
230 views

Why is WETH balance of an address is wrong on hardhat fork?

I have forked mainnet with hardhart with below command: npx hardhat node --fork http://127.0.0.1:8545 --port 8546 When I get the balance of 0xbd497b28d443a5345674fef37c50d8fd68e7bd94, it shows it ...
1 vote
1 answer
1k views

Checking new transactions for a specific wallet using Web3py

I am trying to make a piece of code that scans a wallet for new transactions. When a new transaction is detected my code should print the transaction hash. I looked online and saw stuff about the ...
0 votes
1 answer
566 views

Transaction works or fails depending on the destination address

I was trying to make a deal with another user and he sent me this address: 0xb1f4c727afa220eec5d218399eb443662ab2610e But when I tried to do the transfer I received this error TypeError: Transaction ...
1 vote
2 answers
2k views

web3 get_transaction get_transaction_receipt how to see the error-Message for a failed transaction

I am using the web3-implementation from python (web3.py) and use the both methods get_transaction and get_transaction_receipt to lookup failed transactions. If the status-field from ...
1 vote
1 answer
725 views

Replacement transaction underpriced

I am building a Django service with Celery that sends multiple transactions to a contract and I am finding that the error {'code': -32000, 'message': 'replacement transaction underpriced'} from geth ...
0 votes
1 answer
37 views

What should I do to see the number of outgoing tokens in the transaction hash?

I will need the following data of the outgoing transaction with a transaction hash given by the user: sender, recipient, transferred token amount. I was able to get sender and recepient data with ...
19 votes
2 answers
23k views

ValueError: {'code': -32000, 'message': 'only replay-protected (EIP-155) transactions allowed over RPC'}

Good afternoon, after having been developing a blockchain web app for some months, it's the first time I get this error when making a transaction. ValueError: {'code': -32000, 'message': 'only replay-...
0 votes
1 answer
105 views

Conversion from Wei to Ether gives different results [duplicate]

I'm trying to analyze the transaction of this contract, but sometimes when I try to convert from wei to ether value of tokens I got comma in different position than expected. This is how I proceed: 1)...
1 vote
1 answer
989 views

how to find the creation block_number for a given contract_address using web3.py?

I was trying to find the creation block number using contract address , is there is a way to find creation block number when a contract address is deployed using web3.py?
1 vote
0 answers
480 views

Getting Error with EIP1559 style transaction: "unrecognized fields: {'maxFeePerGas', 'maxPriorityFeePerGas'}"

I wanted to sign and send a transaction interacting with a smart contract. This is the tx: Tx = ID.functions.withdraw(50000000000, '0x....').buildTransaction( { 'chainId': 1, 'gas': 410000,...
0 votes
2 answers
284 views

Can I get more specific metadata for a certain transaction hash from a basic RPC connection (e.g. Infura)

I am trying to deploy a "verifyTx(tx_hash){}" function that takes a hash and tells me the state (succ vs. fail vs. pending), but I was hoping to get more advanced information on the hash if ...
2 votes
1 answer
2k views

passing array of struct as a function argument (web3.py)

I want to call this method updateRewardsPercentageByTokens() , with web3.py but I fail . please can you help me find a solution updateRewardsPercentageByTokens code : function ...
2 votes
1 answer
1k views

Web3.py Transaction with hash ХХХ not found

I have a issues. I need to receive a receipt for transaction "0x7a695820b6491b767308c45776e1da5445c7a2edac29aa14d916bda834d47c31" on Polygon, in which the Klima Token contract was created. ...
1 vote
1 answer
953 views

Creating similar output as EtherScan "Transaction action" with web3.py

I'm trying to get transaction data from etherscan and would like to get exactly what is represented in the "Transaction Action" section of the transaction details. For example, in this ...
0 votes
1 answer
35 views

How to know what coin has been exchanged through Web3 Api

Is there a way to know what coin and how much of it has been exchanged when getting a transaction history through the Web3 API?
0 votes
1 answer
3k views

Web3.py transact works but call doesn't

I am trying to call a fairly simple contract on a private blockchain: function getOwner() public returns (address) { return owner; } And here is my running it from an interactive Python shell: &...
1 vote
1 answer
3k views

How do I get information on pending transactions of a wallet/contract?

I have tried so many API such as Etherscan, Moralis, and Blockcypher but they all only display completed transactions. Is there a way to scan a wallets' pending transaction and get information out of ...
0 votes
1 answer
1k views

Why does the call() method from web3.py cause a revert when combined with transfer()?

I have deployed a contract for my custom ERC20 token. I am trying to send tokens using web3.py contract.functions.transfer(address, 20000000000000000000).call() Above code is giving error raise ...
0 votes
1 answer
218 views

Get contract address and total holders from a hash transaction

I would like to know if it is possible just from a transaction hash (like this one: '0x98daf5eb1fe55d9ebed51b1ee0b7dcb3bfe04ea5bb0663d40927a683771cdc09') to be able to retrieve the contract address of ...
1 vote
1 answer
900 views

How is transactionIndex decided in a block?

I'm using web3py and web3js to send transactions on the Harmony EVM chain using sendRawTransaction, and i noticed that once my transaction is sent, the transactionIndex value will always be between 0 ...
3 votes
2 answers
325 views

Why does confirm that there is always 1 block apart on the mainnet when initiate multi-transactions simultaneously- by web3.py and Infura.io

1.I have a need to initiate multiple transactions to the same contract address in the fastest time and get confirmation from the network. Means that multiple transactions are recorded in the same ...
0 votes
0 answers
102 views

is it really necessary to use the public key to send erc20 tokens?

It is evident that the private key is the fundamental piece of everything, for that reason I wonder, why we need to include the public key in the transactions, why does the private key not do the ...
2 votes
1 answer
1k views

How can I validate if a transaction hash is valid using web3.py?

How can I check whether a transaction hash is valid or not using Python [web3.py]? The answers I found was in javascript, related: How to test if a TransactionHash is valid using web3? What is the ...
3 votes
2 answers
7k views

How to get the value of the transaction?

I am using web3.py but I need help to know the value of the transaction sent. I know that the information is stored in the input but how do I parse the string. I know nothing about ABI. Here is the ...
1 vote
1 answer
2k views

Getting txpool with python web3 and infura

I am trying to monitor pending transactions with python web3 and an infura node. I am currently using web3.eth.getBlock(block_identifier='pending', full_transactions=True) on a loop to fetch pending ...
0 votes
1 answer
3k views

How to decode transaction input data on Polygon network?

I am trying to decode the input data that was passed within a transaction. I managed to figure this out on Etherscan, however performing the complementary action on Polygonscan leaves me with an ...
6 votes
1 answer
14k views

How to create and send Flashbot transactions?

So far, I only understand flashbot bundles are signed raw transactions with one of them being a bribe to the miner for the mining fee, but : Is the bribing transaction special in the way it is valid ...
1 vote
0 answers
370 views

web3py - get transaction result

I'm trying to parse the following UniswapV3 transaction in Python using web3: https://etherscan.io/tx/0x086d2ae22b7ba31245c842060f7e94b61b922795ca3b3fbff326ba63db00060a Etherscan shows as Transaction ...