hardhat
hardhat copied to clipboard
Multiple transactions in one block
Version of Hardhat
2.16.0, 2.23.0
What happened?
I test Multiple transactions on hardhat 2.16.0 and 2.23.0 from link : https://github.com/NomicFoundation/hardhat/issues/4090 I just replaced:
import { ethers } from "hardhat";
const { ethers } = require('hardhat');
my hardhat.config.js:
require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.18",
networks: {
hardhat: {
gas: "auto",
},
},
};
I run:
npx hardhat node
npx hardhat run scripts/deploy.js --network localhost
My result:
pendingTx [
'0x5b05dc76c7337f9e7504e4a7b6b751864b5a3c1727c3c352eb4ad5035919f7ac',
'0xbf906c271f66202cdb86b18b1c1e0b2b384703ab81dc551dfeca7616ee59bc6c'
]
{
number: null,
hash: null,
parentHash: '0x522d00424ad35338ca64e9074e509dd0e8de1f270e6781130469ea7faf869fd4',
nonce: null,
mixHash: null,
sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347',
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
transactionsRoot: '0xd0ee808780b87c01cb5825e0a1d5adda30af4a8b5b16755eac09acc92f249fcc',
stateRoot: '0xe3c6bfa2635909acca4f75eec9a9256e9550063fd0a57d92e8429140d76454e2',
receiptsRoot: '0xf78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efa',
miner: '0xc014ba5ec014ba5ec014ba5ec014ba5ec014ba5e',
difficulty: '0x0',
totalDifficulty: '0x0',
extraData: '0x',
size: '0x29e',
gasLimit: '0x1c9c380',
gasUsed: '0x5208',
timestamp: '0x6810819b',
transactions: [
'0x5b05dc76c7337f9e7504e4a7b6b751864b5a3c1727c3c352eb4ad5035919f7ac'
],
uncles: [],
baseFeePerGas: '0x342770c0',
withdrawals: [],
withdrawalsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'
}
But I have one transaction only. I want two transactions in block. What's wrong?
Minimal reproduction steps
test this
Search terms
No response
On hardhat 2.14.0 work correctly
Sorry @catboy1989, that it has taken us so long to respond. Is this still an issue or where you able to work round it? If it is still an issue can you include your deployment script to help me fully reproduce your example