Skip to content

v1.5.0

Compare
Choose a tag to compare
@spacesailor24 spacesailor24 released this 28 Jul 22:06
· 178 commits to 1.x since this release

Added

  • London transaction support (#4155)
  • RPC support eth_feehistory call (#4191)

Changed

  • Grammar fix (#4088) and updated Swarm (#4151)and Whisper doc links (#4170)
  • Removed deprecation notice for HttpProvider (#4008)
  • Nonce added to send options in documentation and types (#4052)
  • Updated Solidity example to modern syntax (#4147)
  • Changing web3 connection example from lets to const (#3967)
  • Updated the documentation for the transaction object to include EIP-2718 and EIP-1559 options (#4188)

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) => {...});