laconicd/tests/solidity/suites/eip1559/test/eip1559.js
Yijia Su 5ff2a2c45f
tests: add eip1559 solidity test (#656)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-22 17:35:48 +00:00

20 lines
568 B
JavaScript

contract('Transaction', async function(accounts) {
it('should send a transaction with EIP-1559 flag', async function() {
console.log(`Accounts: `, accounts);
console.log(web3.version);
const tx = await web3.eth.sendTransaction({
from: accounts[0],
to: !!accounts[1] ? accounts[1] : "0x0000000000000000000000000000000000000000",
value: '10000000',
gas: '21000',
type: "0x2",
common: {
hardfork: 'london'
}
});
console.log(tx);
assert.equal(tx.type, '0x2', 'Tx type should be 0x2');
});
});