micro-eth-signer
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -430,2 +430,2 @@ "use strict"; | ||
Transaction.DEFAULT_CHAIN = 'mainnet'; | ||
Transaction.DEFAULT_TYPE = 'legacy'; | ||
Transaction.DEFAULT_TYPE = 'eip1559'; |
{ | ||
"name": "micro-eth-signer", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Create, sign and validate Ethereum transactions & addresses with minimum deps. Supports London & Berlin txs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,3 +21,3 @@ # micro-eth-signer | ||
to: '0xdf90dea0e0bf5ca6d2a7f0cb86874ba6714f463e', | ||
gasPrice: 100n * 10n ** 9n, // 100 gwei in wei | ||
maxFeePerGas: 100n * 10n ** 9n, // 100 gwei in wei | ||
value: 10n ** 18n, // 1 eth in wei | ||
@@ -46,9 +46,8 @@ nonce: 1 | ||
// London style txs, EIP 1559 | ||
const londonTx = new Transaction({ | ||
const legacyTx = new Transaction({ | ||
to: '0xdf90dea0e0bf5ca6d2a7f0cb86874ba6714f463e', | ||
maxFeePerGas: 100n * 10n ** 9n, // 100 gwei in wei | ||
maxPriorityFeePerGas: 1n * 10n ** 9n, // 1 gwei in wei | ||
gasPrice: 100n * 10n ** 9n, // 100 gwei in wei | ||
value: 10n ** 18n, // 1 eth in wei | ||
nonce: 1 | ||
}, undefined, undefined, 'eip1559'); | ||
}, undefined, undefined, 'legacy'); | ||
@@ -118,3 +117,3 @@ const berlinTx = new Transaction({ | ||
you'll probably won't need them | ||
- `type`: optional argument (default is `legacy`). Can be either `legacy`, `eip2930`, or `eip1559` | ||
- `type`: optional argument (default is `eip1559`). Can be either `legacy`, `eip2930`, or `eip1559` | ||
(Berlin and London style transactions with access lists and `maxFeePerGas`/`maxPriorityFeePerGas`) | ||
@@ -121,0 +120,0 @@ - `new Transaction(rawTx[, chain, hardfork, type])` - creates transaction from Raw TX data. |
29229
152