zksync-web3
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -53,2 +53,8 @@ { | ||
"internalType": "address", | ||
"name": "_l2Sender", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "_l1Receiver", | ||
@@ -70,5 +76,5 @@ "type": "address" | ||
{ | ||
"internalType": "address", | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "address" | ||
"type": "uint256" | ||
} | ||
@@ -75,0 +81,0 @@ ], |
import { BigNumber, BigNumberish, ethers, BytesLike } from 'ethers'; | ||
import { Provider } from './provider'; | ||
import { Address, PriorityOpResponse, BlockTag, Eip712Meta, TransactionResponse, BalancesMap } from './types'; | ||
declare type Constructor<T = {}> = new (...args: any[]) => T; | ||
type Constructor<T = {}> = new (...args: any[]) => T; | ||
interface TxSender { | ||
@@ -6,0 +6,0 @@ sendTransaction(tx: ethers.providers.TransactionRequest): Promise<ethers.providers.TransactionResponse>; |
@@ -13,15 +13,2 @@ "use strict"; | ||
class Provider extends ethers_1.ethers.providers.JsonRpcProvider { | ||
constructor(url, network) { | ||
super(url, network); | ||
this.pollingInterval = 500; | ||
const blockTag = this.formatter.blockTag.bind(this.formatter); | ||
this.formatter.blockTag = (tag) => { | ||
if (tag == 'committed' || tag == 'finalized') { | ||
return tag; | ||
} | ||
return blockTag(tag); | ||
}; | ||
this.contractAddresses = {}; | ||
this.formatter.transaction = utils_1.parseTransaction; | ||
} | ||
async getTransactionReceipt(transactionHash) { | ||
@@ -208,2 +195,15 @@ await this.getNetwork(); | ||
} | ||
constructor(url, network) { | ||
super(url, network); | ||
this.pollingInterval = 500; | ||
const blockTag = this.formatter.blockTag.bind(this.formatter); | ||
this.formatter.blockTag = (tag) => { | ||
if (tag == 'committed' || tag == 'finalized') { | ||
return tag; | ||
} | ||
return blockTag(tag); | ||
}; | ||
this.contractAddresses = {}; | ||
this.formatter.transaction = utils_1.parseTransaction; | ||
} | ||
async getMessageProof(blockNumber, sender, messageHash, logIndex) { | ||
@@ -210,0 +210,0 @@ return await this.send('zks_getL2ToL1MsgProof', [ |
import { BytesLike, BigNumberish, providers, BigNumber } from 'ethers'; | ||
import { BlockWithTransactions as EthersBlockWithTransactions } from '@ethersproject/abstract-provider'; | ||
export declare type Address = string; | ||
export declare type Signature = string; | ||
export type Address = string; | ||
export type Signature = string; | ||
export declare enum Network { | ||
@@ -27,7 +27,7 @@ Mainnet = 1, | ||
} | ||
export declare type PaymasterParams = { | ||
export type PaymasterParams = { | ||
paymaster: Address; | ||
paymasterInput: BytesLike; | ||
}; | ||
export declare type Eip712Meta = { | ||
export type Eip712Meta = { | ||
gasPerPubdata?: BigNumberish; | ||
@@ -38,4 +38,4 @@ factoryDeps?: BytesLike[]; | ||
}; | ||
export declare type BlockTag = number | string | 'committed' | 'finalized' | 'latest' | 'earliest' | 'pending'; | ||
export declare type DeploymentType = 'create' | 'createAccount'; | ||
export type BlockTag = number | string | 'committed' | 'finalized' | 'latest' | 'earliest' | 'pending'; | ||
export type DeploymentType = 'create' | 'createAccount'; | ||
export interface Token { | ||
@@ -98,3 +98,3 @@ l1Address: Address; | ||
} | ||
export declare type TransactionRequest = providers.TransactionRequest & { | ||
export type TransactionRequest = providers.TransactionRequest & { | ||
customData?: Eip712Meta; | ||
@@ -105,3 +105,3 @@ }; | ||
} | ||
export declare type BalancesMap = { | ||
export type BalancesMap = { | ||
[key: string]: BigNumber; | ||
@@ -129,3 +129,3 @@ }; | ||
} | ||
export declare type PaymasterInput = ApprovalBasedPaymasterInput | GeneralPaymasterInput; | ||
export type PaymasterInput = ApprovalBasedPaymasterInput | GeneralPaymasterInput; | ||
export declare enum AccountAbstractionVersion { | ||
@@ -132,0 +132,0 @@ None = 0, |
@@ -9,11 +9,2 @@ "use strict"; | ||
class Wallet extends (0, adapters_1.AdapterL2)((0, adapters_1.AdapterL1)(ethers_1.ethers.Wallet)) { | ||
constructor(privateKey, providerL2, providerL1) { | ||
super(privateKey, providerL2); | ||
if (this.provider != null) { | ||
const chainId = this.getChainId(); | ||
// @ts-ignore | ||
this.eip712 = new signer_1.EIP712Signer(this, chainId); | ||
} | ||
this.providerL1 = providerL1; | ||
} | ||
_providerL1() { | ||
@@ -63,2 +54,11 @@ if (this.providerL1 == null) { | ||
} | ||
constructor(privateKey, providerL2, providerL1) { | ||
super(privateKey, providerL2); | ||
if (this.provider != null) { | ||
const chainId = this.getChainId(); | ||
// @ts-ignore | ||
this.eip712 = new signer_1.EIP712Signer(this, chainId); | ||
} | ||
this.providerL1 = providerL1; | ||
} | ||
async populateTransaction(transaction) { | ||
@@ -65,0 +65,0 @@ var _a, _b; |
{ | ||
"name": "zksync-web3", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"main": "build/src/index.js", | ||
@@ -5,0 +5,0 @@ "types": "build/src/index.d.ts", |
Sorry, the diff of this file is not supported yet
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
861451
74
27843