562 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
35
views
have problem in swapping with web3.py in uniswap sepolia testnet by eth/usdc pool
i write a code with chatgpt help for swapping tokens in web3.py in eth/usdc pool sepolia testnet.
why?
I’m testing a Uniswap v3 swap on the Sepolia testnet using Python and web3.py.
Although the ...
0
votes
0
answers
30
views
How can I get the reason for a failed transaction status 0 from Geth?
After sending a transaction to a payable smart contract (deployed to a geth instance) I receive transaction status 0. I don't understand where I'm going wrong as I followed the documentation.
Looking ...
0
votes
0
answers
70
views
swapExactTokensForTokens throws error: Fail with error 'STF'
I am trying to swap some cake2 token to tbnb using swapExactTokensForTokens function in web3py as following:
pancakeswap2_txn = pancake_router_contract.functions.swapExactTokensForTokens(
web3....
0
votes
0
answers
75
views
How to properly use swapExactETHForTokens function in a web3py
I am trying to use swapExactETHForTokens function using pancake router v2 and here is my code:
#!/usr/bin/env python3
import time
from web3 import Web3
bsc = "https://data-seed-prebsc-1-s1....
0
votes
1
answer
199
views
Unable to generate valid signatures for Four.meme wallet authentication
Problem Description:
I'm trying to authenticate with Four.meme using their wallet-based authentication system, but I keep receiving a "Signature for this request is not valid" error. I've ...
1
vote
0
answers
98
views
How to view data and preform actions on a Solana Program with an IDL?
I've create a python script to output the raffles from the Solana NFT raffle site https://rafffle.famousfoxes.com/
import asyncio
import json
from anchorpy import Provider, Program, Idl
from solana....
0
votes
1
answer
290
views
Ethereum Flashbots python code not working correctly with web3.py
Recently I've been having some trouble with the X-Flashbots-Signature header when sending a request to the flashbots endpoint. My python code looks like this:
import requests
import json
import ...
0
votes
1
answer
132
views
telegram chatbot for crypto transaction (solana) using python: Unexpected Error: argument 'signature': 'str' object cannot be converted to 'Signature'
Python: How to check a Solana transaction and sanitize the transaction ID
I have written a script to fetch transaction details from the Solana blockchain using the solana-py library. It includes ...
1
vote
1
answer
85
views
Execution Reverted on Base Layer 2 Buy transaction using web3.py
I'm trying to write a service using python and web3.py to execute a "buy" transaction on a Base smart contract.
I can't figure out why my buy transactions aren't working from my code but ...
0
votes
1
answer
260
views
Web3.py AsyncWeb3 WebSocket Connection Fails for Infura Sepolia
I’m working on an Ethereum project that connects to the Sepolia network using Infura's WebSocket endpoint (wss://sepolia.infura.io/ws/v3/<PROJECT_ID>). While the connection works fine in Postman,...
0
votes
2
answers
281
views
bitcoinlib signing raw text message using python
I am trying to sign a raw message, like "Hello World", using the Python library bitcoinlib. The goal is to generate a base64-encoded signature for the message that can be verified. However, ...
1
vote
2
answers
2k
views
'SignedTransaction' object has no attribute 'rawTransaction'
`
from web3 import Web3
import os
import time
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Define RPC URLs for different networks
RPC_URLS = {
"ethereum":...
1
vote
0
answers
41
views
"ImportError: Cannot Import 'solcx' Despite Manual Installation and Virtual Environment Setup"
ImportError: Cannot Import 'solcx' - Library Not Found
I'm facing persistent issues importing the solcx library in my Python script, and I'm receiving an error indicating that the library is not found ...
1
vote
1
answer
252
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
1
answer
127
views
Get Detail transaction info
I encountered an issue and need help. I want a simple Python script that accepts a transaction hash and prints detailed information for transactions on the BSC blockchain. This includes the ...