yarn web3-eth-contract 1.5.0-rc.0
v1.5.0-rc.0

latest releases: 1.7.5-rc.1, 1.7.5-rc.0, 1.7.4...
2 years ago

Added

  • London transaction support (#4155)

An example of signing an EIP-1559 transaction with web3-eth-accounts

import Web3 from 'web3';

const web3 = new Web3(Web3.givenProvider || 'http://localhost:8545');

const txObject = {
    to: '0x...',
    value: web3.utils.toHex(web3.utils.toWei('0.1', 'ether')),
    gas: web3.utils.toHex(21000),
    maxFeePerGas: web3.utils.toHex(web3.utils.toWei('1.5', 'gwei')),
    maxPriorityFeePerGas: web3.utils.toHex(web3.utils.toWei('.5', 'gwei'))
 };

 web3.eth.accounts.signTransaction(txObject, privateKey, (err, signed) => {...});

Don't miss a new web3-eth-contract release

NewReleases is sending notifications on new releases.