@layerzerolabs/lz-sui-sdk-v2 3.0.134-sui.3 → 3.0.134
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/deployments/sui-sandbox-local/blocked_message_lib.json +18 -18
- package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +25 -25
- package/deployments/sui-sandbox-local/counter.json +47 -82
- package/deployments/sui-sandbox-local/dvn.json +14 -15
- package/deployments/sui-sandbox-local/dvn_call_type.json +21 -21
- package/deployments/sui-sandbox-local/dvn_fee_lib.json +27 -27
- package/deployments/sui-sandbox-local/dvn_layerzero.json +24 -24
- package/deployments/sui-sandbox-local/dvn_ptb_builder.json +14 -14
- package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +26 -26
- package/deployments/sui-sandbox-local/endpoint_v2.json +25 -25
- package/deployments/sui-sandbox-local/executor.json +14 -15
- package/deployments/sui-sandbox-local/executor_call_type.json +28 -28
- package/deployments/sui-sandbox-local/executor_fee_lib.json +28 -28
- package/deployments/sui-sandbox-local/executor_layerzero.json +17 -17
- package/deployments/sui-sandbox-local/executor_ptb_builder.json +21 -21
- package/deployments/sui-sandbox-local/layerzero_views.json +13 -13
- package/deployments/sui-sandbox-local/message_lib_common.json +21 -21
- package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +13 -13
- package/deployments/sui-sandbox-local/oapp.json +21 -23
- package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Counter.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterOApp.json +5 -5
- package/deployments/sui-sandbox-local/object-DVN.json +2 -2
- package/deployments/sui-sandbox-local/object-DVNCap.json +4 -4
- package/deployments/sui-sandbox-local/object-DVNFeeLib.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Executor.json +2 -2
- package/deployments/sui-sandbox-local/object-ExecutorCap.json +4 -4
- package/deployments/sui-sandbox-local/object-ExecutorFeeLib.json +5 -5
- package/deployments/sui-sandbox-local/object-ExecutorOwnerCap.json +2 -2
- package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +5 -5
- package/deployments/sui-sandbox-local/object-PriceFeed.json +5 -5
- package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +5 -5
- package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Treasury.json +5 -5
- package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302Verification.json +5 -5
- package/deployments/sui-sandbox-local/package_whitelist_validator.json +51 -51
- package/deployments/sui-sandbox-local/price_feed.json +39 -39
- package/deployments/sui-sandbox-local/price_feed_call_types.json +19 -19
- package/deployments/sui-sandbox-local/ptb_move_call.json +20 -20
- package/deployments/sui-sandbox-local/simple_message_lib.json +33 -33
- package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +18 -18
- package/deployments/sui-sandbox-local/treasury.json +41 -41
- package/deployments/sui-sandbox-local/uln_302.json +47 -43
- package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +18 -18
- package/deployments/sui-sandbox-local/worker_common.json +14 -15
- package/deployments/sui-testnet/blocked_message_lib.json +22 -22
- package/deployments/sui-testnet/blocked_msglib_ptb_builder.json +29 -29
- package/deployments/sui-testnet/call.json +21 -21
- package/deployments/sui-testnet/counter.json +40 -40
- package/deployments/sui-testnet/dvn.json +21 -22
- package/deployments/sui-testnet/dvn_call_type.json +19 -19
- package/deployments/sui-testnet/dvn_fee_lib.json +26 -26
- package/deployments/sui-testnet/dvn_layerzero.json +24 -24
- package/deployments/sui-testnet/dvn_ptb_builder.json +20 -20
- package/deployments/sui-testnet/endpoint_ptb_builder.json +30 -30
- package/deployments/sui-testnet/endpoint_v2.json +26 -26
- package/deployments/sui-testnet/executor.json +21 -22
- package/deployments/sui-testnet/executor_call_type.json +19 -19
- package/deployments/sui-testnet/executor_fee_lib.json +18 -18
- package/deployments/sui-testnet/executor_layerzero.json +25 -25
- package/deployments/sui-testnet/executor_ptb_builder.json +20 -20
- package/deployments/sui-testnet/layerzero_views.json +13 -13
- package/deployments/sui-testnet/message_lib_common.json +21 -21
- package/deployments/sui-testnet/msglib_ptb_builder_call_types.json +13 -13
- package/deployments/sui-testnet/oapp.json +13 -15
- package/deployments/sui-testnet/object-BlockedMessageLib.json +5 -5
- package/deployments/sui-testnet/object-BlockedMsglibPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Counter.json +5 -5
- package/deployments/sui-testnet/object-CounterAdminCap.json +5 -5
- package/deployments/sui-testnet/object-CounterOApp.json +5 -5
- package/deployments/sui-testnet/object-DVN.json +2 -2
- package/deployments/sui-testnet/object-DVNCap.json +5 -5
- package/deployments/sui-testnet/object-DVNFeeLib.json +5 -5
- package/deployments/sui-testnet/object-EndpointPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-EndpointPtbBuilderAdminCap.json +5 -5
- package/deployments/sui-testnet/object-EndpointV2.json +5 -5
- package/deployments/sui-testnet/object-EndpointV2AdminCap.json +5 -5
- package/deployments/sui-testnet/object-Executor.json +2 -2
- package/deployments/sui-testnet/object-ExecutorCap.json +5 -5
- package/deployments/sui-testnet/object-ExecutorFeeLib.json +5 -5
- package/deployments/sui-testnet/object-ExecutorOwnerCap.json +2 -2
- package/deployments/sui-testnet/object-PackageWhitelistValidator.json +5 -5
- package/deployments/sui-testnet/object-PriceFeed.json +5 -5
- package/deployments/sui-testnet/object-PriceFeedOwnerCap.json +5 -5
- package/deployments/sui-testnet/object-SimpleMessageLib.json +5 -5
- package/deployments/sui-testnet/object-SimpleMessageLibAdminCap.json +5 -5
- package/deployments/sui-testnet/object-SmlPtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Treasury.json +5 -5
- package/deployments/sui-testnet/object-TreasuryAdminCap.json +5 -5
- package/deployments/sui-testnet/object-ULN302.json +5 -5
- package/deployments/sui-testnet/object-ULN302AdminCap.json +5 -5
- package/deployments/sui-testnet/object-Uln302PtbBuilder.json +5 -5
- package/deployments/sui-testnet/object-Uln302Verification.json +5 -5
- package/deployments/sui-testnet/object-ZroCoinMetadata.json +5 -5
- package/deployments/sui-testnet/object-ZroTreasuryCap.json +5 -5
- package/deployments/sui-testnet/package_whitelist_validator.json +44 -44
- package/deployments/sui-testnet/price_feed.json +25 -25
- package/deployments/sui-testnet/price_feed_call_types.json +12 -12
- package/deployments/sui-testnet/ptb_move_call.json +21 -21
- package/deployments/sui-testnet/simple_message_lib.json +29 -29
- package/deployments/sui-testnet/simple_msglib_ptb_builder.json +26 -26
- package/deployments/sui-testnet/treasury.json +58 -30
- package/deployments/sui-testnet/uln_302.json +32 -28
- package/deployments/sui-testnet/uln_302_ptb_builder.json +25 -25
- package/deployments/sui-testnet/utils.json +12 -12
- package/deployments/sui-testnet/worker_common.json +20 -21
- package/deployments/sui-testnet/zro.json +28 -28
- package/dist/index.cjs +418 -1193
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +343 -693
- package/dist/index.d.ts +343 -693
- package/dist/index.mjs +418 -1182
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bcs/index.ts +1 -2
- package/src/generated/addresses.ts +105 -123
- package/src/module-manager.ts +3 -15
- package/src/modules/call.ts +6 -16
- package/src/modules/endpoint.ts +4 -12
- package/src/modules/message-libs/simple-message-lib.ts +2 -3
- package/src/modules/message-libs/uln302.ts +26 -28
- package/src/modules/oapps/counter.ts +50 -34
- package/src/modules/oapps/oapp.ts +74 -489
- package/src/modules/ptb-builders/endpoint-ptb-builder.ts +3 -9
- package/src/modules/ptb-builders/ptb-builder.ts +4 -19
- package/src/modules/ptb-builders/uln302-ptb-builder.ts +0 -5
- package/src/modules/workers/dvn-layerzero.ts +0 -9
- package/src/modules/workers/dvn.ts +6 -214
- package/src/modules/workers/executor-fee-lib.ts +3 -11
- package/src/modules/workers/executor-layerzero.ts +0 -9
- package/src/modules/workers/executor.ts +0 -115
- package/src/modules/workers/index.ts +0 -1
- package/src/modules/workers/treasury.ts +4 -4
- package/src/resource.ts +0 -3
- package/src/sdk.ts +2 -7
- package/src/types/endpoint.ts +1 -2
- package/src/types/modules.ts +0 -1
- package/src/types/options.ts +0 -15
- package/src/utils/transaction.ts +3 -3
- package/deployments/sui-sandbox-local/object-WorkerRegistry.json +0 -9
- package/deployments/sui-sandbox-local/sequential_multi_call.json +0 -45
- package/deployments/sui-sandbox-local/uln_common.json +0 -49
- package/deployments/sui-sandbox-local/worker_registry.json +0 -58
- package/deployments/sui-testnet/object-WorkerRegistry.json +0 -9
- package/deployments/sui-testnet/sequential_multi_call.json +0 -45
- package/deployments/sui-testnet/uln_common.json +0 -49
- package/deployments/sui-testnet/worker_registry.json +0 -58
- package/src/bcs/oapp.ts +0 -14
- package/src/modules/workers/worker-registry.ts +0 -110
- package/src/types/oapp.ts +0 -6
|
@@ -6,15 +6,9 @@ import { ModuleManager } from '../../module-manager'
|
|
|
6
6
|
import { ObjectOptions } from '../../types'
|
|
7
7
|
import { asAddress, asBool, asU32, executeSimulate } from '../../utils'
|
|
8
8
|
|
|
9
|
-
export const
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
EndpointPtbBuilder_EBuilderRegistered: 2,
|
|
13
|
-
EndpointPtbBuilder_EBuilderUnsupported: 3,
|
|
14
|
-
EndpointPtbBuilder_EInvalidBounds: 4,
|
|
15
|
-
EndpointPtbBuilder_EInvalidBuilderAddress: 5,
|
|
16
|
-
EndpointPtbBuilder_EInvalidLibrary: 6,
|
|
17
|
-
EndpointPtbBuilder_EUnauthorized: 7,
|
|
9
|
+
export const LibBuilderManagerErrorCode = {
|
|
10
|
+
// LibBuilderManager related errors (with LibBuilderManager_ prefix)
|
|
11
|
+
LibBuilderManager_EBuilderNotFound: 1,
|
|
18
12
|
} as const
|
|
19
13
|
|
|
20
14
|
const ModuleName = 'endpoint_ptb_builder'
|
|
@@ -2,14 +2,14 @@ import { bcs } from '@mysten/sui/bcs'
|
|
|
2
2
|
import { SuiClient } from '@mysten/sui/client'
|
|
3
3
|
import { Transaction, TransactionResult } from '@mysten/sui/transactions'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { VectorMoveCallBCS } from '../../bcs'
|
|
6
6
|
import {
|
|
7
7
|
Argument,
|
|
8
8
|
BuilderPlaceholderInfo,
|
|
9
9
|
DEFAULT_SIMULATION_TIMES,
|
|
10
10
|
LzComposeVersion,
|
|
11
|
+
LzReceiveVersion,
|
|
11
12
|
MoveCall,
|
|
12
|
-
OAppInfoVersion,
|
|
13
13
|
SimulateResult,
|
|
14
14
|
} from '../../types'
|
|
15
15
|
import { simulateTransaction } from '../../utils/transaction'
|
|
@@ -17,15 +17,6 @@ import { normalizeSuiPackageId } from '../../utils/type-name'
|
|
|
17
17
|
|
|
18
18
|
const MOVE_CALL_MODULE_NAME = 'move_call'
|
|
19
19
|
|
|
20
|
-
export const PtbBuilderErrorCode = {
|
|
21
|
-
// MoveCallsBuilder related errors (matching move_calls_builder.move)
|
|
22
|
-
MoveCallsBuilder_EInvalidMoveCallResult: 1,
|
|
23
|
-
MoveCallsBuilder_EResultIDNotFound: 2,
|
|
24
|
-
|
|
25
|
-
// Argument related errors (matching argument.move)
|
|
26
|
-
Argument_EInvalidArgument: 1,
|
|
27
|
-
} as const
|
|
28
|
-
|
|
29
20
|
export class PtbBuilder {
|
|
30
21
|
public packageId: string
|
|
31
22
|
public readonly client: SuiClient
|
|
@@ -57,10 +48,9 @@ export class PtbBuilder {
|
|
|
57
48
|
async simulateLzReceivePtb(tx: Transaction, sender?: string): Promise<MoveCall[]> {
|
|
58
49
|
const ptbCallsResult = await simulateTransaction(this.client, tx, sender)
|
|
59
50
|
const buffer = Buffer.from(bcs.vector(bcs.u8()).parse(ptbCallsResult[0].value))
|
|
60
|
-
|
|
61
51
|
const version = buffer.readInt16BE()
|
|
62
|
-
if (version ===
|
|
63
|
-
return this.#
|
|
52
|
+
if (version === LzReceiveVersion.VERSION_1) {
|
|
53
|
+
return this.#decodeMoveCallsBytes(new Uint8Array(buffer.subarray(2)))
|
|
64
54
|
}
|
|
65
55
|
throw new Error(`Unknown version: ${version}`)
|
|
66
56
|
}
|
|
@@ -295,11 +285,6 @@ export class PtbBuilder {
|
|
|
295
285
|
return this.#decodeMoveCallsBytes(value)
|
|
296
286
|
}
|
|
297
287
|
|
|
298
|
-
#decodeMoveCallsFromOAppInfoV1(bytes: Uint8Array): MoveCall[] {
|
|
299
|
-
const oappInfo = OAppInfoV1Bcs.parse(bytes)
|
|
300
|
-
return this.#decodeMoveCallsBytes(new Uint8Array(oappInfo.lz_receive_info).subarray(2)) // remove the version prefix
|
|
301
|
-
}
|
|
302
|
-
|
|
303
288
|
/**
|
|
304
289
|
* Decode move calls from raw bytes
|
|
305
290
|
* @param bytes - The raw bytes containing encoded move calls
|
|
@@ -8,11 +8,6 @@ import { asAddress, executeSimulate } from '../../utils'
|
|
|
8
8
|
|
|
9
9
|
const MODULE_NAME = 'uln_302_ptb_builder'
|
|
10
10
|
|
|
11
|
-
export const Uln302PtbBuilderErrorCode = {
|
|
12
|
-
// ULN302 PTB Builder related errors (matching uln_302_ptb_builder.move)
|
|
13
|
-
Uln302PtbBuilder_EWorkerPtbsNotFound: 1,
|
|
14
|
-
} as const
|
|
15
|
-
|
|
16
11
|
export class Uln302PtbBuilder {
|
|
17
12
|
public packageId: string
|
|
18
13
|
public readonly client: SuiClient
|
|
@@ -6,11 +6,6 @@ import { asAddress, asAddressVector, asBytesVector, asObject, asU16, asU32, asU6
|
|
|
6
6
|
|
|
7
7
|
const MODULE_NAME = 'dvn_layerzero'
|
|
8
8
|
|
|
9
|
-
export const DVNLayerzeroErrorCode = {
|
|
10
|
-
// DVNLayerzero related errors (matching dvn_layerzero.move)
|
|
11
|
-
DVNLayerzero_EWorkerCapNotFromPackage: 1,
|
|
12
|
-
} as const
|
|
13
|
-
|
|
14
9
|
export class DvnLayerZero {
|
|
15
10
|
public packageId: string
|
|
16
11
|
public readonly client: SuiClient
|
|
@@ -33,7 +28,6 @@ export class DvnLayerZero {
|
|
|
33
28
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
34
29
|
* @param vid - Verifier ID for the DVN or transaction argument
|
|
35
30
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
36
|
-
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
37
31
|
* @param priceFeed - Price feed object address or transaction argument
|
|
38
32
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
39
33
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
@@ -46,7 +40,6 @@ export class DvnLayerZero {
|
|
|
46
40
|
workerCap: string | TransactionArgument,
|
|
47
41
|
vid: number | TransactionArgument,
|
|
48
42
|
depositAddress: string | TransactionArgument,
|
|
49
|
-
supportedMessageLibs: string[] | TransactionArgument,
|
|
50
43
|
priceFeed: string | TransactionArgument,
|
|
51
44
|
workerFeeLib: string | TransactionArgument,
|
|
52
45
|
defaultMultiplierBps: number | TransactionArgument,
|
|
@@ -60,14 +53,12 @@ export class DvnLayerZero {
|
|
|
60
53
|
asObject(tx, workerCap),
|
|
61
54
|
asU32(tx, vid),
|
|
62
55
|
asAddress(tx, depositAddress),
|
|
63
|
-
asAddressVector(tx, supportedMessageLibs),
|
|
64
56
|
asAddress(tx, priceFeed),
|
|
65
57
|
asAddress(tx, workerFeeLib),
|
|
66
58
|
asU16(tx, defaultMultiplierBps),
|
|
67
59
|
asAddressVector(tx, admins),
|
|
68
60
|
asBytesVector(tx, signers),
|
|
69
61
|
asU64(tx, quorum),
|
|
70
|
-
tx.object(this.moduleManager.objects.workerRegistry),
|
|
71
62
|
],
|
|
72
63
|
})
|
|
73
64
|
}
|
|
@@ -27,21 +27,6 @@ export const DVNErrorCode = {
|
|
|
27
27
|
DVN_EEidNotSupported: 2,
|
|
28
28
|
DVN_EHashAlreadyUsed: 3,
|
|
29
29
|
DVN_EPtbBuilderAlreadyInitialized: 4,
|
|
30
|
-
|
|
31
|
-
// Multisig related errors (matching multisig.move)
|
|
32
|
-
Multisig_EDuplicatedSigner: 1,
|
|
33
|
-
Multisig_EInvalidSignatureLength: 2,
|
|
34
|
-
Multisig_EInvalidSignerLength: 3,
|
|
35
|
-
Multisig_EQuorumIsZero: 4,
|
|
36
|
-
Multisig_ESignaturesLessThanQuorum: 5,
|
|
37
|
-
Multisig_ESignerAlreadyExists: 6,
|
|
38
|
-
Multisig_ESignerNotFound: 7,
|
|
39
|
-
Multisig_ESignerNotInCommittee: 8,
|
|
40
|
-
Multisig_ESignersSizeIsLessThanQuorum: 9,
|
|
41
|
-
|
|
42
|
-
// DVNInfoV1 related errors (matching dvn_info_v1.move)
|
|
43
|
-
DVNInfoV1_EInvalidData: 1,
|
|
44
|
-
DVNInfoV1_EInvalidVersion: 2,
|
|
45
30
|
} as const
|
|
46
31
|
|
|
47
32
|
export class DVN {
|
|
@@ -268,37 +253,6 @@ export class DVN {
|
|
|
268
253
|
|
|
269
254
|
// === Set Functions with Signatures ===
|
|
270
255
|
|
|
271
|
-
/**
|
|
272
|
-
* Set supported message library (admin with signatures)
|
|
273
|
-
* @param tx - The transaction to add the move call to
|
|
274
|
-
* @param adminCap - The admin capability object ID
|
|
275
|
-
* @param messageLib - The message library address
|
|
276
|
-
* @param supported - Whether to support or remove support for the message library
|
|
277
|
-
* @param expiration - Signature expiration timestamp
|
|
278
|
-
* @param signatures - Multisig signatures for authorization
|
|
279
|
-
*/
|
|
280
|
-
setSupportedMessageLibMoveCall(
|
|
281
|
-
tx: Transaction,
|
|
282
|
-
adminCap: string | TransactionArgument,
|
|
283
|
-
messageLib: string | TransactionArgument,
|
|
284
|
-
supported: boolean | TransactionArgument,
|
|
285
|
-
expiration: bigint | number | string | TransactionArgument,
|
|
286
|
-
signatures: Uint8Array | TransactionArgument
|
|
287
|
-
): void {
|
|
288
|
-
tx.moveCall({
|
|
289
|
-
target: this.#target('set_supported_message_lib'),
|
|
290
|
-
arguments: [
|
|
291
|
-
tx.object(this.objects.dvn),
|
|
292
|
-
asObject(tx, adminCap),
|
|
293
|
-
asAddress(tx, messageLib),
|
|
294
|
-
asBool(tx, supported),
|
|
295
|
-
asU64(tx, expiration),
|
|
296
|
-
asBytes(tx, signatures),
|
|
297
|
-
tx.object.clock(),
|
|
298
|
-
],
|
|
299
|
-
})
|
|
300
|
-
}
|
|
301
|
-
|
|
302
256
|
/**
|
|
303
257
|
* Set allowlist status for an OApp sender (admin with signatures)
|
|
304
258
|
* @param tx - The transaction to add the move call to
|
|
@@ -479,33 +433,32 @@ export class DVN {
|
|
|
479
433
|
// Verification Functions
|
|
480
434
|
|
|
481
435
|
/**
|
|
482
|
-
* Verify a packet with DVN signatures (admin with signatures)
|
|
436
|
+
* Verify a packet with DVN signatures (admin with signatures)
|
|
483
437
|
* @param tx - The transaction to add the move call to
|
|
484
438
|
* @param adminCap - The admin capability object ID
|
|
485
|
-
* @param
|
|
439
|
+
* @param verification - The verification object address
|
|
486
440
|
* @param packetHeader - The packet header as bytes
|
|
487
441
|
* @param payloadHash - The payload hash as bytes
|
|
488
442
|
* @param confirmations - Required confirmations count
|
|
489
443
|
* @param expiration - Signature expiration timestamp
|
|
490
444
|
* @param signatures - DVN multisig signatures
|
|
491
|
-
* @returns Transaction result containing the verification Call object
|
|
492
445
|
*/
|
|
493
446
|
verifyMoveCall(
|
|
494
447
|
tx: Transaction,
|
|
495
448
|
adminCap: string | TransactionArgument,
|
|
496
|
-
|
|
449
|
+
verification: string | TransactionArgument,
|
|
497
450
|
packetHeader: Uint8Array | TransactionArgument,
|
|
498
451
|
payloadHash: Uint8Array | TransactionArgument,
|
|
499
452
|
confirmations: bigint | number | string | TransactionArgument,
|
|
500
453
|
expiration: bigint | number | string | TransactionArgument,
|
|
501
454
|
signatures: Uint8Array | TransactionArgument
|
|
502
|
-
):
|
|
503
|
-
|
|
455
|
+
): void {
|
|
456
|
+
tx.moveCall({
|
|
504
457
|
target: this.#target('verify'),
|
|
505
458
|
arguments: [
|
|
506
459
|
tx.object(this.objects.dvn),
|
|
507
460
|
asObject(tx, adminCap),
|
|
508
|
-
|
|
461
|
+
asObject(tx, verification),
|
|
509
462
|
asBytes(tx, packetHeader),
|
|
510
463
|
asBytes32(tx, payloadHash, this.moduleManager.getUtils()),
|
|
511
464
|
asU64(tx, confirmations),
|
|
@@ -802,34 +755,6 @@ export class DVN {
|
|
|
802
755
|
)
|
|
803
756
|
}
|
|
804
757
|
|
|
805
|
-
/**
|
|
806
|
-
* Check if a message library is supported by this DVN
|
|
807
|
-
* @param tx - The transaction to add the move call to
|
|
808
|
-
* @param messageLib - The message library address to check
|
|
809
|
-
* @returns Transaction result containing the support status
|
|
810
|
-
*/
|
|
811
|
-
isSupportedMessageLibMoveCall(tx: Transaction, messageLib: string | TransactionArgument): TransactionResult {
|
|
812
|
-
return tx.moveCall({
|
|
813
|
-
target: this.#target('is_supported_message_lib'),
|
|
814
|
-
arguments: [tx.object(this.objects.dvn), asAddress(tx, messageLib)],
|
|
815
|
-
})
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
/**
|
|
819
|
-
* Check if a message library is supported by this DVN
|
|
820
|
-
* @param messageLib - The message library address to check
|
|
821
|
-
* @returns Promise<boolean> - True if the message library is supported
|
|
822
|
-
*/
|
|
823
|
-
async isSupportedMessageLib(messageLib: string): Promise<boolean> {
|
|
824
|
-
return executeSimulate(
|
|
825
|
-
this.client,
|
|
826
|
-
(tx) => {
|
|
827
|
-
this.isSupportedMessageLibMoveCall(tx, messageLib)
|
|
828
|
-
},
|
|
829
|
-
(result) => bcs.Bool.parse(result[0].value)
|
|
830
|
-
)
|
|
831
|
-
}
|
|
832
|
-
|
|
833
758
|
/**
|
|
834
759
|
* Check if an address is allowlisted
|
|
835
760
|
* @param tx - The transaction to add the move call to
|
|
@@ -1210,65 +1135,6 @@ export class DVN {
|
|
|
1210
1135
|
)
|
|
1211
1136
|
}
|
|
1212
1137
|
|
|
1213
|
-
/**
|
|
1214
|
-
* Get DVN object address from worker registry using this DVN's worker capability (as a move call)
|
|
1215
|
-
* This function chains Move calls to decode worker info and extract the DVN object address
|
|
1216
|
-
* @param tx - The transaction to add the move call to
|
|
1217
|
-
* @returns Transaction result containing the DVN object address
|
|
1218
|
-
*/
|
|
1219
|
-
getDvnObjectAddressMoveCall(tx: Transaction): TransactionResult {
|
|
1220
|
-
// Step 1: Get this DVN's worker capability address
|
|
1221
|
-
const workerCapAddress = this.workerCapAddressMoveCall(tx)
|
|
1222
|
-
|
|
1223
|
-
// Step 2: Get worker info bytes from registry
|
|
1224
|
-
const workerInfoBytes = this.moduleManager
|
|
1225
|
-
.getWorkerRegistry(this.client)
|
|
1226
|
-
.getWorkerInfoMoveCall(tx, workerCapAddress)
|
|
1227
|
-
|
|
1228
|
-
// Step 3: Decode worker info using worker_common::worker_info_v1::decode
|
|
1229
|
-
const workerInfo = tx.moveCall({
|
|
1230
|
-
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::decode`,
|
|
1231
|
-
arguments: [workerInfoBytes],
|
|
1232
|
-
})
|
|
1233
|
-
|
|
1234
|
-
// Step 4: Extract worker_info field from decoded WorkerInfoV1
|
|
1235
|
-
const dvnInfoBytes = tx.moveCall({
|
|
1236
|
-
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::worker_info`,
|
|
1237
|
-
arguments: [workerInfo],
|
|
1238
|
-
})
|
|
1239
|
-
|
|
1240
|
-
// Step 5: Decode DVN info using dvn::dvn_info_v1::decode
|
|
1241
|
-
const dvnInfo = tx.moveCall({
|
|
1242
|
-
target: `${this.packageId}::dvn_info_v1::decode`,
|
|
1243
|
-
arguments: [dvnInfoBytes],
|
|
1244
|
-
})
|
|
1245
|
-
|
|
1246
|
-
// Step 6: Extract dvn_object address from decoded DVNInfoV1
|
|
1247
|
-
return tx.moveCall({
|
|
1248
|
-
target: `${this.packageId}::dvn_info_v1::dvn_object`,
|
|
1249
|
-
arguments: [dvnInfo],
|
|
1250
|
-
})
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
/**
|
|
1254
|
-
* Get DVN object address from worker registry using this DVN's worker capability
|
|
1255
|
-
* This function uses Move calls to decode worker info and extract the DVN object address
|
|
1256
|
-
* @returns Promise<string> - The DVN object address
|
|
1257
|
-
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
1258
|
-
*/
|
|
1259
|
-
async getDvnObjectAddress(): Promise<string> {
|
|
1260
|
-
return executeSimulate(
|
|
1261
|
-
this.client,
|
|
1262
|
-
(tx) => {
|
|
1263
|
-
this.getDvnObjectAddressMoveCall(tx)
|
|
1264
|
-
},
|
|
1265
|
-
(result) => {
|
|
1266
|
-
// The result is the DVN object address directly from the Move call chain
|
|
1267
|
-
return bcs.Address.parse(result[0].value)
|
|
1268
|
-
}
|
|
1269
|
-
)
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
1138
|
// === Witness Functions ===
|
|
1273
1139
|
|
|
1274
1140
|
/**
|
|
@@ -1640,80 +1506,6 @@ export class DVN {
|
|
|
1640
1506
|
})
|
|
1641
1507
|
}
|
|
1642
1508
|
|
|
1643
|
-
/**
|
|
1644
|
-
* Populate verify with DVN verification and ULN verify call
|
|
1645
|
-
* @param tx - The transaction to add the move call to
|
|
1646
|
-
* @param adminCap - The admin capability object ID
|
|
1647
|
-
* @param targetMessageLib - The target message library address (usually ULN302)
|
|
1648
|
-
* @param targetVerification - The verification object address for the target message library
|
|
1649
|
-
* @param packetHeader - The packet header as bytes
|
|
1650
|
-
* @param payloadHash - The payload hash as bytes
|
|
1651
|
-
* @param confirmations - Required confirmations count
|
|
1652
|
-
* @param expiration - Signature expiration timestamp
|
|
1653
|
-
* @param signatures - DVN multisig signatures
|
|
1654
|
-
*/
|
|
1655
|
-
populateVerify(
|
|
1656
|
-
tx: Transaction,
|
|
1657
|
-
adminCap: string | TransactionArgument,
|
|
1658
|
-
targetMessageLib: string,
|
|
1659
|
-
targetVerification: string,
|
|
1660
|
-
packetHeader: Uint8Array | TransactionArgument,
|
|
1661
|
-
payloadHash: Uint8Array | TransactionArgument,
|
|
1662
|
-
confirmations: bigint | number | string | TransactionArgument,
|
|
1663
|
-
expiration: bigint | number | string | TransactionArgument,
|
|
1664
|
-
signatures: Uint8Array | TransactionArgument
|
|
1665
|
-
): void {
|
|
1666
|
-
// Step 1: Call DVN's verifyMoveCall to get the verification call
|
|
1667
|
-
const dvnCall = this.verifyMoveCall(
|
|
1668
|
-
tx,
|
|
1669
|
-
adminCap,
|
|
1670
|
-
targetMessageLib,
|
|
1671
|
-
packetHeader,
|
|
1672
|
-
payloadHash,
|
|
1673
|
-
confirmations,
|
|
1674
|
-
expiration,
|
|
1675
|
-
signatures
|
|
1676
|
-
)
|
|
1677
|
-
|
|
1678
|
-
// Step 2: Get the message library object address based on targetMessageLib
|
|
1679
|
-
const messageLibObjectAddress = this.#getUlnObjectAddress(targetMessageLib)
|
|
1680
|
-
|
|
1681
|
-
tx.moveCall({
|
|
1682
|
-
target: this.#getUlnVerifyTarget(targetMessageLib),
|
|
1683
|
-
arguments: [tx.object(messageLibObjectAddress), asObject(tx, targetVerification), dvnCall],
|
|
1684
|
-
})
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Get message library object address based on targetMessageLib package address
|
|
1689
|
-
* @param targetMessageLib - The target message library package address
|
|
1690
|
-
* @returns Message library object address
|
|
1691
|
-
* @throws Error if targetMessageLib doesn't match any known message library
|
|
1692
|
-
* @private
|
|
1693
|
-
*/
|
|
1694
|
-
#getUlnObjectAddress(targetMessageLib: string): string {
|
|
1695
|
-
// Check if targetMessageLib equals ULN302 package address
|
|
1696
|
-
if (targetMessageLib === this.moduleManager.packages.uln302) {
|
|
1697
|
-
return this.objects.uln302
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
throw new Error('Target message library not match objects')
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
/**
|
|
1704
|
-
* Get ULN verify target path based on targetMessageLib package address
|
|
1705
|
-
* @param targetMessageLib - The target message library package address
|
|
1706
|
-
* @returns Message library verify target path
|
|
1707
|
-
* @throws Error if targetMessageLib doesn't match any known message library
|
|
1708
|
-
* @private
|
|
1709
|
-
*/
|
|
1710
|
-
#getUlnVerifyTarget(targetMessageLib: string): string {
|
|
1711
|
-
if (targetMessageLib === this.moduleManager.packages.uln302) {
|
|
1712
|
-
return `${targetMessageLib}::uln_302::verify`
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
throw new Error('Target message library not match any target')
|
|
1716
|
-
}
|
|
1717
1509
|
/**
|
|
1718
1510
|
* Generate the full target path for move calls
|
|
1719
1511
|
* @param name - The function name to call
|
|
@@ -7,18 +7,10 @@ import { ObjectOptions } from '../../types'
|
|
|
7
7
|
const MODULE_NAME = 'executor_fee_lib'
|
|
8
8
|
|
|
9
9
|
export const ExecutorFeeLibErrorCode = {
|
|
10
|
-
// Executor Fee Lib related errors (
|
|
10
|
+
// Executor Fee Lib related errors (with ExecutorFeeLib_ prefix)
|
|
11
11
|
ExecutorFeeLib_EEidNotSupported: 1,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ExecutorOption_ENoOptions: 1,
|
|
15
|
-
ExecutorOption_EUnsupportedOptionType: 2,
|
|
16
|
-
ExecutorOption_EZeroLzReceiveGasProvided: 3,
|
|
17
|
-
ExecutorOption_EZeroLzComposeGasProvided: 4,
|
|
18
|
-
ExecutorOption_ENativeAmountExceedsCap: 5,
|
|
19
|
-
ExecutorOption_EInvalidLzReceiveOption: 6,
|
|
20
|
-
ExecutorOption_EInvalidNativeDropOption: 7,
|
|
21
|
-
ExecutorOption_EInvalidLzComposeOption: 8,
|
|
12
|
+
ExecutorFeeLib_EInvalidExecutor: 2,
|
|
13
|
+
ExecutorFeeLib_EExecutorAlreadySet: 3,
|
|
22
14
|
} as const
|
|
23
15
|
|
|
24
16
|
export class ExecutorFeeLib {
|
|
@@ -6,11 +6,6 @@ import { asAddress, asAddressVector, asObject, asU16 } from '../../utils'
|
|
|
6
6
|
|
|
7
7
|
const MODULE_NAME = 'executor_layerzero'
|
|
8
8
|
|
|
9
|
-
export const ExecutorLayerzeroErrorCode = {
|
|
10
|
-
// ExecutorLayerzero related errors (matching executor_layerzero.move)
|
|
11
|
-
ExecutorLayerzero_EWorkerCapNotFromPackage: 1,
|
|
12
|
-
} as const
|
|
13
|
-
|
|
14
9
|
export class ExecutorLayerZero {
|
|
15
10
|
public packageId: string
|
|
16
11
|
public readonly client: SuiClient
|
|
@@ -32,7 +27,6 @@ export class ExecutorLayerZero {
|
|
|
32
27
|
* @param tx - The transaction to add the move call to
|
|
33
28
|
* @param workerCap - Worker capability object ID or transaction argument
|
|
34
29
|
* @param depositAddress - Address for fee deposits or transaction argument
|
|
35
|
-
* @param supportedMessageLibs - Array of supported message library addresses or transaction argument
|
|
36
30
|
* @param priceFeed - Price feed object address or transaction argument
|
|
37
31
|
* @param workerFeeLib - Worker fee library address or transaction argument
|
|
38
32
|
* @param defaultMultiplierBps - Default multiplier in basis points or transaction argument
|
|
@@ -43,7 +37,6 @@ export class ExecutorLayerZero {
|
|
|
43
37
|
tx: Transaction,
|
|
44
38
|
workerCap: string | TransactionArgument,
|
|
45
39
|
depositAddress: string | TransactionArgument,
|
|
46
|
-
supportedMessageLibs: string[] | TransactionArgument,
|
|
47
40
|
priceFeed: string | TransactionArgument,
|
|
48
41
|
workerFeeLib: string | TransactionArgument,
|
|
49
42
|
defaultMultiplierBps: number | TransactionArgument,
|
|
@@ -55,13 +48,11 @@ export class ExecutorLayerZero {
|
|
|
55
48
|
arguments: [
|
|
56
49
|
asObject(tx, workerCap),
|
|
57
50
|
asAddress(tx, depositAddress),
|
|
58
|
-
asAddressVector(tx, supportedMessageLibs),
|
|
59
51
|
asAddress(tx, priceFeed),
|
|
60
52
|
asAddress(tx, workerFeeLib),
|
|
61
53
|
asU16(tx, defaultMultiplierBps),
|
|
62
54
|
asAddress(tx, owner),
|
|
63
55
|
asAddressVector(tx, admins),
|
|
64
|
-
tx.object(this.moduleManager.objects.workerRegistry),
|
|
65
56
|
],
|
|
66
57
|
})
|
|
67
58
|
}
|
|
@@ -25,10 +25,6 @@ export const ExecutorErrorCode = {
|
|
|
25
25
|
// Executor related errors (with Executor_ prefix)
|
|
26
26
|
Executor_EEidNotSupported: 1,
|
|
27
27
|
Executor_EInvalidNativeDropAmount: 2,
|
|
28
|
-
|
|
29
|
-
// ExecutorInfoV1 related errors (matching executor_info_v1.move)
|
|
30
|
-
ExecutorInfoV1_EInvalidData: 1,
|
|
31
|
-
ExecutorInfoV1_EInvalidVersion: 2,
|
|
32
28
|
} as const
|
|
33
29
|
|
|
34
30
|
export class Executor {
|
|
@@ -528,30 +524,6 @@ export class Executor {
|
|
|
528
524
|
})
|
|
529
525
|
}
|
|
530
526
|
|
|
531
|
-
/**
|
|
532
|
-
* Set supported message library (owner only)
|
|
533
|
-
* @param tx - The transaction to add the move call to
|
|
534
|
-
* @param ownerCap - The owner capability object ID
|
|
535
|
-
* @param messageLib - The message library address
|
|
536
|
-
* @param supported - Whether to support or remove support for the message library
|
|
537
|
-
*/
|
|
538
|
-
setSupportedMessageLibMoveCall(
|
|
539
|
-
tx: Transaction,
|
|
540
|
-
ownerCap: string | TransactionArgument,
|
|
541
|
-
messageLib: string | TransactionArgument,
|
|
542
|
-
supported: boolean | TransactionArgument
|
|
543
|
-
): void {
|
|
544
|
-
tx.moveCall({
|
|
545
|
-
target: this.#target('set_supported_message_lib'),
|
|
546
|
-
arguments: [
|
|
547
|
-
tx.object(this.objects.executor),
|
|
548
|
-
asObject(tx, ownerCap),
|
|
549
|
-
asAddress(tx, messageLib),
|
|
550
|
-
asBool(tx, supported),
|
|
551
|
-
],
|
|
552
|
-
})
|
|
553
|
-
}
|
|
554
|
-
|
|
555
527
|
/**
|
|
556
528
|
* Set allowlist status for an OApp sender (owner only)
|
|
557
529
|
* @param tx - The transaction to add the move call to
|
|
@@ -838,34 +810,6 @@ export class Executor {
|
|
|
838
810
|
)
|
|
839
811
|
}
|
|
840
812
|
|
|
841
|
-
/**
|
|
842
|
-
* Check if a message library is supported by this executor
|
|
843
|
-
* @param tx - The transaction to add the move call to
|
|
844
|
-
* @param messageLib - The message library address to check
|
|
845
|
-
* @returns Transaction result containing the support status
|
|
846
|
-
*/
|
|
847
|
-
isSupportedMessageLibMoveCall(tx: Transaction, messageLib: string | TransactionArgument): TransactionResult {
|
|
848
|
-
return tx.moveCall({
|
|
849
|
-
target: this.#target('is_supported_message_lib'),
|
|
850
|
-
arguments: [tx.object(this.objects.executor), asAddress(tx, messageLib)],
|
|
851
|
-
})
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* Check if a message library is supported by this executor
|
|
856
|
-
* @param messageLib - The message library address to check
|
|
857
|
-
* @returns Promise<boolean> - True if the message library is supported
|
|
858
|
-
*/
|
|
859
|
-
async isSupportedMessageLib(messageLib: string): Promise<boolean> {
|
|
860
|
-
return executeSimulate(
|
|
861
|
-
this.client,
|
|
862
|
-
(tx) => {
|
|
863
|
-
this.isSupportedMessageLibMoveCall(tx, messageLib)
|
|
864
|
-
},
|
|
865
|
-
(result) => bcs.Bool.parse(result[0].value)
|
|
866
|
-
)
|
|
867
|
-
}
|
|
868
|
-
|
|
869
813
|
/**
|
|
870
814
|
* Check if an address is allowlisted
|
|
871
815
|
* @param tx - The transaction to add the move call to
|
|
@@ -1085,65 +1029,6 @@ export class Executor {
|
|
|
1085
1029
|
)
|
|
1086
1030
|
}
|
|
1087
1031
|
|
|
1088
|
-
/**
|
|
1089
|
-
* Get Executor object address from worker registry using this Executor's worker capability (as a move call)
|
|
1090
|
-
* This function chains Move calls to decode worker info and extract the Executor object address
|
|
1091
|
-
* @param tx - The transaction to add the move call to
|
|
1092
|
-
* @returns Transaction result containing the Executor object address
|
|
1093
|
-
*/
|
|
1094
|
-
getExecutorObjectAddressMoveCall(tx: Transaction): TransactionResult {
|
|
1095
|
-
// Step 1: Get this Executor's worker capability address
|
|
1096
|
-
const workerCapAddress = this.workerCapAddressMoveCall(tx)
|
|
1097
|
-
|
|
1098
|
-
// Step 2: Get worker info bytes from registry
|
|
1099
|
-
const workerInfoBytes = this.moduleManager
|
|
1100
|
-
.getWorkerRegistry(this.client)
|
|
1101
|
-
.getWorkerInfoMoveCall(tx, workerCapAddress)
|
|
1102
|
-
|
|
1103
|
-
// Step 3: Decode worker info using worker_common::worker_info_v1::decode
|
|
1104
|
-
const workerInfo = tx.moveCall({
|
|
1105
|
-
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::decode`,
|
|
1106
|
-
arguments: [workerInfoBytes],
|
|
1107
|
-
})
|
|
1108
|
-
|
|
1109
|
-
// Step 4: Extract worker_info field from decoded WorkerInfoV1
|
|
1110
|
-
const executorInfoBytes = tx.moveCall({
|
|
1111
|
-
target: `${this.moduleManager.packages.workerCommon}::worker_info_v1::worker_info`,
|
|
1112
|
-
arguments: [workerInfo],
|
|
1113
|
-
})
|
|
1114
|
-
|
|
1115
|
-
// Step 5: Decode Executor info using executor::executor_info_v1::decode
|
|
1116
|
-
const executorInfo = tx.moveCall({
|
|
1117
|
-
target: `${this.packageId}::executor_info_v1::decode`,
|
|
1118
|
-
arguments: [executorInfoBytes],
|
|
1119
|
-
})
|
|
1120
|
-
|
|
1121
|
-
// Step 6: Extract executor_object address from decoded ExecutorInfoV1
|
|
1122
|
-
return tx.moveCall({
|
|
1123
|
-
target: `${this.packageId}::executor_info_v1::executor_object`,
|
|
1124
|
-
arguments: [executorInfo],
|
|
1125
|
-
})
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
/**
|
|
1129
|
-
* Get Executor object address from worker registry using this Executor's worker capability
|
|
1130
|
-
* This function uses Move calls to decode worker info and extract the Executor object address
|
|
1131
|
-
* @returns Promise<string> - The Executor object address
|
|
1132
|
-
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
1133
|
-
*/
|
|
1134
|
-
async getExecutorObjectAddress(): Promise<string> {
|
|
1135
|
-
return executeSimulate(
|
|
1136
|
-
this.client,
|
|
1137
|
-
(tx) => {
|
|
1138
|
-
this.getExecutorObjectAddressMoveCall(tx)
|
|
1139
|
-
},
|
|
1140
|
-
(result) => {
|
|
1141
|
-
// The result is the Executor object address directly from the Move call chain
|
|
1142
|
-
return bcs.Address.parse(result[0].value)
|
|
1143
|
-
}
|
|
1144
|
-
)
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1032
|
// === Private Helper Functions ===
|
|
1148
1033
|
|
|
1149
1034
|
private parseDstConfig(data: Uint8Array): DstConfig {
|
|
@@ -9,10 +9,10 @@ import { asAddress, asBool, asU64, executeSimulate } from '../../utils'
|
|
|
9
9
|
const MODULE_NAME = 'treasury'
|
|
10
10
|
|
|
11
11
|
export const TreasuryErrorCode = {
|
|
12
|
-
// Treasury related errors
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
// Treasury related errors
|
|
13
|
+
TREASURY_EZroNotEnabled: 1,
|
|
14
|
+
TREASURY_EInvalidFeeRecipient: 2,
|
|
15
|
+
TREASURY_EInvalidNativeFeeBp: 3,
|
|
16
16
|
} as const
|
|
17
17
|
|
|
18
18
|
export class Treasury {
|
package/src/resource.ts
CHANGED
|
@@ -33,8 +33,6 @@ const PACKAGE_ADDRESS_MAP: { [K in keyof PackageOptions]: Partial<{ [S in Stage]
|
|
|
33
33
|
oapp: AddressConstants.PACKAGE_OAPP_ADDRESS,
|
|
34
34
|
layerzeroViews: AddressConstants.PACKAGE_LAYERZERO_VIEWS_ADDRESS,
|
|
35
35
|
packageWhitelistValidator: AddressConstants.PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS,
|
|
36
|
-
workerRegistry: AddressConstants.PACKAGE_WORKER_REGISTRY_ADDRESS,
|
|
37
|
-
workerCommon: AddressConstants.PACKAGE_WORKER_COMMON_ADDRESS,
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
/**
|
|
@@ -69,7 +67,6 @@ const OBJECT_ADDRESS_MAP: { [K in keyof ObjectOptions]: Partial<{ [S in Stage]:
|
|
|
69
67
|
priceFeed: AddressConstants.OBJECT_PRICE_FEED_ADDRESS,
|
|
70
68
|
priceFeedOwnerCap: AddressConstants.OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS,
|
|
71
69
|
packageWhitelistValidator: AddressConstants.OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS,
|
|
72
|
-
workerRegistry: AddressConstants.OBJECT_WORKER_REGISTRY_ADDRESS,
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
/**
|