All Questions
Tagged with transactions web3.py
74 questions
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
0
answers
327
views
"TxRejectedError" Using Ganache with Web3
I am having trouble sending my transaction Using Ganache. I am showing the logic that creates and sends the transaction and it says it cant be found or it is rejected don;t really know what the error ...
1
vote
0
answers
271
views
decode a transaction receipt which does not have an event log
Is there a way to decode a transaction receipt which does not have an event log? In the case of an event log we have topics which we can decode, but what about the case when an event isn't triggered ...
1
vote
1
answer
736
views
How do you know if a contract is destroyed?
I'm using web3.py to interact with contracts. I was wondering, after calling a function with selfdestruct or suicide(address), how do I find out that the contract is in fact dead?
2
votes
1
answer
985
views
Unable to sign transaction
As per this documentation, I'm trying to send a signed transaction.
Here's what I have
def send(web3, wallet_private_key, gas_price, transactionABI, value=0):
options = {
'to': ...
1
vote
2
answers
889
views
Empty to field in web3.py transactionReceipt
I fetched the transaction receipts of a block and had some questions regarding some of the fields. If a transaction receipt shows the "to" field empty and a address in the "contractAddress" field, ...
0
votes
0
answers
881
views
Using web3.py to send a 0 price gas erc20 transaction
Sorry about the formatting, I’m on mobile
I'm trying to push an ERC20 Token transaction with 0 gas price using web3.py. Although when I set the gas price to 0, I receive the following error:
{'code':...
0
votes
1
answer
80
views
How can I implement redactable chain for ETH?
I am trying to research about Redactable blockchain so my question is how can I implement a Redactable chain in Eth if someone has some idea about it I will be thankful
0
votes
1
answer
445
views
Adding a pending transaction to get the balance results in a different outcome
language : python 3.7
network : kovan
use web3(infura)
I want to check the balance as well as the pending transaction.
The address below is the address with the Pending transaction.
Testing in the ...
2
votes
3
answers
942
views
How to get the actual time of occurrence for ethereum transaction in block
I used the API of Ethereum to download some transactions info. The timestamp is included, however I found the timestamp not mean the transaction time but the block which this transaction is located ...
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
188
views
How to understand from web3py if I need a transaction or a call
I have a contract with a function in which only if a certain condition is true, it changes the state of the blockchain otherwise it emits an event and returns:
address[] public global_state;
function ...
7
votes
2
answers
5k
views
How to determine transaction fees using web3.py
I am using web3py to transfer tokens and ether. I need to track the transaction fees for each transaction. Given a transaction hash, how do I determine the total fee paid?
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
How can I retrieve the transaction hash / block hash of a contract that has already been deployed?
If you use Web3.py to deploy a Solidity contract to the blockchain, you can retrieve a transaction hash, like this:
tx_hash = w3.eth.sendRawTransaction(signed.rawTransaction)
Once you have that ...
2
votes
2
answers
3k
views
How to send a python bytearray into solidity function by web3.py?
I have a solidity function declared as:
function setUnitData(bytes32[10] my_input_array) public payable {...}
When I run this code:
contract = self.contract_instance['../contracts/test.sol:test']
...
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
3
answers
82
views
How to know whether the my address received ERC20Tokens?
This is my transaction id : 0xe2a18a18180d960061611c27ced38b965b445a6263a54b1495abf27b9ce1d628
I am getting the transaction details using web3
w3.eth.getTransaction('...
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:
&...
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 ...
4
votes
1
answer
543
views
Transaction using Metamask works. Fails with web3.py
I have two transaction, the first from MetaMask (everything is fine)
https://etherscan.io/tx/0x1ab684f4875f8cc28043d9f3c3536a5e4f8a565cadda7a29bc6a96db5f1d0f8f
the second using web3.py (it seems to ...
0
votes
1
answer
843
views
Where is the result of the smart contract call stored when using web3.py's transact method?
I am using web3.py and trying to get the return value of a smart contract method after calling it. Of course, I can do it like this:
value = smart_contract_instance.someFunction()
but this does not ...
5
votes
1
answer
2k
views
How to send a smart token transaction from one account to another account using JSON RPC interface
I would like to send amounts of a created token from one address to another.
I would like to use eth_sendTransaction:
eth_sendTransaction
Creates new message call transaction or a contract creation,...
5
votes
1
answer
1k
views
Send transaction crash, how to resolve "timeout" error?
I use web3 to send transaction with Ethereum on the ropsten network. But I tried to on main network, and I've the same result.
I don't no why but since few days send transaction function didn't work.
...