Skip to content

Commit

Permalink
fix:update function signatures in Wallet, L1Signer and `L1VoidSig…
Browse files Browse the repository at this point in the history
…ner`
  • Loading branch information
danijelTxFusion committed Apr 19, 2024
1 parent de15395 commit 6c21731
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 24 deletions.
32 changes: 19 additions & 13 deletions src/signer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {BigNumber, BigNumberish, BytesLike, ethers, Overrides} from 'ethers';
import {BigNumber, BigNumberish, BytesLike, ethers, Overrides, PopulatedTransaction} from 'ethers';
import {Provider} from './provider';
import {
DEFAULT_GAS_PER_PUBDATA_LIMIT,
Expand Down Expand Up @@ -27,6 +27,7 @@ import {Il1Erc20Bridge as IL1ERC20Bridge} from './typechain/Il1Erc20Bridge';
import {Il1SharedBridge as IL1SharedBridge} from './typechain/Il1SharedBridge';
import {IZkSyncStateTransition} from './typechain/IZkSyncStateTransition';
import {IBridgehub} from './typechain/IBridgehub';
import {PayableOverrides} from "@ethersproject/contracts";

/**
* All typed data conforming to the EIP712 standard within zkSync Era.
Expand Down Expand Up @@ -933,12 +934,14 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
operatorTip?: BigNumberish;
bridgeAddress?: Address;
approveERC20?: boolean;
approveBaseERC20?: boolean;
l2GasLimit?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides;
approveOverrides?: Overrides;
customBridgeData?: BytesLike;
approveBaseOverrides?: Overrides;
customBridgeData?: BytesLike
}): Promise<PriorityOpResponse> {
return super.deposit(transaction);
}
Expand Down Expand Up @@ -974,7 +977,7 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
l2GasLimit?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<BigNumber> {
return super.estimateGasDeposit(transaction);
}
Expand Down Expand Up @@ -1009,7 +1012,7 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
gasPerPubdataByte?: BigNumberish;
customBridgeData?: BytesLike;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<any> {
return super.getDepositTx(transaction);
}
Expand Down Expand Up @@ -1041,7 +1044,7 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
bridgeAddress?: Address;
customBridgeData?: BytesLike;
gasPerPubdataByte?: BigNumberish;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<FullDepositFee> {
return super.getFullRequiredDepositFee(transaction);
}
Expand Down Expand Up @@ -1207,14 +1210,15 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
*/
override async requestExecute(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<PriorityOpResponse> {
return super.requestExecute(transaction);
}
Expand Down Expand Up @@ -1243,14 +1247,15 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
*/
override async estimateGasRequestExecute(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<BigNumber> {
return super.estimateGasRequestExecute(transaction);
}
Expand All @@ -1277,15 +1282,16 @@ export class L1Signer extends AdapterL1(ethers.providers.JsonRpcSigner) {
*/
override async getRequestExecuteTx(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
}): Promise<ethers.PopulatedTransaction> {
overrides?: PayableOverrides
}): Promise<PopulatedTransaction> {
return super.getRequestExecuteTx(transaction);
}

Expand Down
26 changes: 15 additions & 11 deletions src/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Bytes,
BytesLike,
ethers,
Overrides,
Overrides, PopulatedTransaction,
utils,
} from 'ethers';
import {
Expand All @@ -28,6 +28,7 @@ import {Il1Erc20Bridge as IL1ERC20Bridge} from './typechain/Il1Erc20Bridge';
import {Il1SharedBridge as IL1SharedBridge} from './typechain/Il1SharedBridge';
import {Il2Bridge as IL2Bridge} from './typechain/Il2Bridge';
import {IBridgehub} from './typechain/IBridgehub';
import {PayableOverrides} from "@ethersproject/contracts";

/**
* A `Wallet` is an extension of {@link ethers.Wallet} with additional features for interacting with zkSync Era.
Expand Down Expand Up @@ -536,7 +537,7 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
l2GasLimit?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<BigNumber> {
return super.estimateGasDeposit(transaction);
}
Expand Down Expand Up @@ -571,7 +572,7 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
gasPerPubdataByte?: BigNumberish;
customBridgeData?: BytesLike;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<any> {
return super.getDepositTx(transaction);
}
Expand Down Expand Up @@ -603,7 +604,7 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
bridgeAddress?: Address;
customBridgeData?: BytesLike;
gasPerPubdataByte?: BigNumberish;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<FullDepositFee> {
return super.getFullRequiredDepositFee(transaction);
}
Expand Down Expand Up @@ -802,14 +803,15 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
*/
override async requestExecute(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<PriorityOpResponse> {
return super.requestExecute(transaction);
}
Expand Down Expand Up @@ -867,14 +869,15 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
*/
override async estimateGasRequestExecute(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
overrides?: PayableOverrides
}): Promise<BigNumber> {
return super.estimateGasRequestExecute(transaction);
}
Expand Down Expand Up @@ -932,15 +935,16 @@ export class Wallet extends AdapterL2(AdapterL1(ethers.Wallet)) {
*/
override async getRequestExecuteTx(transaction: {
contractAddress: Address;
calldata: string;
calldata: BytesLike;
l2GasLimit?: BigNumberish;
mintValue?: BigNumberish;
l2Value?: BigNumberish;
factoryDeps?: BytesLike[];
operatorTip?: BigNumberish;
gasPerPubdataByte?: BigNumberish;
refundRecipient?: Address;
overrides?: Overrides;
}): Promise<ethers.PopulatedTransaction> {
overrides?: PayableOverrides
}): Promise<PopulatedTransaction> {
return super.getRequestExecuteTx(transaction);
}

Expand Down

0 comments on commit 6c21731

Please sign in to comment.