From 9ef72067d72aa0be81107ef6e62a543fc539a7f9 Mon Sep 17 00:00:00 2001 From: Karl Kempe Date: Thu, 20 Jan 2022 21:41:28 +0000 Subject: [PATCH] Fix contract method calls --- react/src/swapper/util.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/react/src/swapper/util.ts b/react/src/swapper/util.ts index f83d738..bad52cf 100644 --- a/react/src/swapper/util.ts +++ b/react/src/swapper/util.ts @@ -19,7 +19,7 @@ export async function swapExactInFromVaaNativeV3( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactNativeInFromV2( + const tx = await swapContractWithSigner.recvAndSwapExactNativeIn( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V3 ); @@ -30,7 +30,7 @@ export async function swapExactInFromVaaNativeV2( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactNativeInFromV3( + const tx = await swapContractWithSigner.recvAndSwapExactNativeIn( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V2 ); @@ -41,7 +41,7 @@ export async function swapExactInFromVaaTokenV3( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactInFromV2( + const tx = await swapContractWithSigner.recvAndSwapExactIn( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V3 ); @@ -52,20 +52,20 @@ export async function swapExactInFromVaaTokenV2( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactInFromV3( + const tx = await swapContractWithSigner.recvAndSwapExactIn( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V2 ); return tx.wait(); } -// exact out +// exact out (TODO: add to util) // export async function swapExactOutFromVaaNativeV3( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactNativeOutFromV2( + const tx = await swapContractWithSigner.recvAndSwapExactNativeOut( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V3 ); @@ -76,7 +76,7 @@ export async function swapExactOutFromVaaNativeV2( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactNativeOutFromV3( + const tx = await swapContractWithSigner.recvAndSwapExactNativeOut( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V2 ); @@ -87,7 +87,7 @@ export async function swapExactOutFromVaaTokenV3( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactOutFromV2( + const tx = await swapContractWithSigner.recvAndSwapExactOut( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V3 ); @@ -98,7 +98,7 @@ export async function swapExactOutFromVaaTokenV2( swapContractWithSigner: ethers.Contract, signedVaa: Uint8Array ): Promise { - const tx = await swapContractWithSigner.swapExactOutFromV3( + const tx = await swapContractWithSigner.recvAndSwapExactOut( signedVaa, CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V2 );