-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement EIP-1559 #4105
Comments
Reference ethers-io/ethers.js#1610 |
Any ETA for this change? EIP-1559 activation isn't that far away :). |
It'll be our priority to get EIP-1559 asap :) |
Until it's released it's still possible to extend it ourselves using web3.extend. |
Mind posting the extensions? |
Sure, it depends on which part you need exactly. const inputFormatters = [
blockNumber => (blockNumber ? web3.utils.toHex(blockNumber) : 'latest'),
() => false
];
const getBlockByNumberMethodDescription = {
name: 'getBlockByNumber',
call: 'eth_getBlockByNumber',
params: 2,
inputFormatter: inputFormatters
};
const extendWeb3 = web3 => {
web3.eth.extend({
methods: [getBlockByNumberMethodDescription]
});
}; Then call the const baseFeePerGas = async(web3, callback) => {
const networkId = await web3.eth.net.getId();
const networkType = await web3.eth.net.getNetworkType();
const block = await web3.eth.getBlockByNumber();
console.log(`networkType: ${networkType}`); // ropsten
console.log(`networkId: ${networkId}`); // would output 3 for Ropsten
console.log(`baseFeePerGas: ${block.baseFeePerGas}`); // e.g. 0x11
callback();
};
extendWeb3(web3);
baseFeePerGas(web3, process.exit); Well that's the idea, but it turns out that we could probably use the already existing npm install --save npm install git://github.com/ChainSafe/web3.js.git#wyatt/eip1559 If this is not enough, maybe dirty patching your from |
EIP-1559 is a transaction type that targets fee market changes
The text was updated successfully, but these errors were encountered: