From e865eb9af865ee7015f147c669a6274f65fe1da7 Mon Sep 17 00:00:00 2001 From: Ayanami Date: Sun, 23 Jan 2022 16:26:24 +0900 Subject: [PATCH] Support EIP-1559 transaction for Polygon & Avalanche Most of the transaction on those chains have same maxFeePerGas and maxPriorityFeePerGas value --- cli.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cli.js b/cli.js index faa785c..31b8cdc 100755 --- a/cli.js +++ b/cli.js @@ -85,6 +85,16 @@ async function generateTransaction(to, encodedData, value = 0) { gas : gasLimit, data : encodedData } + } else if (netId == 137 || netId == 43114) { + tx = { + to : to, + value : value, + nonce : nonce, + maxFeePerGas : gasPrice, + maxPriorityFeePerGas : gasPrice, + gas : gasLimit, + data : encodedData + } } else { tx = { to : to,