@0xsequence/transactions
Advanced tools
Comparing version 0.9.6 to 0.10.0
# @0xsequence/transactions | ||
## 0.10.0 | ||
### Minor Changes | ||
- Deployed new contracts with ERC1271 signer support | ||
### Patch Changes | ||
- Updated dependencies [undefined] | ||
- @0xsequence/abi@0.10.0 | ||
- @0xsequence/chaind@0.10.0 | ||
- @0xsequence/network@0.10.0 | ||
## 0.9.6 | ||
@@ -4,0 +17,0 @@ |
@@ -63,3 +63,3 @@ 'use strict'; | ||
} | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce = undefined) { | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce) { | ||
if (isSequenceTransaction(tx)) { | ||
@@ -108,2 +108,6 @@ return tx; | ||
if (!sample) { | ||
return undefined; | ||
} | ||
if (txs.find(t => t.nonce !== undefined && t.nonce !== sample.nonce)) { | ||
@@ -110,0 +114,0 @@ throw new Error('Mixed nonces on Sequence transactions'); |
@@ -63,3 +63,3 @@ 'use strict'; | ||
} | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce = undefined) { | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.ethers.constants.Zero, nonce) { | ||
if (isSequenceTransaction(tx)) { | ||
@@ -108,2 +108,6 @@ return tx; | ||
if (!sample) { | ||
return undefined; | ||
} | ||
if (txs.find(t => t.nonce !== undefined && t.nonce !== sample.nonce)) { | ||
@@ -110,0 +114,0 @@ throw new Error('Mixed nonces on Sequence transactions'); |
@@ -59,3 +59,3 @@ import { ethers } from 'ethers'; | ||
} | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.constants.Zero, nonce = undefined) { | ||
async function toSequenceTransaction(wallet, tx, revertOnError = false, gasLimit = ethers.constants.Zero, nonce) { | ||
if (isSequenceTransaction(tx)) { | ||
@@ -104,2 +104,6 @@ return tx; | ||
if (!sample) { | ||
return undefined; | ||
} | ||
if (txs.find(t => t.nonce !== undefined && t.nonce !== sample.nonce)) { | ||
@@ -106,0 +110,0 @@ throw new Error('Mixed nonces on Sequence transactions'); |
@@ -12,3 +12,3 @@ import { Signer, BigNumberish } from 'ethers'; | ||
export declare function hasSequenceTransactions(txs: any[]): boolean; | ||
export declare function readSequenceNonce(...txs: Transaction[]): BigNumberish; | ||
export declare function readSequenceNonce(...txs: Transaction[]): BigNumberish | undefined; | ||
export declare function sequenceTxAbiEncode(txs: Transaction[]): TransactionEncoded[]; | ||
@@ -15,0 +15,0 @@ export declare function appendNonce(txs: Transaction[], nonce: BigNumberish): Transaction[]; |
{ | ||
"name": "@0xsequence/transactions", | ||
"version": "0.9.6", | ||
"version": "0.10.0", | ||
"description": "transactions sub-package for Sequence", | ||
@@ -17,5 +17,5 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/transactions", | ||
"dependencies": { | ||
"@0xsequence/abi": "^0.9.6", | ||
"@0xsequence/chaind": "^0.9.6", | ||
"@0xsequence/network": "^0.9.6", | ||
"@0xsequence/abi": "^0.10.0", | ||
"@0xsequence/chaind": "^0.10.0", | ||
"@0xsequence/network": "^0.10.0", | ||
"@ethersproject/abi": "^5.0.11", | ||
@@ -22,0 +22,0 @@ "ethers": "^5.0.31" |
@@ -47,3 +47,3 @@ import { ethers, Signer, BigNumberish } from 'ethers' | ||
if ((<TransactionRequest>c).auxiliary) { | ||
return p.concat([c, ...flattenAuxTransactions((<TransactionRequest>c).auxiliary)]) | ||
return p.concat([c, ...flattenAuxTransactions((<TransactionRequest>c).auxiliary!)]) | ||
} | ||
@@ -60,3 +60,3 @@ | ||
gasLimit: BigNumberish = ethers.constants.Zero, | ||
nonce: BigNumberish = undefined | ||
nonce?: BigNumberish | ||
): Promise<Transaction> { | ||
@@ -76,3 +76,3 @@ if (isSequenceTransaction(tx)) { | ||
value: tx.value ? await tx.value : 0, | ||
data: await tx.data, | ||
data: (await tx.data)!, | ||
nonce: nonce ? nonce : await tx.nonce | ||
@@ -109,4 +109,7 @@ } | ||
export function readSequenceNonce(...txs: Transaction[]): BigNumberish { | ||
export function readSequenceNonce(...txs: Transaction[]): BigNumberish | undefined { | ||
const sample = txs.find(t => t.nonce !== undefined) | ||
if (!sample) { | ||
return undefined | ||
} | ||
if (txs.find(t => t.nonce !== undefined && t.nonce !== sample.nonce)) { | ||
@@ -209,4 +212,4 @@ throw new Error('Mixed nonces on Sequence transactions') | ||
Array.isArray(cand.transactions) && | ||
cand.transactions.reduce((p, c) => p && isSequenceTransaction(c), true) | ||
(<SignedTransactions>cand).transactions.reduce((p, c) => p && isSequenceTransaction(c), true) | ||
) | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35667
805
+ Added@0xsequence/abi@0.10.9(transitive)
+ Added@0xsequence/chaind@0.10.9(transitive)
+ Added@0xsequence/network@0.10.9(transitive)
+ Added@0xsequence/utils@0.10.9(transitive)
+ Added@ethersproject/abstract-signer@5.0.14(transitive)
- Removed@0xsequence/abi@0.9.6(transitive)
- Removed@0xsequence/chaind@0.9.6(transitive)
- Removed@0xsequence/network@0.9.6(transitive)
- Removed@0xsequence/utils@0.9.6(transitive)
- Removed@ethersproject/abstract-signer@5.0.12(transitive)
Updated@0xsequence/abi@^0.10.0
Updated@0xsequence/chaind@^0.10.0
Updated@0xsequence/network@^0.10.0