All Questions
Tagged with smartcontracts web3py
69 questions
1
vote
1
answer
175
views
Calling a smart contract without the ABI in Web3.py
I need to call a function of an implementation contract. The problem is I'm not the creator of the contract and it's source code hasn't been verified on ethersan, hence I don't have the ABI.
I ...
0
votes
0
answers
83
views
Web3 python websocket persistent connection
I am implementing a crypto payment system for my django web app. I have a smart contract that exposes some functions that let users purchase credits for my application by sending crypto to the smart ...
0
votes
0
answers
33
views
post request for token name from address
I want to get a token name from a smart contract address. I have come to a code using web3 module. It works nice, but I can not use web3 - the code will be used in the environment (BI service) that ...
0
votes
0
answers
287
views
Smart Contract deployment with web3.py - AttributeError: 'Web3' object has no attribute '...'
I am new to blockchain and have recently setup a hardhat project and written a smart contract for minting nfts. I am more comfortable with python so have started using web3.py for deploying and ...
0
votes
0
answers
117
views
Ethereum: how to call Smart Contract functions directly with JSON-RPC method?
I need to execute and call http JSON-RPC ethereum node to get results without web3py or web3js. How to do that? I have read there is eth_call method, but I didn't find any examples with ABI how to use....
0
votes
1
answer
213
views
Web3py: can not find ABI function after decoded
Here is transaction https://etherscan.io/tx/0x6465187a7bb43a6db42ee63e5f5cc30fb094393957a7f1ce6c08b5afddf3e0bc
I don't know why my script can not find ABI Transfer() function after decoded on ...
1
vote
0
answers
114
views
Web3 Contract Deployment Error: VM Exception 'Revert' during Transaction Processing
Web3 Contract Deployment Error - Execution Reverted
I am encountering an issue while deploying a smart contract using Web3. The deployment process triggers an error leading to contract execution being ...
1
vote
0
answers
79
views
How to decode int256 from tx data?
I am looking at a transaction's data:
Swap (index_topic_1 address sender, index_topic_2 address recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
and the ...
1
vote
0
answers
70
views
Calculating Memory Positions in Solidity Diamond EIP-2535 AppStorage
I'm trying to calculate the memory positions of a smart contract which uses the Diamond pattern so I can use w3.getStorageAt, but I'm having some issues with finding the correct positions.
This is my ...
1
vote
2
answers
3k
views
How to bundle multiple transactions in one on Ethereum using web3.py?
I'm trying to use Python to make multiple swaps in one transaction on Uniswap (swaping ETH against the token).
I successfully wrote a Python function that does just that, using swapExactETHForTokens ...
0
votes
1
answer
568
views
I cannot find the contract address for the BSC Testnet network
There's a code:
import json
from eth_account.signers.local import LocalAccount
from web3 import Web3
from web3.middleware import geth_poa_middleware
rpc = "https://data-seed-prebsc-1-s1.binance....
0
votes
1
answer
728
views
How do I find the correct ABI, containing the function to transfer tokens to Polygon zkEVM bridge contract?
I am writing python code to transfer tokens from ETH wallet to smart contract of Polygon zkEVM Native Bridge (https://wallet.polygon.technology) with address 0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe ...
0
votes
2
answers
829
views
Web3.py: Function invocation failed due to no matching argument types
I'm currently facing an issue when interacting with an Ethereum smart contract using Python's Web3 module. More specifically, I'm trying to call a specific function named "requestL2Transaction&...
0
votes
1
answer
355
views
Why is my list argument turning into a tuple when calling a smart contract function in python using Web3?
"Could not identify the intended function with name swapExactNATIVEForTokens, positional arguments with type(s) int,(int,int,(address,address)),address,int and keyword arguments with type(s) {}.
...
0
votes
1
answer
990
views
How to Pre-Generate an Ethereum Contract Adress
I'm trying to generate the address of a contract before its deployed. This is my code, using Web3.py:
sender = w3.eth.default_account
expected_address = w3.keccak(rlp.encode([sender, 0]))[12:]
print(&...