Skip to content

Commit

Permalink
feat: Unwrap wNEAR option.
Browse files Browse the repository at this point in the history
  • Loading branch information
paouvrard committed Feb 26, 2024
1 parent 577cf2e commit 909f58c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/aurora-nep141/src/bridged-erc20/sendToNear/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ export async function sendToNear (
nearAccount?: Account
nearProvider?: najProviders.Provider
auroraEvmAccount?: string
unwrapWNear?: boolean
}
}
): Promise<Transfer> {
Expand Down Expand Up @@ -420,6 +421,7 @@ export async function burn (
auroraChainId?: number
auroraErc20Abi?: string
signer?: ethers.Signer
unwrapWNear?: boolean
}
): Promise<Transfer> {
options = options ?? {}
Expand All @@ -442,7 +444,7 @@ export async function burn (
)
const safeReorgHeight = await provider.getBlockNumber() - 20
const tx = await erc20Contract.withdrawToNear(
Buffer.from(transfer.recipient),
Buffer.from(options.unwrapWNear ? transfer.recipient + ':unwrap' : transfer.recipient),
transfer.amount,
{ gasLimit: 100000 }
)
Expand Down

0 comments on commit 909f58c

Please sign in to comment.