Skip to content

Commit

Permalink
feat(signer): add finalizeWithdrawalParams
Browse files Browse the repository at this point in the history
  • Loading branch information
petarTxFusion committed Aug 27, 2024
1 parent 0f8d58f commit 30fb918
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,30 @@ export class L1Signer extends AdapterL1(ethers.JsonRpcSigner) {
return super.finalizeWithdrawalParams(withdrawalHash, index);
}

/**
* @inheritDoc
*
* @example
*
* import { Provider, L1Signer, types } from "zksync-ethers";
* import { ethers } from "ethers";
*
* const browserProvider = new ethers.BrowserProvider(window.ethereum);
* const signer = L1Signer.from(
* await browserProvider.getSigner(),
* Provider.getDefaultProvider(types.Network.Sepolia)
* );
*
* const WITHDRAWAL_HASH = "<WITHDRAWAL_TX_HASH>";
* const params = await signer.getFinalizeWithdrawalParams(WITHDRAWAL_HASH);
*/
override async getFinalizeWithdrawalParams(
withdrawalHash: BytesLike,
index = 0
): Promise<FinalizeWithdrawalParams> {
return super.getFinalizeWithdrawalParams(withdrawalHash, index);
}

/**
* @inheritDoc
*
Expand Down

0 comments on commit 30fb918

Please sign in to comment.