diff --git a/src/utils/bridge.ts b/src/utils/bridge.ts index 2183bcb81..73c034e80 100644 --- a/src/utils/bridge.ts +++ b/src/utils/bridge.ts @@ -220,7 +220,7 @@ export async function sendAcrossDeposit( const tx = shouldUseSpokePoolVerifier ? await config .getSpokePoolVerifier(fromChain) - .populateTransaction.deposit(...commonArgs) + .populateTransaction.deposit(spokePool.address, ...commonArgs) : await config .getSpokePool(fromChain) .populateTransaction.deposit(...commonArgs); diff --git a/src/utils/config.ts b/src/utils/config.ts index 87020365b..8fbe7c528 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -10,6 +10,8 @@ import { HubPool__factory, SpokePool, SpokePool__factory, + SpokePoolVerifier, + SpokePoolVerifier__factory, AcrossMerkleDistributor, AcrossMerkleDistributor__factory, AcceleratingDistributor, @@ -121,10 +123,13 @@ export class ConfigClient { ); return enabledSpokePoolVerifier.address; } - getSpokePoolVerifier(chainId: constants.ChainId, signer?: Signer): SpokePool { + getSpokePoolVerifier( + chainId: constants.ChainId, + signer?: Signer + ): SpokePoolVerifier { const address = this.getSpokePoolVerifierAddress(chainId); const provider = signer ?? providerUtils.getProvider(chainId); - return SpokePool__factory.connect(address, provider); // TODO: Use SpokePoolVerifier when new contracts-v2 package is released + return SpokePoolVerifier__factory.connect(address, provider); } getHubPoolChainId(): constants.ChainId { return this.config.hubPoolChain; diff --git a/src/utils/typechain.ts b/src/utils/typechain.ts index 7a3f74238..2dce307b8 100644 --- a/src/utils/typechain.ts +++ b/src/utils/typechain.ts @@ -6,6 +6,7 @@ export { AcrossMerkleDistributor__factory } from "@across-protocol/contracts-v2/dist/typechain/factories/contracts/merkle-distributor/AcrossMerkleDistributor__factory"; export { HubPool__factory } from "@across-protocol/contracts-v2/dist/typechain/factories/contracts/HubPool__factory"; export { SpokePool__factory } from "@across-protocol/contracts-v2/dist/typechain/factories/contracts/SpokePool.sol/SpokePool__factory"; +export { SpokePoolVerifier__factory } from "@across-protocol/contracts-v2/dist/typechain/factories/contracts/SpokePoolVerifier__factory"; export { ERC20__factory } from "@across-protocol/contracts-v2/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory"; export { AcceleratingDistributor__factory } from "@across-protocol/across-token/dist/typechain/factories/AcceleratingDistributor__factory"; export { ClaimAndStake__factory } from "@across-protocol/across-token/dist/typechain/factories/ClaimAndStake__factory"; @@ -13,6 +14,7 @@ export { ClaimAndStake__factory } from "@across-protocol/across-token/dist/typec export type { AcrossMerkleDistributor } from "@across-protocol/contracts-v2/dist/typechain/contracts/merkle-distributor/AcrossMerkleDistributor"; export type { HubPool } from "@across-protocol/contracts-v2/dist/typechain/contracts/HubPool"; export type { SpokePool } from "@across-protocol/contracts-v2/dist/typechain/contracts/SpokePool.sol/SpokePool"; +export type { SpokePoolVerifier } from "@across-protocol/contracts-v2/dist/typechain/contracts/SpokePoolVerifier"; export type { AcceleratingDistributor } from "@across-protocol/across-token/dist/typechain/AcceleratingDistributor"; export type { ClaimAndStake } from "@across-protocol/across-token/dist/typechain/ClaimAndStake"; export type {