2023-03-14 05:48:42 +00:00
|
|
|
contract('Transaction', async function (accounts) {
|
|
|
|
it('should send a transaction with EIP-1559 flag', async function () {
|
|
|
|
console.log('Accounts: ', accounts)
|
|
|
|
console.log(web3.version)
|
2021-10-22 17:35:48 +00:00
|
|
|
const tx = await web3.eth.sendTransaction({
|
|
|
|
from: accounts[0],
|
2023-03-14 05:48:42 +00:00
|
|
|
to: accounts[1] ? accounts[1] : '0x0000000000000000000000000000000000000000',
|
2021-10-22 17:35:48 +00:00
|
|
|
value: '10000000',
|
|
|
|
gas: '21000',
|
2023-03-14 05:48:42 +00:00
|
|
|
type: '0x2',
|
2021-10-22 17:35:48 +00:00
|
|
|
common: {
|
|
|
|
hardfork: 'london'
|
|
|
|
}
|
2023-03-14 05:48:42 +00:00
|
|
|
})
|
|
|
|
console.log(tx)
|
|
|
|
// assert.equal(tx.type, '0x2', 'Tx type should be 0x2');
|
|
|
|
})
|
|
|
|
})
|