All Questions
Tagged with transactions web3js
373 questions
0
votes
1
answer
43
views
Error during tokenization with the contract: 0xe83cE6bfb580583bd6A62B4Be7b34fC25F02910D
I have an Alchemy project through which I have received transactions. I would like to tokenize these transactions using the following Python script:
import json
from web3 import Web3
# Codes de ...
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/...
0
votes
1
answer
203
views
TransactionRevertInstructionError: Transaction has been reverted by the EVM
I am now trying to use addLiquidity with Uniswap V2 on sepolia testnet.
I am using web3.js in truffle, but there are some areas where errors keep occurring.
I have posted only the necessary code here.
...
0
votes
0
answers
83
views
web3.js wrong EIP-1559 transaction
I am currently working on a function (for educational purposes) that signs a hex message, extracts the signatures and create a signed transaction, but every time I add the signature, the from address ...
1
vote
2
answers
42
views
web3.js Keccak256 giving different answer
Minimum reproducible example :
hash1 = "be516d52220ea58966754101dd7ee25be73a695febd2bca54145681e2cc72fe9"
hash2 = "edede15ad23aba32fd2613ffee105278e322b2d81314bcb66eb4c453ad072bd4"
...
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
0
answers
28
views
How to send entire account balance to another address on Base
The below code is what I used to transfer entire account balance to other address on the ERC20 network and it works fine on it, but not on Base. Maybe it's because Base has different transaction fee ...
0
votes
0
answers
164
views
Replacement fee too low, Base Sepolia
This is the code I have for sending a transaction on Base Sepolia. I am using this to split the balance in my account into two halves and sending each half to an address one by one.
export async ...
0
votes
2
answers
88
views
Is it possible to make an atomic transaction using web3.js only?
I am currently working on a project using web3.js that invloves making 2 transactions atomically. Is it possible to pass those 2 transactions in a single transaction object to make it atomic or is the ...
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 ...
1
vote
1
answer
195
views
Cannot send USDT on Polygon : Error happened while trying to execute a function inside a smart contract
//token_address is the adress of the contract : 0xc2132D05D31c914a87C6611C10748AEb04B58e8F
//because USDT on polygon is a Proxy contract, minABI is the abi of the contract where it redirect : https://...
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 ...
0
votes
0
answers
19
views
analysing a wallet on a specific contract (web3js/ethers)
is it possible to obtain the transactions of an eth address on a given contract (nft)?
at the moment the os API does not allow this, or rather, I would have to iterate over all wallet transactions ...
1
vote
1
answer
22
views
Transfer Ether through a smart contract
I'm pretty new to web3.
I'm writing a simple smart contract to receive ETH and transfer it to a fix address, really a simple smart contract.
Its work well with standard token but not with Ether.
Can ...
2
votes
1
answer
85
views
Issue with Smart Contract Interaction using Web3.js 4.2.0: TransactionRevertedWithoutReasonError on MetaMask and Sepolia Testnet
Problem Overview
I am facing an issue while interacting with a smart contract using Web3.js version 4.2.0. The specific method causing trouble is broadcastMessage(string), designed to store a string ...
0
votes
1
answer
15
views
Send selected token (the one you deployed) with web3js
How to send a transaction of a token that I have in my wallet other than the default one like ether in Ethereum without a contract method just with web3js?
0
votes
1
answer
694
views
'value at "/0" is required'
const {Web3} = require("web3");
require("dotenv").config();
const sPrivateKey = process.env.SENDER_PRIVATE_KEY;
const sPublicKey = process.env.SENDER_PUBLIC_KEY;
const rPublicKey =...
0
votes
0
answers
76
views
eth_sendTransaction does not exist/is not available
What I am trying to do is I am trying to send transactions with web3js. At first I used sign transaction then send signed transaction get the same error after a little bit of research and tryed them. ...
1
vote
1
answer
71
views
Tracking the spedup transactions from metamask
while building a Dapp using metamask to make transactions, i figured that metamask is not responding correctly when a transaction is spedup, making my code wait forever for a canceled transaction that ...
3
votes
0
answers
104
views
Cannot send transaction to smart contract, 'unknown account' even with account added to wallet
I am trying to send a transaction that updates the state of a smart contract. I have locally deployed a ethereum network using Geth and three VM.
Here is my JS code:
import { Web3 } from 'web3';
...
0
votes
3
answers
737
views
REWARD!! PLEASE CAN SOMEBODY HELP ME ETH STUCK - I am a newbie trying to create a trading bot. and came across a tutorial, my 1.1eth stuck Metamask! [duplicate]
SORRY ABOUT THE GRAMMAR AND SPELLING I HAVENT SLEPT FOR ALLMOST 2 days BECAUSE OF THIS..
Here is a bit of a back story on why I have become a little desperate lately to find ways to make crypto faster ...
0
votes
1
answer
3k
views
Coinbase / Web3 - how are they connected? Where is my balance on Web3
I am brand new. I created a Coinbase Account and started investing. I heard someone say something about web3. I don't know what this is, but I think i have money in there. As I'm still waiting to be ...
0
votes
2
answers
1k
views
'err: insufficient funds for gas * price + value:
I am using sepolia testnet, to make a signed transaction between two accounts locally, below is the code :---
let { Transaction: Tx }= require('ethereumjs-tx');
let {Web3} = require('web3');
const ...
0
votes
0
answers
680
views
How to get and decode logs of all transactions of a block in web3?
How to get and decode logs of all transactions of a block in web3?
My question is very similar to:
Is there a way to get the logs for all transactions in a block?
But the suggestions were given using ...
2
votes
1
answer
146
views
abi-decoder's decodeMethod returns undefined
I am trying to decode the input field of this transaction as below,
const decodedInput = abiDecoder.decodeMethod(transaction.input);
but decodedInput returns undefined despite the my ABI having the ...
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
3
answers
3k
views
Read Transaction History with ethers v6.1.0
I am trying to create a new wallet similar to Metamask. I have implemented few simple features and now I am looking to display transaction history for a particular wallet address. I have tried ...
0
votes
1
answer
390
views
Impossible to deals with big number in web3.js transacation :
I can't deals with big number (BN.js) with web3.js I have overflow error or i have execution reverted with BN.js library when I try add liquidity to pancakeswap pool.
By using BN.js
Without using BN....
2
votes
2
answers
1k
views
ValueError: {'code': -32000, 'message': 'intrinsic gas too low'} how to resolve , see the code in body, looking for help
from web3 import Web3
infura_url = "https://goerli.infura.io/v3/<key>"
web3 = Web3(Web3.HTTPProvider(infura_url))
account_1 = '0x0BD2c4B74c3DEcF804567eb91DF84F3fAcC6DE32'
private_key1 ...
1
vote
2
answers
550
views
Get Method ID from all transactions in a block
I ask for your help! How do I get the Method ID for each transaction in a block.
I can get the following information
block = w3.eth.get_block('latest', True)
print(list(block))
['difficulty', '...
0
votes
2
answers
666
views
I can't made web3 subscribe filter work
I'm trying to get a subscription to logs from a "target" address, but I wasn't able to make filters works.
Subscribe method works without filter but I wasn't able to print a result without ...
0
votes
1
answer
194
views
Await ethereum transaction in javascript by only knowing the transaction hash
Is there a way to check if a transaction was mined/it's being mined by only knowing the transaction hash?
I'm using ethers.js
1
vote
1
answer
2k
views
What is 'gas' when sending a transaction in web3.js? Is it in gwei? How can I set the gas price of a transaction in gwei?
There are so many gas paramaters in web3.js. How can I send a transaction with a custom gas fee in gwei?
0
votes
1
answer
167
views
How to retrieve DAI transfers
I'm trying to fetch most recent DAI transfers for this address 0x6b175474e89094c44da98b954eedeac495271d0f, and retrieve information about them such as address, etc.
I feel like I'm missing ...
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 ...
1
vote
0
answers
54
views
How the transaction can happen without signing the transaction here?
Why we can complete the transaction without signing it?
//sending transaction.
// Q: Why we don't need to sign transactions here?
const trxHash = await web3.eth.sendTransaction({
from: accounts[0],
...
1
vote
1
answer
170
views
How Web3 send a token transaction? [Newbie question]
I'm a bit new to Web3, and have a serious job to build a multi-chain wallet
Already know the basics, create wallet or account with Web3
(BTW don't know the difference)
anyway, I'd like to know how to ...
1
vote
1
answer
441
views
MetaMask showing 'transfer' method - How do I switch it to 'Smart Contract Interaction'?
I have a simple transaction set up to send 100 of my ERC20 token to a certain address. Please see the code below:
if (window.ethereum) {
await window.ethereum.request({ method: "...
2
votes
1
answer
551
views
Wait for incoming ethereum transactions and credit them after n confirmations
I'm trying to create a website where users can deposit ethereum. For my server I'm using node.js and express.js. I looked into web3.js but the docs are unclear to me and I don't know which functions ...
2
votes
1
answer
583
views
Transaction on Uniswap -- how to find out what pair is being swapped (via web3.js)?
Given a transaction on Uniswap,
how to find out what pair is being swapped, and the amount of it? Namely, via web3.js/ethers.js
Is there relevant and sufficient information in the fields of a ...
0
votes
1
answer
24
views
how to fail a ether transaction on blockchain (with insufficient balance)
Need to generate error cases for ether transfer to see how blockchain deals with these cases. But ethereum clients like metamask didn't allow sending ether higher than the balance. Tried the same with ...
0
votes
1
answer
77
views
Emit an Event when no transaction
Can I emit an event in case a transaction doesn't take place?
For example, I have a function checking whether the wallet is allowed to buy the token. If yes, the transaction takes place and an event ...
1
vote
0
answers
33
views
Is it possible to extract data such as `gasPrice`, `gasLimit`, `nonce`, etc. from the transaction that has been signed and serialized?
Is it possible to extract data such as gasPrice, gasLimit, nonce, etc. from the transaction that has been signed and serialized?
For example I use this code for sign tx:
//Signing transaction
const ...
0
votes
0
answers
54
views
Optimizing ETH transaction code
I am using the below code for executing ETH transactions with web3.js
Is it an optimized code? is there any room for improvements, what else can I add, or how can I handle exceptions/errors
const ...
0
votes
1
answer
502
views
A Transaction from a wallet to a smart contract gives an error "txn receipt status fail". If you transfer to another wallet, it works. How to fix it?
I need to transfer money from the Metamask wallet to the smart contract address.
I wrote a js-file for this(using web3.js).
(I'm testing on Rinkeby's network.)
When my site opens, this js-file is ...
2
votes
1
answer
1k
views
How to get transaction failed reason with ethers.js
Using ethers' waitForTransaction(), getTransactionReceipt() or getTransaction() I can ask for transaction status,
but I need to know the cause of error (as this question: How to get transaction failed ...
3
votes
1
answer
396
views
What is the cheapest valid transaction?
What is the cheapest valid transaction, in terms of gas used? Is there a "no op" kind of transaction that I can construct?
If so, how would I construct this with web3?
2
votes
0
answers
165
views
Is it possible to sign a transaction using eth_sign?
I am trying to sign a transaction, but not submit it. That would be possible using eth_signTransaction, but Metamask doesn't support it yet. I heard that it would be possible to sign a transaction ...
3
votes
1
answer
594
views
Is transaction data the same as transaction input?
The Ethereum RPC API documentation accepts a data field when requesting to sendTransaction.
I notice that when I retrieve a historical transaction from the blockchain, I get back an input field and ...