Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
605 views

SendSignedTransaction TIMEOUT

I'm trying to sign data offline and then send signed transaction via web3.js Here's my code snippet: const {sign} = require('@warren-bank/ethereumjs-tx-sign'); const {Loader} = require("loader-in-...
0 votes
1 answer
452 views

TypeError [ERR_INVALID_ARG_TYPE] web3.js error

Can anyone help me fix this problem? I keep getting 'throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or ...
0 votes
1 answer
559 views

@ethereumjs/tx Error: Returned error: Insufficient funds. The account you tried to send transaction from does not have enough funds

Moving to @ethereumjs/tx npm package after ethereumjs-tx has been marked as deprecated. My from address has sufficient Kovan network balance, but the following code throwing Insufficient funds error. ...
0 votes
1 answer
1k views

ethereumjs-tx Returned error: invalid sender

When i am trying to send signed transaction via ethereumjs-tx. I get this Returned error: invalid sender web3Http.eth.getTransactionCount(myAddress,"pending").then(function(blockcount){ ...
0 votes
1 answer
240 views

Bytes validation error while transferring ERC20 tokens while using ethereumjs/tx

I am trying to send an ERC20 token using ethereumjs, but I am getting a bytes validation error: Web3ValidatorError: Web3 validator found 1 error[s]: value "0x2,248,191,131,170,54,167,20,138,49,48,...
0 votes
0 answers
44 views

Why does my from address changes when signing an eth_sign transaction

I need help with something. I am trying to create a transaction, sign it, and send the transaction with web3, but every time it gets signed, the from address changes to a random address. After much ...
1 vote
1 answer
1k views

Recover Y-parity from DER-signature for EIP-1559

I have a software system where signing ETH transactions happens in a black box. I give the information required, and it returns to me a DER-signature (30|totalLen|02|lenR|R|02|lenS|S). Now I'm aware ...
0 votes
1 answer
26 views

How to copy this transaction, change the parmeters and send again?

I need to copy this transaction: https://etherscan.io/tx/0x9acf0ecfd6f5a320a419ad8b155208d25f666e228b955d6df7109c84f46f7425 After that, change the recipient address and the NFT ID and send again. I ...
0 votes
0 answers
139 views

eth_sign invalid "from" address in signature in Trust Wallet browser extension or 0 balance when user has money

Problem I have code for sending 1 dollar from user to my account. It always works for all wallets except the trust wallet extension (trust wallet mobile works also). When I watch the result ...
1 vote
0 answers
136 views

How to let client side sign the transaction and send it to blockchain

This mint function is giving me this error Uncaught (in promise) Error: Returned error: transaction could not be decoded: unsupported transaction type And if I use ethereum-js/tx module to serialize ...
1 vote
3 answers
4k views

How to sign a transaction using web3.js and ethereumjs-tx on the BSC testnet

How do I sign and send a transaction using web3.js and ethereumjs-tx on the BSC testnet? I have found this question and answer: Is it possible to send transaction in Binance Smart Chain using web3 and ...
0 votes
0 answers
169 views

Web3Js: TypeError: hexToBytes: expected string, got object

I am trying to sign a transaction, but I'm receiving this error: hexToBytes: expected string, got object TypeError: hexToBytes: expected string, got object at hexToBytes (~\node_modules\@noble\...
2 votes
2 answers
7k views

Error: "invalid sender" from web3.eth.sendSignedTransaction()

I have a client running a private blockchain. It was started with the following command: geth --datadir private-chain --mine --miner.threads 4 --http --http.addr 127.0.0.1 --http.port 8545 --http.api ...
1 vote
3 answers
2k views

unsigned transactions not supported - web3, infura, @ethereumjs/tx

I am working on sending signed transactions using web3, @ethereumjs/tx, and infura. However, I am getting an error "unsigned transactions not supported". Here my code, credit: const Web3 = ...
0 votes
1 answer
673 views

“txHash: undefined” error using web3.js

Can anyone help me fix this problem? I get 'txHash: undefined' error in terminal var Tx = require('ethereumjs-tx').Transaction const Web3 = require('web3') const web3 = new Web3('https://ropsten....
1 vote
1 answer
332 views

Error while signing ethereum transaction with Private key and Infura URL

Unable to decode sender address from transaction: Incompatible EIP155-based V 37 and chain id 3. See the Common parameter of the Transaction constructor to set the chain id Please suggest me where i ...
0 votes
1 answer
5k views

I'm getting 'error: exceeds block gas limit' despite my gas limit being very low

I am trying to create a simple transaction in the Rinkeby testnet using Web3.js, Ethereumjs-tx, and an Alchemy node. I've only managed to push transactions through at 0.001 Gwei in gas and it's been ...
2 votes
2 answers
5k views

"Invalid Chain Id" on Kovan testnet

I'm attempting to initiate a transaction (transfer of ETH) from my main account to a test account on the Kovan Testnet, but I'm getting the error Returned error: Invalid chain id. from the following ...
6 votes
4 answers
2k views

TypeError: EthereumTransaction is not a constructor

var EthereumTransaction = require("ethereumjs-tx") var Web3 = require('web3') var web3 = new Web3('http://127.0.0.1:7545') //Setting Receiving and Sending Address var sendingAddress = ...
1 vote
1 answer
4k views

How to sign a transaction for a smart contract call using Ethers? [duplicate]

I'm looking for a complete example of a javascript/typescript based code for signing a transaction for a smart contract function call (that changes the contract state) and also the broadcast of the ...
4 votes
1 answer
6k views

Web3js Error: transaction type not supported - How to know supported transaction type?

I'm trying to send a test transaction but am getting a "transaction type not supported" error, and I tried every transaction type supported in the @ethereumjs/tx docs. const Web3 = require('...
0 votes
1 answer
2k views

"The field value must not have more 32 bytes" trying to create transaction from contract method call

I've already interacted with this contract instance using a local Geth node with my wallet loaded/unlocked, so I know there's nothing wrong with the contract. Now I'm using an Infura RPC node instead ...
0 votes
0 answers
54 views

How do I deploy this code to the eth block

please I need help on this, this code works well on my local machine but doesn’t work on infura main net. I need it done to avoid stress in my business. To automatically transfer my work eth to my ...
1 vote
1 answer
387 views

Automatically register number into Kovan test net with signed transaction (Infura API + NodeJS)

I have a very simple Smart Contract deployed using remix.ethereum which is: pragma solidity ^ 0.6.0; contract primerContrato { uint storeddata; function set(uint x) public{ storeddata = x; } ...
0 votes
2 answers
405 views

Signature test failed at Truffle js

I'm trying to test validAddress function from my contract ValidationUser, using truffle and test with JS. I checked the V value from the signature and its 27,28 so it is not the problem. Also, I have ...
0 votes
2 answers
149 views

Transaction won't be mined / Failed signing of transaction

I'm trying to send a transaction that writes somesthing on ethereum(kovan) but it seems my transaction is not mined and probably not even send to the network? All my view requests to ethereum work, so ...
3 votes
1 answer
1k views

Do we need to sign transaction for totalSupply also? [closed]

I am using web3 and want to sign transactions made with ERC20 contract.
0 votes
1 answer
2k views

how to send erc20 token without using smart contract abi?

How to transfer erc20 token without using contract or contract abi? The below script i have used to create Signed Raw Transaction to send Ether(ETH). How can i create Signed Raw Transaction to send ...
0 votes
1 answer
2k views

Why do we use `serialize` function of `ethereumjs-tx` package before broadcasting a transaction

I just want to know the purpose/functionality of serialize function which we use before broadcasting a transaction: const serializedTransaction = tx.serialize() const raw = '0x' + ...
2 votes
1 answer
3k views

What does it mean to serialize a transaction?

In tx library there is a function: serialize() that "serializes" your transaction object. You can then convert that serialization into hexa decimal string, and use it to send the transaction with the ...
0 votes
1 answer
288 views

Transaction being reverted by EVM during contract creation (Web3 / ethereumjs-tx)

Hey guys I am running into an issue deploying a smart contract with Web3 to the Ropsten network. The code is running seemingly correctly, and there is a contract address being created, but if I check ...
1 vote
1 answer
1k views

Error: types/values length mismatchProblem when calling payable contract function with web3

Enviroment Node version: v10.15.3 Web3: ^1.0.0-beta.50 Net: Ropsten My smart contract is a very simple payable/balance one and my goal is to contribute 0.1 ETH to raise the contract balance using ...
0 votes
0 answers
697 views

Sign a transaction locally and send it

I'm using Infura as my web3 provider, and have MetaMask installed to connect to the blockchain. I'm trying to send a transaction, but have learned that Infura is read-only, and doesn't support the ...
0 votes
2 answers
2k views

web3.js library not loading properly

I am trying to load web3 library after installing it via command prompt. However, looks like it is not loading properly as it is not showing all the details for Ethereum ecosystem (ex. unitmap of ...
5 votes
1 answer
3k views

Web3.js 1.0 sendSignedTransaction returns error: Invalid RLP

Running parity private PoA chain, using latest parity client + nodejs + web3.js 1.0 When I try to sign a transaction and then send it following web3.js 1.0 documentation (sendTransaction and ...
1 vote
2 answers
225 views

Read state from smart contract deployed to azure proof of authority ethereum network

I deployed a smart contract to an azure proof of authority network(ethereum). Following the instructions here https://docs.microsoft.com/en-us/azure/blockchain/templates/ethereum-poa-deployment#...
0 votes
1 answer
459 views

Trying to send signed transaction through web browser using ethereum-tx

I am working on signing and sending a transaction using web3 v1.0 and Infura.io. I have setup a script to run the TX but cannot seem to get ethereum-tx to connect in the browser. <script src="...
4 votes
2 answers
4k views

RangeError: private key length is invalid (In New ETH Transaction pragmatically)

Followed this Ans Ans1 and Ans2 but no solution got. const web3 = new Web3('https://ropsten.infura.io/v3/3c52917848e945229c0d33d632b10490'); const account1 = '...
1 vote
0 answers
128 views

When trying to perform sendSignedTransaction iteratively on wallets in an array, an undefined error is returned

I'm trying to write a script that takes as input a JSON array where each element of the array has an address and a corresponding private key. I'd like to have a function that iterates through this ...
1 vote
0 answers
134 views

Trying to iterate through an array to send signed transactions results in one failure and one success

I'm trying to iterate through an array of address/key pairs and send a transaction from each one. When I do this on testrpc with an array of the account info for two different accounts, one ...
3 votes
1 answer
2k views

ganache-cli doesn't have enough funds to send tx – number increases proportionally to however much I initialize a wallet with

I'm trying to write a simple function to send a transaction using web3 and ethereumjs-tx that empties the wallet of an account (call this account A) into another account (account B). However, no ...
3 votes
1 answer
484 views

Can't send data to non-contract address using web3 1.0.0 and ganache

Problem According to this question, it is possible to send data to a non-contract address in Ethereum. However, if I run my code which sends ether from the first account to the second account on ...
0 votes
1 answer
970 views

Problem with sending ERC20 token using [email protected]

Circumstance I have followed all indications from this GH issue and from other SO posts. The transaction gets successfully broadcasted but no tokens are transferred. When I check the balance before ...
1 vote
0 answers
412 views

Cannot find module ethereumjs-tx even though it is there [duplicate]

I'm trying to send a signed transaction from a web interface using web3, web3 is loaded and I'm connected to an Infuro.io node. Ethereumjs-tx is installed and I've also included it as seperate JS, but ...
3 votes
0 answers
4k views

SOLVED - sendRawTransaction (no) errors, valid tx, not found when scanned

I have a method that is supposed to create a transaction, send some wei and validate. When looking around I red that you can use infura.io. I also checked that you need to use raw transactions because ...
3 votes
1 answer
300 views

web3.js Transactions security/differences

While learning how to use the web3.js package I came across two types of transactions: RawTransactions/ web3.eth.sendawTransaction(...) and simple Transactions/ web3.eth.sendTransaction(...) I ...
0 votes
1 answer
2k views

Call a Contract With Web3JS/ethereumjs-tx

I want to execute a smart contract on the blockchain. As far as I understood this web3js offers two options call: executes the contract method locally without using gas execute: executes the contract ...