@layerzerolabs/lz-movevm-sdk-v2 3.0.38 → 3.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +28 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts","../src/types/uln.ts","../src/types/endpoint.ts","../src/types/serdes/uln_config_deserialize.ts","../src/types/serdes/update_price_serialize.ts","../src/modules/counter.ts","../src/modules/dvn-worker.ts","../src/modules/endpoint.ts","../src/modules/endpoint-common.ts","../src/modules/executor.ts","../src/modules/oft.ts","../src/modules/pricefeed.ts","../src/modules/simple-message-lib.ts","../src/modules/uln302.ts","../src/modules/worker-common.ts","../src/modules/index.ts"],"names":["VERIFICATION_STATE","ConfigType","trim0x","Deserializer","Serializer","addressToBytes32","arrayify","ensure0x","MoveResourceNotFoundError","MoveAbortError","padify","assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,aAAA,GAAA;AAAA,QAAA,CAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,kBAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,wBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACkFO,IAAK,kBAAA,qBAAAA,mBAAL,KAAA;AACH,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,qBAAkB,CAAlB,CAAA,GAAA,iBAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,sBAAmB,CAAnB,CAAA,GAAA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AAI,OAAA,CAAQ,GAAG,CAAA;AAC9B,IAAK,IAAA,CAAA,GAAA,GAAM,IAAI,GAAA,CAAI,GAAG,CAAA;AACtB,IAAK,IAAA,CAAA,SAAA,GAAY,IAAI,SAAA,CAAU,GAAG,CAAA;AAClC,IAAK,IAAA,CAAA,YAAA,GAAe,IAAI,YAAA,CAAa,GAAG,CAAA;AACxC,IAAK,IAAA,CAAA,gBAAA,GAAmB,IAAI,cAAA,CAAe,GAAG,CAAA;AAAA;AAEtD","file":"index.cjs","sourcesContent":["export * from './dvn'\nexport * from './executor'\nexport * from './uln'\nexport * from './endpoint'\nexport * from './pricefeed'\nexport * from './serdes'\nexport * from './worker-common'\nexport * from './oft'\n","/**\n * Interface representing the ULN configuration.\n */\nexport interface UlnConfig {\n /**\n * The number of confirmations.\n */\n confirmations: bigint\n\n /**\n * The optional DVN threshold.\n */\n optionalDVNThreshold: number\n\n /**\n * The required DVNs.\n */\n requiredDVNs: string[]\n\n /**\n * The optional DVNs.\n */\n optionalDVNs: string[]\n\n /**\n * Whether to use the default for confirmations.\n */\n useDefaultForConfirmations: boolean\n\n /**\n * Whether to use the default for required DVNs.\n */\n useDefaultForRequiredDVNs: boolean\n\n /**\n * Whether to use the default for optional DVNs.\n */\n useDefaultForOptionalDVNs: boolean\n}\n\n/**\n * Use to parse the ULN configuration response from the contract method,\n * Everyone who needs to use the ULN configuration should use @see UlnConfig instead of this.\n */\nexport interface UlnConfigResponse {\n confirmations: bigint\n optional_dvn_threshold: number\n required_dvns: string[]\n optional_dvns: string[]\n use_default_for_confirmations: boolean\n use_default_for_required_dvns: boolean\n use_default_for_optional_dvns: boolean\n}\n\n/**\n * Interface representing the executor configuration.\n */\nexport interface ExecutorConfig {\n /**\n * The maximum message size.\n */\n maxMessageSize: number\n\n /**\n * The executor address.\n */\n executorAddress: string\n}\n\n/**\n * Use to parse the Executor configuration response from the contract method,\n * Everyone who needs to use the Executor configuration should use @see ExecutorConfig instead of this.\n */\nexport interface ExecutorConfigResponse {\n max_message_size: number\n executor_address: string\n}\n\n/**\n * Enum representing the verification state.\n * @see packages/layerzero-v2/aptos/contracts/layerzero_views/sources/uln_302.move\n */\nexport enum VERIFICATION_STATE {\n STATE_VERIFYING = 0,\n STATE_VERIFIABLE = 1,\n STATE_VERIFIED = 2,\n STATE_NOT_INITIALIZABLE = 3,\n}\n\n/**\n * Gets the verification state value.\n *\n * @param {number} state - The state number.\n * @returns {VERIFICATION_STATE} The verification state.\n */\nexport function verificationStateValueOf(value: number): VERIFICATION_STATE {\n switch (value) {\n case 0:\n return VERIFICATION_STATE.STATE_VERIFYING\n case 1:\n return VERIFICATION_STATE.STATE_VERIFIABLE\n case 2:\n return VERIFICATION_STATE.STATE_VERIFIED\n case 3:\n return VERIFICATION_STATE.STATE_NOT_INITIALIZABLE\n default:\n throw new Error(`Invalid value for VERIFICATION_STATE: ${value}`)\n }\n}\n","/**\n * Enum representing the configuration types.\n */\nexport enum ConfigType {\n /**\n * Executor configuration type.\n */\n Executor = 1,\n\n /**\n * Send ULN configuration type.\n */\n sendUln = 2,\n\n /**\n * Receive ULN configuration type.\n */\n receiveUln = 3,\n}\n\n/**\n * Interface representing a timeout configuration.\n */\nexport interface Timeout {\n /**\n * The expiry time.\n */\n expiry: bigint\n\n /**\n * The prior library.\n */\n prior_lib: string\n}\n","import { Deserializer } from '@layerzerolabs/lz-serdes'\nimport { trim0x } from '@layerzerolabs/lz-utilities'\n\nimport { UlnConfig } from '../uln'\n\n/**\n * Deserializes the ULN configuration from a string or Uint8Array.\n *\n * @param {string | Uint8Array} data - The data to deserialize.\n * @returns {UlnConfig} The deserialized ULN configuration.\n */\nexport function deserializeUlnConfig(data: string | Uint8Array): UlnConfig {\n if (typeof data === 'string') {\n data = Uint8Array.from(Buffer.from(trim0x(data), 'hex'))\n }\n const deserializer = new Deserializer(data, false)\n const confirmations = deserializer.deserializeU64()\n const optionalDVNThreshold = deserializer.deserializeU8()\n const requiredDVNCount = deserializer.deserializeU8()\n const requiredDVNs: string[] = []\n for (let i = 0; i < requiredDVNCount; i++) {\n requiredDVNs.push(Buffer.from(deserializer.deserializeFixedBytes(32)).toString('hex'))\n }\n const optionalDVNCount = deserializer.deserializeU8()\n const optionalDVNs: string[] = []\n for (let i = 0; i < optionalDVNCount; i++) {\n optionalDVNs.push(Buffer.from(deserializer.deserializeFixedBytes(32)).toString('hex'))\n }\n const useDefaultForConfirmations = deserializer.deserializeU8() === 1\n const useDefaultForRequiredDVNs = deserializer.deserializeU8() === 1\n const useDefaultForOptionalDVNs = deserializer.deserializeU8() === 1\n return {\n confirmations,\n optionalDVNThreshold,\n requiredDVNs,\n optionalDVNs,\n useDefaultForConfirmations,\n useDefaultForRequiredDVNs,\n useDefaultForOptionalDVNs,\n }\n}\n","import { Serializer } from '@layerzerolabs/lz-serdes'\n\nimport { UpdatePrice } from '../pricefeed'\n\n/**\n * Serializes an array of UpdatePrice objects into a Uint8Array.\n *\n * @param {UpdatePrice[]} updatePrices - The array of UpdatePrice objects to serialize.\n * @returns {Uint8Array} The serialized data as a Uint8Array.\n */\nexport function serializeUpdatePrices(updatePrices: UpdatePrice[]): Uint8Array {\n const serializer = new Serializer(false)\n for (const updatePrice of updatePrices) {\n serializer.serializeU32(updatePrice.eid)\n serializer.serializeU128(updatePrice.priceRatio)\n serializer.serializeU64(updatePrice.gasPriceInUnit)\n serializer.serializeU32(updatePrice.gasPerByte)\n }\n return serializer.getBytes()\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { arrayify, ensure0x } from '@layerzerolabs/lz-utilities'\nimport { Packet, addressToBytes32 } from '@layerzerolabs/lz-v2-utilities'\nimport {\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveResourceNotFoundError,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the Counter SDK that provides send, lzReceive, LzCompose and view functions for the Counter contract.\n * @template AccountType - The type of the account.\n */\nexport class Counter<AccountType> {\n module: string[]\n oappCoreModule: string[]\n\n /**\n * Creates an instance of Counter SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.counter_v2?.toString() ?? '0x0', 'counter']\n this.oappCoreModule = [sdk.accounts.counter_v2?.toString() ?? '0x0', 'oapp_core']\n }\n\n /**\n * Create a payload of send contract function.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {number} type - The message type of the payload, @see {@link OmniCounterMsgType}.\n * @param {bigint} feeInNative - The fee in native currency.\n * @param {Uint8Array} options - Additional options for the payload.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n sendPayload(dstEid: EndpointId, type: number, feeInNative: bigint, options: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::send`,\n functionArguments: [dstEid, type, options, feeInNative],\n functionArgumentTypes: ['u32', 'u8', 'vector<u8>', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of set peer contract function.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {string} remoteOapp - The remote OAPP address.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n setPeerPayload(remoteEid: EndpointId, remoteOapp: string): InputEntryFunctionData {\n const remoteOappBytes32 = addressToBytes32(remoteOapp)\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n functionArguments: [remoteEid, remoteOappBytes32],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of lz receive contract function.\n *\n * @param {Packet} packet - The received packet.\n * @param {string} module - Remote OAPP module name.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n lzReceivePayload(packet: Packet, module: string): InputEntryFunctionData {\n const { receiver, srcEid, sender, nonce, guid, message } = packet\n return {\n function: `${receiver}::${module}::lz_receive`,\n functionArguments: [\n srcEid,\n arrayify(sender),\n BigInt(nonce),\n arrayify(guid),\n arrayify(message),\n new Uint8Array(), //unused field\n ],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of lz compose contract function.\n *\n * @param {string} from - The sender address.\n * @param {string} to - The receiver address.\n * @param {Uint8Array} guid - The packet GUID.\n * @param {number} index - The message index.\n * @param {Uint8Array} message - The message.\n * @param {string} module - Remote OAPP module name.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n lzComposePayload(\n from: string,\n to: string,\n guid: Uint8Array,\n index: number,\n message: Uint8Array,\n module: string\n ): InputEntryFunctionData {\n return {\n function: `${to}::${module}::lz_compose`,\n functionArguments: [\n from,\n guid,\n index,\n message,\n new Uint8Array(), //unused field\n ],\n functionArgumentTypes: ['address', 'vector<u8>', 'u16', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sends a transaction to the specified endpoint.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {number} type - The type of the payload.\n * @param {bigint} feeInNative - The fee in native currency.\n * @param {Uint8Array} options - Additional options for the payload.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async send(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n dstEid: EndpointId,\n type: number,\n feeInNative: bigint,\n options: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::send`,\n [dstEid, type, options, feeInNative],\n ['u32', 'u8', 'vector<u8>', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Sets the peer for the specified remote endpoint.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {string} remoteOapp - The remote OAPP address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setPeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: EndpointId,\n remoteOapp: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n const remoteOappBytes32 = addressToBytes32(remoteOapp)\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n [remoteEid, remoteOappBytes32],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Gets the peer for the specified remote endpoint.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @returns {Promise<string>} The peer address, '' if not found.\n */\n async getPeer(remoteEid: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_peer`,\n functionArgs: [remoteEid],\n functionArgTypes: ['u32'],\n })\n const bytes = view[0] as string\n return ensure0x(bytes)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return ''\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the total inbound count.\n *\n * @returns {Promise<number>} The total inbound count, 0 if not found.\n */\n async getCount(): Promise<number> {\n try {\n const resource = await this.sdk.getAccountResource<{ total_inbound_count: number | string }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n const { total_inbound_count } = resource\n return Number(total_inbound_count)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Gets the compose count.\n *\n * @returns {Promise<number>} The compose count, 0 if not found.\n */\n async getComposeCount(): Promise<number> {\n try {\n const resource = await this.sdk.getAccountResource<{ compose_count: number | string }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n const { compose_count } = resource\n return Number(compose_count)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Checks if the counter is initialized.\n *\n * @returns {Promise<boolean>} True if the counter is initialized, false otherwise.\n */\n async isInitialized(): Promise<boolean> {\n try {\n await this.sdk.getAccountResource({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n return true\n } catch (e) {\n return false\n }\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { arrayify, padify } from '@layerzerolabs/lz-utilities'\nimport { PacketV1Codec, trim0x } from '@layerzerolabs/lz-v2-utilities'\nimport {\n ByteCode,\n EntryFunctionArgumentTypes,\n InputEntryFunctionData,\n MoveAbortError,\n MoveFunction,\n MoveResourceNotFoundError,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { DVNDstConfig, WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the DvnWorker SDK that provides various functions for interacting with the DVN contract.\n * @template AccountType - The type of the account.\n */\nexport class DvnWorker<AccountType> {\n public readonly module: string[]\n public readonly workerStoreModule: string[]\n\n /**\n * Creates an instance of DvnWorker SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.dvn?.toString() ?? '0x0', 'dvn']\n this.workerStoreModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config_store']\n }\n\n /**\n * Gets the VID.\n * VID is endpointId % 30000.\n *\n * @returns {Promise<number>} The VID.\n */\n async getVid(): Promise<number> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_vid`,\n functionArgs: [],\n })\n return view[0] as number\n }\n\n /**\n * Creates a verify hash.\n *\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} payloadHash - The payload hash.\n * @param {bigint} confirmations - The number of confirmations.\n * @param {string} target - The target address.\n * @param {number} vid - The VID.\n * @param {bigint} expiration - The expiration time.\n * @returns {Promise<Uint8Array>} The verify hash.\n */\n async createVerifyHash(\n packetHeader: Uint8Array,\n payloadHash: Uint8Array,\n confirmations: bigint,\n target: string,\n vid: number,\n expiration: bigint\n ): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::hashes::create_verify_hash`,\n functionArgs: [packetHeader, payloadHash, confirmations, target, vid, expiration],\n functionArgTypes: ['vector<u8>', 'vector<u8>', 'u64', 'address', 'u32', 'u64'],\n })\n const hash = view[0] as { bytes: Uint8Array }\n return hash.bytes\n }\n\n /**\n * Creates a payload for initializing the DVN contract.\n *\n * @param {string[]} admins - The list of admin addresses.\n * @param {Uint8Array[]} dvnSigners - The list of DVN signer public keys.\n * @param {bigint} quorum - The quorum required for DVN operations.\n * @param {string[]} msglibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} depositAddress - The deposit address. Defaults to the DVN address.\n * @returns {Promise<InputEntryFunctionData>} The input entry function data, used to build the transaction.\n */\n async createInitializeDVNPayload(\n admins: string[],\n dvnSigners: Uint8Array[],\n quorum: bigint,\n msglibs: string[],\n feeLib: string,\n depositAddress?: string\n ): Promise<InputEntryFunctionData> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n admins,\n dvnSigners,\n quorum,\n msglibs,\n feeLib,\n ]\n let functionArgumentTypes = [\n 'address',\n 'vector<address>',\n 'vector<vector<u8>>',\n 'u64',\n 'vector<address>',\n 'address',\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeDvnScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msglibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n const dvnSignersU8Array = new Uint8Array(dvnSigners.flatMap((signer) => Array.from(signer)))\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n adminsU8Array,\n dvnSignersU8Array,\n quorum,\n msgLibsU8Array,\n feeLib,\n ]\n functionArgumentTypes = ['address', 'address', 'vector<u8>', 'vector<u8>', 'u64', 'vector<u8>', 'address']\n }\n return {\n function: functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the DVN contract is initialized.\n *\n * @returns {Promise<boolean>} True if the DVN contract is initialized, false otherwise.\n */\n async isInitialize(): Promise<boolean> {\n try {\n const resource = await this.sdk.getAccountResource<{ worker_id: number }>({\n accountAddress: this.module[0],\n resourceType: `${this.workerStoreModule[0]}::${this.workerStoreModule[1]}::WorkerStore`,\n })\n const { worker_id } = resource\n return worker_id !== 0\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Gets the destination configuration for the specified endpoint.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<DVNDstConfig>} The destination configuration.\n */\n async getDstConfig(dstEid: EndpointId): Promise<DVNDstConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_dst_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n const viewResponse = view[0] as [bigint, number, bigint]\n return {\n gas: viewResponse[0],\n multiplierBps: viewResponse[1],\n floorMarginUsd: viewResponse[2],\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 4 || e.abortCode === 5 || e.abortCode === 17)) {\n return {\n gas: BigInt(0),\n multiplierBps: 0,\n floorMarginUsd: BigInt(0),\n }\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the destination configuration.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {DVNDstConfig} dstConfig - The destination configuration.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDstConfigPayload(remoteEid: EndpointId, dstConfig: DVNDstConfig): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_dst_config`,\n functionArguments: [remoteEid, dstConfig.gas, dstConfig.multiplierBps, dstConfig.floorMarginUsd],\n functionArgumentTypes: ['u32', 'u64', 'u16', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the specified account is an admin.\n *\n * @param {string} account - The account address.\n * @returns {Promise<boolean>} True if the account is an admin, false otherwise.\n */\n async isAdmin(account: string): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_admin`,\n functionArgs: [account],\n functionArgTypes: ['address'],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting an admin.\n *\n * @param {string} admin - The admin address.\n * @param {boolean} active - The admin status.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetAdminPayload(admin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_admin`,\n functionArguments: [admin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the deposit address.\n *\n * @returns {Promise<string>} The deposit address, '' if not found.\n */\n async getDepositAddress(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_deposit_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the deposit address.\n *\n * @param {string} depositAddress - The deposit address.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDepositAddressPayload(depositAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_deposit_address`,\n functionArguments: [depositAddress],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed configuration of dvn.\n *\n * @returns {Promise<WorkerPriceFeedConfig>} The price feed configuration.\n */\n async getPriceFeed(): Promise<WorkerPriceFeedConfig> {\n return this.sdk.LayerzeroModule.WorkerCommon.getWorkerPriceFeedConfig(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed.\n *\n * @param {string} priceFeed - The price feed address.\n * @param {string} feedAddress - The feed address.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed`,\n functionArguments: [priceFeed, feedAddress],\n functionArgumentTypes: ['address', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for verifying a packet.\n *\n * @param {Date} date - The date of the transaction.\n * @param {PacketV1Codec} codec - The codec for the packet.\n * @param {string} receiveMessageLibAddress - The address of the receive message library.\n * @param {number} inboundConfirmation - The number of inbound confirmations.\n * @param {number} expiration - The expiration time.\n * @param {string} signatures - The signatures for the transaction.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createVerifyPayload(\n date: Date,\n codec: PacketV1Codec,\n receiveMessageLibAddress: string,\n inboundConfirmation: number,\n expiration: number,\n signatures: string\n ): InputEntryFunctionData {\n const payload: InputEntryFunctionData = {\n function: `${this.module[0]}::${this.module[1]}::verify`,\n functionArguments: [\n arrayify(codec.header()),\n arrayify(codec.payloadHash()),\n BigInt(inboundConfirmation),\n receiveMessageLibAddress,\n BigInt(expiration) + BigInt(date.getTime()),\n arrayify(signatures),\n ] as EntryFunctionArgumentTypes[],\n functionArgumentTypes: ['vector<u8>', 'vector<u8>', 'u64', 'address', 'u64', 'vector<u8>'],\n }\n return payload\n }\n}\n\n/**\n * Initialize DVN script\n * This creates a script that can be used to initialize a DVN that was created using deployer::object_code_deployment.\n * The output is in hex and must be converted to a byte array.\n *\n * The address inputs must be provided in hex with no 0x prefix.\n *\n * Interface:\n * fun initialize_dvn(\n * publisher: &signer,\n * dvn_address: address,\n * deposit_address: address,\n * admins_concatenated: vector<u8>, // 32 bytes each\n * dvn_signers_concatenated: vector<u8>, // 64 bytes each\n * quorum: u64,\n * supported_msglibs_concatenated: vector<u8>, // 32 bytes each\n * fee_lib: address,\n * )\n *\n * @param deployerAddressHex the address of the deployer in hex (without the 0x prefix)\n * @param dvnAddressHex the address of the DVN in hex (without the 0x prefix)\n * @param uln302AddressHex the address of the ULN302 in hex (without the 0x prefix)\n */\nconst initializeDvnScriptHex = (\n deployerAddressHex: string,\n dvnAddressHex: string,\n uln302AddressHex: string\n): ByteCode => {\n const stdAddressHex = '0000000000000000000000000000000000000000000000000000000000000001'\n deployerAddressHex = trim0x(padify(deployerAddressHex as `0x${string}`))\n dvnAddressHex = trim0x(padify(dvnAddressHex as `0x${string}`))\n uln302AddressHex = trim0x(padify(uln302AddressHex as `0x${string}`))\n return (`a11ceb0b060000000701000a030a1a042402052657077d9201088f028001068f031d00000001010202030304040503040001` +\n `0606070101000708090002080a020003090b0200010508060c05050a020a02030a0205170c0101010303030a020a05060c0a` +\n `020a0a020303030303030303030a020a050002060c05010c010203060a09000303010a0900010a02010507060c050a050a0a` +\n `02030a050502060c010866726f6d5f62637306766563746f720364766e066d73676c6962166f626a6563745f636f64655f64` +\n `65706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a` +\n `696e697469616c697a652c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f` +\n `70745f696e${stdAddressHex}${dvnAddressHex}${uln302AddressHex}${deployerAddressHex}030820000000000000` +\n `00030840000000000000000a0501000a0a020100000001b0010b000b0111000c080e080c110e0341050c170a170700190600` +\n `0000000000000021041005140b11010601000000000000002707020c100600000000000000000c14090c090b1707001a0c0c` +\n `0a0904250b14060100000000000000160c140527080c090a140a0c23043b0a140700180c1a0e030a1a0b1a07001638000c0f` +\n `0d100b0f11024409051e0e0641050c180a1807001906000000000000000021044505490b1101060100000000000000270702` +\n `0c1e0600000000000000000c15090c0a0b1807001a0c0e0a0a045a0b15060100000000000000160c15055c080c0a0a150a0e` +\n `2304700a150700180c1c0e060a1c0b1c07001638000c1d0d1e0b1d1102440905530e0441050c190a19070119060000000000` +\n `00000021047a057e0b11010601000000000000002707030c130600000000000000000c16090c0b0b1907011a0c0d0a0b048f` +\n `010b16060100000000000000160c16059101080c0b0a160a0d2304a4010a160701180c1b0e040a1b0b1b07011638000c120d` +\n `130b1244080588010a110b020b100b130b050b1e0b0711030b1108110402`) as ByteCode\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { addressToBytes32 } from '@layerzerolabs/lz-v2-utilities'\nimport {\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ConfigType, Timeout, deserializeUlnConfig } from '../types'\n\n/**\n * This is the Endpoint SDK that provides verify and view functions for the Endpoint contract.\n * @template AccountType - The type of the account.\n */\nexport class Endpoint<AccountType> {\n public readonly module: string[]\n public readonly adminModule: string[]\n\n /**\n * Creates an instance of Endpoint.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.endpoint_v2?.toString() ?? '0x0', 'endpoint']\n this.adminModule = [sdk.accounts.endpoint_v2?.toString() ?? '0x0', 'admin']\n }\n\n /**\n * Creates a payload for verify contract method.\n *\n * @param {string} msgLibAddr - The message library address.\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} hash - The hash of the payload.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n verifyPayload(msgLibAddr: string, packetHeader: Uint8Array, hash: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::verify`,\n functionArguments: [msgLibAddr, packetHeader, hash],\n functionArgumentTypes: ['address', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Verifies a message.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} receiveLib - The receive library address.\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} hash - The hash of the payload.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async verify(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n receiveLib: string,\n packetHeader: Uint8Array,\n hash: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::verify`,\n [receiveLib, packetHeader, hash],\n ['address', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n // VIEW FUNCTIONS\n /**\n * Gets a quote for sending a message.\n *\n * @param {string} sender - The sender address.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {string} receiver - The receiver address.\n * @param {Uint8Array} message - The message to be sent.\n * @param {Uint8Array} options - Additional options for the message.\n * @param {boolean} payInLzToken - Whether to pay in LZ token.\n * @returns {Promise<[number, number]>} The quote for sending the message.\n */\n async quoteView(\n sender: string,\n dstEid: EndpointId,\n receiver: string,\n message: Uint8Array,\n options: Uint8Array,\n payInLzToken: boolean\n ): Promise<[number, number]> {\n const receiverBytes32 = addressToBytes32(receiver)\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_quote`,\n functionArgs: [sender, dstEid, receiverBytes32, message, options, payInLzToken],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'bool'],\n })\n return view[0] as [number, number]\n }\n\n /**\n * Gets the number of inbound confirmations for a given remote endpoint and OAPP.\n *\n * @param {number} remoteEid - The remote endpoint ID.\n * @param {string} oapp - The OAPP address.\n * @returns {Promise<number>} The number of inbound confirmations.\n */\n async getUlnInboundConfirmations(remoteEid: number, oapp: string): Promise<number> {\n const ulnMsgLibAddr = this.sdk.accounts.uln_message_lib?.toString() ?? '0x0'\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_config`,\n functionArgs: [oapp, ulnMsgLibAddr, remoteEid, ConfigType.receiveUln],\n functionArgTypes: ['address', 'address', 'u32', 'u32'],\n })\n const config = deserializeUlnConfig(view[0] as Uint8Array | string)\n return Number(config.confirmations)\n }\n\n /**\n * Checks if a message can be verified.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the message can be verified, false otherwise.\n */\n async verifiableView(srcEid: number, sender: Uint8Array, nonce: bigint, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::verifiable_view`,\n functionArgs: [srcEid, sender, nonce, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Gets the payload hash for a given message.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @returns {Promise<Uint8Array | null>} The payload hash, or null if not found.\n */\n async getPayloadHash(\n receiver: string,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint\n ): Promise<Uint8Array | null> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_payload_hash`,\n functionArgs: [receiver, srcEid, sender, nonce],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'u64'],\n })\n return view[0] as Uint8Array\n } catch (e) {\n return null\n }\n }\n\n /**\n * Gets the LZ receive module for a given OAPP.\n *\n * @param {string} oapp - The OAPP address.\n * @returns {Promise<string>} The LZ receive module address.\n */\n async getLzReceiveModule(oapp: string): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lz_receive_module`,\n functionArgs: [oapp],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n }\n\n /**\n * Gets the LZ compose module for a given composer.\n *\n * @param {string} composer - The composer address.\n * @returns {Promise<string>} The LZ compose module address.\n */\n async getLzComposeModule(composer: string): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lz_compose_module`,\n functionArgs: [composer],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n }\n\n /**\n * Gets the effective receive library for a given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<[string, boolean]>} The effective receive library address and a boolean indicating if it is the default library.\n */\n async getEffectiveReceiveLib(oappAddress: string, srcEid: number): Promise<[string, boolean]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_effective_receive_library`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n return view[0] as [string, boolean]\n }\n\n /**\n * Gets the effective send library for a given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<[string, boolean]>} The effective send library address and a boolean indicating if it is the default library.\n */\n async getEffectiveSendLib(oappAddress: string, srcEid: number): Promise<[string, boolean]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_effective_send_library`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n return view[0] as [string, boolean]\n }\n\n /**\n * Gets the outbound nonce for a given sender address, destination endpoint ID, and receiver address.\n *\n * @param {string} sender - The sender address.\n * @param {number} dstEid - The destination endpoint ID.\n * @param {Uint8Array} receiver - The receiver address.\n * @returns {Promise<bigint>} The outbound nonce.\n */\n async getOutboundNonce(sender: string, dstEid: number, receiver: Uint8Array): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_outbound_nonce`,\n functionArgs: [sender, dstEid, receiver],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as bigint\n }\n\n /**\n * Gets the lazy inbound nonce for a given receiver address, source endpoint ID, and sender address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @returns {Promise<number>} The lazy inbound nonce.\n */\n async getLazyInboundNonce(receiver: string, srcEid: number, sender: Uint8Array): Promise<number> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lazy_inbound_nonce`,\n functionArgs: [receiver, srcEid, sender],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as number\n }\n\n /**\n * Gets the inbound nonce for a given receiver address, source endpoint ID, and sender address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @returns {Promise<bigint>} The inbound nonce.\n */\n async getInboundNonce(receiver: string, srcEid: number, sender: Uint8Array): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_inbound_nonce`,\n functionArgs: [receiver, srcEid, sender],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as bigint\n }\n\n /**\n * Checks if the specified receive library is valid for a given receiver address, source endpoint ID, and message library address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {string} msglib - The message library address.\n * @returns {Promise<boolean>} True if the receive library is valid, false otherwise.\n */\n async isValidReceiveLib(receiver: string, srcEid: number, msglib: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_valid_receive_library_for_oapp`,\n functionArgs: [receiver, srcEid, msglib],\n functionArgTypes: ['address', 'u32', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Checks if the payload hash view exists for the given parameters.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the payload hash view exists, false otherwise.\n */\n async hasPayloadHashView(srcEid: number, sender: Uint8Array, nonce: bigint, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::has_payload_hash_view`,\n functionArgs: [srcEid, sender, nonce, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Gets the compose message hash for the given parameters.\n *\n * @param {string} from - The sender address.\n * @param {string} to - The receiver address.\n * @param {Uint8Array} guid - The GUID.\n * @param {number} index - The index.\n * @returns {Promise<Uint8Array>} The compose message hash.\n */\n async getComposeMessageHash(from: string, to: string, guid: Uint8Array, index: number): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_compose_message_hash`,\n functionArgs: [from, to, guid, index],\n functionArgTypes: ['address', 'address', 'vector<u8>', 'u16'],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Checks if the endpoint is initializable for the given parameters.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the endpoint is initializable, false otherwise.\n */\n async initializable(srcEid: number, sender: Uint8Array, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::initializable`,\n functionArgs: [srcEid, sender, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Quotes the fee for the given parameters.\n *\n * @param {string} sender - The sender address.\n * @param {number} dstChainId - The destination chain ID.\n * @param {Uint8Array} remote - The remote address.\n * @param {Uint8Array} message - The message.\n * @param {Uint8Array} options - The options.\n * @param {boolean} lzToken - The LZ token flag.\n * @returns {Promise<[number, number]>} The quoted fee.\n */\n async quoteFee(\n sender: string,\n dstChainId: number,\n remote: Uint8Array,\n message: Uint8Array,\n options: Uint8Array,\n lzToken: boolean\n ): Promise<[number, number]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_quote`,\n functionArgs: [sender, dstChainId, remote, message, options, lzToken],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'bool'],\n })\n return view[0] as [number, number]\n }\n\n /**\n * Gets the default send library for the given remote chain ID.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @returns {Promise<string>} The default send library address.\n */\n async getDefaultSendLib(remoteChainId: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_send_lib`,\n functionArgs: [remoteChainId],\n functionArgTypes: ['u32'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 6) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the default receive library for the given remote chain ID.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @returns {Promise<string>} The default receive library address.\n */\n async getDefaultReceiveLib(remoteChainId: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_receive_lib`,\n functionArgs: [remoteChainId],\n functionArgTypes: ['u32'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 7) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the registered libraries.\n * @param {number} startIndex - The start index. Default is 0.\n * @param {number} length - The length. Default is 20.\n * @returns {Promise<string[]>} The list of registered libraries.\n */\n async getRegisteredLibraries(startIndex = 0, length = 20): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_registered_libraries`,\n functionArgs: [startIndex, length],\n functionArgTypes: ['u64', 'u64'],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Gets the receive library timeout for the given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<Timeout | undefined>} The receive library timeout, or undefined if not found.\n */\n async getReceiveLibraryTimeout(oappAddress: string, srcEid: number): Promise<Timeout | undefined> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_receive_library_timeout`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return undefined\n }\n return view[0] as Timeout\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return undefined\n }\n throw e\n }\n }\n\n /**\n * Gets the default receive library timeout for the given source endpoint ID.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<Timeout | undefined>} The default receive library timeout, or undefined if not found.\n */\n async getDefaultReceiveLibraryTimeout(srcEid: number): Promise<Timeout | undefined> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_receive_library_timeout`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return undefined\n }\n return view[0] as Timeout\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return undefined\n }\n throw e\n }\n }\n\n /**\n * Checks if the ZRO is set.\n *\n * @returns {Promise<boolean>} True if the ZRO is set, false otherwise.\n */\n async isSetZro(): Promise<boolean> {\n const resource = await this.sdk.getAccountResource<{ zro: any }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::store::GlobalStore`,\n })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { zro: zroMetadata } = resource\n console.log('zroMetadata', zroMetadata)\n return false\n }\n\n /**\n * Creates a payload for registering a message library.\n *\n * @param {string} msgLib - The message library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createRegisterMsgLibPayload(msgLib: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::register_library`,\n functionArguments: [msgLib],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Registers a message library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} msgLib - The message library address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async registerMsgLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n msgLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::register_library`,\n [msgLib],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the default send library.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @param {string} sendLib - The send library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultSendLibPayload(remoteChainId: EndpointId, sendLib: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_send_library`,\n functionArguments: [Number(remoteChainId), sendLib],\n functionArgumentTypes: ['u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the default send library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {number} remoteChainId - The remote chain ID.\n * @param {string} sendLib - The send library address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setDefaultSendLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteChainId: number,\n sendLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::set_default_send_library`,\n [Number(remoteChainId), sendLib.toString()],\n ['u32', 'address'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the default receive library.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @param {string} receiveLib - The receive library address.\n * @param {bigint} periodSecond - The period in seconds.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultReceiveLibPayload(\n remoteChainId: EndpointId,\n receiveLib: string,\n periodSecond: bigint\n ): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_receive_library`,\n functionArguments: [Number(remoteChainId), receiveLib, periodSecond],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the default receive library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {number} remoteChainId - The remote chain ID.\n * @param {string} receiveLib - The receive library address.\n * @param {bigint} periodSecond - The period in seconds.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setDefaultReceiveLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteChainId: number,\n receiveLib: string,\n periodSecond: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::set_default_receive_library`,\n [Number(remoteChainId), receiveLib.toString(), periodSecond],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the ZRO.\n *\n * @param {string} zro - The ZRO address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetZroPayload(zro: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_zro`,\n functionArguments: [zro],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData, MoveResourceNotFoundError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the EndpointCommon SDK that provides initialization and view functions for the EndpointCommon contract.\n * @template AccountType - The type of the account.\n */\nexport class EndpointCommon<AccountType> {\n universalConfigModule: string[]\n\n /**\n * Creates an instance of EndpointCommon SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.universalConfigModule = [sdk.accounts.endpoint_v2_common?.toString() ?? '0x0', 'universal_config']\n }\n\n /**\n * Create a payload for initializing the universalConfig.\n *\n * @param {EndpointId} endpoint - The endpoint ID.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createInitializePayload(endpoint: EndpointId): InputEntryFunctionData {\n return {\n function: `${this.universalConfigModule[0]}::${this.universalConfigModule[1]}::initialize`,\n functionArguments: [endpoint],\n functionArgumentTypes: ['u32'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the endpoint ID.\n *\n * @returns {Promise<number>} The endpoint ID, 0 if not found.\n */\n async getEid(): Promise<number> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.universalConfigModule[0]}::${this.universalConfigModule[1]}::eid`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as number\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { padify } from '@layerzerolabs/lz-utilities'\nimport { trim0x } from '@layerzerolabs/lz-v2-utilities'\nimport {\n ByteCode,\n EntryFunctionArgumentTypes,\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveFunction,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ExecutorDstConfig, WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the Executor SDK that provides initialization and view functions for the Executor contract.\n * @template AccountType - The type of the account.\n */\nexport class Executor<AccountType> {\n module: string[]\n /**\n * Creates an instance of Executor SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.executor?.toString() ?? '0x0', 'executor']\n }\n\n /**\n * Checks if the executor is initialized.\n *\n * @returns {Promise<boolean>} True if the executor is initialized, false otherwise.\n */\n async isInitialize(): Promise<boolean> {\n const admins = await this.getAdmins()\n return admins.length !== 0\n }\n\n /**\n * Creates a payload for initializing the executor.\n *\n * @param {string} roleAdmin - The role admin address.\n * @param {string[]} admins - The list of admin addresses.\n * @param {string[]} msgLibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} [depositAddress] - The deposit address. Defaults to the executor address.\n * @returns {Promise<InputEntryFunctionData>} The input entry function data, used to build the transaction.\n */\n async createInitExecutorPayload(\n roleAdmin: string,\n admins: string[],\n msgLibs: string[],\n feeLib: string,\n depositAddress?: string\n ): Promise<InputEntryFunctionData> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArgumentTypes = ['address', 'address', 'vector<address>', 'vector<address>', 'address']\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n roleAdmin,\n admins,\n msgLibs,\n feeLib,\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeExecutorScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n functionArgumentTypes = ['address', 'address', 'address', 'vector<u8>', 'vector<u8>', 'address']\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msgLibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n roleAdmin,\n adminsU8Array,\n msgLibsU8Array,\n feeLib,\n ]\n }\n return {\n function: functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Initializes the executor.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} roleAdmin - The role admin address.\n * @param {string[]} admins - The list of admin addresses.\n * @param {string[]} msgLibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} [depositAddress] - The deposit address. Defaults to the executor address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async initialize(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n roleAdmin: string,\n admins: string[],\n msgLibs: string[],\n feeLib: string,\n depositAddress?: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArgumentTypes = ['address', 'address', 'vector<address>', 'vector<address>', 'address']\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n roleAdmin,\n admins,\n msgLibs,\n feeLib,\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeExecutorScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n functionArgumentTypes = ['address', 'address', 'address', 'vector<u8>', 'vector<u8>', 'address']\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msgLibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n roleAdmin,\n adminsU8Array,\n msgLibsU8Array,\n feeLib,\n ]\n }\n return this.sdk.sendAndConfirmTransaction(\n signer,\n functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n gasOptions\n )\n }\n\n /**\n * Gets the destination configuration for the specified endpoint.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<ExecutorDstConfig>} The destination configuration.\n */\n async getDstConfig(dstEid: EndpointId): Promise<ExecutorDstConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_dst_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n const [lzReceiveBaseGas, multiplierBps, floorMarginUsd, nativeCap, lzComposeBaseGas] = view[0] as [\n bigint,\n number,\n bigint,\n bigint,\n bigint,\n ]\n return {\n lzReceiveBaseGas,\n multiplierBps,\n floorMarginUsd,\n nativeCap,\n lzComposeBaseGas,\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return {\n lzReceiveBaseGas: BigInt(0),\n multiplierBps: 0,\n floorMarginUsd: BigInt(0),\n nativeCap: BigInt(0),\n lzComposeBaseGas: BigInt(0),\n }\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the destination configuration.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {ExecutorDstConfig} dstConfig - The destination configuration.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDstConfigPayload(remoteEid: EndpointId, dstConfig: ExecutorDstConfig): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_dst_config`,\n functionArguments: [\n remoteEid,\n dstConfig.lzReceiveBaseGas,\n dstConfig.multiplierBps,\n dstConfig.floorMarginUsd,\n dstConfig.nativeCap,\n dstConfig.lzComposeBaseGas,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u16', 'u128', 'u128', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the list of role admin addresses.\n *\n * @returns {Promise<string[]>} The list of role admin addresses.\n */\n async getRoleAdmins(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_role_admins`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Checks if the specified address is a role admin.\n *\n * @param {string} roleAdmin - The role admin address.\n * @returns {Promise<boolean>} True if the address is a role admin, false otherwise.\n */\n async isRoleAdmin(roleAdmin: string): Promise<boolean> {\n const roleAdmins = await this.getRoleAdmins()\n return roleAdmins\n .map((admin) => this.sdk.normalizeAddress(admin).toLowerCase())\n .includes(this.sdk.normalizeAddress(roleAdmin).toLowerCase())\n }\n\n /**\n * Creates a payload for setting a role admin.\n *\n * @param {string} roleAdmin - The role admin address.\n * @param {boolean} active - The role admin status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetRoleAdminPayload(roleAdmin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_role_admin`,\n functionArguments: [roleAdmin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the specified address is an admin.\n *\n * @param {string} admin - The admin address.\n * @returns {Promise<boolean>} True if the address is an admin, false otherwise.\n */\n async isAdmin(admin: string): Promise<boolean> {\n const admins = await this.getAdmins()\n return admins\n .map((adminTemp) => this.sdk.normalizeAddress(adminTemp).toLowerCase())\n .includes(this.sdk.normalizeAddress(admin).toLowerCase())\n }\n\n /**\n * Gets the list of admin addresses.\n *\n * @returns {Promise<string[]>} The list of admin addresses.\n */\n async getAdmins(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_admins`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting an admin.\n *\n * @param {string} admin - The admin address.\n * @param {boolean} active - The admin status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetAdminPayload(admin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_admin`,\n functionArguments: [admin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the executor is paused.\n *\n * @returns {Promise<boolean>} True if the executor is paused, false otherwise.\n */\n async isPaused(): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_paused`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for pausing or unpausing the executor.\n *\n * @param {boolean} pause - The pause status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPauseExecutorPayload(pause: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_pause_executor`,\n functionArguments: [pause],\n functionArgumentTypes: ['bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the deposit address.\n *\n * @returns {Promise<string>} The deposit address, or an empty string if not found.\n */\n async getDepositAddress(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_deposit_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the deposit address.\n *\n * @param {string} depositAddress - The deposit address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDepositAddressPayload(depositAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_deposit_address`,\n functionArguments: [depositAddress],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the default multiplier basis points (BPS).\n *\n * @returns {Promise<number>} The default multiplier BPS, or 0 if not found.\n */\n async getDefaultMultiplierBps(): Promise<number> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_multiplier_bps`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as number\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the default multiplier basis points (BPS).\n *\n * @param {number} defaultMultiplier - The default multiplier BPS.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultMultiplierBpsPayload(defaultMultiplier: number): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_default_multiplier_bps`,\n functionArguments: [defaultMultiplier],\n functionArgumentTypes: ['u16'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the supported option types.\n *\n * @returns {Promise<Uint8Array>} The supported option types.\n */\n async getSupportedOptionTypes(): Promise<Uint8Array> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_supported_option_types`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as Uint8Array\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return new Uint8Array()\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the supported option types.\n *\n * @param {Uint8Array} optionTypes - The supported option types.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetSupportedOptionTypesPayload(optionTypes: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_supported_option_types`,\n functionArguments: [optionTypes],\n functionArgumentTypes: ['vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the supported message libraries.\n *\n * @returns {Promise<string[]>} The supported message libraries.\n */\n async getSupportedMsglibs(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_supported_msglibs`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the supported message libraries.\n *\n * @param {string[]} msglibs - The supported message libraries.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetSupportedMsglibsPayload(msglibs: string[]): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_supported_msglibs`,\n functionArguments: [msglibs],\n functionArgumentTypes: ['vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed configuration.\n *\n * @returns {Promise<WorkerPriceFeedConfig>} The price feed configuration.\n */\n async getPriceFeed(): Promise<WorkerPriceFeedConfig> {\n return this.sdk.LayerzeroModule.WorkerCommon.getWorkerPriceFeedConfig(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed.\n *\n * @param {string} priceFeed - The price feed address.\n * @param {string} feedAddress - The feed address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed`,\n functionArguments: [priceFeed, feedAddress],\n functionArgumentTypes: ['address', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed delegate.\n *\n * @returns {Promise<string>} The price feed delegate address.\n */\n async getPriceFeedDelegate(): Promise<string> {\n return this.sdk.LayerzeroModule.WorkerCommon.getPriceFeedDelegate(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed delegate.\n *\n * @param {string} priceFeedDelegate - The price feed delegate address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPriceFeedDelegatePayload(priceFeedDelegate: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed_delegate`,\n functionArguments: [priceFeedDelegate],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the fee library address.\n *\n * @returns {Promise<string>} The fee library address, or an empty string if not found.\n */\n async getFeeLib(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_fee_lib`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the fee library.\n *\n * @param {string} feeLib - The fee library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetFeeLibPayload(feeLib: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_fee_lib`,\n functionArguments: [feeLib],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n}\n\n/**\n * Initialize executor script\n * This creates a script that can be used to publish an Executor. The output is in hex and must be converted to a byte\n * array.\n *\n * The address inputs must be provided in hex with no 0x prefix.\n *\n * Interface:\n * fun initialize_executor(\n * publisher: &signer,\n * executor_address: address,\n * deposit_address: address,\n * role_admin: address,\n * admins_concatenated: vector<u8>, // 32 bytes each\n * supported_msglibs_concatenated: vector<u8>, // 32 bytes each\n * fee_lib: address,\n * )\n *\n * @param deployerAddressHex the address of the deployer in hex (without the 0x prefix)\n * @param executorAddressHex the address of the executor in hex (without the 0x prefix)\n * @param uln302AddressHex the address of the ULN302 in hex (without the 0x prefix)\n */\nconst initializeExecutorScriptHex = (\n deployerAddressHex: string,\n executorAddressHex: string,\n uln302AddressHex: string\n): ByteCode => {\n const stdAddressHex = '0000000000000000000000000000000000000000000000000000000000000001'\n deployerAddressHex = trim0x(padify(deployerAddressHex as `0x${string}`))\n executorAddressHex = trim0x(padify(executorAddressHex as `0x${string}`))\n uln302AddressHex = trim0x(padify(uln302AddressHex as `0x${string}`))\n return (`a11ceb0b060000000701000a030a1a042402052648076e970108850280010685030e00000001010202030304040503040001` +\n `0606070101000708090002080a020003090b0200010507060c0505050a020a0205100c010103030a020a05060c0303030303` +\n `030a020a050002060c05010c010203060a09000303010a0900010a02010506060c05050a050a050502060c010866726f6d5f` +\n `62637306766563746f72086578656375746f72066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e7416` +\n `6765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a696e697469616c697a65` +\n `2c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e` +\n `${stdAddressHex}${executorAddressHex}${uln302AddressHex}${deployerAddressHex}030820000000000000000a` +\n `0501000000017b0b000b0111000c070e070c0e0e0441050c110a1107001906000000000000000021041005140b0e01060100` +\n `0000000000002707010c0d0600000000000000000c0f090c080b1107001a0c0a0a0804250b0f060100000000000000160c0f` +\n `0527080c080a0f0a0a23043b0a0f0700180c130e040a130b1307001638000c0c0d0d0b0c11024409051e0e0541050c120a12` +\n `07001906000000000000000021044505490b0e010601000000000000002707010c160600000000000000000c10090c090b12` +\n `07001a0c0b0a09045a0b10060100000000000000160c10055c080c090a100a0b2304700a100700180c140e050a140b140700` +\n `1638000c150d160b151102440905530a0e0b020b030b0d0b160b0611030b0e08110402`) as ByteCode\n}\n","import * as assert from 'assert'\n\nimport { ensure0x, trim0x } from '@layerzerolabs/lz-utilities'\nimport {\n EntryFunctionArgumentTypes,\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveResourceNotFoundError,\n MoveStructId,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { Metadata, OftFeeDetail, OftLimit, OftTokenInfo } from '../types'\n\nconst EmptyUint8Array = Uint8Array.from([])\nconst DefaultSharedDecimals = 6\nconst DefaultLocalDecimals = 8\nconst CoinStandard = 'coin'\n/**\n * This is the OFT SDK that provides send, quote, and view functions for the OFT contract.\n */\nexport class Oft<AccountType> {\n private readonly module: string[]\n private readonly oappCoreModule: string[]\n private readonly oappReceiveModule: string[]\n private readonly oftStoreModule: string[]\n private cachedToken?: string | null\n private cachedIsCoin?: boolean\n public coin?: MoveStructId\n constructor(\n private sdk: MoveSdkImpl<AccountType>,\n readonly isAdapter = false\n ) {\n this.module = [sdk.accounts.oft?.toString() ?? '0x0', 'oft']\n this.oftStoreModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oft_store']\n this.oappCoreModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oapp_core']\n this.oappReceiveModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oapp_receive']\n }\n\n getImplModule(): string[] {\n return [this.sdk.accounts.oft?.toString() ?? '0x0', 'oft_impl']\n }\n\n // view functions\n /**\n * Check whether the OFT is initialized or not\n */\n async isInitialized(): Promise<boolean> {\n try {\n const { decimal_conversion_rate } = await this.sdk.getAccountResource<{ decimal_conversion_rate: string }>({\n accountAddress: this.module[0],\n resourceType: `${this.oftStoreModule[0]}::${this.oftStoreModule[1]}::OftStore`,\n })\n return parseInt(decimal_conversion_rate) !== 0\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Get enforced options\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * @returns enforced options\n */\n async getEnforcedOptions(eid: number, msgType: number): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_enforced_options`,\n functionArgs: [eid, msgType],\n functionArgTypes: ['u32', 'u16'],\n })\n return view[0] as string\n }\n\n /**\n * Combine enforced options with extra options\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * @param extraOptions can be empty, or should contain number 3 as u16\n * @returns enforced options\n */\n async combineOptions(eid: number, msgType: number, extraOptions: Uint8Array): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::combine_options`,\n functionArgs: [eid, msgType, extraOptions],\n functionArgTypes: ['u32', 'u16', 'vector<u8>'],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Get admin address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns admin address\n */\n async getAdmin(): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_admin`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n\n /**\n * Check specific eid has peer or not\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns true or false\n */\n async hasPeer(eid: number): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::has_peer`,\n functionArgs: [eid],\n functionArgTypes: ['u32'],\n })\n return view[0] as boolean\n }\n\n /**\n * Get peer address with specific eid\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns peer address\n */\n async getPeer(eid: number): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_peer`,\n functionArgs: [eid],\n functionArgTypes: ['u32'],\n })\n const bytes = view[0] as string\n return ensure0x(bytes)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return ''\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Check oapp has delegate or not\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns true or false\n */\n async hasDelegate(): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::has_delegate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as boolean\n }\n\n /**\n * Get oapp delegate address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns delegate address\n */\n async getDelegate(): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_delegate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n\n /**\n * Get lz_receive module name\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns fixed value 'oapp_receive' in Uint8Array\n * details: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oapp_config.move\n */\n async getLzReceiveModuleName(): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_lz_receive_module_name`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Quote the OFT for a particular send without sending\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns (\n * oft_limit: The minimum and maximum limits that can be sent to the recipient\n * fees: The fees that will be applied to the amount sent\n * amount_sent_ld: The amount that would be debited from the sender in local decimals\n * amount_received_ld: The amount that would be received by the recipient in local decimals\n * )\n */\n async quoteOft(\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<[OftLimit, OftFeeDetail[], bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::quote_oft`,\n functionArgs: [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n })\n console.log(`quoteOft view: ${JSON.stringify(view)}`)\n return view[0] as [OftLimit, OftFeeDetail[], bigint, bigint]\n }\n\n /**\n * Quote the network fees for a particular send\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param userSender sender oapp address\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param payInZro whether to pay in ZRO or not\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns (native_fee, zro_fee)\n */\n async quoteSend(\n userSender: string,\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n payInZro = false,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::quote_send`,\n functionArgs: [userSender, dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, payInZro],\n functionArgTypes: [\n 'address',\n 'u32',\n 'vector<u8>',\n 'u64',\n 'u64',\n 'vector<u8>',\n 'vector<u8>',\n 'vector<u8>',\n 'bool',\n ],\n })\n return view[0] as [bigint, bigint]\n }\n\n /**\n * The address of the OFT token\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns token address or null if it is a Coin\n */\n async token(): Promise<string | null> {\n if (this.cachedToken !== undefined) {\n return this.cachedToken\n }\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::token`,\n functionArgs: [],\n functionArgTypes: [],\n })\n this.cachedToken = view[0] as string\n return this.cachedToken\n } catch (e) {\n // throw ENOT_IMPLEMENTED means is a Coin\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n this.cachedToken = null\n return this.cachedToken\n }\n throw e\n }\n }\n\n /**\n * The metadata object of the OFT\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns CoinInfo or Metadata\n */\n async metadata(): Promise<Metadata> {\n if (await this.isCoin()) {\n const implModule = this.getImplModule()\n const coin = this.coin ?? `${implModule[0]}::${implModule[1]}::PlaceholderCoin`\n const res = await this.sdk.getAccountResource<Metadata>({\n accountAddress: implModule[0],\n resourceType: `0x1::coin::CoinInfo<${coin}>`,\n })\n return res\n } else {\n const token = (await this.token())!\n const res = await this.sdk.viewFunction({\n functionName: `0x1::fungible_asset::metadata`,\n functionArgs: [token],\n functionArgTypes: ['address'],\n typeArgs: ['0x1::fungible_asset::Metadata'],\n })\n return res[0] as Metadata\n }\n }\n\n /**\n * Check whether the OFT is a Coin or not\n *\n * @returns true is coin, false is not\n */\n async isCoin(): Promise<boolean> {\n if (!this.sdk.supportsCoin()) {\n return false\n }\n if (this.cachedIsCoin === undefined) {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::send_standards_supported`,\n functionArgs: [],\n functionArgTypes: [],\n })\n const supported = view[0] as string[]\n this.cachedIsCoin = Buffer.from(trim0x(supported[0]), 'hex').toString('utf8') === CoinStandard\n }\n return this.cachedIsCoin\n }\n\n /**\n * Get the balance of the specific address\n *\n * @param address account address\n * @returns account balance\n */\n async balanceOf(address: string): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::balance`,\n functionArgs: [address],\n functionArgTypes: ['address'],\n })\n return BigInt(view[0] as string)\n }\n\n /**\n * debit view\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns (\n * amount_sent_ld amount sent in local decimals\n * amount_received_ld amount received in local decimals\n * )\n */\n async debitView(amountLd: bigint, minAmountLd: bigint, dstEid: number): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::debit_view`,\n functionArgs: [amountLd, minAmountLd, dstEid],\n functionArgTypes: ['u64', 'u64', 'u32'],\n })\n return view[0] as [bigint, bigint]\n }\n\n /**\n * Convert an amount from shared decimals to local decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountSd original amount in shared decimals\n * @returns amount in local decimals\n */\n async toLd(amountSd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::to_ld`,\n functionArgs: [amountSd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Convert an amount from local decimals to shared decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount in local decimals\n * @returns amount in shared decimals\n */\n async toSd(amountLd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::to_sd`,\n functionArgs: [amountLd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Remove dust from the amount in local decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount in local decimals\n * @returns dust removed amount in local decimals\n */\n async removeDust(amountLd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::remove_dust`,\n functionArgs: [amountLd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Get The multiplier which can convert a local decimals to a shared decimals representation\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns decimal conversion rate\n */\n async decimalConversionRate(): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::decimal_conversion_rate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as bigint\n }\n\n /**\n * Encode an OFT message\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param sender sender oapp address\n * @param amountLd amount to send in local decimals\n * @param to dst oapp address in Uint8Array\n * @param composeMsg compose message to send in Uint8Array\n * @returns (\n * encoded_msg: The encoded message\n * msg_type: (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * )\n */\n async encodeOftMsg(\n sender: string,\n amountLd: bigint,\n to: Uint8Array,\n composeMsg: Uint8Array\n ): Promise<[Uint8Array, number]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::encode_oft_msg`,\n functionArgs: [sender, amountLd, to, composeMsg],\n functionArgTypes: ['address', 'u64', 'vector<u8>', 'vector<u8>'],\n })\n return view[0] as [Uint8Array, number]\n }\n\n /**\n * Get the escrow address for the OFT\n *\n * @returns escrow address, or null if it is not in adapter mode\n */\n async escrowAddress(): Promise<string | null> {\n const implModule = this.getImplModule()\n if (this.isAdapter) {\n const view = await this.sdk.viewFunction({\n functionName: `${implModule[0]}::${implModule[1]}::escrow_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n return null\n }\n\n // entry functions\n\n /**\n * Initialize the OFT, must be called before wiring\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/implementations/*.move\n *\n * @param signer account to initialize the OFT\n * @param tokenInfo token information\n * @param tokenInfo.tokenName (optional) required only for oft_fa / oft_coin\n * @param tokenInfo.tokenAddress (optional) required only for oft_adapter_fa\n * @param tokenInfo.symbol (optional) required only for oft_fa / oft_coin\n * @param tokenInfo.iconUri (optional) required only for oft_fa, default is ''\n * @param tokenInfo.projectUri (optional) required only for oft_fa, default is ''\n * @param tokenInfo.sharedDecimals required for all kinds of oft, default is 6\n * @param tokenInfo.localDecimals (optional) required only for oft_fa / oft_coin, default is 8\n * @param tokenInfo.monitorSupply (optional) required only for oft_coin, default is false\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of initialize function\n */\n async initialize(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n tokenInfo: OftTokenInfo,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n const {\n tokenName,\n symbol,\n iconUri = '',\n projectUri = '',\n sharedDecimals = DefaultSharedDecimals,\n localDecimals = DefaultLocalDecimals,\n monitorSupply = false,\n tokenAddress,\n } = tokenInfo\n const implModule = this.getImplModule()\n const isCoin = await this.isCoin()\n let params: EntryFunctionArgumentTypes[]\n let paramTypes: string[]\n if (isCoin && this.isAdapter) {\n // for oft_adapter_coin\n params = [sharedDecimals]\n paramTypes = ['u8']\n } else if (isCoin && !this.isAdapter) {\n // for oft_coin\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n sharedDecimals,\n localDecimals,\n monitorSupply,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'u8', 'u8', 'bool']\n } else if (!isCoin && this.isAdapter) {\n // for oft_adapter_fa\n assert.ok(tokenAddress, 'tokenAddress is required for oft_adapter_fa')\n params = [tokenAddress, sharedDecimals]\n paramTypes = ['address', 'u8']\n } else {\n // for oft_fa\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n Uint8Array.from(Buffer.from(iconUri, 'utf-8')),\n Uint8Array.from(Buffer.from(projectUri, 'utf-8')),\n sharedDecimals,\n localDecimals,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u8', 'u8']\n }\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${implModule[0]}::${implModule[1]}::initialize`,\n params,\n paramTypes,\n gasOptions\n )\n }\n\n /**\n * Initialize the OFT, must be called before wiring\n * @see {@link initialize}\n *\n * @param tokenInfo token information\n * @returns payload of initialize function\n */\n async initializePayload(tokenInfo: OftTokenInfo): Promise<InputEntryFunctionData> {\n const {\n tokenName,\n symbol,\n iconUri = '',\n projectUri = '',\n sharedDecimals = DefaultSharedDecimals,\n localDecimals = DefaultLocalDecimals,\n monitorSupply = false,\n tokenAddress,\n } = tokenInfo\n const isCoin = await this.isCoin()\n const implModule = this.getImplModule()\n let params: EntryFunctionArgumentTypes[]\n let paramTypes: string[]\n if (isCoin && this.isAdapter) {\n // for oft_adapter_coin\n params = [sharedDecimals]\n paramTypes = ['u8']\n } else if (isCoin && !this.isAdapter) {\n // for oft_coin\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n sharedDecimals,\n localDecimals,\n monitorSupply,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'u8', 'u8', 'bool']\n } else if (!isCoin && this.isAdapter) {\n // for oft_adapter_fa\n assert.ok(tokenAddress, 'tokenAddress is required for oft_adapter_fa')\n params = [tokenAddress, sharedDecimals]\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n console.log(`oft adapter fa params: ${params}`)\n paramTypes = ['address', 'u8']\n } else {\n // for oft_fa\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n Uint8Array.from(Buffer.from(iconUri, 'utf-8')),\n Uint8Array.from(Buffer.from(projectUri, 'utf-8')),\n sharedDecimals,\n localDecimals,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u8', 'u8']\n }\n return {\n function: `${implModule[0]}::${implModule[1]}::initialize`,\n functionArguments: params,\n functionArgumentTypes: paramTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Send from an account to a recipient on another EID, deducting the fees and the amount to send from the sender's\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param nativeFee native fee\n * @param zroFee zro fee\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns payload of send_withdraw or send_withdraw_coin function\n */\n async sendPayload(\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n nativeFee: bigint,\n zroFee: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<InputEntryFunctionData> {\n return {\n function: (await this.isCoin())\n ? `${this.module[0]}::${this.module[1]}::send_withdraw_coin`\n : `${this.module[0]}::${this.module[1]}::send_withdraw`,\n functionArguments: [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, nativeFee, zroFee],\n functionArgumentTypes: [\n 'u32',\n 'vector<u8>',\n 'u64',\n 'u64',\n 'vector<u8>',\n 'vector<u8>',\n 'vector<u8>',\n 'u64',\n 'u64',\n ],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Send from an account to a recipient on another EID, deducting the fees and the amount to send from the sender's\n * @see {@link sendPayload}\n *\n * @param signer oapp account\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param nativeFee native fee\n * @param zroFee zro fee\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of send_withdraw or send_withdraw_coin function\n */\n async send(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n nativeFee: bigint,\n zroFee: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n (await this.isCoin())\n ? `${this.module[0]}::${this.module[1]}::send_withdraw_coin`\n : `${this.module[0]}::${this.module[1]}::send_withdraw`,\n [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, nativeFee, zroFee],\n ['u32', 'vector<u8>', 'u64', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u64', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Claim provides a way to retreive tokens that could not be delivered because, at the time of delivery, the\n * account wasn't registered to receive that amount (relevant for Coin-enabled implementations)\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns payload of claim function\n */\n claimPayload(): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::claim`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Claim provides a way to retreive tokens that could not be delivered because, at the time of delivery, the\n * account wasn't registered to receive that amount (relevant for Coin-enabled implementations)\n * @see {@link claimPayload}\n *\n * @param signer oapp account\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of claim function\n */\n async claim(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::claim`,\n [],\n [],\n gasOptions\n )\n }\n\n /**\n * Set the OApp configuration for a Message Library\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param msgLib Message Library address\n * @param configType (CONFIG_TYPE_EXECUTOR=1, CONFIG_TYPE_SEND_ULN=2, CONFIG_TYPE_RECV_ULN=3)\n * @param config configuration in Uint8Array format. (struct UlnConfig or ExecutorConfig)\n * @returns payload of set_config function\n */\n setConfigPayload(msgLib: string, configType: number, config: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_config`,\n functionArguments: [msgLib, configType, config],\n functionArgumentTypes: ['address', 'u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the OApp configuration for a Message Library\n * @see {@link setConfigPayload}\n *\n * @param signer oapp account or delegate account\n * @param msgLib Message Library address\n * @param configType (CONFIG_TYPE_EXECUTOR=1, CONFIG_TYPE_SEND_ULN=2, CONFIG_TYPE_RECV_ULN=3)\n * @param config configuration in Uint8Array format. (struct UlnConfig or ExecutorConfig)\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_config function\n */\n async setConfig(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n msgLib: string,\n configType: number,\n config: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_config`,\n [msgLib, configType, config],\n ['address', 'u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Set the Send Library for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @returns payload of set_send_library function\n */\n setSendLibraryPayload(remoteEid: number, msgLib: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_send_library`,\n functionArguments: [remoteEid, msgLib],\n functionArgumentTypes: ['u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Send Library for an OApp\n * @see {@link setSendLibraryPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_send_library function\n */\n async setSendLibrary(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_send_library`,\n [remoteEid, msgLib],\n ['u32', 'address'],\n gasOptions\n )\n }\n\n /**\n * Set the Receive Library for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gracePeriod The block number at which the grace period expires in u64\n * @returns payload of set_receive_library function\n */\n setReceiveLibraryPayload(remoteEid: number, msgLib: string, gracePeriod: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library`,\n functionArguments: [remoteEid, msgLib, gracePeriod],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Receive Library for an OApp\n * @see {@link setReceiveLibraryPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gracePeriod The block number at which the grace period expires in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_receive_library function\n */\n async setReceiveLibrary(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n gracePeriod: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library`,\n [remoteEid, msgLib, gracePeriod],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Update the Receive Library Expiry for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param expiry The block number at which the timeout expires in u64\n * @returns payload of set_receive_library_timeout function\n */\n setReceiveLibraryTimeoutPayload(remoteEid: number, msgLib: string, expiry: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library_timeout`,\n functionArguments: [remoteEid, msgLib, expiry],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Update the Receive Library Expiry for an OApp\n * @see {@link setReceiveLibraryTimeoutPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param expiry The block number at which the timeout expires in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_receive_library_timeout function\n */\n async setReceiveLibraryTimeout(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n expiry: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library_timeout`,\n [remoteEid, msgLib, expiry],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Register a Receive Pathway for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param srcOapp Source OApp address\n * @returns payload of register_receive_pathway function\n */\n registerReceivePathwayPayload(srcEid: number, srcOapp: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::register_receive_pathway`,\n functionArguments: [srcEid, srcOapp],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Register a Receive Pathway for an OApp\n * @see {@link registerReceivePathwayPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param srcOapp Source OApp address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of register_receive_pathway function\n */\n async registerReceivePathway(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n srcOapp: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::register_receive_pathway`,\n [srcEid, srcOapp],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Set the Enforced Options for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType Message type identifier\n * @param enforcedOptions Enforced options in Uint8Array format\n * @returns payload of set_enforced_options function\n */\n setEnforcedOptionsPayload(eid: number, msgType: number, enforcedOptions: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_enforced_options`,\n functionArguments: [eid, msgType, enforcedOptions],\n functionArgumentTypes: ['u32', 'u16', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Enforced Options for an OApp\n * @see {@link setEnforcedOptionsPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType Message type identifier\n * @param enforcedOptions Enforced options in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_enforced_options function\n */\n async setEnforcedOptions(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n msgType: number,\n enforcedOptions: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_enforced_options`,\n [eid, msgType, enforcedOptions],\n ['u32', 'u16', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Transfer the Admin role to a new address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param newAdmin New admin address\n * @returns payload of transfer_admin function\n */\n transferAdminPayload(newAdmin: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::transfer_admin`,\n functionArguments: [newAdmin],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Transfer the Admin role to a new address\n * @see {@link transferAdminPayload}\n *\n * @param signer oapp account\n * @param newAdmin New admin address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of transfer_admin function\n */\n async transferAdmin(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n newAdmin: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::transfer_admin`,\n [newAdmin],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * renounce current admin\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns payload of renounce_admin function\n */\n renounceAdminPayload(): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::renounce_admin`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * renounce current admin\n * @see {@link renounceAdminPayload}\n *\n * @param signer admin account\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of renounce_admin function\n */\n async renounceAdmin(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::renounce_admin`,\n [],\n [],\n gasOptions\n )\n }\n\n /**\n * Set the Peer for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @returns payload of set_peer function\n */\n setPeerPayload(eid: number, peer: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n functionArguments: [eid, peer],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Peer for an OApp\n * @see {@link setPeerPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_peer function\n */\n async setPeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n peer: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n [eid, peer],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Remove the Peer for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @returns payload of remove_peer function\n */\n removePeerPayload(eid: number): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::remove_peer`,\n functionArguments: [eid],\n functionArgumentTypes: ['u32'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Remove the Peer for an OApp\n * @see {@link removePeerPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of remove_peer function\n */\n async removePeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::remove_peer`,\n [eid],\n ['u32'],\n gasOptions\n )\n }\n\n /**\n * Set the delegate address for the OApp - set to @0x0 to remove the delegate\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param delegate Delegate address\n * @returns payload of set_delegate function\n */\n setDelegatePayload(delegate: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_delegate`,\n functionArguments: [delegate],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the delegate address for the OApp - set to @0x0 to remove the delegate\n * @see {@link setDelegatePayload}\n *\n * @param signer admin account\n * @param delegate Delegate address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_delegate function\n */\n async setDelegate(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n delegate: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_delegate`,\n [delegate],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * Receive a LayerZero message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_receive.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param extraData Additional data in Uint8Array format\n * @returns payload of lz_receive function\n */\n lzReceivePayload(\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n extraData: Uint8Array\n ): InputEntryFunctionData {\n return {\n function: `${this.oappReceiveModule[0]}::${this.oappReceiveModule[1]}::lz_receive`,\n functionArguments: [srcEid, sender, nonce, guid, message, extraData],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Receive a LayerZero message for an OApp\n * @see {@link lzReceivePayload}\n *\n * @param signer oapp receiver account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param extraData Additional data in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of lz_receive function\n */\n async lzReceive(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n extraData: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappReceiveModule[0]}::${this.oappReceiveModule[1]}::lz_receive`,\n [srcEid, sender, nonce, guid, message, extraData],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Clear a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @returns payload of clear function\n */\n clearPayload(\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array\n ): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::clear`,\n functionArguments: [srcEid, sender, nonce, guid, message],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Clear a message for an OApp\n * @see {@link clearPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of clear function\n */\n async clear(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::clear`,\n [srcEid, sender, nonce, guid, message],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Skip a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @returns payload of skip function\n */\n skipPayload(srcEid: number, sender: Uint8Array, nonce: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::skip`,\n functionArguments: [srcEid, sender, nonce],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Skip a message for an OApp\n * @see {@link skipPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of skip function\n */\n async skip(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::skip`,\n [srcEid, sender, nonce],\n ['u32', 'vector<u8>', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Burn a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @returns payload of burn function\n */\n burnPayload(srcEid: number, sender: Uint8Array, nonce: bigint, payloadHash: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::burn`,\n functionArguments: [srcEid, sender, nonce, payloadHash],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Burn a message for an OApp\n * @see {@link burnPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of burn function\n */\n async burn(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n payloadHash: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::burn`,\n [srcEid, sender, nonce, payloadHash],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Nilify a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @returns payload of nilify function\n */\n nilifyPayload(srcEid: number, sender: Uint8Array, nonce: bigint, payloadHash: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::nilify`,\n functionArguments: [srcEid, sender, nonce, payloadHash],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Nilify a message for an OApp\n * @see {@link nilifyPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of nilify function\n */\n async nilify(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n payloadHash: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::nilify`,\n [srcEid, sender, nonce, payloadHash],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n gasOptions\n )\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData, MoveAbortError, MoveResourceNotFoundError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ArbitrumPriceTraits, Price, UpdatePrice, serializeUpdatePrices } from '../types'\n\n/**\n * This is the PriceFeed SDK that provides initialization and view functions for the PriceFeed contract.\n * @template AccountType - The type of the account.\n */\nexport class PriceFeed<AccountType> {\n module: string[]\n /**\n * Creates an instance of PriceFeed SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.price_feed?.toString() ?? '0x0', 'feeds']\n }\n\n /**\n * Creates a payload for initializing the price feed.\n *\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createInitializeFeedPayload(): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::initialize`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the price feed is initialized.\n *\n * @param {string} feedAddress - The feed address.\n * @returns {Promise<boolean>} True if the price feed is initialized, false otherwise.\n */\n async isInitialize(feedAddress: string): Promise<boolean> {\n try {\n const resource = await this.sdk.getAccountResource<{ denominator: bigint }>({\n accountAddress: feedAddress,\n resourceType: `${this.module[0]}::feeds::Feed`,\n })\n const { denominator } = resource\n return denominator !== BigInt(0)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the price.\n *\n * @param {string} feedAddress - The feed address.\n * @param {UpdatePrice[]} prices - The list of prices to update.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetPricePayload(feedAddress: string, prices: UpdatePrice[]): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price`,\n functionArguments: [feedAddress, serializeUpdatePrices(prices)],\n functionArgumentTypes: ['address', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price for the specified feed address and destination endpoint ID.\n *\n * @param {string} feedAddress - The feed address.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<Price>} The price information.\n */\n async getPrice(feedAddress: string, dstEid: EndpointId): Promise<Price> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_price`,\n functionArgs: [feedAddress, dstEid],\n functionArgTypes: ['address', 'u32'],\n })\n\n const viewResponse = view[0] as [bigint, bigint, number]\n const priceRatio = viewResponse[0]\n const gasPriceInUnit = viewResponse[1]\n const gasPerByte = viewResponse[2]\n\n return {\n priceRatio,\n gasPriceInUnit,\n gasPerByte,\n } satisfies Price\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 2 || e.abortCode === 1)) {\n return {\n priceRatio: BigInt(0),\n gasPriceInUnit: BigInt(0),\n gasPerByte: 0,\n } satisfies Price\n }\n throw e\n }\n }\n\n /**\n * Checks if the specified updater is valid for the given feed.\n *\n * @param {string} updater - The updater address.\n * @param {string} feed - The feed address.\n * @returns {Promise<boolean>} True if the updater is valid, false otherwise.\n */\n async updaterIsValid(updater: string, feed: string): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_price_updater`,\n functionArgs: [updater, feed],\n functionArgTypes: ['address', 'address'],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for enabling a feed updater.\n *\n * @param {string} updater - The updater address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createEnableFeedUpdaterPayload(updater: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::enable_feed_updater`,\n functionArguments: [updater],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for disabling a feed updater.\n *\n * @param {string} updater - The updater address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createDisableFeedUpdaterPayload(updater: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::disable_feed_updater`,\n functionArguments: [updater],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the price ratio denominator.\n *\n * @param {bigint} denominator - The price ratio denominator.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDenominatorPayload(denominator: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_denominator`,\n functionArguments: [denominator],\n functionArgumentTypes: ['u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price ratio denominator for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The price ratio denominator.\n */\n async getPriceRatioDenominator(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_price_ratio_denominator`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the Arbitrum compression percent.\n *\n * @param {bigint} percent - The compression percent.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetArbitrumCompressionPercentPayload(percent: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_arbitrum_compression_percent`,\n functionArguments: [percent],\n functionArgumentTypes: ['u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the Arbitrum compression percent for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The Arbitrum compression percent.\n */\n async getArbitrumCompressionPercent(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_arbitrum_compression_percent`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the Arbitrum traits.\n *\n * @param {string} feed - The feed address.\n * @param {bigint} gasPerL2Tx - The gas per L2 transaction.\n * @param {bigint} gasPerL1CalldataByte - The gas per L1 calldata byte.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetArbitrumTraitsPayload(\n feed: string,\n gasPerL2Tx: bigint,\n gasPerL1CalldataByte: bigint\n ): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_arbitrum_traits`,\n functionArguments: [feed, gasPerL2Tx, gasPerL1CalldataByte],\n functionArgumentTypes: ['address', 'u128', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the Arbitrum price traits for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<ArbitrumPriceTraits>} The Arbitrum price traits.\n */\n async getArbitrumPriceTraits(feed: string): Promise<ArbitrumPriceTraits> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_arbitrum_price_traits`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n const viewResponse = view[0] as [string, string]\n const arbitrumGasPerL2Tx = BigInt(viewResponse[0])\n const arbitrumGasPerL1CalldataByte = BigInt(viewResponse[1])\n return {\n arbitrumGasPerL2Tx,\n arbitrumGasPerL1CalldataByte,\n } satisfies ArbitrumPriceTraits\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return {\n arbitrumGasPerL2Tx: BigInt(0),\n arbitrumGasPerL1CalldataByte: BigInt(0),\n } satisfies ArbitrumPriceTraits\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the native token price in USD.\n *\n * @param {string} feed - The feed address.\n * @param {bigint} nativeTokenPriceUsd - The native token price in USD.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetNativeTokenPriceUsdPayload(feed: string, nativeTokenPriceUsd: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_native_token_price_usd`,\n functionArguments: [feed, nativeTokenPriceUsd],\n functionArgumentTypes: ['address', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the native token price in USD for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The native token price in USD.\n */\n async getNativeTokenPriceUsd(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_native_token_price_usd`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n}\n","import {\n InputEntryFunctionData,\n MnemonicAndPath,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the SimpleMsgLib SDK that provides functions for interacting with the Simple Message Library contract.\n * @template AccountType - The type of the account.\n */\nexport class SimpleMsgLib<AccountType> {\n module: string[]\n /**\n * Creates an instance of SimpleMsgLib SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.simple_message_lib?.toString() ?? '0x0', 'msglib']\n }\n\n /**\n * Gets the address of the Simple Message Library contract.\n *\n * @returns {string} The address of the Simple Message Library contract.\n */\n getAddress(): string {\n return this.module[0]\n }\n\n /**\n * Creates a payload for setting the messaging fee.\n *\n * @param {bigint} nativeFee - The native fee.\n * @param {bigint} lzTokenFee - The LayerZero token fee.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetMessagingFeePayload(nativeFee: bigint, lzTokenFee: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_messaging_fee`,\n functionArguments: [nativeFee, lzTokenFee],\n functionArgumentTypes: ['u64', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the messaging fee.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {bigint} fee - The native fee.\n * @param {bigint} lz - The LayerZero token fee.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setMessagingFee(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n fee: bigint,\n lz: bigint\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::set_messaging_fee`,\n [fee, lz],\n ['u64', 'u64']\n )\n }\n\n /**\n * Gets the messaging fee.\n *\n * @returns {Promise<[bigint, bigint]>} A promise that resolves to a tuple containing the native fee and the LayerZero token fee.\n */\n async getMessagingFee(): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_messaging_fee`,\n functionArgs: [],\n })\n return view[0] as [bigint, bigint]\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport {\n ExecutorConfig,\n ExecutorConfigResponse,\n UlnConfig,\n UlnConfigResponse,\n VERIFICATION_STATE,\n verificationStateValueOf,\n} from '../types'\n\n/**\n * This is the Uln302 SDK that provides functions for interacting with the ULN 302 contract.\n * @template AccountType - The type of the account.\n */\nexport class Uln302<AccountType> {\n module: string[]\n adminModule: string[]\n uln302StoreModule: string[]\n /**\n * Creates an instance of Uln302 SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'msglib']\n this.adminModule = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'admin']\n this.uln302StoreModule = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'uln_302_store']\n }\n\n private emptyUlnConfig: UlnConfig = {\n confirmations: BigInt(0),\n optionalDVNThreshold: 0,\n requiredDVNs: [],\n optionalDVNs: [],\n useDefaultForConfirmations: false,\n useDefaultForRequiredDVNs: false,\n useDefaultForOptionalDVNs: false,\n }\n private emptyExecutorConfig: ExecutorConfig = {\n maxMessageSize: 0,\n executorAddress: '',\n }\n\n /**\n * Gets the address of the ULN 302 contract.\n *\n * @returns {string} The address of the ULN 302 contract.\n */\n getAddress(): string {\n return this.module[0]\n }\n\n // View functions\n\n /**\n * Gets the default ULN send configuration for the specified destination endpoint ID.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<UlnConfig>} The default ULN send configuration.\n */\n async getDefaultUlnSendConfig(dstEid: EndpointId): Promise<UlnConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_uln_send_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyUlnConfig\n }\n return this.parseUlnConfig(view[0] as UlnConfigResponse)\n }\n\n /**\n * Gets the default ULN receive configuration for the specified source endpoint ID.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @returns {Promise<UlnConfig>} The default ULN receive configuration.\n */\n async getDefaultUlnReceiveConfig(srcEid: EndpointId): Promise<UlnConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_uln_receive_config`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyUlnConfig\n }\n return this.parseUlnConfig(view[0] as UlnConfigResponse)\n }\n\n /**\n * Gets the default executor configuration for the specified source endpoint ID.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @returns {Promise<ExecutorConfig>} The default executor configuration.\n */\n async getDefaultExecutorConfig(srcEid: EndpointId): Promise<ExecutorConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_executor_config`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyExecutorConfig\n }\n return this.parseExecutorConfig(view[0] as ExecutorConfigResponse)\n }\n\n /**\n * Gets the opt in/out status of a worker\n * @param workerAddress - The worker address\n * @returns {Promise<boolean>} The opt in/out status of the worker\n */\n async getWorkerConfigForFeeLibRoutingOptIn(workerAddress: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::worker_config_for_fee_lib_routing_opt_in`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Creates a payload for setting the default ULN send configuration.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {UlnConfig} ulnConfig - The ULN configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultUlnSendConfigPayload(dstEid: EndpointId, ulnConfig: UlnConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_uln_send_config`,\n functionArguments: [\n dstEid,\n ulnConfig.confirmations,\n ulnConfig.optionalDVNThreshold,\n ulnConfig.requiredDVNs,\n ulnConfig.optionalDVNs,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u8', 'vector<address>', 'vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the default ULN receive configuration.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @param {UlnConfig} ulnConfig - The ULN configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultUlnReceiveConfigPayload(srcEid: EndpointId, ulnConfig: UlnConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_uln_receive_config`,\n functionArguments: [\n srcEid,\n ulnConfig.confirmations,\n ulnConfig.optionalDVNThreshold,\n ulnConfig.requiredDVNs,\n ulnConfig.optionalDVNs,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u8', 'vector<address>', 'vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the default executor configuration.\n *\n * @param {EndpointId} eid - The endpoint ID.\n * @param {ExecutorConfig} executorConfig - The executor configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultExecutorConfigPayload(eid: EndpointId, executorConfig: ExecutorConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_executor_config`,\n functionArguments: [eid, executorConfig.maxMessageSize, executorConfig.executorAddress],\n functionArgumentTypes: ['u32', 'u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the worker config for fee lib routing opt in\n * @param optIn\n */\n createSetWorkerConfigForFeeLibRoutingOptInPayload(optIn: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_worker_config_for_fee_lib_routing_opt_in`,\n functionArguments: [optIn],\n functionArgumentTypes: ['bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Parses the ULN configuration response.\n *\n * @param {UlnConfigResponse} ulnConfigResponse - The ULN configuration response.\n * @returns {UlnConfig} The parsed ULN configuration.\n */\n private parseUlnConfig(ulnConfigResponse: UlnConfigResponse): UlnConfig {\n return {\n confirmations: ulnConfigResponse.confirmations,\n optionalDVNThreshold: ulnConfigResponse.optional_dvn_threshold,\n requiredDVNs: ulnConfigResponse.required_dvns,\n optionalDVNs: ulnConfigResponse.optional_dvns,\n useDefaultForConfirmations: ulnConfigResponse.use_default_for_confirmations,\n useDefaultForOptionalDVNs: ulnConfigResponse.use_default_for_optional_dvns,\n useDefaultForRequiredDVNs: ulnConfigResponse.use_default_for_required_dvns,\n } satisfies UlnConfig\n }\n\n /**\n * Parses the executor configuration response.\n *\n * @param {ExecutorConfigResponse} executorConfigResponse - The executor configuration response.\n * @returns {ExecutorConfig} The parsed executor configuration.\n */\n private parseExecutorConfig(executorConfigResponse: ExecutorConfigResponse): ExecutorConfig {\n return {\n maxMessageSize: executorConfigResponse.max_message_size,\n executorAddress: executorConfigResponse.executor_address,\n } satisfies ExecutorConfig\n }\n}\n\n/**\n * This is the Views SDK that provides functions for interacting with the ULN 302 contract views.\n * @template AccountType - The type of the account.\n */\nexport class Views<AccountType> {\n module: string\n\n /**\n * Creates an instance of Views SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = sdk.accounts.layerzero_views?.toString() ?? '0x0'\n }\n\n /**\n * Checks if the packet is verifiable.\n *\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} payloadHash - The payload hash.\n * @returns {Promise<VERIFICATION_STATE>} The verification state.\n */\n async verifiable(packetHeader: Uint8Array, payloadHash: Uint8Array): Promise<VERIFICATION_STATE> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module}::uln_302::verifiable`,\n functionArgs: [packetHeader, payloadHash],\n functionArgTypes: ['vector<u8>', 'vector<u8>'],\n })\n\n const state = view[0] as number\n return verificationStateValueOf(state)\n }\n}\n","import { MoveAbortError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the WorkerCommon SDK that provides functions for interacting with the Worker Common contract.\n * @template AccountType - The type of the account.\n */\nexport class WorkerCommon<AccountType> {\n workerConfigModule: string[]\n workerConfigStoreModule: string[]\n\n /**\n * Creates an instance of WorkerCommon SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.workerConfigModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config']\n this.workerConfigStoreModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config_store']\n }\n\n /**\n * Gets the worker price feed configuration.\n *\n * @param {string} workerAddress - The worker address.\n * @returns {Promise<WorkerPriceFeedConfig>} The worker price feed configuration.\n */\n async getWorkerPriceFeedConfig(workerAddress: string): Promise<WorkerPriceFeedConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.workerConfigModule[0]}::${this.workerConfigModule[1]}::get_worker_price_feed_config`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n const viewResponse = view[0] as [string, string]\n\n return {\n PriceFeed: viewResponse[0],\n FeedAddress: viewResponse[1],\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 8)) {\n return {\n PriceFeed: '',\n FeedAddress: '',\n }\n }\n throw e\n }\n }\n\n /**\n * Gets the price feed delegate for the specified worker address.\n *\n * @param {string} workerAddress - The worker address.\n * @returns {Promise<string>} The price feed delegate address.\n */\n async getPriceFeedDelegate(workerAddress: string): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.workerConfigModule[0]}::${this.workerConfigModule[1]}::get_price_feed_delegate`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n}\n","import { MoveSdkImpl } from '../base'\n\nimport { Counter } from './counter'\nimport { DvnWorker } from './dvn-worker'\nimport { Endpoint } from './endpoint'\nimport { EndpointCommon } from './endpoint-common'\nimport { Executor } from './executor'\nimport { Oft } from './oft'\nimport { PriceFeed } from './pricefeed'\nimport { SimpleMsgLib } from './simple-message-lib'\nimport { Uln302, Views } from './uln302'\nimport { WorkerCommon } from './worker-common'\n\nexport class LayerZeroModulesSdk<AccountType> {\n Endpoint: Endpoint<AccountType>\n Uln: Uln302<AccountType>\n Views: Views<AccountType>\n SimpleMsgLib: SimpleMsgLib<AccountType>\n Executor: Executor<AccountType>\n DvnWorker: DvnWorker<AccountType>\n Counter: Counter<AccountType>\n Oft: Oft<AccountType>\n PriceFeed: PriceFeed<AccountType>\n WorkerCommon: WorkerCommon<AccountType>\n EndpointV2Common: EndpointCommon<AccountType>\n\n constructor(sdk: MoveSdkImpl<AccountType>) {\n this.Endpoint = new Endpoint(sdk)\n this.Uln = new Uln302(sdk)\n this.Views = new Views(sdk)\n this.Executor = new Executor(sdk)\n this.SimpleMsgLib = new SimpleMsgLib(sdk)\n this.DvnWorker = new DvnWorker(sdk)\n this.Counter = new Counter(sdk)\n this.Oft = new Oft(sdk)\n this.PriceFeed = new PriceFeed(sdk)\n this.WorkerCommon = new WorkerCommon(sdk)\n this.EndpointV2Common = new EndpointCommon(sdk)\n }\n}\n\nexport { Counter, Oft, DvnWorker, Endpoint, Executor, PriceFeed, Uln302, SimpleMsgLib }\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts","../src/types/uln.ts","../src/types/endpoint.ts","../src/types/serdes/uln_config_deserialize.ts","../src/types/serdes/update_price_serialize.ts","../src/modules/counter.ts","../src/modules/dvn-worker.ts","../src/modules/endpoint.ts","../src/modules/endpoint-common.ts","../src/modules/executor.ts","../src/modules/oft.ts","../src/modules/pricefeed.ts","../src/modules/simple-message-lib.ts","../src/modules/uln302.ts","../src/modules/worker-common.ts","../src/modules/index.ts"],"names":["VERIFICATION_STATE","ConfigType","trim0x","Deserializer","Serializer","addressToBytes32","arrayify","ensure0x","MoveResourceNotFoundError","MoveAbortError","padify","assert"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,aAAA,GAAA;AAAA,QAAA,CAAA,aAAA,EAAA;AAAA,EAAA,UAAA,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,YAAA,CAAa,GAAG,CAAA;AACxC,IAAK,IAAA,CAAA,gBAAA,GAAmB,IAAI,cAAA,CAAe,GAAG,CAAA;AAAA;AAEtD","file":"index.cjs","sourcesContent":["export * from './dvn'\nexport * from './executor'\nexport * from './uln'\nexport * from './endpoint'\nexport * from './pricefeed'\nexport * from './serdes'\nexport * from './worker-common'\nexport * from './oft'\n","/**\n * Interface representing the ULN configuration.\n */\nexport interface UlnConfig {\n /**\n * The number of confirmations.\n */\n confirmations: bigint\n\n /**\n * The optional DVN threshold.\n */\n optionalDVNThreshold: number\n\n /**\n * The required DVNs.\n */\n requiredDVNs: string[]\n\n /**\n * The optional DVNs.\n */\n optionalDVNs: string[]\n\n /**\n * Whether to use the default for confirmations.\n */\n useDefaultForConfirmations: boolean\n\n /**\n * Whether to use the default for required DVNs.\n */\n useDefaultForRequiredDVNs: boolean\n\n /**\n * Whether to use the default for optional DVNs.\n */\n useDefaultForOptionalDVNs: boolean\n}\n\n/**\n * Use to parse the ULN configuration response from the contract method,\n * Everyone who needs to use the ULN configuration should use @see UlnConfig instead of this.\n */\nexport interface UlnConfigResponse {\n confirmations: bigint\n optional_dvn_threshold: number\n required_dvns: string[]\n optional_dvns: string[]\n use_default_for_confirmations: boolean\n use_default_for_required_dvns: boolean\n use_default_for_optional_dvns: boolean\n}\n\n/**\n * Interface representing the executor configuration.\n */\nexport interface ExecutorConfig {\n /**\n * The maximum message size.\n */\n maxMessageSize: number\n\n /**\n * The executor address.\n */\n executorAddress: string\n}\n\n/**\n * Use to parse the Executor configuration response from the contract method,\n * Everyone who needs to use the Executor configuration should use @see ExecutorConfig instead of this.\n */\nexport interface ExecutorConfigResponse {\n max_message_size: number\n executor_address: string\n}\n\n/**\n * Enum representing the verification state.\n * @see packages/layerzero-v2/aptos/contracts/layerzero_views/sources/uln_302.move\n */\nexport enum VERIFICATION_STATE {\n STATE_VERIFYING = 0,\n STATE_VERIFIABLE = 1,\n STATE_VERIFIED = 2,\n STATE_NOT_INITIALIZABLE = 3,\n}\n\n/**\n * Gets the verification state value.\n *\n * @param {number} state - The state number.\n * @returns {VERIFICATION_STATE} The verification state.\n */\nexport function verificationStateValueOf(value: number): VERIFICATION_STATE {\n switch (value) {\n case 0:\n return VERIFICATION_STATE.STATE_VERIFYING\n case 1:\n return VERIFICATION_STATE.STATE_VERIFIABLE\n case 2:\n return VERIFICATION_STATE.STATE_VERIFIED\n case 3:\n return VERIFICATION_STATE.STATE_NOT_INITIALIZABLE\n default:\n throw new Error(`Invalid value for VERIFICATION_STATE: ${value}`)\n }\n}\n","/**\n * Enum representing the configuration types.\n */\nexport enum ConfigType {\n /**\n * Executor configuration type.\n */\n Executor = 1,\n\n /**\n * Send ULN configuration type.\n */\n sendUln = 2,\n\n /**\n * Receive ULN configuration type.\n */\n receiveUln = 3,\n}\n\n/**\n * Interface representing a timeout configuration.\n */\nexport interface Timeout {\n /**\n * The expiry time.\n */\n expiry: bigint\n\n /**\n * The prior library.\n */\n prior_lib: string\n}\n","import { Deserializer } from '@layerzerolabs/lz-serdes'\nimport { trim0x } from '@layerzerolabs/lz-utilities'\n\nimport { UlnConfig } from '../uln'\n\n/**\n * Deserializes the ULN configuration from a string or Uint8Array.\n *\n * @param {string | Uint8Array} data - The data to deserialize.\n * @returns {UlnConfig} The deserialized ULN configuration.\n */\nexport function deserializeUlnConfig(data: string | Uint8Array): UlnConfig {\n if (typeof data === 'string') {\n data = Uint8Array.from(Buffer.from(trim0x(data), 'hex'))\n }\n const deserializer = new Deserializer(data, false)\n const confirmations = deserializer.deserializeU64()\n const optionalDVNThreshold = deserializer.deserializeU8()\n const requiredDVNCount = deserializer.deserializeU8()\n const requiredDVNs: string[] = []\n for (let i = 0; i < requiredDVNCount; i++) {\n requiredDVNs.push(Buffer.from(deserializer.deserializeFixedBytes(32)).toString('hex'))\n }\n const optionalDVNCount = deserializer.deserializeU8()\n const optionalDVNs: string[] = []\n for (let i = 0; i < optionalDVNCount; i++) {\n optionalDVNs.push(Buffer.from(deserializer.deserializeFixedBytes(32)).toString('hex'))\n }\n const useDefaultForConfirmations = deserializer.deserializeU8() === 1\n const useDefaultForRequiredDVNs = deserializer.deserializeU8() === 1\n const useDefaultForOptionalDVNs = deserializer.deserializeU8() === 1\n return {\n confirmations,\n optionalDVNThreshold,\n requiredDVNs,\n optionalDVNs,\n useDefaultForConfirmations,\n useDefaultForRequiredDVNs,\n useDefaultForOptionalDVNs,\n }\n}\n","import { Serializer } from '@layerzerolabs/lz-serdes'\n\nimport { UpdatePrice } from '../pricefeed'\n\n/**\n * Serializes an array of UpdatePrice objects into a Uint8Array.\n *\n * @param {UpdatePrice[]} updatePrices - The array of UpdatePrice objects to serialize.\n * @returns {Uint8Array} The serialized data as a Uint8Array.\n */\nexport function serializeUpdatePrices(updatePrices: UpdatePrice[]): Uint8Array {\n const serializer = new Serializer(false)\n for (const updatePrice of updatePrices) {\n serializer.serializeU32(updatePrice.eid)\n serializer.serializeU128(updatePrice.priceRatio)\n serializer.serializeU64(updatePrice.gasPriceInUnit)\n serializer.serializeU32(updatePrice.gasPerByte)\n }\n return serializer.getBytes()\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { arrayify, ensure0x } from '@layerzerolabs/lz-utilities'\nimport { Packet, addressToBytes32 } from '@layerzerolabs/lz-v2-utilities'\nimport {\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveResourceNotFoundError,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the Counter SDK that provides send, lzReceive, LzCompose and view functions for the Counter contract.\n * @template AccountType - The type of the account.\n */\nexport class Counter<AccountType> {\n module: string[]\n oappCoreModule: string[]\n\n /**\n * Creates an instance of Counter SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.counter_v2?.toString() ?? '0x0', 'counter']\n this.oappCoreModule = [sdk.accounts.counter_v2?.toString() ?? '0x0', 'oapp_core']\n }\n\n /**\n * Create a payload of send contract function.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {number} type - The message type of the payload, @see {@link OmniCounterMsgType}.\n * @param {bigint} feeInNative - The fee in native currency.\n * @param {Uint8Array} options - Additional options for the payload.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n sendPayload(dstEid: EndpointId, type: number, feeInNative: bigint, options: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::send`,\n functionArguments: [dstEid, type, options, feeInNative],\n functionArgumentTypes: ['u32', 'u8', 'vector<u8>', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of set peer contract function.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {string} remoteOapp - The remote OAPP address.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n setPeerPayload(remoteEid: EndpointId, remoteOapp: string): InputEntryFunctionData {\n const remoteOappBytes32 = addressToBytes32(remoteOapp)\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n functionArguments: [remoteEid, remoteOappBytes32],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of lz receive contract function.\n *\n * @param {Packet} packet - The received packet.\n * @param {string} module - Remote OAPP module name.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n lzReceivePayload(packet: Packet, module: string): InputEntryFunctionData {\n const { receiver, srcEid, sender, nonce, guid, message } = packet\n return {\n function: `${receiver}::${module}::lz_receive`,\n functionArguments: [\n srcEid,\n arrayify(sender),\n BigInt(nonce),\n arrayify(guid),\n arrayify(message),\n new Uint8Array(), //unused field\n ],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Create a payload of lz compose contract function.\n *\n * @param {string} from - The sender address.\n * @param {string} to - The receiver address.\n * @param {Uint8Array} guid - The packet GUID.\n * @param {number} index - The message index.\n * @param {Uint8Array} message - The message.\n * @param {string} module - Remote OAPP module name.\n * @returns {InputEntryFunctionData} The input entry function data, use to build the transaction.\n */\n lzComposePayload(\n from: string,\n to: string,\n guid: Uint8Array,\n index: number,\n message: Uint8Array,\n module: string\n ): InputEntryFunctionData {\n return {\n function: `${to}::${module}::lz_compose`,\n functionArguments: [\n from,\n guid,\n index,\n message,\n new Uint8Array(), //unused field\n ],\n functionArgumentTypes: ['address', 'vector<u8>', 'u16', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sends a transaction to the specified endpoint.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {number} type - The type of the payload.\n * @param {bigint} feeInNative - The fee in native currency.\n * @param {Uint8Array} options - Additional options for the payload.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async send(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n dstEid: EndpointId,\n type: number,\n feeInNative: bigint,\n options: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::send`,\n [dstEid, type, options, feeInNative],\n ['u32', 'u8', 'vector<u8>', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Sets the peer for the specified remote endpoint.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {string} remoteOapp - The remote OAPP address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setPeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: EndpointId,\n remoteOapp: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n const remoteOappBytes32 = addressToBytes32(remoteOapp)\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n [remoteEid, remoteOappBytes32],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Gets the peer for the specified remote endpoint.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @returns {Promise<string>} The peer address, '' if not found.\n */\n async getPeer(remoteEid: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_peer`,\n functionArgs: [remoteEid],\n functionArgTypes: ['u32'],\n })\n const bytes = view[0] as string\n return ensure0x(bytes)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return ''\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the total inbound count.\n *\n * @returns {Promise<number>} The total inbound count, 0 if not found.\n */\n async getCount(): Promise<number> {\n try {\n const resource = await this.sdk.getAccountResource<{ total_inbound_count: number | string }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n const { total_inbound_count } = resource\n return Number(total_inbound_count)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Gets the compose count.\n *\n * @returns {Promise<number>} The compose count, 0 if not found.\n */\n async getComposeCount(): Promise<number> {\n try {\n const resource = await this.sdk.getAccountResource<{ compose_count: number | string }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n const { compose_count } = resource\n return Number(compose_count)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Checks if the counter is initialized.\n *\n * @returns {Promise<boolean>} True if the counter is initialized, false otherwise.\n */\n async isInitialized(): Promise<boolean> {\n try {\n await this.sdk.getAccountResource({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::counter::Counter`,\n })\n return true\n } catch (e) {\n return false\n }\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { arrayify, padify } from '@layerzerolabs/lz-utilities'\nimport { PacketV1Codec, trim0x } from '@layerzerolabs/lz-v2-utilities'\nimport {\n ByteCode,\n EntryFunctionArgumentTypes,\n InputEntryFunctionData,\n MoveAbortError,\n MoveFunction,\n MoveResourceNotFoundError,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { DVNDstConfig, WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the DvnWorker SDK that provides various functions for interacting with the DVN contract.\n * @template AccountType - The type of the account.\n */\nexport class DvnWorker<AccountType> {\n public readonly module: string[]\n public readonly workerStoreModule: string[]\n\n /**\n * Creates an instance of DvnWorker SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.dvn?.toString() ?? '0x0', 'dvn']\n this.workerStoreModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config_store']\n }\n\n /**\n * Gets the VID.\n * VID is endpointId % 30000.\n *\n * @returns {Promise<number>} The VID.\n */\n async getVid(): Promise<number> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_vid`,\n functionArgs: [],\n })\n return view[0] as number\n }\n\n /**\n * Creates a verify hash.\n *\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} payloadHash - The payload hash.\n * @param {bigint} confirmations - The number of confirmations.\n * @param {string} target - The target address.\n * @param {number} vid - The VID.\n * @param {bigint} expiration - The expiration time.\n * @returns {Promise<Uint8Array>} The verify hash.\n */\n async createVerifyHash(\n packetHeader: Uint8Array,\n payloadHash: Uint8Array,\n confirmations: bigint,\n target: string,\n vid: number,\n expiration: bigint\n ): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::hashes::create_verify_hash`,\n functionArgs: [packetHeader, payloadHash, confirmations, target, vid, expiration],\n functionArgTypes: ['vector<u8>', 'vector<u8>', 'u64', 'address', 'u32', 'u64'],\n })\n const hash = view[0] as { bytes: Uint8Array }\n return hash.bytes\n }\n\n /**\n * Creates a payload for initializing the DVN contract.\n *\n * @param {string[]} admins - The list of admin addresses.\n * @param {Uint8Array[]} dvnSigners - The list of DVN signer public keys.\n * @param {bigint} quorum - The quorum required for DVN operations.\n * @param {string[]} msglibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} depositAddress - The deposit address. Defaults to the DVN address.\n * @returns {Promise<InputEntryFunctionData>} The input entry function data, used to build the transaction.\n */\n async createInitializeDVNPayload(\n admins: string[],\n dvnSigners: Uint8Array[],\n quorum: bigint,\n msglibs: string[],\n feeLib: string,\n depositAddress?: string\n ): Promise<InputEntryFunctionData> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n admins,\n dvnSigners,\n quorum,\n msglibs,\n feeLib,\n ]\n let functionArgumentTypes = [\n 'address',\n 'vector<address>',\n 'vector<vector<u8>>',\n 'u64',\n 'vector<address>',\n 'address',\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeDvnScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msglibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n const dvnSignersU8Array = new Uint8Array(dvnSigners.flatMap((signer) => Array.from(signer)))\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n adminsU8Array,\n dvnSignersU8Array,\n quorum,\n msgLibsU8Array,\n feeLib,\n ]\n functionArgumentTypes = ['address', 'address', 'vector<u8>', 'vector<u8>', 'u64', 'vector<u8>', 'address']\n }\n return {\n function: functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the DVN contract is initialized.\n *\n * @returns {Promise<boolean>} True if the DVN contract is initialized, false otherwise.\n */\n async isInitialize(): Promise<boolean> {\n try {\n const resource = await this.sdk.getAccountResource<{ worker_id: number }>({\n accountAddress: this.module[0],\n resourceType: `${this.workerStoreModule[0]}::${this.workerStoreModule[1]}::WorkerStore`,\n })\n const { worker_id } = resource\n return worker_id !== 0\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Gets the destination configuration for the specified endpoint.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<DVNDstConfig>} The destination configuration.\n */\n async getDstConfig(dstEid: EndpointId): Promise<DVNDstConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_dst_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n const viewResponse = view[0] as [bigint, number, bigint]\n return {\n gas: viewResponse[0],\n multiplierBps: viewResponse[1],\n floorMarginUsd: viewResponse[2],\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 4 || e.abortCode === 5 || e.abortCode === 17)) {\n return {\n gas: BigInt(0),\n multiplierBps: 0,\n floorMarginUsd: BigInt(0),\n }\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the destination configuration.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {DVNDstConfig} dstConfig - The destination configuration.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDstConfigPayload(remoteEid: EndpointId, dstConfig: DVNDstConfig): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_dst_config`,\n functionArguments: [remoteEid, dstConfig.gas, dstConfig.multiplierBps, dstConfig.floorMarginUsd],\n functionArgumentTypes: ['u32', 'u64', 'u16', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the specified account is an admin.\n *\n * @param {string} account - The account address.\n * @returns {Promise<boolean>} True if the account is an admin, false otherwise.\n */\n async isAdmin(account: string): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_admin`,\n functionArgs: [account],\n functionArgTypes: ['address'],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting an admin.\n *\n * @param {string} admin - The admin address.\n * @param {boolean} active - The admin status.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetAdminPayload(admin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_admin`,\n functionArguments: [admin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the deposit address.\n *\n * @returns {Promise<string>} The deposit address, '' if not found.\n */\n async getDepositAddress(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_deposit_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the deposit address.\n *\n * @param {string} depositAddress - The deposit address.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDepositAddressPayload(depositAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_deposit_address`,\n functionArguments: [depositAddress],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed configuration of dvn.\n *\n * @returns {Promise<WorkerPriceFeedConfig>} The price feed configuration.\n */\n async getPriceFeed(): Promise<WorkerPriceFeedConfig> {\n return this.sdk.LayerzeroModule.WorkerCommon.getWorkerPriceFeedConfig(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed.\n *\n * @param {string} priceFeed - The price feed address.\n * @param {string} feedAddress - The feed address.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed`,\n functionArguments: [priceFeed, feedAddress],\n functionArgumentTypes: ['address', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for verifying a packet.\n *\n * @param {Date} date - The date of the transaction.\n * @param {PacketV1Codec} codec - The codec for the packet.\n * @param {string} receiveMessageLibAddress - The address of the receive message library.\n * @param {number} inboundConfirmation - The number of inbound confirmations.\n * @param {number} expiration - The expiration time.\n * @param {string} signatures - The signatures for the transaction.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createVerifyPayload(\n date: Date,\n codec: PacketV1Codec,\n receiveMessageLibAddress: string,\n inboundConfirmation: number,\n expiration: number,\n signatures: string\n ): InputEntryFunctionData {\n const payload: InputEntryFunctionData = {\n function: `${this.module[0]}::${this.module[1]}::verify`,\n functionArguments: [\n arrayify(codec.header()),\n arrayify(codec.payloadHash()),\n BigInt(inboundConfirmation),\n receiveMessageLibAddress,\n BigInt(expiration) + BigInt(date.getTime()),\n arrayify(signatures),\n ] as EntryFunctionArgumentTypes[],\n functionArgumentTypes: ['vector<u8>', 'vector<u8>', 'u64', 'address', 'u64', 'vector<u8>'],\n }\n return payload\n }\n}\n\n/**\n * Initialize DVN script\n * This creates a script that can be used to initialize a DVN that was created using deployer::object_code_deployment.\n * The output is in hex and must be converted to a byte array.\n *\n * The address inputs must be provided in hex with no 0x prefix.\n *\n * Interface:\n * fun initialize_dvn(\n * publisher: &signer,\n * dvn_address: address,\n * deposit_address: address,\n * admins_concatenated: vector<u8>, // 32 bytes each\n * dvn_signers_concatenated: vector<u8>, // 64 bytes each\n * quorum: u64,\n * supported_msglibs_concatenated: vector<u8>, // 32 bytes each\n * fee_lib: address,\n * )\n *\n * @param deployerAddressHex the address of the deployer in hex (without the 0x prefix)\n * @param dvnAddressHex the address of the DVN in hex (without the 0x prefix)\n * @param uln302AddressHex the address of the ULN302 in hex (without the 0x prefix)\n */\nconst initializeDvnScriptHex = (\n deployerAddressHex: string,\n dvnAddressHex: string,\n uln302AddressHex: string\n): ByteCode => {\n const stdAddressHex = '0000000000000000000000000000000000000000000000000000000000000001'\n deployerAddressHex = trim0x(padify(deployerAddressHex as `0x${string}`))\n dvnAddressHex = trim0x(padify(dvnAddressHex as `0x${string}`))\n uln302AddressHex = trim0x(padify(uln302AddressHex as `0x${string}`))\n return (`a11ceb0b060000000701000a030a1a042402052657077d9201088f028001068f031d00000001010202030304040503040001` +\n `0606070101000708090002080a020003090b0200010508060c05050a020a02030a0205170c0101010303030a020a05060c0a` +\n `020a0a020303030303030303030a020a050002060c05010c010203060a09000303010a0900010a02010507060c050a050a0a` +\n `02030a050502060c010866726f6d5f62637306766563746f720364766e066d73676c6962166f626a6563745f636f64655f64` +\n `65706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a` +\n `696e697469616c697a652c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f` +\n `70745f696e${stdAddressHex}${dvnAddressHex}${uln302AddressHex}${deployerAddressHex}030820000000000000` +\n `00030840000000000000000a0501000a0a020100000001b0010b000b0111000c080e080c110e0341050c170a170700190600` +\n `0000000000000021041005140b11010601000000000000002707020c100600000000000000000c14090c090b1707001a0c0c` +\n `0a0904250b14060100000000000000160c140527080c090a140a0c23043b0a140700180c1a0e030a1a0b1a07001638000c0f` +\n `0d100b0f11024409051e0e0641050c180a1807001906000000000000000021044505490b1101060100000000000000270702` +\n `0c1e0600000000000000000c15090c0a0b1807001a0c0e0a0a045a0b15060100000000000000160c15055c080c0a0a150a0e` +\n `2304700a150700180c1c0e060a1c0b1c07001638000c1d0d1e0b1d1102440905530e0441050c190a19070119060000000000` +\n `00000021047a057e0b11010601000000000000002707030c130600000000000000000c16090c0b0b1907011a0c0d0a0b048f` +\n `010b16060100000000000000160c16059101080c0b0a160a0d2304a4010a160701180c1b0e040a1b0b1b07011638000c120d` +\n `130b1244080588010a110b020b100b130b050b1e0b0711030b1108110402`) as ByteCode\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { addressToBytes32 } from '@layerzerolabs/lz-v2-utilities'\nimport {\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ConfigType, Timeout, deserializeUlnConfig } from '../types'\n\n/**\n * This is the Endpoint SDK that provides verify and view functions for the Endpoint contract.\n * @template AccountType - The type of the account.\n */\nexport class Endpoint<AccountType> {\n public readonly module: string[]\n public readonly adminModule: string[]\n\n /**\n * Creates an instance of Endpoint.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.endpoint_v2?.toString() ?? '0x0', 'endpoint']\n this.adminModule = [sdk.accounts.endpoint_v2?.toString() ?? '0x0', 'admin']\n }\n\n /**\n * Creates a payload for verify contract method.\n *\n * @param {string} msgLibAddr - The message library address.\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} hash - The hash of the payload.\n * @param {Uint8Array} [extraData] - The extra data.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n verifyPayload(\n msgLibAddr: string,\n packetHeader: Uint8Array,\n hash: Uint8Array,\n extraData: Uint8Array = new Uint8Array([])\n ): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::verify`,\n functionArguments: [msgLibAddr, packetHeader, hash, extraData],\n functionArgumentTypes: ['address', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Verifies a message.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} receiveLib - The receive library address.\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} hash - The hash of the payload.\n * @param {Uint8Array} [extraData] - The extra data.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async verify(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n receiveLib: string,\n packetHeader: Uint8Array,\n hash: Uint8Array,\n extraData?: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::verify`,\n [receiveLib, packetHeader, hash, extraData ?? new Uint8Array([])],\n ['address', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n // VIEW FUNCTIONS\n /**\n * Gets a quote for sending a message.\n *\n * @param {string} sender - The sender address.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {string} receiver - The receiver address.\n * @param {Uint8Array} message - The message to be sent.\n * @param {Uint8Array} options - Additional options for the message.\n * @param {boolean} payInLzToken - Whether to pay in LZ token.\n * @returns {Promise<[number, number]>} The quote for sending the message.\n */\n async quoteView(\n sender: string,\n dstEid: EndpointId,\n receiver: string,\n message: Uint8Array,\n options: Uint8Array,\n payInLzToken: boolean\n ): Promise<[number, number]> {\n const receiverBytes32 = addressToBytes32(receiver)\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_quote`,\n functionArgs: [sender, dstEid, receiverBytes32, message, options, payInLzToken],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'bool'],\n })\n return view[0] as [number, number]\n }\n\n /**\n * Gets the number of inbound confirmations for a given remote endpoint and OAPP.\n *\n * @param {number} remoteEid - The remote endpoint ID.\n * @param {string} oapp - The OAPP address.\n * @returns {Promise<number>} The number of inbound confirmations.\n */\n async getUlnInboundConfirmations(remoteEid: number, oapp: string): Promise<number> {\n const ulnMsgLibAddr = this.sdk.accounts.uln_message_lib?.toString() ?? '0x0'\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_config`,\n functionArgs: [oapp, ulnMsgLibAddr, remoteEid, ConfigType.receiveUln],\n functionArgTypes: ['address', 'address', 'u32', 'u32'],\n })\n const config = deserializeUlnConfig(view[0] as Uint8Array | string)\n return Number(config.confirmations)\n }\n\n /**\n * Checks if a message can be verified.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the message can be verified, false otherwise.\n */\n async verifiableView(srcEid: number, sender: Uint8Array, nonce: bigint, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::verifiable_view`,\n functionArgs: [srcEid, sender, nonce, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Gets the payload hash for a given message.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @returns {Promise<Uint8Array | null>} The payload hash, or null if not found.\n */\n async getPayloadHash(\n receiver: string,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint\n ): Promise<Uint8Array | null> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_payload_hash`,\n functionArgs: [receiver, srcEid, sender, nonce],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'u64'],\n })\n return view[0] as Uint8Array\n } catch (e) {\n return null\n }\n }\n\n /**\n * Gets the LZ receive module for a given OAPP.\n *\n * @param {string} oapp - The OAPP address.\n * @returns {Promise<string>} The LZ receive module address.\n */\n async getLzReceiveModule(oapp: string): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lz_receive_module`,\n functionArgs: [oapp],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n }\n\n /**\n * Gets the LZ compose module for a given composer.\n *\n * @param {string} composer - The composer address.\n * @returns {Promise<string>} The LZ compose module address.\n */\n async getLzComposeModule(composer: string): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lz_compose_module`,\n functionArgs: [composer],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n }\n\n /**\n * Gets the effective receive library for a given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<[string, boolean]>} The effective receive library address and a boolean indicating if it is the default library.\n */\n async getEffectiveReceiveLib(oappAddress: string, srcEid: number): Promise<[string, boolean]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_effective_receive_library`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n return view[0] as [string, boolean]\n }\n\n /**\n * Gets the effective send library for a given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<[string, boolean]>} The effective send library address and a boolean indicating if it is the default library.\n */\n async getEffectiveSendLib(oappAddress: string, srcEid: number): Promise<[string, boolean]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_effective_send_library`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n return view[0] as [string, boolean]\n }\n\n /**\n * Gets the outbound nonce for a given sender address, destination endpoint ID, and receiver address.\n *\n * @param {string} sender - The sender address.\n * @param {number} dstEid - The destination endpoint ID.\n * @param {Uint8Array} receiver - The receiver address.\n * @returns {Promise<bigint>} The outbound nonce.\n */\n async getOutboundNonce(sender: string, dstEid: number, receiver: Uint8Array): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_outbound_nonce`,\n functionArgs: [sender, dstEid, receiver],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as bigint\n }\n\n /**\n * Gets the lazy inbound nonce for a given receiver address, source endpoint ID, and sender address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @returns {Promise<number>} The lazy inbound nonce.\n */\n async getLazyInboundNonce(receiver: string, srcEid: number, sender: Uint8Array): Promise<number> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_lazy_inbound_nonce`,\n functionArgs: [receiver, srcEid, sender],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as number\n }\n\n /**\n * Gets the inbound nonce for a given receiver address, source endpoint ID, and sender address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @returns {Promise<bigint>} The inbound nonce.\n */\n async getInboundNonce(receiver: string, srcEid: number, sender: Uint8Array): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_inbound_nonce`,\n functionArgs: [receiver, srcEid, sender],\n functionArgTypes: ['address', 'u32', 'vector<u8>'],\n })\n return view[0] as bigint\n }\n\n /**\n * Checks if the specified receive library is valid for a given receiver address, source endpoint ID, and message library address.\n *\n * @param {string} receiver - The receiver address.\n * @param {number} srcEid - The source endpoint ID.\n * @param {string} msglib - The message library address.\n * @returns {Promise<boolean>} True if the receive library is valid, false otherwise.\n */\n async isValidReceiveLib(receiver: string, srcEid: number, msglib: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_valid_receive_library_for_oapp`,\n functionArgs: [receiver, srcEid, msglib],\n functionArgTypes: ['address', 'u32', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Checks if the payload hash view exists for the given parameters.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {bigint} nonce - The nonce.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the payload hash view exists, false otherwise.\n */\n async hasPayloadHashView(srcEid: number, sender: Uint8Array, nonce: bigint, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::has_payload_hash_view`,\n functionArgs: [srcEid, sender, nonce, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Gets the compose message hash for the given parameters.\n *\n * @param {string} from - The sender address.\n * @param {string} to - The receiver address.\n * @param {Uint8Array} guid - The GUID.\n * @param {number} index - The index.\n * @returns {Promise<Uint8Array>} The compose message hash.\n */\n async getComposeMessageHash(from: string, to: string, guid: Uint8Array, index: number): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_compose_message_hash`,\n functionArgs: [from, to, guid, index],\n functionArgTypes: ['address', 'address', 'vector<u8>', 'u16'],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Checks if the endpoint is initializable for the given parameters.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @param {Uint8Array} sender - The sender address.\n * @param {string} receiver - The receiver address.\n * @returns {Promise<boolean>} True if the endpoint is initializable, false otherwise.\n */\n async initializable(srcEid: number, sender: Uint8Array, receiver: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::initializable`,\n functionArgs: [srcEid, sender, receiver],\n functionArgTypes: ['u32', 'vector<u8>', 'address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Quotes the fee for the given parameters.\n *\n * @param {string} sender - The sender address.\n * @param {number} dstChainId - The destination chain ID.\n * @param {Uint8Array} remote - The remote address.\n * @param {Uint8Array} message - The message.\n * @param {Uint8Array} options - The options.\n * @param {boolean} lzToken - The LZ token flag.\n * @returns {Promise<[number, number]>} The quoted fee.\n */\n async quoteFee(\n sender: string,\n dstChainId: number,\n remote: Uint8Array,\n message: Uint8Array,\n options: Uint8Array,\n lzToken: boolean\n ): Promise<[number, number]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_quote`,\n functionArgs: [sender, dstChainId, remote, message, options, lzToken],\n functionArgTypes: ['address', 'u32', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'bool'],\n })\n return view[0] as [number, number]\n }\n\n /**\n * Gets the default send library for the given remote chain ID.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @returns {Promise<string>} The default send library address.\n */\n async getDefaultSendLib(remoteChainId: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_send_library`,\n functionArgs: [remoteChainId],\n functionArgTypes: ['u32'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 6) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the default receive library for the given remote chain ID.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @returns {Promise<string>} The default receive library address.\n */\n async getDefaultReceiveLib(remoteChainId: EndpointId): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_receive_library`,\n functionArgs: [remoteChainId],\n functionArgTypes: ['u32'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 7) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Gets the registered libraries.\n * @param {number} startIndex - The start index. Default is 0.\n * @param {number} length - The length. Default is 20.\n * @returns {Promise<string[]>} The list of registered libraries.\n */\n async getRegisteredLibraries(startIndex = 0, length = 20): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_registered_libraries`,\n functionArgs: [startIndex, length],\n functionArgTypes: ['u64', 'u64'],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Gets the receive library timeout for the given OAPP address and source endpoint ID.\n *\n * @param {string} oappAddress - The OAPP address.\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<Timeout | undefined>} The receive library timeout, or undefined if not found.\n */\n async getReceiveLibraryTimeout(oappAddress: string, srcEid: number): Promise<Timeout | undefined> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_receive_library_timeout`,\n functionArgs: [oappAddress, srcEid],\n functionArgTypes: ['address', 'u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return undefined\n }\n return view[0] as Timeout\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return undefined\n }\n throw e\n }\n }\n\n /**\n * Gets the default receive library timeout for the given source endpoint ID.\n *\n * @param {number} srcEid - The source endpoint ID.\n * @returns {Promise<Timeout | undefined>} The default receive library timeout, or undefined if not found.\n */\n async getDefaultReceiveLibraryTimeout(srcEid: number): Promise<Timeout | undefined> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_receive_library_timeout`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return undefined\n }\n return view[0] as Timeout\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n return undefined\n }\n throw e\n }\n }\n\n /**\n * Checks if the ZRO is set.\n *\n * @returns {Promise<boolean>} True if the ZRO is set, false otherwise.\n */\n async isSetZro(): Promise<boolean> {\n const resource = await this.sdk.getAccountResource<{ zro: any }>({\n accountAddress: this.module[0],\n resourceType: `${this.module[0]}::store::GlobalStore`,\n })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { zro: zroMetadata } = resource\n console.log('zroMetadata', zroMetadata)\n return false\n }\n\n /**\n * Creates a payload for registering a message library.\n *\n * @param {string} msgLib - The message library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createRegisterMsgLibPayload(msgLib: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::register_library`,\n functionArguments: [msgLib],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Registers a message library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} msgLib - The message library address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async registerMsgLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n msgLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::register_library`,\n [msgLib],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the default send library.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @param {string} sendLib - The send library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultSendLibPayload(remoteChainId: EndpointId, sendLib: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_send_library`,\n functionArguments: [Number(remoteChainId), sendLib],\n functionArgumentTypes: ['u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the default send library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {number} remoteChainId - The remote chain ID.\n * @param {string} sendLib - The send library address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setDefaultSendLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteChainId: number,\n sendLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::set_default_send_library`,\n [Number(remoteChainId), sendLib.toString()],\n ['u32', 'address'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the default receive library.\n *\n * @param {EndpointId} remoteChainId - The remote chain ID.\n * @param {string} receiveLib - The receive library address.\n * @param {bigint} periodSecond - The period in seconds.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultReceiveLibPayload(\n remoteChainId: EndpointId,\n receiveLib: string,\n periodSecond: bigint\n ): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_receive_library`,\n functionArguments: [Number(remoteChainId), receiveLib, periodSecond],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the default receive library.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {number} remoteChainId - The remote chain ID.\n * @param {string} receiveLib - The receive library address.\n * @param {bigint} periodSecond - The period in seconds.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setDefaultReceiveLib(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteChainId: number,\n receiveLib: string,\n periodSecond: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.adminModule[0]}::${this.adminModule[1]}::set_default_receive_library`,\n [Number(remoteChainId), receiveLib.toString(), periodSecond],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Creates a payload for setting the ZRO.\n *\n * @param {string} zro - The ZRO address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetZroPayload(zro: string): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_zro`,\n functionArguments: [zro],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData, MoveResourceNotFoundError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the EndpointCommon SDK that provides initialization and view functions for the EndpointCommon contract.\n * @template AccountType - The type of the account.\n */\nexport class EndpointCommon<AccountType> {\n universalConfigModule: string[]\n\n /**\n * Creates an instance of EndpointCommon SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.universalConfigModule = [sdk.accounts.endpoint_v2_common?.toString() ?? '0x0', 'universal_config']\n }\n\n /**\n * Create a payload for initializing the universalConfig.\n *\n * @param {EndpointId} endpoint - The endpoint ID.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createInitializePayload(endpoint: EndpointId): InputEntryFunctionData {\n return {\n function: `${this.universalConfigModule[0]}::${this.universalConfigModule[1]}::initialize`,\n functionArguments: [endpoint],\n functionArgumentTypes: ['u32'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the endpoint ID.\n *\n * @returns {Promise<number>} The endpoint ID, 0 if not found.\n */\n async getEid(): Promise<number> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.universalConfigModule[0]}::${this.universalConfigModule[1]}::eid`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as number\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return 0\n }\n throw e\n }\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { padify } from '@layerzerolabs/lz-utilities'\nimport { trim0x } from '@layerzerolabs/lz-v2-utilities'\nimport {\n ByteCode,\n EntryFunctionArgumentTypes,\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveFunction,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ExecutorDstConfig, WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the Executor SDK that provides initialization and view functions for the Executor contract.\n * @template AccountType - The type of the account.\n */\nexport class Executor<AccountType> {\n module: string[]\n /**\n * Creates an instance of Executor SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.executor?.toString() ?? '0x0', 'executor']\n }\n\n /**\n * Checks if the executor is initialized.\n *\n * @returns {Promise<boolean>} True if the executor is initialized, false otherwise.\n */\n async isInitialize(): Promise<boolean> {\n const admins = await this.getAdmins()\n return admins.length !== 0\n }\n\n /**\n * Creates a payload for initializing the executor.\n *\n * @param {string} roleAdmin - The role admin address.\n * @param {string[]} admins - The list of admin addresses.\n * @param {string[]} msgLibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} [depositAddress] - The deposit address. Defaults to the executor address.\n * @returns {Promise<InputEntryFunctionData>} The input entry function data, used to build the transaction.\n */\n async createInitExecutorPayload(\n roleAdmin: string,\n admins: string[],\n msgLibs: string[],\n feeLib: string,\n depositAddress?: string\n ): Promise<InputEntryFunctionData> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArgumentTypes = ['address', 'address', 'vector<address>', 'vector<address>', 'address']\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n roleAdmin,\n admins,\n msgLibs,\n feeLib,\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeExecutorScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n functionArgumentTypes = ['address', 'address', 'address', 'vector<u8>', 'vector<u8>', 'address']\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msgLibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n roleAdmin,\n adminsU8Array,\n msgLibsU8Array,\n feeLib,\n ]\n }\n return {\n function: functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Initializes the executor.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {string} roleAdmin - The role admin address.\n * @param {string[]} admins - The list of admin addresses.\n * @param {string[]} msgLibs - The list of message libraries.\n * @param {string} feeLib - The fee library address.\n * @param {string} [depositAddress] - The deposit address. Defaults to the executor address.\n * @param {GasOptions} [gasOptions] - The gas options.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async initialize(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n roleAdmin: string,\n admins: string[],\n msgLibs: string[],\n feeLib: string,\n depositAddress?: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n let functionIdOrBytecode: MoveFunction | ByteCode = `${this.module[0]}::${this.module[1]}::initialize`\n let functionArgumentTypes = ['address', 'address', 'vector<address>', 'vector<address>', 'address']\n let functionArguments: EntryFunctionArgumentTypes[] = [\n depositAddress ?? this.module[0],\n roleAdmin,\n admins,\n msgLibs,\n feeLib,\n ]\n if (await this.sdk.isObjectAddress(this.module[0])) {\n functionIdOrBytecode = initializeExecutorScriptHex(\n this.sdk.accounts.deploy_to_object!,\n this.module[0],\n this.sdk.accounts.uln_message_lib!\n )\n functionArgumentTypes = ['address', 'address', 'address', 'vector<u8>', 'vector<u8>', 'address']\n const adminsU8Array = new Uint8Array(\n admins.flatMap((admin) => Array.from(Buffer.from(trim0x(padify(admin as `0x${string}`)), 'hex')))\n )\n const msgLibsU8Array = new Uint8Array(\n msgLibs.flatMap((msgLib) => Array.from(Buffer.from(trim0x(padify(msgLib as `0x${string}`)), 'hex')))\n )\n functionArguments = [\n this.module[0],\n depositAddress ?? this.module[0],\n roleAdmin,\n adminsU8Array,\n msgLibsU8Array,\n feeLib,\n ]\n }\n return this.sdk.sendAndConfirmTransaction(\n signer,\n functionIdOrBytecode,\n functionArguments,\n functionArgumentTypes,\n gasOptions\n )\n }\n\n /**\n * Gets the destination configuration for the specified endpoint.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<ExecutorDstConfig>} The destination configuration.\n */\n async getDstConfig(dstEid: EndpointId): Promise<ExecutorDstConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_dst_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n const [lzReceiveBaseGas, multiplierBps, floorMarginUsd, nativeCap, lzComposeBaseGas] = view[0] as [\n bigint,\n number,\n bigint,\n bigint,\n bigint,\n ]\n return {\n lzReceiveBaseGas,\n multiplierBps,\n floorMarginUsd,\n nativeCap,\n lzComposeBaseGas,\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 5)) {\n return {\n lzReceiveBaseGas: BigInt(0),\n multiplierBps: 0,\n floorMarginUsd: BigInt(0),\n nativeCap: BigInt(0),\n lzComposeBaseGas: BigInt(0),\n }\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the destination configuration.\n *\n * @param {EndpointId} remoteEid - The remote endpoint ID.\n * @param {ExecutorDstConfig} dstConfig - The destination configuration.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetDstConfigPayload(remoteEid: EndpointId, dstConfig: ExecutorDstConfig): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_dst_config`,\n functionArguments: [\n remoteEid,\n dstConfig.lzReceiveBaseGas,\n dstConfig.multiplierBps,\n dstConfig.floorMarginUsd,\n dstConfig.nativeCap,\n dstConfig.lzComposeBaseGas,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u16', 'u128', 'u128', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the list of role admin addresses.\n *\n * @returns {Promise<string[]>} The list of role admin addresses.\n */\n async getRoleAdmins(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_role_admins`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Checks if the specified address is a role admin.\n *\n * @param {string} roleAdmin - The role admin address.\n * @returns {Promise<boolean>} True if the address is a role admin, false otherwise.\n */\n async isRoleAdmin(roleAdmin: string): Promise<boolean> {\n const roleAdmins = await this.getRoleAdmins()\n return roleAdmins\n .map((admin) => this.sdk.normalizeAddress(admin).toLowerCase())\n .includes(this.sdk.normalizeAddress(roleAdmin).toLowerCase())\n }\n\n /**\n * Creates a payload for setting a role admin.\n *\n * @param {string} roleAdmin - The role admin address.\n * @param {boolean} active - The role admin status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetRoleAdminPayload(roleAdmin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_role_admin`,\n functionArguments: [roleAdmin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the specified address is an admin.\n *\n * @param {string} admin - The admin address.\n * @returns {Promise<boolean>} True if the address is an admin, false otherwise.\n */\n async isAdmin(admin: string): Promise<boolean> {\n const admins = await this.getAdmins()\n return admins\n .map((adminTemp) => this.sdk.normalizeAddress(adminTemp).toLowerCase())\n .includes(this.sdk.normalizeAddress(admin).toLowerCase())\n }\n\n /**\n * Gets the list of admin addresses.\n *\n * @returns {Promise<string[]>} The list of admin addresses.\n */\n async getAdmins(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_admins`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting an admin.\n *\n * @param {string} admin - The admin address.\n * @param {boolean} active - The admin status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetAdminPayload(admin: string, active: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_admin`,\n functionArguments: [admin, active],\n functionArgumentTypes: ['address', 'bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the executor is paused.\n *\n * @returns {Promise<boolean>} True if the executor is paused, false otherwise.\n */\n async isPaused(): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_paused`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for pausing or unpausing the executor.\n *\n * @param {boolean} pause - The pause status.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPauseExecutorPayload(pause: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_pause_executor`,\n functionArguments: [pause],\n functionArgumentTypes: ['bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the deposit address.\n *\n * @returns {Promise<string>} The deposit address, or an empty string if not found.\n */\n async getDepositAddress(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_deposit_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the deposit address.\n *\n * @param {string} depositAddress - The deposit address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDepositAddressPayload(depositAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_deposit_address`,\n functionArguments: [depositAddress],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the default multiplier basis points (BPS).\n *\n * @returns {Promise<number>} The default multiplier BPS, or 0 if not found.\n */\n async getDefaultMultiplierBps(): Promise<number> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_multiplier_bps`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as number\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return 0\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the default multiplier basis points (BPS).\n *\n * @param {number} defaultMultiplier - The default multiplier BPS.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultMultiplierBpsPayload(defaultMultiplier: number): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_default_multiplier_bps`,\n functionArguments: [defaultMultiplier],\n functionArgumentTypes: ['u16'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the supported option types.\n *\n * @returns {Promise<Uint8Array>} The supported option types.\n */\n async getSupportedOptionTypes(): Promise<Uint8Array> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_supported_option_types`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as Uint8Array\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return new Uint8Array()\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the supported option types.\n *\n * @param {Uint8Array} optionTypes - The supported option types.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetSupportedOptionTypesPayload(optionTypes: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_supported_option_types`,\n functionArguments: [optionTypes],\n functionArgumentTypes: ['vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the supported message libraries.\n *\n * @returns {Promise<string[]>} The supported message libraries.\n */\n async getSupportedMsglibs(): Promise<string[]> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_supported_msglibs`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string[]\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return []\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the supported message libraries.\n *\n * @param {string[]} msglibs - The supported message libraries.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetSupportedMsglibsPayload(msglibs: string[]): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_supported_msglibs`,\n functionArguments: [msglibs],\n functionArgumentTypes: ['vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed configuration.\n *\n * @returns {Promise<WorkerPriceFeedConfig>} The price feed configuration.\n */\n async getPriceFeed(): Promise<WorkerPriceFeedConfig> {\n return this.sdk.LayerzeroModule.WorkerCommon.getWorkerPriceFeedConfig(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed.\n *\n * @param {string} priceFeed - The price feed address.\n * @param {string} feedAddress - The feed address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed`,\n functionArguments: [priceFeed, feedAddress],\n functionArgumentTypes: ['address', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price feed delegate.\n *\n * @returns {Promise<string>} The price feed delegate address.\n */\n async getPriceFeedDelegate(): Promise<string> {\n return this.sdk.LayerzeroModule.WorkerCommon.getPriceFeedDelegate(this.module[0])\n }\n\n /**\n * Creates a payload for setting the price feed delegate.\n *\n * @param {string} priceFeedDelegate - The price feed delegate address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetPriceFeedDelegatePayload(priceFeedDelegate: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price_feed_delegate`,\n functionArguments: [priceFeedDelegate],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the fee library address.\n *\n * @returns {Promise<string>} The fee library address, or an empty string if not found.\n */\n async getFeeLib(): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_fee_lib`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the fee library.\n *\n * @param {string} feeLib - The fee library address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetFeeLibPayload(feeLib: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_fee_lib`,\n functionArguments: [feeLib],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n}\n\n/**\n * Initialize executor script\n * This creates a script that can be used to publish an Executor. The output is in hex and must be converted to a byte\n * array.\n *\n * The address inputs must be provided in hex with no 0x prefix.\n *\n * Interface:\n * fun initialize_executor(\n * publisher: &signer,\n * executor_address: address,\n * deposit_address: address,\n * role_admin: address,\n * admins_concatenated: vector<u8>, // 32 bytes each\n * supported_msglibs_concatenated: vector<u8>, // 32 bytes each\n * fee_lib: address,\n * )\n *\n * @param deployerAddressHex the address of the deployer in hex (without the 0x prefix)\n * @param executorAddressHex the address of the executor in hex (without the 0x prefix)\n * @param uln302AddressHex the address of the ULN302 in hex (without the 0x prefix)\n */\nconst initializeExecutorScriptHex = (\n deployerAddressHex: string,\n executorAddressHex: string,\n uln302AddressHex: string\n): ByteCode => {\n const stdAddressHex = '0000000000000000000000000000000000000000000000000000000000000001'\n deployerAddressHex = trim0x(padify(deployerAddressHex as `0x${string}`))\n executorAddressHex = trim0x(padify(executorAddressHex as `0x${string}`))\n uln302AddressHex = trim0x(padify(uln302AddressHex as `0x${string}`))\n return (`a11ceb0b060000000701000a030a1a042402052648076e970108850280010685030e00000001010202030304040503040001` +\n `0606070101000708090002080a020003090b0200010507060c0505050a020a0205100c010103030a020a05060c0303030303` +\n `030a020a050002060c05010c010203060a09000303010a0900010a02010506060c05050a050a050502060c010866726f6d5f` +\n `62637306766563746f72086578656375746f72066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e7416` +\n `6765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a696e697469616c697a65` +\n `2c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e` +\n `${stdAddressHex}${executorAddressHex}${uln302AddressHex}${deployerAddressHex}030820000000000000000a` +\n `0501000000017b0b000b0111000c070e070c0e0e0441050c110a1107001906000000000000000021041005140b0e01060100` +\n `0000000000002707010c0d0600000000000000000c0f090c080b1107001a0c0a0a0804250b0f060100000000000000160c0f` +\n `0527080c080a0f0a0a23043b0a0f0700180c130e040a130b1307001638000c0c0d0d0b0c11024409051e0e0541050c120a12` +\n `07001906000000000000000021044505490b0e010601000000000000002707010c160600000000000000000c10090c090b12` +\n `07001a0c0b0a09045a0b10060100000000000000160c10055c080c090a100a0b2304700a100700180c140e050a140b140700` +\n `1638000c150d160b151102440905530a0e0b020b030b0d0b160b0611030b0e08110402`) as ByteCode\n}\n","import * as assert from 'assert'\n\nimport { ensure0x, trim0x } from '@layerzerolabs/lz-utilities'\nimport {\n EntryFunctionArgumentTypes,\n GasOptions,\n InputEntryFunctionData,\n MnemonicAndPath,\n MoveAbortError,\n MoveResourceNotFoundError,\n MoveStructId,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { Metadata, OftFeeDetail, OftLimit, OftTokenInfo } from '../types'\n\nconst EmptyUint8Array = Uint8Array.from([])\nconst DefaultSharedDecimals = 6\nconst DefaultLocalDecimals = 8\nconst CoinStandard = 'coin'\n/**\n * This is the OFT SDK that provides send, quote, and view functions for the OFT contract.\n */\nexport class Oft<AccountType> {\n private readonly module: string[]\n private readonly oappCoreModule: string[]\n private readonly oappReceiveModule: string[]\n private readonly oftStoreModule: string[]\n private cachedToken?: string | null\n private cachedIsCoin?: boolean\n public coin?: MoveStructId\n constructor(\n private sdk: MoveSdkImpl<AccountType>,\n readonly isAdapter = false\n ) {\n this.module = [sdk.accounts.oft?.toString() ?? '0x0', 'oft']\n this.oftStoreModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oft_store']\n this.oappCoreModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oapp_core']\n this.oappReceiveModule = [sdk.accounts.oft?.toString() ?? '0x0', 'oapp_receive']\n }\n\n async getImplModule(): Promise<string[]> {\n if (await this.isCoin()) {\n if (this.isAdapter) {\n return [this.sdk.accounts.oft?.toString() ?? '0x0', 'oft_adapter_coin']\n } else {\n return [this.sdk.accounts.oft?.toString() ?? '0x0', 'oft_coin']\n }\n } else {\n if (this.isAdapter) {\n return [this.sdk.accounts.oft?.toString() ?? '0x0', 'oft_adapter_fa']\n } else {\n return [this.sdk.accounts.oft?.toString() ?? '0x0', 'oft_fa']\n }\n }\n }\n\n // view functions\n /**\n * Check whether the OFT is initialized or not\n */\n async isInitialized(): Promise<boolean> {\n try {\n const { decimal_conversion_rate } = await this.sdk.getAccountResource<{ decimal_conversion_rate: string }>({\n accountAddress: this.module[0],\n resourceType: `${this.oftStoreModule[0]}::${this.oftStoreModule[1]}::OftStore`,\n })\n return parseInt(decimal_conversion_rate) !== 0\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Get enforced options\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * @returns enforced options\n */\n async getEnforcedOptions(eid: number, msgType: number): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_enforced_options`,\n functionArgs: [eid, msgType],\n functionArgTypes: ['u32', 'u16'],\n })\n return view[0] as string\n }\n\n /**\n * Combine enforced options with extra options\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * @param extraOptions can be empty, or should contain number 3 as u16\n * @returns enforced options\n */\n async combineOptions(eid: number, msgType: number, extraOptions: Uint8Array): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::combine_options`,\n functionArgs: [eid, msgType, extraOptions],\n functionArgTypes: ['u32', 'u16', 'vector<u8>'],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Get admin address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns admin address\n */\n async getAdmin(): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_admin`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n\n /**\n * Check specific eid has peer or not\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns true or false\n */\n async hasPeer(eid: number): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::has_peer`,\n functionArgs: [eid],\n functionArgTypes: ['u32'],\n })\n return view[0] as boolean\n }\n\n /**\n * Get peer address with specific eid\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns peer address\n */\n async getPeer(eid: number): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_peer`,\n functionArgs: [eid],\n functionArgTypes: ['u32'],\n })\n const bytes = view[0] as string\n return ensure0x(bytes)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return ''\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return ''\n }\n throw e\n }\n }\n\n /**\n * Check oapp has delegate or not\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns true or false\n */\n async hasDelegate(): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::has_delegate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as boolean\n }\n\n /**\n * Get oapp delegate address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns delegate address\n */\n async getDelegate(): Promise<string> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_delegate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n\n /**\n * Get lz_receive module name\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns fixed value 'oapp_receive' in Uint8Array\n * details: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oapp_config.move\n */\n async getLzReceiveModuleName(): Promise<Uint8Array> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::get_lz_receive_module_name`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as Uint8Array\n }\n\n /**\n * Quote the OFT for a particular send without sending\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns (\n * oft_limit: The minimum and maximum limits that can be sent to the recipient\n * fees: The fees that will be applied to the amount sent\n * amount_sent_ld: The amount that would be debited from the sender in local decimals\n * amount_received_ld: The amount that would be received by the recipient in local decimals\n * )\n */\n async quoteOft(\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<[OftLimit, OftFeeDetail[], bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::quote_oft`,\n functionArgs: [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd],\n functionArgTypes: ['u32', 'vector<u8>', 'u64', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n })\n console.log(`quoteOft view: ${JSON.stringify(view)}`)\n return view[0] as [OftLimit, OftFeeDetail[], bigint, bigint]\n }\n\n /**\n * Quote the network fees for a particular send\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param userSender sender oapp address\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param payInZro whether to pay in ZRO or not\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns (native_fee, zro_fee)\n */\n async quoteSend(\n userSender: string,\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n payInZro = false,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::quote_send`,\n functionArgs: [userSender, dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, payInZro],\n functionArgTypes: [\n 'address',\n 'u32',\n 'vector<u8>',\n 'u64',\n 'u64',\n 'vector<u8>',\n 'vector<u8>',\n 'vector<u8>',\n 'bool',\n ],\n })\n return view[0] as [bigint, bigint]\n }\n\n /**\n * The address of the OFT token\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns token address or null if it is a Coin\n */\n async token(): Promise<string | null> {\n if (this.cachedToken !== undefined) {\n return this.cachedToken\n }\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::token`,\n functionArgs: [],\n functionArgTypes: [],\n })\n this.cachedToken = view[0] as string\n return this.cachedToken\n } catch (e) {\n // throw ENOT_IMPLEMENTED means is a Coin\n if (e instanceof MoveAbortError && e.abortCode === 1) {\n this.cachedToken = null\n return this.cachedToken\n }\n throw e\n }\n }\n\n /**\n * The metadata object of the OFT\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns CoinInfo or Metadata\n */\n async metadata(): Promise<Metadata> {\n if (await this.isCoin()) {\n const implModule = await this.getImplModule()\n const coin = this.coin ?? `${implModule[0]}::${implModule[1]}::PlaceholderCoin`\n const res = await this.sdk.getAccountResource<Metadata>({\n accountAddress: implModule[0],\n resourceType: `0x1::coin::CoinInfo<${coin}>`,\n })\n return res\n } else {\n const token = (await this.token())!\n const res = await this.sdk.viewFunction({\n functionName: `0x1::fungible_asset::metadata`,\n functionArgs: [token],\n functionArgTypes: ['address'],\n typeArgs: ['0x1::fungible_asset::Metadata'],\n })\n return res[0] as Metadata\n }\n }\n\n /**\n * Check whether the OFT is a Coin or not\n *\n * @returns true is coin, false is not\n */\n async isCoin(): Promise<boolean> {\n if (!this.sdk.supportsCoin()) {\n return false\n }\n if (this.cachedIsCoin === undefined) {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::send_standards_supported`,\n functionArgs: [],\n functionArgTypes: [],\n })\n const supported = view[0] as string[]\n this.cachedIsCoin = Buffer.from(trim0x(supported[0]), 'hex').toString('utf8') === CoinStandard\n }\n return this.cachedIsCoin\n }\n\n /**\n * Get the balance of the specific address\n *\n * @param address account address\n * @returns account balance\n */\n async balanceOf(address: string): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::balance`,\n functionArgs: [address],\n functionArgTypes: ['address'],\n })\n return BigInt(view[0] as string)\n }\n\n /**\n * debit view\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @returns (\n * amount_sent_ld amount sent in local decimals\n * amount_received_ld amount received in local decimals\n * )\n */\n async debitView(amountLd: bigint, minAmountLd: bigint, dstEid: number): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::debit_view`,\n functionArgs: [amountLd, minAmountLd, dstEid],\n functionArgTypes: ['u64', 'u64', 'u32'],\n })\n return view[0] as [bigint, bigint]\n }\n\n /**\n * Convert an amount from shared decimals to local decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountSd original amount in shared decimals\n * @returns amount in local decimals\n */\n async toLd(amountSd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::to_ld`,\n functionArgs: [amountSd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Convert an amount from local decimals to shared decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount in local decimals\n * @returns amount in shared decimals\n */\n async toSd(amountLd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::to_sd`,\n functionArgs: [amountLd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Remove dust from the amount in local decimals\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param amountLd amount in local decimals\n * @returns dust removed amount in local decimals\n */\n async removeDust(amountLd: bigint): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::remove_dust`,\n functionArgs: [amountLd],\n functionArgTypes: ['u64'],\n })\n return view[0] as bigint\n }\n\n /**\n * Get The multiplier which can convert a local decimals to a shared decimals representation\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns decimal conversion rate\n */\n async decimalConversionRate(): Promise<bigint> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::decimal_conversion_rate`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as bigint\n }\n\n /**\n * Encode an OFT message\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param sender sender oapp address\n * @param amountLd amount to send in local decimals\n * @param to dst oapp address in Uint8Array\n * @param composeMsg compose message to send in Uint8Array\n * @returns (\n * encoded_msg: The encoded message\n * msg_type: (SEND = 1, SEND_AND_CALL = 2) details: apps/oft/config/src/wire/types.ts\n * )\n */\n async encodeOftMsg(\n sender: string,\n amountLd: bigint,\n to: Uint8Array,\n composeMsg: Uint8Array\n ): Promise<[Uint8Array, number]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::encode_oft_msg`,\n functionArgs: [sender, amountLd, to, composeMsg],\n functionArgTypes: ['address', 'u64', 'vector<u8>', 'vector<u8>'],\n })\n return view[0] as [Uint8Array, number]\n }\n\n /**\n * Get the escrow address for the OFT\n *\n * @returns escrow address, or null if it is not in adapter mode\n */\n async escrowAddress(): Promise<string | null> {\n const implModule = await this.getImplModule()\n if (this.isAdapter) {\n const view = await this.sdk.viewFunction({\n functionName: `${implModule[0]}::${implModule[1]}::escrow_address`,\n functionArgs: [],\n functionArgTypes: [],\n })\n return view[0] as string\n }\n return null\n }\n\n // entry functions\n\n /**\n * Initialize the OFT, must be called before wiring\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/implementations/*.move\n *\n * @param signer account to initialize the OFT\n * @param tokenInfo token information\n * @param tokenInfo.tokenName (optional) required only for oft_fa / oft_coin\n * @param tokenInfo.tokenAddress (optional) required only for oft_adapter_fa\n * @param tokenInfo.symbol (optional) required only for oft_fa / oft_coin\n * @param tokenInfo.iconUri (optional) required only for oft_fa, default is ''\n * @param tokenInfo.projectUri (optional) required only for oft_fa, default is ''\n * @param tokenInfo.sharedDecimals required for all kinds of oft, default is 6\n * @param tokenInfo.localDecimals (optional) required only for oft_fa / oft_coin, default is 8\n * @param tokenInfo.monitorSupply (optional) required only for oft_coin, default is false\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of initialize function\n */\n async initialize(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n tokenInfo: OftTokenInfo,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n const {\n tokenName,\n symbol,\n iconUri = '',\n projectUri = '',\n sharedDecimals = DefaultSharedDecimals,\n localDecimals = DefaultLocalDecimals,\n monitorSupply = false,\n tokenAddress,\n } = tokenInfo\n const implModule = await this.getImplModule()\n const isCoin = await this.isCoin()\n let params: EntryFunctionArgumentTypes[]\n let paramTypes: string[]\n if (isCoin && this.isAdapter) {\n // for oft_adapter_coin\n params = [sharedDecimals]\n paramTypes = ['u8']\n } else if (isCoin && !this.isAdapter) {\n // for oft_coin\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n sharedDecimals,\n localDecimals,\n monitorSupply,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'u8', 'u8', 'bool']\n } else if (!isCoin && this.isAdapter) {\n // for oft_adapter_fa\n assert.ok(tokenAddress, 'tokenAddress is required for oft_adapter_fa')\n params = [tokenAddress, sharedDecimals]\n paramTypes = ['address', 'u8']\n } else {\n // for oft_fa\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n Uint8Array.from(Buffer.from(iconUri, 'utf-8')),\n Uint8Array.from(Buffer.from(projectUri, 'utf-8')),\n sharedDecimals,\n localDecimals,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u8', 'u8']\n }\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${implModule[0]}::${implModule[1]}::initialize`,\n params,\n paramTypes,\n gasOptions\n )\n }\n\n /**\n * Initialize the OFT, must be called before wiring\n * @see {@link initialize}\n *\n * @param tokenInfo token information\n * @returns payload of initialize function\n */\n async initializePayload(tokenInfo: OftTokenInfo): Promise<InputEntryFunctionData> {\n const {\n tokenName,\n symbol,\n iconUri = '',\n projectUri = '',\n sharedDecimals = DefaultSharedDecimals,\n localDecimals = DefaultLocalDecimals,\n monitorSupply = false,\n tokenAddress,\n } = tokenInfo\n const isCoin = await this.isCoin()\n const implModule = await this.getImplModule()\n let params: EntryFunctionArgumentTypes[]\n let paramTypes: string[]\n if (isCoin && this.isAdapter) {\n // for oft_adapter_coin\n params = [sharedDecimals]\n paramTypes = ['u8']\n } else if (isCoin && !this.isAdapter) {\n // for oft_coin\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n sharedDecimals,\n localDecimals,\n monitorSupply,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'u8', 'u8', 'bool']\n } else if (!isCoin && this.isAdapter) {\n // for oft_adapter_fa\n assert.ok(tokenAddress, 'tokenAddress is required for oft_adapter_fa')\n params = [tokenAddress, sharedDecimals]\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n console.log(`oft adapter fa params: ${params}`)\n paramTypes = ['address', 'u8']\n } else {\n // for oft_fa\n assert.ok(tokenName, 'tokenName is required for oft_coin')\n assert.ok(symbol, 'symbol is required for oft_coin')\n params = [\n Uint8Array.from(Buffer.from(tokenName, 'utf-8')),\n Uint8Array.from(Buffer.from(symbol, 'utf-8')),\n Uint8Array.from(Buffer.from(iconUri, 'utf-8')),\n Uint8Array.from(Buffer.from(projectUri, 'utf-8')),\n sharedDecimals,\n localDecimals,\n ]\n paramTypes = ['vector<u8>', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u8', 'u8']\n }\n return {\n function: `${implModule[0]}::${implModule[1]}::initialize`,\n functionArguments: params,\n functionArgumentTypes: paramTypes,\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Send from an account to a recipient on another EID, deducting the fees and the amount to send from the sender's\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param nativeFee native fee\n * @param zroFee zro fee\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @returns payload of send_withdraw or send_withdraw_coin function\n */\n async sendPayload(\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n nativeFee: bigint,\n zroFee: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array\n ): Promise<InputEntryFunctionData> {\n return {\n function: (await this.isCoin())\n ? `${this.module[0]}::${this.module[1]}::send_withdraw_coin`\n : `${this.module[0]}::${this.module[1]}::send_withdraw`,\n functionArguments: [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, nativeFee, zroFee],\n functionArgumentTypes: [\n 'u32',\n 'vector<u8>',\n 'u64',\n 'u64',\n 'vector<u8>',\n 'vector<u8>',\n 'vector<u8>',\n 'u64',\n 'u64',\n ],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Send from an account to a recipient on another EID, deducting the fees and the amount to send from the sender's\n * @see {@link sendPayload}\n *\n * @param signer oapp account\n * @param dstEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param to dst oapp address in Uint8Array\n * @param amountLd amount to send in local decimals\n * @param minAmountLd minimum amount to send in local decimals\n * @param nativeFee native fee\n * @param zroFee zro fee\n * @param extraOptions (optional) extra options to send in Uint8Array\n * @param composeMsg (optional) compose message to send in Uint8Array\n * @param oftCmd (optional) oft command to send in Uint8Array\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of send_withdraw or send_withdraw_coin function\n */\n async send(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n dstEid: number,\n to: Uint8Array,\n amountLd: bigint,\n minAmountLd: bigint,\n nativeFee: bigint,\n zroFee: bigint,\n extraOptions: Uint8Array = EmptyUint8Array,\n composeMsg: Uint8Array = EmptyUint8Array,\n oftCmd: Uint8Array = EmptyUint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n (await this.isCoin())\n ? `${this.module[0]}::${this.module[1]}::send_withdraw_coin`\n : `${this.module[0]}::${this.module[1]}::send_withdraw`,\n [dstEid, to, amountLd, minAmountLd, extraOptions, composeMsg, oftCmd, nativeFee, zroFee],\n ['u32', 'vector<u8>', 'u64', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>', 'u64', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Claim provides a way to retreive tokens that could not be delivered because, at the time of delivery, the\n * account wasn't registered to receive that amount (relevant for Coin-enabled implementations)\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oft/oft.move\n *\n * @returns payload of claim function\n */\n claimPayload(): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::claim`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Claim provides a way to retreive tokens that could not be delivered because, at the time of delivery, the\n * account wasn't registered to receive that amount (relevant for Coin-enabled implementations)\n * @see {@link claimPayload}\n *\n * @param signer oapp account\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of claim function\n */\n async claim(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::claim`,\n [],\n [],\n gasOptions\n )\n }\n\n /**\n * Set the OApp configuration for a Message Library\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param msgLib Message Library address\n * @param configType (CONFIG_TYPE_EXECUTOR=1, CONFIG_TYPE_SEND_ULN=2, CONFIG_TYPE_RECV_ULN=3)\n * @param config configuration in Uint8Array format. (struct UlnConfig or ExecutorConfig)\n * @returns payload of set_config function\n */\n setConfigPayload(msgLib: string, configType: number, config: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_config`,\n functionArguments: [msgLib, configType, config],\n functionArgumentTypes: ['address', 'u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the OApp configuration for a Message Library\n * @see {@link setConfigPayload}\n *\n * @param signer oapp account or delegate account\n * @param msgLib Message Library address\n * @param configType (CONFIG_TYPE_EXECUTOR=1, CONFIG_TYPE_SEND_ULN=2, CONFIG_TYPE_RECV_ULN=3)\n * @param config configuration in Uint8Array format. (struct UlnConfig or ExecutorConfig)\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_config function\n */\n async setConfig(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n msgLib: string,\n configType: number,\n config: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_config`,\n [msgLib, configType, config],\n ['address', 'u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Set the Send Library for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @returns payload of set_send_library function\n */\n setSendLibraryPayload(remoteEid: number, msgLib: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_send_library`,\n functionArguments: [remoteEid, msgLib],\n functionArgumentTypes: ['u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Send Library for an OApp\n * @see {@link setSendLibraryPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_send_library function\n */\n async setSendLibrary(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_send_library`,\n [remoteEid, msgLib],\n ['u32', 'address'],\n gasOptions\n )\n }\n\n /**\n * Set the Receive Library for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gracePeriod The block number at which the grace period expires in u64\n * @returns payload of set_receive_library function\n */\n setReceiveLibraryPayload(remoteEid: number, msgLib: string, gracePeriod: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library`,\n functionArguments: [remoteEid, msgLib, gracePeriod],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Receive Library for an OApp\n * @see {@link setReceiveLibraryPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param gracePeriod The block number at which the grace period expires in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_receive_library function\n */\n async setReceiveLibrary(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n gracePeriod: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library`,\n [remoteEid, msgLib, gracePeriod],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Update the Receive Library Expiry for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param expiry The block number at which the timeout expires in u64\n * @returns payload of set_receive_library_timeout function\n */\n setReceiveLibraryTimeoutPayload(remoteEid: number, msgLib: string, expiry: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library_timeout`,\n functionArguments: [remoteEid, msgLib, expiry],\n functionArgumentTypes: ['u32', 'address', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Update the Receive Library Expiry for an OApp\n * @see {@link setReceiveLibraryTimeoutPayload}\n *\n * @param signer oapp account or delegate account\n * @param remoteEid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgLib Message Library address\n * @param expiry The block number at which the timeout expires in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_receive_library_timeout function\n */\n async setReceiveLibraryTimeout(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n remoteEid: number,\n msgLib: string,\n expiry: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_receive_library_timeout`,\n [remoteEid, msgLib, expiry],\n ['u32', 'address', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Register a Receive Pathway for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param srcOapp Source OApp address\n * @returns payload of register_receive_pathway function\n */\n registerReceivePathwayPayload(srcEid: number, srcOapp: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::register_receive_pathway`,\n functionArguments: [srcEid, srcOapp],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Register a Receive Pathway for an OApp\n * @see {@link registerReceivePathwayPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param srcOapp Source OApp address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of register_receive_pathway function\n */\n async registerReceivePathway(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n srcOapp: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::register_receive_pathway`,\n [srcEid, srcOapp],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Set the Enforced Options for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType Message type identifier\n * @param enforcedOptions Enforced options in Uint8Array format\n * @returns payload of set_enforced_options function\n */\n setEnforcedOptionsPayload(eid: number, msgType: number, enforcedOptions: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_enforced_options`,\n functionArguments: [eid, msgType, enforcedOptions],\n functionArgumentTypes: ['u32', 'u16', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Enforced Options for an OApp\n * @see {@link setEnforcedOptionsPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param msgType Message type identifier\n * @param enforcedOptions Enforced options in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_enforced_options function\n */\n async setEnforcedOptions(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n msgType: number,\n enforcedOptions: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_enforced_options`,\n [eid, msgType, enforcedOptions],\n ['u32', 'u16', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Transfer the Admin role to a new address\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param newAdmin New admin address\n * @returns payload of transfer_admin function\n */\n transferAdminPayload(newAdmin: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::transfer_admin`,\n functionArguments: [newAdmin],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Transfer the Admin role to a new address\n * @see {@link transferAdminPayload}\n *\n * @param signer oapp account\n * @param newAdmin New admin address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of transfer_admin function\n */\n async transferAdmin(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n newAdmin: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::transfer_admin`,\n [newAdmin],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * renounce current admin\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @returns payload of renounce_admin function\n */\n renounceAdminPayload(): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::renounce_admin`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * renounce current admin\n * @see {@link renounceAdminPayload}\n *\n * @param signer admin account\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of renounce_admin function\n */\n async renounceAdmin(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::renounce_admin`,\n [],\n [],\n gasOptions\n )\n }\n\n /**\n * Set the Peer for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @returns payload of set_peer function\n */\n setPeerPayload(eid: number, peer: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n functionArguments: [eid, peer],\n functionArgumentTypes: ['u32', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the Peer for an OApp\n * @see {@link setPeerPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_peer function\n */\n async setPeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n peer: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_peer`,\n [eid, peer],\n ['u32', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Remove the Peer for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param peer Peer address in Uint8Array format\n * @returns payload of remove_peer function\n */\n removePeerPayload(eid: number): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::remove_peer`,\n functionArguments: [eid],\n functionArgumentTypes: ['u32'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Remove the Peer for an OApp\n * @see {@link removePeerPayload}\n *\n * @param signer admin account\n * @param eid EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of remove_peer function\n */\n async removePeer(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n eid: number,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::remove_peer`,\n [eid],\n ['u32'],\n gasOptions\n )\n }\n\n /**\n * Set the delegate address for the OApp - set to @0x0 to remove the delegate\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param delegate Delegate address\n * @returns payload of set_delegate function\n */\n setDelegatePayload(delegate: string): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_delegate`,\n functionArguments: [delegate],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Set the delegate address for the OApp - set to @0x0 to remove the delegate\n * @see {@link setDelegatePayload}\n *\n * @param signer admin account\n * @param delegate Delegate address\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of set_delegate function\n */\n async setDelegate(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n delegate: string,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::set_delegate`,\n [delegate],\n ['address'],\n gasOptions\n )\n }\n\n /**\n * Receive a LayerZero message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_receive.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param extraData Additional data in Uint8Array format\n * @returns payload of lz_receive function\n */\n lzReceivePayload(\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n extraData: Uint8Array\n ): InputEntryFunctionData {\n return {\n function: `${this.oappReceiveModule[0]}::${this.oappReceiveModule[1]}::lz_receive`,\n functionArguments: [srcEid, sender, nonce, guid, message, extraData],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Receive a LayerZero message for an OApp\n * @see {@link lzReceivePayload}\n *\n * @param signer oapp receiver account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param extraData Additional data in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of lz_receive function\n */\n async lzReceive(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n extraData: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappReceiveModule[0]}::${this.oappReceiveModule[1]}::lz_receive`,\n [srcEid, sender, nonce, guid, message, extraData],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Clear a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @returns payload of clear function\n */\n clearPayload(\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array\n ): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::clear`,\n functionArguments: [srcEid, sender, nonce, guid, message],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Clear a message for an OApp\n * @see {@link clearPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param guid Message GUID in Uint8Array format\n * @param message Message content in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of clear function\n */\n async clear(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n guid: Uint8Array,\n message: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::clear`,\n [srcEid, sender, nonce, guid, message],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Skip a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @returns payload of skip function\n */\n skipPayload(srcEid: number, sender: Uint8Array, nonce: bigint): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::skip`,\n functionArguments: [srcEid, sender, nonce],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Skip a message for an OApp\n * @see {@link skipPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of skip function\n */\n async skip(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::skip`,\n [srcEid, sender, nonce],\n ['u32', 'vector<u8>', 'u64'],\n gasOptions\n )\n }\n\n /**\n * Burn a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @returns payload of burn function\n */\n burnPayload(srcEid: number, sender: Uint8Array, nonce: bigint, payloadHash: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::burn`,\n functionArguments: [srcEid, sender, nonce, payloadHash],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Burn a message for an OApp\n * @see {@link burnPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of burn function\n */\n async burn(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n payloadHash: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::burn`,\n [srcEid, sender, nonce, payloadHash],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n gasOptions\n )\n }\n\n /**\n * Nilify a message for an OApp\n * location: packages/layerzero-v2/aptos/contracts/oapps/oft/sources/internal_oapp/oapp_core.move\n *\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @returns payload of nilify function\n */\n nilifyPayload(srcEid: number, sender: Uint8Array, nonce: bigint, payloadHash: Uint8Array): InputEntryFunctionData {\n return {\n function: `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::nilify`,\n functionArguments: [srcEid, sender, nonce, payloadHash],\n functionArgumentTypes: ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Nilify a message for an OApp\n * @see {@link nilifyPayload}\n *\n * @param signer oapp account or delegate account\n * @param srcEid Source EndpointId details: packages/layerzero-definitions/src/enums/endpoint-id.ts\n * @param sender Sender address in Uint8Array format\n * @param nonce Message nonce in u64\n * @param payloadHash Hash of the payload in Uint8Array format\n * @param gasOptions (optional) @see {@link GasOptions}\n * @returns transaction response of nilify function\n */\n async nilify(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n srcEid: number,\n sender: Uint8Array,\n nonce: bigint,\n payloadHash: Uint8Array,\n gasOptions?: GasOptions\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.oappCoreModule[0]}::${this.oappCoreModule[1]}::nilify`,\n [srcEid, sender, nonce, payloadHash],\n ['u32', 'vector<u8>', 'u64', 'vector<u8>'],\n gasOptions\n )\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData, MoveAbortError, MoveResourceNotFoundError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { ArbitrumPriceTraits, Price, UpdatePrice, serializeUpdatePrices } from '../types'\n\n/**\n * This is the PriceFeed SDK that provides initialization and view functions for the PriceFeed contract.\n * @template AccountType - The type of the account.\n */\nexport class PriceFeed<AccountType> {\n module: string[]\n /**\n * Creates an instance of PriceFeed SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.price_feed?.toString() ?? '0x0', 'feeds']\n }\n\n /**\n * Creates a payload for initializing the price feed.\n *\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createInitializeFeedPayload(): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::initialize`,\n functionArguments: [],\n functionArgumentTypes: [],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Checks if the price feed is initialized.\n *\n * @param {string} feedAddress - The feed address.\n * @returns {Promise<boolean>} True if the price feed is initialized, false otherwise.\n */\n async isInitialize(feedAddress: string): Promise<boolean> {\n try {\n const resource = await this.sdk.getAccountResource<{ denominator: bigint }>({\n accountAddress: feedAddress,\n resourceType: `${this.module[0]}::feeds::Feed`,\n })\n const { denominator } = resource\n return denominator !== BigInt(0)\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the price.\n *\n * @param {string} feedAddress - The feed address.\n * @param {UpdatePrice[]} prices - The list of prices to update.\n * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.\n */\n createSetPricePayload(feedAddress: string, prices: UpdatePrice[]): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_price`,\n functionArguments: [feedAddress, serializeUpdatePrices(prices)],\n functionArgumentTypes: ['address', 'vector<u8>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price for the specified feed address and destination endpoint ID.\n *\n * @param {string} feedAddress - The feed address.\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<Price>} The price information.\n */\n async getPrice(feedAddress: string, dstEid: EndpointId): Promise<Price> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_price`,\n functionArgs: [feedAddress, dstEid],\n functionArgTypes: ['address', 'u32'],\n })\n\n const viewResponse = view[0] as [bigint, bigint, number]\n const priceRatio = viewResponse[0]\n const gasPriceInUnit = viewResponse[1]\n const gasPerByte = viewResponse[2]\n\n return {\n priceRatio,\n gasPriceInUnit,\n gasPerByte,\n } satisfies Price\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 2 || e.abortCode === 1)) {\n return {\n priceRatio: BigInt(0),\n gasPriceInUnit: BigInt(0),\n gasPerByte: 0,\n } satisfies Price\n }\n throw e\n }\n }\n\n /**\n * Checks if the specified updater is valid for the given feed.\n *\n * @param {string} updater - The updater address.\n * @param {string} feed - The feed address.\n * @returns {Promise<boolean>} True if the updater is valid, false otherwise.\n */\n async updaterIsValid(updater: string, feed: string): Promise<boolean> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::is_price_updater`,\n functionArgs: [updater, feed],\n functionArgTypes: ['address', 'address'],\n })\n return view[0] as boolean\n } catch (e) {\n if (e instanceof MoveResourceNotFoundError) {\n return false\n } else if (e instanceof MoveAbortError && e.abortCode === 2) {\n return false\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for enabling a feed updater.\n *\n * @param {string} updater - The updater address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createEnableFeedUpdaterPayload(updater: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::enable_feed_updater`,\n functionArguments: [updater],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for disabling a feed updater.\n *\n * @param {string} updater - The updater address.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createDisableFeedUpdaterPayload(updater: string): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::disable_feed_updater`,\n functionArguments: [updater],\n functionArgumentTypes: ['address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the price ratio denominator.\n *\n * @param {bigint} denominator - The price ratio denominator.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDenominatorPayload(denominator: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_denominator`,\n functionArguments: [denominator],\n functionArgumentTypes: ['u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the price ratio denominator for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The price ratio denominator.\n */\n async getPriceRatioDenominator(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_price_ratio_denominator`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the Arbitrum compression percent.\n *\n * @param {bigint} percent - The compression percent.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetArbitrumCompressionPercentPayload(percent: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_arbitrum_compression_percent`,\n functionArguments: [percent],\n functionArgumentTypes: ['u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the Arbitrum compression percent for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The Arbitrum compression percent.\n */\n async getArbitrumCompressionPercent(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_arbitrum_compression_percent`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the Arbitrum traits.\n *\n * @param {string} feed - The feed address.\n * @param {bigint} gasPerL2Tx - The gas per L2 transaction.\n * @param {bigint} gasPerL1CalldataByte - The gas per L1 calldata byte.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetArbitrumTraitsPayload(\n feed: string,\n gasPerL2Tx: bigint,\n gasPerL1CalldataByte: bigint\n ): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_arbitrum_traits`,\n functionArguments: [feed, gasPerL2Tx, gasPerL1CalldataByte],\n functionArgumentTypes: ['address', 'u128', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the Arbitrum price traits for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<ArbitrumPriceTraits>} The Arbitrum price traits.\n */\n async getArbitrumPriceTraits(feed: string): Promise<ArbitrumPriceTraits> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_arbitrum_price_traits`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n const viewResponse = view[0] as [string, string]\n const arbitrumGasPerL2Tx = BigInt(viewResponse[0])\n const arbitrumGasPerL1CalldataByte = BigInt(viewResponse[1])\n return {\n arbitrumGasPerL2Tx,\n arbitrumGasPerL1CalldataByte,\n } satisfies ArbitrumPriceTraits\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return {\n arbitrumGasPerL2Tx: BigInt(0),\n arbitrumGasPerL1CalldataByte: BigInt(0),\n } satisfies ArbitrumPriceTraits\n }\n throw e\n }\n }\n\n /**\n * Creates a payload for setting the native token price in USD.\n *\n * @param {string} feed - The feed address.\n * @param {bigint} nativeTokenPriceUsd - The native token price in USD.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetNativeTokenPriceUsdPayload(feed: string, nativeTokenPriceUsd: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_native_token_price_usd`,\n functionArguments: [feed, nativeTokenPriceUsd],\n functionArgumentTypes: ['address', 'u128'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Gets the native token price in USD for the specified feed.\n *\n * @param {string} feed - The feed address.\n * @returns {Promise<bigint>} The native token price in USD.\n */\n async getNativeTokenPriceUsd(feed: string): Promise<bigint> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_native_token_price_usd`,\n functionArgs: [feed],\n functionArgTypes: ['address'],\n })\n\n return view[0] as bigint\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 2) {\n return BigInt(0)\n }\n throw e\n }\n }\n}\n","import {\n InputEntryFunctionData,\n MnemonicAndPath,\n PrivateKey,\n TransactionResponse,\n} from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\n\n/**\n * This is the SimpleMsgLib SDK that provides functions for interacting with the Simple Message Library contract.\n * @template AccountType - The type of the account.\n */\nexport class SimpleMsgLib<AccountType> {\n module: string[]\n /**\n * Creates an instance of SimpleMsgLib SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.simple_message_lib?.toString() ?? '0x0', 'msglib']\n }\n\n /**\n * Gets the address of the Simple Message Library contract.\n *\n * @returns {string} The address of the Simple Message Library contract.\n */\n getAddress(): string {\n return this.module[0]\n }\n\n /**\n * Creates a payload for setting the messaging fee.\n *\n * @param {bigint} nativeFee - The native fee.\n * @param {bigint} lzTokenFee - The LayerZero token fee.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetMessagingFeePayload(nativeFee: bigint, lzTokenFee: bigint): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_messaging_fee`,\n functionArguments: [nativeFee, lzTokenFee],\n functionArgumentTypes: ['u64', 'u64'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Sets the messaging fee.\n *\n * @param {AccountType | PrivateKey | MnemonicAndPath} signer - The signer of the transaction.\n * @param {bigint} fee - The native fee.\n * @param {bigint} lz - The LayerZero token fee.\n * @returns {Promise<TransactionResponse>} The transaction response.\n */\n async setMessagingFee(\n signer: AccountType | PrivateKey | MnemonicAndPath,\n fee: bigint,\n lz: bigint\n ): Promise<TransactionResponse> {\n return this.sdk.sendAndConfirmTransaction(\n signer,\n `${this.module[0]}::${this.module[1]}::set_messaging_fee`,\n [fee, lz],\n ['u64', 'u64']\n )\n }\n\n /**\n * Gets the messaging fee.\n *\n * @returns {Promise<[bigint, bigint]>} A promise that resolves to a tuple containing the native fee and the LayerZero token fee.\n */\n async getMessagingFee(): Promise<[bigint, bigint]> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_messaging_fee`,\n functionArgs: [],\n })\n return view[0] as [bigint, bigint]\n }\n}\n","import { EndpointId } from '@layerzerolabs/lz-definitions'\nimport { InputEntryFunctionData } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport {\n ExecutorConfig,\n ExecutorConfigResponse,\n UlnConfig,\n UlnConfigResponse,\n VERIFICATION_STATE,\n verificationStateValueOf,\n} from '../types'\n\n/**\n * This is the Uln302 SDK that provides functions for interacting with the ULN 302 contract.\n * @template AccountType - The type of the account.\n */\nexport class Uln302<AccountType> {\n module: string[]\n adminModule: string[]\n uln302StoreModule: string[]\n /**\n * Creates an instance of Uln302 SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'msglib']\n this.adminModule = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'admin']\n this.uln302StoreModule = [sdk.accounts.uln_message_lib?.toString() ?? '0x0', 'uln_302_store']\n }\n\n private emptyUlnConfig: UlnConfig = {\n confirmations: BigInt(0),\n optionalDVNThreshold: 0,\n requiredDVNs: [],\n optionalDVNs: [],\n useDefaultForConfirmations: false,\n useDefaultForRequiredDVNs: false,\n useDefaultForOptionalDVNs: false,\n }\n private emptyExecutorConfig: ExecutorConfig = {\n maxMessageSize: 0,\n executorAddress: '',\n }\n\n /**\n * Gets the address of the ULN 302 contract.\n *\n * @returns {string} The address of the ULN 302 contract.\n */\n getAddress(): string {\n return this.module[0]\n }\n\n // View functions\n\n /**\n * Gets the default ULN send configuration for the specified destination endpoint ID.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @returns {Promise<UlnConfig>} The default ULN send configuration.\n */\n async getDefaultUlnSendConfig(dstEid: EndpointId): Promise<UlnConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_uln_send_config`,\n functionArgs: [dstEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyUlnConfig\n }\n return this.parseUlnConfig(view[0] as UlnConfigResponse)\n }\n\n /**\n * Gets the default ULN receive configuration for the specified source endpoint ID.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @returns {Promise<UlnConfig>} The default ULN receive configuration.\n */\n async getDefaultUlnReceiveConfig(srcEid: EndpointId): Promise<UlnConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_uln_receive_config`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyUlnConfig\n }\n return this.parseUlnConfig(view[0] as UlnConfigResponse)\n }\n\n /**\n * Gets the default executor configuration for the specified source endpoint ID.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @returns {Promise<ExecutorConfig>} The default executor configuration.\n */\n async getDefaultExecutorConfig(srcEid: EndpointId): Promise<ExecutorConfig> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::get_default_executor_config`,\n functionArgs: [srcEid],\n functionArgTypes: ['u32'],\n })\n if (view[0] === null || view[0] === undefined) {\n return this.emptyExecutorConfig\n }\n return this.parseExecutorConfig(view[0] as ExecutorConfigResponse)\n }\n\n /**\n * Gets the opt in/out status of a worker\n * @param workerAddress - The worker address\n * @returns {Promise<boolean>} The opt in/out status of the worker\n */\n async getWorkerConfigForFeeLibRoutingOptIn(workerAddress: string): Promise<boolean> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module[0]}::${this.module[1]}::worker_config_for_fee_lib_routing_opt_in`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n return view[0] as boolean\n }\n\n /**\n * Creates a payload for setting the default ULN send configuration.\n *\n * @param {EndpointId} dstEid - The destination endpoint ID.\n * @param {UlnConfig} ulnConfig - The ULN configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultUlnSendConfigPayload(dstEid: EndpointId, ulnConfig: UlnConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_uln_send_config`,\n functionArguments: [\n dstEid,\n ulnConfig.confirmations,\n ulnConfig.optionalDVNThreshold,\n ulnConfig.requiredDVNs,\n ulnConfig.optionalDVNs,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u8', 'vector<address>', 'vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the default ULN receive configuration.\n *\n * @param {EndpointId} srcEid - The source endpoint ID.\n * @param {UlnConfig} ulnConfig - The ULN configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultUlnReceiveConfigPayload(srcEid: EndpointId, ulnConfig: UlnConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_uln_receive_config`,\n functionArguments: [\n srcEid,\n ulnConfig.confirmations,\n ulnConfig.optionalDVNThreshold,\n ulnConfig.requiredDVNs,\n ulnConfig.optionalDVNs,\n ],\n functionArgumentTypes: ['u32', 'u64', 'u8', 'vector<address>', 'vector<address>'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the default executor configuration.\n *\n * @param {EndpointId} eid - The endpoint ID.\n * @param {ExecutorConfig} executorConfig - The executor configuration.\n * @returns {InputEntryFunctionData} The input entry function data.\n */\n createSetDefaultExecutorConfigPayload(eid: EndpointId, executorConfig: ExecutorConfig): InputEntryFunctionData {\n return {\n function: `${this.adminModule[0]}::${this.adminModule[1]}::set_default_executor_config`,\n functionArguments: [eid, executorConfig.maxMessageSize, executorConfig.executorAddress],\n functionArgumentTypes: ['u32', 'u32', 'address'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Creates a payload for setting the worker config for fee lib routing opt in\n * @param optIn\n */\n createSetWorkerConfigForFeeLibRoutingOptInPayload(optIn: boolean): InputEntryFunctionData {\n return {\n function: `${this.module[0]}::${this.module[1]}::set_worker_config_for_fee_lib_routing_opt_in`,\n functionArguments: [optIn],\n functionArgumentTypes: ['bool'],\n } satisfies InputEntryFunctionData\n }\n\n /**\n * Parses the ULN configuration response.\n *\n * @param {UlnConfigResponse} ulnConfigResponse - The ULN configuration response.\n * @returns {UlnConfig} The parsed ULN configuration.\n */\n private parseUlnConfig(ulnConfigResponse: UlnConfigResponse): UlnConfig {\n return {\n confirmations: ulnConfigResponse.confirmations,\n optionalDVNThreshold: ulnConfigResponse.optional_dvn_threshold,\n requiredDVNs: ulnConfigResponse.required_dvns,\n optionalDVNs: ulnConfigResponse.optional_dvns,\n useDefaultForConfirmations: ulnConfigResponse.use_default_for_confirmations,\n useDefaultForOptionalDVNs: ulnConfigResponse.use_default_for_optional_dvns,\n useDefaultForRequiredDVNs: ulnConfigResponse.use_default_for_required_dvns,\n } satisfies UlnConfig\n }\n\n /**\n * Parses the executor configuration response.\n *\n * @param {ExecutorConfigResponse} executorConfigResponse - The executor configuration response.\n * @returns {ExecutorConfig} The parsed executor configuration.\n */\n private parseExecutorConfig(executorConfigResponse: ExecutorConfigResponse): ExecutorConfig {\n return {\n maxMessageSize: executorConfigResponse.max_message_size,\n executorAddress: executorConfigResponse.executor_address,\n } satisfies ExecutorConfig\n }\n}\n\n/**\n * This is the Views SDK that provides functions for interacting with the ULN 302 contract views.\n * @template AccountType - The type of the account.\n */\nexport class Views<AccountType> {\n module: string\n\n /**\n * Creates an instance of Views SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.module = sdk.accounts.layerzero_views?.toString() ?? '0x0'\n }\n\n /**\n * Checks if the packet is verifiable.\n *\n * @param {Uint8Array} packetHeader - The packet header.\n * @param {Uint8Array} payloadHash - The payload hash.\n * @returns {Promise<VERIFICATION_STATE>} The verification state.\n */\n async verifiable(packetHeader: Uint8Array, payloadHash: Uint8Array): Promise<VERIFICATION_STATE> {\n const view = await this.sdk.viewFunction({\n functionName: `${this.module}::uln_302::verifiable`,\n functionArgs: [packetHeader, payloadHash],\n functionArgTypes: ['vector<u8>', 'vector<u8>'],\n })\n\n const state = view[0] as number\n return verificationStateValueOf(state)\n }\n}\n","import { MoveAbortError } from '@layerzerolabs/move-definitions'\n\nimport { MoveSdkImpl } from '../base'\nimport { WorkerPriceFeedConfig } from '../types'\n\n/**\n * This is the WorkerCommon SDK that provides functions for interacting with the Worker Common contract.\n * @template AccountType - The type of the account.\n */\nexport class WorkerCommon<AccountType> {\n workerConfigModule: string[]\n workerConfigStoreModule: string[]\n\n /**\n * Creates an instance of WorkerCommon SDK.\n *\n * @remarks\n * This constructor is intended to be used internally by the SDK and does not need to be called directly.\n *\n * @param {MoveSdkImpl<AccountType>} sdk - The SDK implementation.\n */\n constructor(private sdk: MoveSdkImpl<AccountType>) {\n this.workerConfigModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config']\n this.workerConfigStoreModule = [sdk.accounts.worker_common?.toString() ?? '0x0', 'worker_config_store']\n }\n\n /**\n * Gets the worker price feed configuration.\n *\n * @param {string} workerAddress - The worker address.\n * @returns {Promise<WorkerPriceFeedConfig>} The worker price feed configuration.\n */\n async getWorkerPriceFeedConfig(workerAddress: string): Promise<WorkerPriceFeedConfig> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.workerConfigModule[0]}::${this.workerConfigModule[1]}::get_worker_price_feed_config`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n const viewResponse = view[0] as [string, string]\n\n return {\n PriceFeed: viewResponse[0],\n FeedAddress: viewResponse[1],\n }\n } catch (e) {\n if (e instanceof MoveAbortError && (e.abortCode === 17 || e.abortCode === 8)) {\n return {\n PriceFeed: '',\n FeedAddress: '',\n }\n }\n throw e\n }\n }\n\n /**\n * Gets the price feed delegate for the specified worker address.\n *\n * @param {string} workerAddress - The worker address.\n * @returns {Promise<string>} The price feed delegate address.\n */\n async getPriceFeedDelegate(workerAddress: string): Promise<string> {\n try {\n const view = await this.sdk.viewFunction({\n functionName: `${this.workerConfigModule[0]}::${this.workerConfigModule[1]}::get_price_feed_delegate`,\n functionArgs: [workerAddress],\n functionArgTypes: ['address'],\n })\n return view[0] as string\n } catch (e) {\n if (e instanceof MoveAbortError && e.abortCode === 17) {\n return ''\n }\n throw e\n }\n }\n}\n","import { MoveSdkImpl } from '../base'\n\nimport { Counter } from './counter'\nimport { DvnWorker } from './dvn-worker'\nimport { Endpoint } from './endpoint'\nimport { EndpointCommon } from './endpoint-common'\nimport { Executor } from './executor'\nimport { Oft } from './oft'\nimport { PriceFeed } from './pricefeed'\nimport { SimpleMsgLib } from './simple-message-lib'\nimport { Uln302, Views } from './uln302'\nimport { WorkerCommon } from './worker-common'\n\nexport class LayerZeroModulesSdk<AccountType> {\n Endpoint: Endpoint<AccountType>\n Uln: Uln302<AccountType>\n Views: Views<AccountType>\n SimpleMsgLib: SimpleMsgLib<AccountType>\n Executor: Executor<AccountType>\n DvnWorker: DvnWorker<AccountType>\n Counter: Counter<AccountType>\n Oft: Oft<AccountType>\n PriceFeed: PriceFeed<AccountType>\n WorkerCommon: WorkerCommon<AccountType>\n EndpointV2Common: EndpointCommon<AccountType>\n\n constructor(sdk: MoveSdkImpl<AccountType>) {\n this.Endpoint = new Endpoint(sdk)\n this.Uln = new Uln302(sdk)\n this.Views = new Views(sdk)\n this.Executor = new Executor(sdk)\n this.SimpleMsgLib = new SimpleMsgLib(sdk)\n this.DvnWorker = new DvnWorker(sdk)\n this.Counter = new Counter(sdk)\n this.Oft = new Oft(sdk)\n this.PriceFeed = new PriceFeed(sdk)\n this.WorkerCommon = new WorkerCommon(sdk)\n this.EndpointV2Common = new EndpointCommon(sdk)\n }\n}\n\nexport { Counter, Oft, DvnWorker, Endpoint, Executor, PriceFeed, Uln302, SimpleMsgLib }\n"]}
|