From 5aa9f36c35d6623c189de36f47c678e7808b0422 Mon Sep 17 00:00:00 2001 From: Nitin Mittal Date: Tue, 17 Dec 2024 13:22:12 +0400 Subject: [PATCH] upd: conversion auth data --- src/interfaces/gas_porter.ts | 3 +++ src/lxly/erc20.ts | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/interfaces/gas_porter.ts b/src/interfaces/gas_porter.ts index 287d51c..45cb1b8 100644 --- a/src/interfaces/gas_porter.ts +++ b/src/interfaces/gas_porter.ts @@ -32,6 +32,8 @@ export interface ICargo { swapCalldata: string; tokenPermitData: string; forceUpdateGlobalExitRoot: boolean; + // Tracking: + trackingNumber: string; } export interface IConversionAuthorization { @@ -42,6 +44,7 @@ export interface IConversionAuthorization { gassetDestinationAddress: string; gassetDestinationPermitData: string; gassetDestinationAmount: string; + destinationSwapCalldata: string; destinationNativeTokenMinimumAmount: string; deadline: number; } diff --git a/src/lxly/erc20.ts b/src/lxly/erc20.ts index 8a1dbb2..6329fc9 100644 --- a/src/lxly/erc20.ts +++ b/src/lxly/erc20.ts @@ -793,6 +793,7 @@ export class ERC20 extends Token { 'bool', 'uint32', 'address', + 'uint256', 'address', 'uint32', 'bytes', @@ -809,14 +810,15 @@ export class ERC20 extends Token { forceUpdateGlobalExitRoot: callDataParams[1], destinationNetwork: callDataParams[2], destinationAddress: callDataParams[3], - gasset: callDataParams[4], - gassetSource: callDataParams[5], - gassetPermitData: callDataParams[6] || '0x', - gassetAmount: callDataParams[7], - swapCalldata: callDataParams[8] || '0x', - token: callDataParams[9], - tokenAmount: callDataParams[10], - tokenPermitData: callDataParams[11] || '0x' + trackingNumber: callDataParams[4], + gasset: callDataParams[5], + gassetSource: callDataParams[6], + gassetPermitData: callDataParams[7] || '0x', + gassetAmount: callDataParams[8], + swapCalldata: callDataParams[9] || '0x', + token: callDataParams[10], + tokenAmount: callDataParams[11], + tokenPermitData: callDataParams[12] || '0x' }, callData: data.callData, msgValue: data.msgValue @@ -892,7 +894,7 @@ export class ERC20 extends Token { data.bridgeAssetAndGas.forceUpdateGlobalExitRoot, data.bridgeAssetAndGas.destinationNetwork, data.bridgeAssetAndGas.destinationAddress, - Date.now(), + data.bridgeAssetAndGas.trackingNumber, data.bridgeAssetAndGas.gasset, data.bridgeAssetAndGas.gassetSource, data.bridgeAssetAndGas.gassetPermitData,