-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot send EIP-1559 transaction even when forcing type: 2 #4261
Comments
Hi there, thank you for bringing this to our attention. Could you provide a test repo for us to use for debugging? Seems like it might be related to |
Hi again, I was able to submit a web3.eth.sendTransaction({
from: '0xEe29eDBD1b938175181DCe9E0D818a1c54793525',
to: '0xEe29eDBD1b938175181DCe9E0D818a1c54793525',
value: '0x1',
gasLimit: 21000
}) Could you provide a code example, otherwise I'm going to have to close this as I cannot reproduce |
@spacesailor24 Thanks for the reply. I wrote a minimal repo where you can test it: https://github.com/agro1986/web3-eip1599-test Best regards |
Hi there, I have a very similar issue when sending a raw transaction with upfront signing through The problem seems to be occurring during the signing, and I cannot find the hex value of the My input to signTransaction looks like the following:
Am I doing something wrong or is it an issue with web3js and if so, is there a workaround? |
repost |
I tried with the given sample repo and code below. web3.eth.sendTransaction({
from: account,
to: zeroAddress,
value: new web3.utils.BN(1),
type: 2,
maxFeePerGas: new web3.utils.BN(2),
maxPriorityFeePerGas: new web3.utils.BN(1),
}) Tried couple of transactions and all were created as legacy (0). https://rinkeby.etherscan.io/tx/0x71cfdf047e20406a253692b7c94dfc83262e1e5d1ce2b8f47213f60434f9315c Also tried the offline This issue definitely need to look further details, I suspect somewhere before signing the type is mutated. |
I also tried around a bit and found out that for my case, using hex values as input for |
I was able to figure out the problem. Its the issue with the To verify that here is a script which is using const walletUrl = 'wss://eth-rinkeby.alchemyapi.io/v2/[your-key]';
const walletMnemonic = 'xxxxxxx';
const Web3 = require('web3');
const HDWalletProvider = require('@truffle/hdwallet-provider');
async function start() {
const wsProvider = new Web3.providers.WebsocketProvider(walletUrl);
const web3 = new Web3(wsProvider);
// Get the Private Key
const walletProvider = new HDWalletProvider(walletMnemonic, wsProvider);
const account = walletProvider.addresses[0]
const privateKey = walletProvider.wallets[account].privateKey;
// Generate account and add to local wallet
web3.eth.accounts.wallet.add(web3.eth.accounts.privateKeyToAccount('0x' + privateKey.toString('hex')));
await web3.eth.sendTransaction({
from: account,
to: zeroAddress,
value: new web3.utils.BN(2),
type: 2,
maxFeePerGas: new web3.utils.BN('300000000'),
maxPriorityFeePerGas: new web3.utils.BN('2000000000'),
gas: 21000,
}).on('transactionHash', function(txHash) {
console.log('https://rinkeby.etherscan.io/tx/' + txHash);
console.log('transactionHash');
}).on('receipt', function(receipt){
console.log('Received...', receipt);
process.exit(0);
});
}
start(); Here is a ref tx created with above script. There is already an issue on Ganache to provide support for EIP-1559. I believe once that issue is been worked out all the related packages will also provide support for EIP-1559 including @agro1986 I am closing the issue for now, If you observe same problem with some other findings feel free to re-open the issue. |
Expected behavior
Can send EIP-1559 tx
Actual behavior
Legacy tx sent
Steps to reproduce the behavior
These are the versions in
package.json
This is how I try to create an EIP-1559 tx:
Both result the same (legacy tx)
Logs
https://rinkeby.etherscan.io/tx/0x9eeb2345d0d1453896e15eaa8743b74ba44a3a7c9864c66ba49569e990488dc7
Environment
docker (node:14.17.4-alpine3.11), sending tx on rinkeby testnet
The text was updated successfully, but these errors were encountered: