Fix contract method calls
This commit is contained in:
parent
ff19450182
commit
9ef72067d7
|
@ -19,7 +19,7 @@ export async function swapExactInFromVaaNativeV3(
|
|||
swapContractWithSigner: ethers.Contract,
|
||||
signedVaa: Uint8Array
|
||||
): Promise<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
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<TransactionReceipt> {
|
||||
const tx = await swapContractWithSigner.swapExactOutFromV3(
|
||||
const tx = await swapContractWithSigner.recvAndSwapExactOut(
|
||||
signedVaa,
|
||||
CROSSCHAINSWAP_GAS_PARAMETERS_UNISWAP_V2
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue