@layerzerolabs/lz-sui-sdk-v2 3.0.137 → 3.0.138
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 +8 -0
- package/deployments/sui-sandbox-local/blocked_message_lib.json +21 -21
- package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +25 -25
- package/deployments/sui-sandbox-local/counter.json +28 -28
- package/deployments/sui-sandbox-local/dvn.json +19 -19
- package/deployments/sui-sandbox-local/dvn_fee_lib.json +22 -22
- package/deployments/sui-sandbox-local/dvn_layerzero.json +21 -21
- package/deployments/sui-sandbox-local/dvn_ptb_builder.json +17 -17
- package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +29 -29
- package/deployments/sui-sandbox-local/executor.json +14 -14
- package/deployments/sui-sandbox-local/executor_call_type.json +28 -28
- package/deployments/sui-sandbox-local/executor_fee_lib.json +27 -27
- 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 +18 -18
- package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +17 -17
- package/deployments/sui-sandbox-local/oapp.json +18 -18
- package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +4 -4
- package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +4 -4
- package/deployments/sui-sandbox-local/object-Counter.json +4 -4
- package/deployments/sui-sandbox-local/object-CounterAdminCap.json +4 -4
- package/deployments/sui-sandbox-local/object-CounterOApp.json +4 -4
- package/deployments/sui-sandbox-local/object-DVN.json +2 -2
- package/deployments/sui-sandbox-local/object-DVNCap.json +3 -3
- package/deployments/sui-sandbox-local/object-DVNFeeLib.json +4 -4
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +4 -4
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +4 -4
- 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 +1 -1
- package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +4 -4
- package/deployments/sui-sandbox-local/object-PriceFeed.json +4 -4
- package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +4 -4
- package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +4 -4
- package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +4 -4
- package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +4 -4
- package/deployments/sui-sandbox-local/object-Treasury.json +4 -4
- package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +4 -4
- package/deployments/sui-sandbox-local/object-ULN302.json +4 -4
- package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +4 -4
- package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +4 -4
- package/deployments/sui-sandbox-local/object-Uln302Verification.json +4 -4
- package/deployments/sui-sandbox-local/package_whitelist_validator.json +39 -39
- package/deployments/sui-sandbox-local/price_feed.json +28 -28
- package/deployments/sui-sandbox-local/ptb_move_call.json +9 -9
- package/deployments/sui-sandbox-local/simple_message_lib.json +16 -16
- package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +20 -20
- package/deployments/sui-sandbox-local/treasury.json +27 -27
- package/deployments/sui-sandbox-local/uln_302.json +35 -35
- package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +20 -20
- package/dist/index.cjs +83 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +19 -16
- package/dist/index.d.ts +19 -16
- package/dist/index.mjs +83 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/generated/addresses.ts +48 -48
- package/src/modules/oapps/oapp.ts +41 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/lz-sui-sdk-v2",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.138",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"typecheck": "tsc --noEmit"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@layerzerolabs/lz-definitions": "^3.0.
|
|
40
|
+
"@layerzerolabs/lz-definitions": "^3.0.138",
|
|
41
41
|
"@mysten/sui": "^1.33.0",
|
|
42
42
|
"js-sha3": "0.8.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@layerzerolabs/lz-foundation": "^3.0.
|
|
46
|
-
"@layerzerolabs/lz-utilities": "^3.0.
|
|
47
|
-
"@layerzerolabs/lz-v2-utilities": "^3.0.
|
|
48
|
-
"@layerzerolabs/tsup-config-next": "^3.0.
|
|
49
|
-
"@layerzerolabs/typescript-config-next": "^3.0.
|
|
45
|
+
"@layerzerolabs/lz-foundation": "^3.0.138",
|
|
46
|
+
"@layerzerolabs/lz-utilities": "^3.0.138",
|
|
47
|
+
"@layerzerolabs/lz-v2-utilities": "^3.0.138",
|
|
48
|
+
"@layerzerolabs/tsup-config-next": "^3.0.138",
|
|
49
|
+
"@layerzerolabs/typescript-config-next": "^3.0.138",
|
|
50
50
|
"@types/chai": "^4.3.11",
|
|
51
51
|
"@types/chai-as-promised": "^7.1.0",
|
|
52
52
|
"@types/mocha": "^10.0.6",
|
|
@@ -16,43 +16,43 @@ export const PACKAGE_ENDPOINT_V2_ADDRESS: { [stage in Stage]?: string } = {
|
|
|
16
16
|
export const PACKAGE_COUNTER_V2_ADDRESS: { [stage in Stage]?: string } = {
|
|
17
17
|
[Stage.MAINNET]: '0x3437881139cd9b73cf421b14670c6711727a180b85361878f287014164a2eda6',
|
|
18
18
|
[Stage.TESTNET]: '0x7e594c8f3f3e26f8c5d7dfb3103b5f159442995602bd54c5825b4bd40e381880',
|
|
19
|
-
[Stage.SANDBOX]: '
|
|
19
|
+
[Stage.SANDBOX]: '0x431c83c75401db383563c5fd425250a7f92ce2888b09e8fb60d9ce5d90ea6a79',
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
23
23
|
[Stage.MAINNET]: '0x36c149cb51ec8654906de6ec5a51417113e6117819e0d066ea0a28082df21be1',
|
|
24
24
|
[Stage.TESTNET]: '0x7f170d5f0f9ed14d249eebf29053ed7a7fefe429c34fd7dc7b918e54158ef825',
|
|
25
|
-
[Stage.SANDBOX]: '
|
|
25
|
+
[Stage.SANDBOX]: '0x011a27848fca664ea7d3b700b4a4fb2409e465f18e8d1b53deea35c6b08fb729',
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const PACKAGE_ULN_302_ADDRESS: { [stage in Stage]?: string } = {
|
|
29
29
|
[Stage.MAINNET]: '0x3ce7457bed48ad23ee5d611dd3172ae4fbd0a22ea0e846782a7af224d905dbb0',
|
|
30
30
|
[Stage.TESTNET]: '0xf5d69c7b0922ce0ab4540525fbc66ca25ce9f092c64b032b91e4c5625ea0fb24',
|
|
31
|
-
[Stage.SANDBOX]: '
|
|
31
|
+
[Stage.SANDBOX]: '0xb4b0702ad53a75fd743bfedfaac8d948b78064f065df0c56dce130350cf48047',
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export const PACKAGE_ULN_302_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
35
35
|
[Stage.MAINNET]: '0xc4ace88a7bda637cade13cd6e9a012f680f96bc25d47ebf3ad4705be1ce6e754',
|
|
36
36
|
[Stage.TESTNET]: '0x48fde185c0645dde7b8c0adf8b7a060c3722fc93088957cc2dc08ad328ce0c7e',
|
|
37
|
-
[Stage.SANDBOX]: '
|
|
37
|
+
[Stage.SANDBOX]: '0x828a1cf3bbd81cf9b4c15abc7cbd18733c80f8b2e6f6dacdc485b49af30ff8a0',
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const PACKAGE_DVN_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
41
41
|
[Stage.MAINNET]: '0x88837c16e68cf3c83396c3c2173adbc816fa460b2138396f2bb1c27cf2270d7d',
|
|
42
42
|
[Stage.TESTNET]: '0xf21c983443a76cf3fb83bc76cae25ca35e4d1b20471b52a666ac5dac95d17a37',
|
|
43
|
-
[Stage.SANDBOX]: '
|
|
43
|
+
[Stage.SANDBOX]: '0x5a5e28db35f5613801cbd82eb585b672090da63d33e59a6534b2f9c079af75e2',
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export const PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
47
47
|
[Stage.MAINNET]: '0x56ce988a81311193958324bb2df1aefc8af50494fd5e56f5d6a26359b4fa3c0e',
|
|
48
48
|
[Stage.TESTNET]: '0xe964c8cdc0222d5f6b9ae99c4593a679e5903e899cfb84acdaa57f7d6288df55',
|
|
49
|
-
[Stage.SANDBOX]: '
|
|
49
|
+
[Stage.SANDBOX]: '0x0a3e3ed381660f9abc291d2950d719b89453977598764cb9303ff11181964888',
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export const PACKAGE_EXECUTOR_ADDRESS: { [stage in Stage]?: string } = {
|
|
53
53
|
[Stage.MAINNET]: '0x011da80425fb389d1090743a2a33a48c479f4fd218a25db2cdc072b768a47ce5',
|
|
54
54
|
[Stage.TESTNET]: '0xb9fdc6748fb939095e249b22717d564edf890681e387131d6c525d867d30f834',
|
|
55
|
-
[Stage.SANDBOX]: '
|
|
55
|
+
[Stage.SANDBOX]: '0x4052759e22b92afdd0e0684a6f8006d5e71e94154c11ef443aabf2d8ab94b486',
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export const PACKAGE_ZRO_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -70,91 +70,91 @@ export const PACKAGE_CALL_ADDRESS: { [stage in Stage]?: string } = {
|
|
|
70
70
|
export const PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
71
71
|
[Stage.MAINNET]: '0x28417daea895a3dc2e70b5765ec67b99973e612107d56382e399cc75e666f2ba',
|
|
72
72
|
[Stage.TESTNET]: '0x8aa8f8212d35515298213099a317e7d79d54a35d455e17d6c8f0a3e017f37eb5',
|
|
73
|
-
[Stage.SANDBOX]: '
|
|
73
|
+
[Stage.SANDBOX]: '0xe93d4ba7531715a2f3f91eb498f1c2fe91c761be649cace1b270ecff2ecbf9b9',
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export const PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
77
77
|
[Stage.MAINNET]: '0x2371ec787da9163208f2cb30652fab24027f7c82a2d1aefb1964ce0568975428',
|
|
78
78
|
[Stage.TESTNET]: '0x3328ee44a8cf96905dbd2ad78ee6e8f71a2ee9abdba6b1d69d23dbb31b390a4b',
|
|
79
|
-
[Stage.SANDBOX]: '
|
|
79
|
+
[Stage.SANDBOX]: '0xe184273577ab1bcd21a8a2b0fd41dea759d085b012130e9d0a8f7b3efd459744',
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export const PACKAGE_PTB_MOVE_CALL_ADDRESS: { [stage in Stage]?: string } = {
|
|
83
83
|
[Stage.MAINNET]: '0xc44d4a8623333b1a1d1397d23da4f12298b5763390f245dc7acba2ad98fbc2be',
|
|
84
84
|
[Stage.TESTNET]: '0xb824310acecc18cdbc4803d185d7c516dca47b991a5a0e43404e49cd46c91270',
|
|
85
|
-
[Stage.SANDBOX]: '
|
|
85
|
+
[Stage.SANDBOX]: '0xbe27a34fd97e7987f7b85218571bd6229a7799e14322b504e5a1c349c2f5a897',
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
export const PACKAGE_DVN_ADDRESS: { [stage in Stage]?: string } = {
|
|
89
89
|
[Stage.MAINNET]: '0x60d4ef2e0e057d19e947406ccec3ac4d0208adc8e1981964ab2552166a30f461',
|
|
90
90
|
[Stage.TESTNET]: '0xfa5a7bd745a56f3f18f4830563c8b65a737dcfca5b9e5aa281f2f2cd3f6eaf6d',
|
|
91
|
-
[Stage.SANDBOX]: '
|
|
91
|
+
[Stage.SANDBOX]: '0xae0f57c477e818991546e1a140ab02fac306de169a0238a5aca303fb303a1c58',
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export const PACKAGE_DVN_FEE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
95
95
|
[Stage.MAINNET]: '0xc3213e769e222f573edb14c63bf11b6481f3d3b66f2206f5911be07032390883',
|
|
96
96
|
[Stage.TESTNET]: '0xfb596f2afcc4f15ec8660fb241c3a7bc9aa2f9b3b820914b6990202b5f236f2f',
|
|
97
|
-
[Stage.SANDBOX]: '
|
|
97
|
+
[Stage.SANDBOX]: '0x8c8db2c8f188856d4b7efd16ce6a9902214fce4feb8a588bb453854720899a19',
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
export const PACKAGE_EXECUTOR_FEE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
101
101
|
[Stage.MAINNET]: '0x63e8c59b39720d833bffca2f50e51e48ef426ac0c6ab8e92cf6475c42f5bd24e',
|
|
102
102
|
[Stage.TESTNET]: '0xa99c7ca780a6cedfc27d9274c031741b68014886cba04dafe8335c72eeeed0b5',
|
|
103
|
-
[Stage.SANDBOX]: '
|
|
103
|
+
[Stage.SANDBOX]: '0x2182807d0043774e3068dd7b0019273fb6f78167be09e23d28c86a2f0d679a89',
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export const PACKAGE_PRICE_FEED_ADDRESS: { [stage in Stage]?: string } = {
|
|
107
107
|
[Stage.MAINNET]: '0xea932d79771b24103a1cda8e87a65068d6116c047f9dccc3e487cf8316625576',
|
|
108
108
|
[Stage.TESTNET]: '0xa4f8f126dc7e2a763676eab3a6f0a12afaf334baa0f37b41a1e93890cf95ea4c',
|
|
109
|
-
[Stage.SANDBOX]: '
|
|
109
|
+
[Stage.SANDBOX]: '0xc50f65268c017fe12d7d09c2ed4a71985b5968bd2aeb2afceb0deec2b1a8ea46',
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export const PACKAGE_TREASURY_ADDRESS: { [stage in Stage]?: string } = {
|
|
113
113
|
[Stage.MAINNET]: '0x0c26c5b4189f046e7c0866b29be102e4dae63da8df95c28ea08ae244b814fdf1',
|
|
114
114
|
[Stage.TESTNET]: '0xb9ae7adf8193fb0bf2cc99d89dac19ae309c0f1b768d0976166f507c1daa9936',
|
|
115
|
-
[Stage.SANDBOX]: '
|
|
115
|
+
[Stage.SANDBOX]: '0xf49ab11bd37f3114ff19d70d9004f5ca6230bdf918940a0d631573e751dee970',
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export const PACKAGE_OAPP_ADDRESS: { [stage in Stage]?: string } = {
|
|
119
119
|
[Stage.MAINNET]: '0xfdc28afc0110cb2edb94e3e57f2b1ce69b5a99c503b06d15e51cfa212de56e24',
|
|
120
120
|
[Stage.TESTNET]: '0x04c440985f5deab2fb7f821b3288d93225a3e637cf22dda476809836f0533751',
|
|
121
|
-
[Stage.SANDBOX]: '
|
|
121
|
+
[Stage.SANDBOX]: '0xf8d3c5d886cd6488964fea8a91b2c2268c6df8ee89dd7c36aab9abb04e4f8fe0',
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
export const PACKAGE_LAYERZERO_VIEWS_ADDRESS: { [stage in Stage]?: string } = {
|
|
125
125
|
[Stage.MAINNET]: '0xd4f403280fa2c05da6ec6e75c563e88b60326a0300ac71bfea91028772c12f85',
|
|
126
126
|
[Stage.TESTNET]: '0xaab2d0f2a54eef15fd00f03d70b87a015a41ebdc3fd85c0ceaffda969a400c9f',
|
|
127
|
-
[Stage.SANDBOX]: '
|
|
127
|
+
[Stage.SANDBOX]: '0x217aec0b88970b1987932bb2ba0fd4b21fb08cf05923b778c21d37b40ff6f2f1',
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export const PACKAGE_DVN_LAYERZERO_ADDRESS: { [stage in Stage]?: string } = {
|
|
131
131
|
[Stage.MAINNET]: '0x52aa129049de845353484868d1be6e2df6878b0ed2213d94d3c827309aeae685',
|
|
132
132
|
[Stage.TESTNET]: '0x1356fef0c7325536e289e53cc545219cbfbd1490ed762c8d8efb97efa6cfb856',
|
|
133
|
-
[Stage.SANDBOX]: '
|
|
133
|
+
[Stage.SANDBOX]: '0xe85698c8d9f579ea86800aa840c318fc1d6ef7ebf4217d39a10b716f35cdc6ae',
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export const PACKAGE_EXECUTOR_LAYERZERO_ADDRESS: { [stage in Stage]?: string } = {
|
|
137
137
|
[Stage.MAINNET]: '0xde7fe1a6648d587fcc991f124f3aa5b6389340610804108094d5c5fbf61d1989',
|
|
138
138
|
[Stage.TESTNET]: '0xbd529bbc1e862db38c374435c40bb6399f3fffbc097977dbae4b71cfa975adb1',
|
|
139
|
-
[Stage.SANDBOX]: '
|
|
139
|
+
[Stage.SANDBOX]: '0x8d74076b132a6d7c6c05d8fc46a104558b2e3a29cc8ad78b8ef7f7d429b3416e',
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
export const PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS: { [stage in Stage]?: string } = {
|
|
143
143
|
[Stage.MAINNET]: '0xe7358e7dd22bb2ff7d8e8f9f583186af6fb88100b51c5575bc38aeeeff3a8bfa',
|
|
144
144
|
[Stage.TESTNET]: '0xfd259aa95eec6f8b91e0ff3cc5c3313010fbe3226096cf02286b1f843dd036d4',
|
|
145
|
-
[Stage.SANDBOX]: '
|
|
145
|
+
[Stage.SANDBOX]: '0x9fc738e7ec5fa8d43572c8961dcdfb2636a6811f1c9efe2723f79086f043ae8f',
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
export const PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
149
149
|
[Stage.MAINNET]: '0x54bb7dd5dc12abfaf82616f245e9d4f0e3f737b48699371d17556eaaf874eda1',
|
|
150
150
|
[Stage.TESTNET]: '0x8f7e92efeba183d10db22ea61e8a35b46a165f2b42b127ca28740250dde5220a',
|
|
151
|
-
[Stage.SANDBOX]: '
|
|
151
|
+
[Stage.SANDBOX]: '0x422d19e48f6c1f38d37093852df7e716d2c65b596cb4d8ad7f2b9a7b6c791c49',
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
export const PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
155
155
|
[Stage.MAINNET]: '0x578a57771bd2c5ade542211b6216037237147567ed81f6a285f832b657651f47',
|
|
156
156
|
[Stage.TESTNET]: '0xa791dddddc4007c7d13ce2318159f0e0e2f27ad5a5e330dfb821683663df43eb',
|
|
157
|
-
[Stage.SANDBOX]: '
|
|
157
|
+
[Stage.SANDBOX]: '0x97e114a539a698a50c7cd5ad07ad72bcb503818421ee6cbc83f225b842fae634',
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
export const PACKAGE_WORKER_REGISTRY_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -178,67 +178,67 @@ export const OBJECT_ENDPOINT_V2_ADDRESS: { [stage in Stage]?: string } = {
|
|
|
178
178
|
export const OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
179
179
|
[Stage.MAINNET]: '0xecf8e06eb1ff89b3c8a0c9bd2b55024489e9853c3fe7f4a79ae7b21e89b266f3',
|
|
180
180
|
[Stage.TESTNET]: '0xcc22cbdd0961e7ba0522de24c1c38bc3b6265345ac423a68666079a3b558b575',
|
|
181
|
-
[Stage.SANDBOX]: '
|
|
181
|
+
[Stage.SANDBOX]: '0x553e02fe142be99a64d42988c22b2159c16b1f6fd3bfcc8630f7053af9bc16d7',
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
export const OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
185
185
|
[Stage.MAINNET]: '0x3cc367f73aaef63accc01057144ae728fd4f867c97de7022965a77501739e2c3',
|
|
186
186
|
[Stage.TESTNET]: '0xd0e51a7343f9f11bbc7a5d149d9184721a5e0086fa7622279ebe1b3a5db16408',
|
|
187
|
-
[Stage.SANDBOX]: '
|
|
187
|
+
[Stage.SANDBOX]: '0xb476e9d531b0226ed8adcb9a6a6a98aa5339e3a9ea526ba9c4a6c9a6a1623702',
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
export const OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
191
191
|
[Stage.MAINNET]: '0x6a3be6c3ca14ac0b9ea4ef9a980e6e0ae6edcb321cae5d2b750a36177947d734',
|
|
192
192
|
[Stage.TESTNET]: '0x160a37f6df7b23bfd01ae53f376b490d9c0d535253e22d47c87dc8e4048f92b0',
|
|
193
|
-
[Stage.SANDBOX]: '
|
|
193
|
+
[Stage.SANDBOX]: '0xa3bac9c621234bf7c35a7fcb221806cdadceb7e855b5dd939c35feeeed208a4b',
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export const OBJECT_ULN_302_ADDRESS: { [stage in Stage]?: string } = {
|
|
197
197
|
[Stage.MAINNET]: '0x8ebd7a0b102a5f7a3d4a08d84dd853fecc4ae0093be6eb02cf0d11dce7d4861f',
|
|
198
198
|
[Stage.TESTNET]: '0x69541d4feeb08cdd3b20b3502021a676eea0fca4f47d46e423cdc9686df406ff',
|
|
199
|
-
[Stage.SANDBOX]: '
|
|
199
|
+
[Stage.SANDBOX]: '0xb46f1074d8bda6443bdad5c3a70d896f59fbcd70c71c0a3ba3618d989f75fcc1',
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
export const OBJECT_ULN_302_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
203
203
|
[Stage.MAINNET]: '0x2d9803b0a6a2b663f1d629f168c1e26f503bf9a553b63cc4ab3d1652cf23f725',
|
|
204
204
|
[Stage.TESTNET]: '0xf02307bc8f22f0390ebe757a8a9292eba2c784dddde523fec2632d2167f4c02e',
|
|
205
|
-
[Stage.SANDBOX]: '
|
|
205
|
+
[Stage.SANDBOX]: '0x33980165c9589de2fc275e19f4ad3aa4b3381f4bb7bac30374c0e37e8b3159f9',
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
export const OBJECT_ULN_302_VERIFICATION_ADDRESS: { [stage in Stage]?: string } = {
|
|
209
209
|
[Stage.MAINNET]: '0x950f66ed27ec0a01a52bda147d74165d4cc20165f0cee0ecae6aaacde13d7741',
|
|
210
210
|
[Stage.TESTNET]: '0x0769f54f89fdeacccd61384db8e67e7c76f8c33723cfa97940132616600709f9',
|
|
211
|
-
[Stage.SANDBOX]: '
|
|
211
|
+
[Stage.SANDBOX]: '0xcf69dcdae17f7b4a21c9d27122baf29994bd32a9dc50526ea8751a2e15f26af4',
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
export const OBJECT_ULN_302_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
215
215
|
[Stage.MAINNET]: '0xa6a23d2e0bf9d6c3bc82a79113c66f80700fb4642383c6ed3b2e82fee6d60c56',
|
|
216
216
|
[Stage.TESTNET]: '0xec0cb4575348722360fc2ef7a3ddeeeb29024bdfdd0fadeb4b9fe787847af552',
|
|
217
|
-
[Stage.SANDBOX]: '
|
|
217
|
+
[Stage.SANDBOX]: '0x97e8628dfc52fed2fdf6fd04345bb0ac731f646611524f41098174bec916cda9',
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
export const OBJECT_TREASURY_ADDRESS: { [stage in Stage]?: string } = {
|
|
221
221
|
[Stage.MAINNET]: '0x52e0e092bf361557c68bd3b1c370b9c102dc834d874624d910e1656ebc08bedc',
|
|
222
222
|
[Stage.TESTNET]: '0x40a2b309bda42658dd12e967574f6e77170082599a77b158051c31064df82be1',
|
|
223
|
-
[Stage.SANDBOX]: '
|
|
223
|
+
[Stage.SANDBOX]: '0x23ea4195d1b09889c160da7d2f3c857fd9835191955b87d0aee754294c936b56',
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
export const OBJECT_TREASURY_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
227
227
|
[Stage.MAINNET]: '0x97a5b42866c407810cbc0af1676a0dfa93e791e1fc77f859ca94f6c968b1c603',
|
|
228
228
|
[Stage.TESTNET]: '0xe2db6d7632269ccdea6eb9c93a66809b242005f1ac9c0a4ed9a31ef2d0e8b6dd',
|
|
229
|
-
[Stage.SANDBOX]: '
|
|
229
|
+
[Stage.SANDBOX]: '0x4bbcf61f044173db132516c9f273dd850c321902ac1eee3ed4860e353ad3a4d4',
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
export const OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
233
233
|
[Stage.MAINNET]: '0xefa7dac6e455454f56eaa28e17cccd1550c7c831fa3a265d0113936fc89f6c4b',
|
|
234
234
|
[Stage.TESTNET]: '0xb9b05d049cb78fa942b8a259d424f3db42f1a26a8d033a273edce240956bd04a',
|
|
235
|
-
[Stage.SANDBOX]: '
|
|
235
|
+
[Stage.SANDBOX]: '0x7cf98584d87959d985b96c7b3e9e127e0df473665ac4452d7d17b7f7e2d33b26',
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
export const OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
239
239
|
[Stage.MAINNET]: '0x8b16bf1655928282917196b2bcaf4b7736fa1ee8a504145ee618094831ce33a7',
|
|
240
240
|
[Stage.TESTNET]: '0xcb9de2c184b44f26ab981b898b5ad46fb86d05335523bae3bc0c8eee478f28bb',
|
|
241
|
-
[Stage.SANDBOX]: '
|
|
241
|
+
[Stage.SANDBOX]: '0x6c8fe5baf756b9548764eb381701b17b2f2a8edb194e6bc19c6f8ad2be63bcf8',
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
export const OBJECT_DISCOVERY_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -250,19 +250,19 @@ export const OBJECT_DISCOVERY_ADDRESS: { [stage in Stage]?: string } = {
|
|
|
250
250
|
export const OBJECT_COUNTER_ADDRESS: { [stage in Stage]?: string } = {
|
|
251
251
|
[Stage.MAINNET]: '0x69039ba9acc537b0aef87dac91ab9ea49669351886241fc2a3ab63eda0da8c4d',
|
|
252
252
|
[Stage.TESTNET]: '0x47607ddc0f7d906f384da14d868c000499f5ef96dcf214a036322618e61907c5',
|
|
253
|
-
[Stage.SANDBOX]: '
|
|
253
|
+
[Stage.SANDBOX]: '0x6dd84defe23d2e478d29024dc37193cadfb3572e9e429a4176b200145f579cbb',
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
export const OBJECT_COUNTER_OAPP_ADDRESS: { [stage in Stage]?: string } = {
|
|
257
257
|
[Stage.MAINNET]: '0x224b102e85c6e26cf9ebdb991121088478e305632083980329b6cc774f84fbb3',
|
|
258
258
|
[Stage.TESTNET]: '0xacf214933db3da2dc72202c33c8e2dbc694efcc52dea7a76314038e674ba51e8',
|
|
259
|
-
[Stage.SANDBOX]: '
|
|
259
|
+
[Stage.SANDBOX]: '0x92016d5f538933d004c30a4e890be8691236488adffcd2e11d4ceba67b648bd0',
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
export const OBJECT_COUNTER_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
263
263
|
[Stage.MAINNET]: '0x8642113bbf13fe4d0c8daaeb14985286ce406e629072ca0ad585164dc4ca019e',
|
|
264
264
|
[Stage.TESTNET]: '0x4fdd1cba150010d9cfe8f5a9e33179d6a6cd0837441d2a2c4adb5af98298849f',
|
|
265
|
-
[Stage.SANDBOX]: '
|
|
265
|
+
[Stage.SANDBOX]: '0x7eaf3ca8103c8c4c900abaa6381975fe646580127131ad45cee55bfb977dfa81',
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
export const OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -274,31 +274,31 @@ export const OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } =
|
|
|
274
274
|
export const OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS: { [stage in Stage]?: string } = {
|
|
275
275
|
[Stage.MAINNET]: '0xe64fe6d281abb481de8d49953c564c9ea952bd0a1ce62f4f1a6de8812ec427d4',
|
|
276
276
|
[Stage.TESTNET]: '0x57ec59d312b807e12c4af7e5efa9764cba5feb03ebb9a238d3f3547f4d14c78a',
|
|
277
|
-
[Stage.SANDBOX]: '
|
|
277
|
+
[Stage.SANDBOX]: '0xc5909ea6d4ccf1fd128a5f5e192add36864aff625ee388500bee469efc94fc9d',
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
export const OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
281
281
|
[Stage.MAINNET]: '0x07956cd333329d64bc1c889e8b4c451d934ef9a6ac95e876073013e3b470faea',
|
|
282
282
|
[Stage.TESTNET]: '0x385284d0bd5b2cf39bde3bd448ecb64d851c23dbd8f6890b138e5268a88e2304',
|
|
283
|
-
[Stage.SANDBOX]: '
|
|
283
|
+
[Stage.SANDBOX]: '0x683f0baa879f5e0254242e738d9448d6030ab4f1b90af967466b423c63c903e0',
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
export const OBJECT_DVN_ADDRESS: { [stage in Stage]?: string } = {
|
|
287
287
|
[Stage.MAINNET]: '0xff718d782c8881e9bcdca063c1e7999c77ee22d7cc6b34c84d5f6f4c2654f7da',
|
|
288
288
|
[Stage.TESTNET]: '0x4160cd9281e79a93f87f7f45853cd682750102be01f36d1c33ef99ee8cd86e0d',
|
|
289
|
-
[Stage.SANDBOX]: '
|
|
289
|
+
[Stage.SANDBOX]: '0xa0b4a2b69da21919fb3e9d655189420e8a6224422dcb8417944e2bda6c208cd1',
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
export const OBJECT_DVN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
293
293
|
[Stage.MAINNET]: '0x49f6692af37e0887c5c84e74a2b9e67d6826b4ce3d602a296175ca9f8bcf4731',
|
|
294
294
|
[Stage.TESTNET]: '0xf124f6eb30af9ce474d60827cd5df45c207f5fb5c1ea1c45f535c655ca0a776e',
|
|
295
|
-
[Stage.SANDBOX]: '
|
|
295
|
+
[Stage.SANDBOX]: '0x5dc6f1983e071c5deedf3a08bbb64ac9592db40276b623a7701e2d18f099026d',
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
export const OBJECT_DVN_FEE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
299
299
|
[Stage.MAINNET]: '0x7f7ded52a6073633f8d642458b7899b0eaa7cd1ed7fb8098bd61730853afd3f7',
|
|
300
300
|
[Stage.TESTNET]: '0xd433507170ea8cf08c5697128e80fca03f5c03c4a2f639bc632e6647baff63e1',
|
|
301
|
-
[Stage.SANDBOX]: '
|
|
301
|
+
[Stage.SANDBOX]: '0xed0342f688333987128889946630589f7b0f5111636ea9738d6888d4cbc59d61',
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
export const OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -310,25 +310,25 @@ export const OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string }
|
|
|
310
310
|
export const OBJECT_EXECUTOR_ADDRESS: { [stage in Stage]?: string } = {
|
|
311
311
|
[Stage.MAINNET]: '0x5f24ef7da5e93ca930bf3270468bc2268e84cc83e52c129ea3311b0d5df50c8e',
|
|
312
312
|
[Stage.TESTNET]: '0x51816836a18df1cc8bbc0ae840e01da8fef15968ddbb390f4d6b9243b7911f23',
|
|
313
|
-
[Stage.SANDBOX]: '
|
|
313
|
+
[Stage.SANDBOX]: '0x394a0ac4027abde414166d694b9bf503d06481f3422861fa62c5f1d5f9b8ef30',
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
export const OBJECT_EXECUTOR_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
317
317
|
[Stage.MAINNET]: '0x5428977914a0445c605e13a3cd20cd9ea5c2e109da771d782106e01e5a3312e8',
|
|
318
318
|
[Stage.TESTNET]: '0x89a76121547d5a96482244015e908081d776bccbafc9e3f67bc079d560b3b185',
|
|
319
|
-
[Stage.SANDBOX]: '
|
|
319
|
+
[Stage.SANDBOX]: '0xdd3e66f75ee2abe59a57655e6c3c96bb36889cd16def954946013f6757025bf4',
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
export const OBJECT_EXECUTOR_OWNER_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
323
323
|
[Stage.MAINNET]: '0x01b466dea619d0d848d788c1ebb09ff7ee2207fd3d8c5c9b7e90d68d4bd5dbd7',
|
|
324
324
|
[Stage.TESTNET]: '0xf68d901d0426743e97c053f939f0e401e26e4c9bd2b1918227a942aa0acb4498',
|
|
325
|
-
[Stage.SANDBOX]: '
|
|
325
|
+
[Stage.SANDBOX]: '0x2287e26dcfb277e4be9b0d58ff35e9ee0da9b1aa67b3d19aa34ff5e8b9d9aea4',
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
export const OBJECT_EXECUTOR_FEE_LIB_ADDRESS: { [stage in Stage]?: string } = {
|
|
329
329
|
[Stage.MAINNET]: '0x05195518fab7b80e60bc7df11cf791d8658c614e7ed401fc768db77e744e70b3',
|
|
330
330
|
[Stage.TESTNET]: '0x4e0c4cc4aa88b428005a8bb131014fdf9637a3ae042f192b9071119a64a32138',
|
|
331
|
-
[Stage.SANDBOX]: '
|
|
331
|
+
[Stage.SANDBOX]: '0x2ce90eaaf6ef1bfa9e1fbc09f0dc6c929140ce7144330df6e2e77a709ea2a305',
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
export const OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -340,19 +340,19 @@ export const OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS: { [stage in Stage]?: str
|
|
|
340
340
|
export const OBJECT_PRICE_FEED_ADDRESS: { [stage in Stage]?: string } = {
|
|
341
341
|
[Stage.MAINNET]: '0x492ac62cfb43eb1e858a877cf7a0cf396bf38bc1420c727c747ecc19cf9f4e5c',
|
|
342
342
|
[Stage.TESTNET]: '0xc8ae95cdc862a032e4d35f5f4c5dd6d3d07bdde2c7f39460e78e1539cc07dc2d',
|
|
343
|
-
[Stage.SANDBOX]: '
|
|
343
|
+
[Stage.SANDBOX]: '0x99cc94b72a175be5cb25fb5b92985f96a7f6cb032a6746ee0d43b1026c417dd6',
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
export const OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS: { [stage in Stage]?: string } = {
|
|
347
347
|
[Stage.MAINNET]: '0x9d26644fc92bdd8fce114aa2c9333cfc10cc7f1947b238455bb77b8382857cb4',
|
|
348
348
|
[Stage.TESTNET]: '0xe1b167fe636f405def446df32c7d1390b2e4341f7c2af71c6eb358d8fbe4e99b',
|
|
349
|
-
[Stage.SANDBOX]: '
|
|
349
|
+
[Stage.SANDBOX]: '0x86428c7285ebc79bac8d987fbda87414ff93d30b85e7ef2eae3d5a2782bf81c1',
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
export const OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS: { [stage in Stage]?: string } = {
|
|
353
353
|
[Stage.MAINNET]: '0x3ebd427d6237383d163b6d5595889793d52b0171ae908ab6f7159ccfa55b4d94',
|
|
354
354
|
[Stage.TESTNET]: '0x68fd353ff6848cb7281ce3ccbddbd4d651319e6427d71d170b13031416c93c10',
|
|
355
|
-
[Stage.SANDBOX]: '
|
|
355
|
+
[Stage.SANDBOX]: '0x1f86aec48e9062d0177cdda25037ce5faeb0f784117a1463fe9b50bffb121ba7',
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
export const OBJECT_WORKER_REGISTRY_ADDRESS: { [stage in Stage]?: string } = {
|
|
@@ -64,17 +64,11 @@ export class OApp {
|
|
|
64
64
|
this.objects = objects
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// setOAppInfo(oappInfo: OAppInfoV1): void {
|
|
68
|
-
// this.oappInfo = oappInfo
|
|
69
|
-
// }
|
|
70
|
-
|
|
71
67
|
// === Set Functions ===
|
|
72
68
|
|
|
73
69
|
/**
|
|
74
70
|
* Set enforced options for OApp messaging
|
|
75
71
|
* @param tx - The transaction to add the move call to
|
|
76
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
77
|
-
* @param adminCap - The admin capability object ID or transaction argument
|
|
78
72
|
* @param eid - Endpoint ID or transaction argument
|
|
79
73
|
* @param msgType - Message type or transaction argument
|
|
80
74
|
* @param options - Enforced options as bytes or transaction argument
|
|
@@ -102,8 +96,6 @@ export class OApp {
|
|
|
102
96
|
/**
|
|
103
97
|
* Set peer OApp on another chain
|
|
104
98
|
* @param tx - The transaction to add the move call to
|
|
105
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
106
|
-
* @param adminCap - The admin capability object ID or transaction argument
|
|
107
99
|
* @param eid - Peer endpoint ID or transaction argument
|
|
108
100
|
* @param peer - Peer OApp address as bytes or transaction argument
|
|
109
101
|
*/
|
|
@@ -161,7 +153,6 @@ export class OApp {
|
|
|
161
153
|
/**
|
|
162
154
|
* Get OApp CallCap identifier
|
|
163
155
|
* @param tx - The transaction to add the move call to
|
|
164
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
165
156
|
* @returns Transaction result containing the OApp CallCap identifier
|
|
166
157
|
*/
|
|
167
158
|
async getOAppCapIdMoveCall(tx: Transaction): Promise<TransactionResult> {
|
|
@@ -174,7 +165,6 @@ export class OApp {
|
|
|
174
165
|
|
|
175
166
|
/**
|
|
176
167
|
* Get OApp CallCap identifier
|
|
177
|
-
* @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
|
|
178
168
|
* @returns Promise<string> - The OApp CallCap identifier
|
|
179
169
|
*/
|
|
180
170
|
async getOAppCapId(): Promise<string> {
|
|
@@ -190,7 +180,6 @@ export class OApp {
|
|
|
190
180
|
/**
|
|
191
181
|
* Combine enforced options with extra options for message execution
|
|
192
182
|
* @param tx - The transaction to add the move call to
|
|
193
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
194
183
|
* @param eid - Destination endpoint ID or transaction argument
|
|
195
184
|
* @param msgType - Message type or transaction argument
|
|
196
185
|
* @param extraOptions - Extra options to combine with enforced options or transaction argument
|
|
@@ -216,7 +205,6 @@ export class OApp {
|
|
|
216
205
|
|
|
217
206
|
/**
|
|
218
207
|
* Combine enforced options with extra options for message execution
|
|
219
|
-
* @param oapp - The OApp object ID
|
|
220
208
|
* @param eid - Destination endpoint ID
|
|
221
209
|
* @param msgType - Message type
|
|
222
210
|
* @param extraOptions - Extra options to combine with enforced options
|
|
@@ -235,7 +223,6 @@ export class OApp {
|
|
|
235
223
|
/**
|
|
236
224
|
* Get enforced options for a specific destination and message type
|
|
237
225
|
* @param tx - The transaction to add the move call to
|
|
238
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
239
226
|
* @param eid - Destination endpoint ID or transaction argument
|
|
240
227
|
* @param msgType - Message type or transaction argument
|
|
241
228
|
* @returns Transaction result containing enforced options
|
|
@@ -254,7 +241,6 @@ export class OApp {
|
|
|
254
241
|
|
|
255
242
|
/**
|
|
256
243
|
* Get enforced options for a specific destination and message type
|
|
257
|
-
* @param oapp - The OApp object ID
|
|
258
244
|
* @param eid - Destination endpoint ID
|
|
259
245
|
* @param msgType - Message type
|
|
260
246
|
* @returns Promise<Uint8Array> - Enforced options as bytes
|
|
@@ -272,7 +258,6 @@ export class OApp {
|
|
|
272
258
|
/**
|
|
273
259
|
* Check if a peer is configured for a specific destination chain
|
|
274
260
|
* @param tx - The transaction to add the move call to
|
|
275
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
276
261
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
277
262
|
* @returns Transaction result containing boolean result
|
|
278
263
|
*/
|
|
@@ -286,7 +271,6 @@ export class OApp {
|
|
|
286
271
|
|
|
287
272
|
/**
|
|
288
273
|
* Check if a peer is configured for a specific destination chain
|
|
289
|
-
* @param oapp - The OApp object ID
|
|
290
274
|
* @param dstEid - Destination endpoint ID
|
|
291
275
|
* @returns Promise<boolean> - True if peer is configured, false otherwise
|
|
292
276
|
*/
|
|
@@ -303,7 +287,6 @@ export class OApp {
|
|
|
303
287
|
/**
|
|
304
288
|
* Get the configured peer address for a specific destination chain
|
|
305
289
|
* @param tx - The transaction to add the move call to
|
|
306
|
-
* @param oapp - The OApp object ID or transaction argument
|
|
307
290
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
308
291
|
* @returns Transaction result containing peer address
|
|
309
292
|
*/
|
|
@@ -317,7 +300,6 @@ export class OApp {
|
|
|
317
300
|
|
|
318
301
|
/**
|
|
319
302
|
* Get the configured peer address for a specific destination chain
|
|
320
|
-
* @param oapp - The OApp object ID
|
|
321
303
|
* @param dstEid - Destination endpoint ID
|
|
322
304
|
* @returns Promise<Uint8Array> - Peer address as bytes32
|
|
323
305
|
*/
|
|
@@ -333,15 +315,24 @@ export class OApp {
|
|
|
333
315
|
)
|
|
334
316
|
}
|
|
335
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Get OApp information V1 structure
|
|
320
|
+
* @param tx - The transaction to add the move call to
|
|
321
|
+
* @returns Transaction result containing the OApp information V1
|
|
322
|
+
*/
|
|
336
323
|
getOAppInfoV1MoveCall(tx: Transaction): TransactionResult {
|
|
337
324
|
const endpoint = this.moduleManager.getEndpoint()
|
|
338
325
|
const oappInfoRaw = endpoint.getOappInfoMoveCall(tx, this.oappCallCapId) // the new OAppInfo used to be named as lz_receive_info
|
|
339
326
|
return tx.moveCall({
|
|
340
|
-
target:
|
|
327
|
+
target: this.#target('decode', 'oapp_info_v1'),
|
|
341
328
|
arguments: [oappInfoRaw],
|
|
342
329
|
})
|
|
343
330
|
}
|
|
344
331
|
|
|
332
|
+
/**
|
|
333
|
+
* Get OApp information V1 structure
|
|
334
|
+
* @returns Promise<OAppInfoV1> - The OApp information V1
|
|
335
|
+
*/
|
|
345
336
|
async getOAppInfoV1(): Promise<OAppInfoV1> {
|
|
346
337
|
return executeSimulate(
|
|
347
338
|
this.client,
|
|
@@ -354,16 +345,25 @@ export class OApp {
|
|
|
354
345
|
)
|
|
355
346
|
}
|
|
356
347
|
|
|
348
|
+
getOAppInfoV1ExtraInfoMoveCall(tx: Transaction, oappInfo: TransactionArgument): TransactionResult {
|
|
349
|
+
return tx.moveCall({
|
|
350
|
+
target: this.#target('extra_info', 'oapp_info_v1'),
|
|
351
|
+
arguments: [oappInfo],
|
|
352
|
+
})
|
|
353
|
+
}
|
|
354
|
+
|
|
357
355
|
// === Endpoint Call Functions ===
|
|
358
356
|
|
|
359
357
|
/**
|
|
360
358
|
* Register OApp with the endpoint
|
|
361
359
|
* @param tx - The transaction to add the move call to
|
|
360
|
+
* @param oappObjectId - The OApp object ID
|
|
362
361
|
* @param oappInfo - OApp information as bytes (optional)
|
|
363
362
|
* @returns Transaction result containing the messaging channel address
|
|
364
363
|
*/
|
|
365
364
|
async registerOAppMoveCall(
|
|
366
365
|
tx: Transaction,
|
|
366
|
+
oappObjectId: string,
|
|
367
367
|
oappInfo?: Uint8Array | TransactionArgument
|
|
368
368
|
): Promise<TransactionResult> {
|
|
369
369
|
let oappInfoArg: TransactionArgument
|
|
@@ -376,13 +376,11 @@ export class OApp {
|
|
|
376
376
|
// For None
|
|
377
377
|
oappInfoArg = tx.pure.option('vector<u8>', null)
|
|
378
378
|
}
|
|
379
|
-
|
|
380
|
-
const oappInfoObj = await this.#oappInfo()
|
|
381
|
-
const adminCap = await this.getAdminCap(oappInfoObj.oapp_object)
|
|
379
|
+
const adminCap = await this.getAdminCap(oappObjectId)
|
|
382
380
|
return tx.moveCall({
|
|
383
381
|
target: this.#target('register_oapp', 'endpoint_calls'),
|
|
384
382
|
arguments: [
|
|
385
|
-
asObject(tx,
|
|
383
|
+
asObject(tx, oappObjectId),
|
|
386
384
|
asObject(tx, adminCap),
|
|
387
385
|
asObject(tx, this.objects.endpointV2),
|
|
388
386
|
oappInfoArg,
|
|
@@ -413,14 +411,22 @@ export class OApp {
|
|
|
413
411
|
* Set OApp information in the endpoint
|
|
414
412
|
* @param tx - The transaction to add the move call to
|
|
415
413
|
* @param oappInfo - OApp information as bytes
|
|
414
|
+
* @param oappObjectId - Optional OApp object ID (uses configured oapp if not provided)
|
|
416
415
|
*/
|
|
417
|
-
async setOAppInfoMoveCall(
|
|
418
|
-
|
|
419
|
-
|
|
416
|
+
async setOAppInfoMoveCall(
|
|
417
|
+
tx: Transaction,
|
|
418
|
+
oappInfo: Uint8Array | TransactionArgument,
|
|
419
|
+
oappObjectId?: string
|
|
420
|
+
): Promise<void> {
|
|
421
|
+
if (oappObjectId === undefined) {
|
|
422
|
+
const oappInfoObj = await this.#oappInfo()
|
|
423
|
+
oappObjectId = oappInfoObj.oapp_object
|
|
424
|
+
}
|
|
425
|
+
const adminCap = await this.getAdminCap(oappObjectId)
|
|
420
426
|
tx.moveCall({
|
|
421
427
|
target: this.#target('set_oapp_info', 'endpoint_calls'),
|
|
422
428
|
arguments: [
|
|
423
|
-
asObject(tx,
|
|
429
|
+
asObject(tx, oappObjectId),
|
|
424
430
|
asObject(tx, adminCap),
|
|
425
431
|
asObject(tx, this.objects.endpointV2),
|
|
426
432
|
asBytes(tx, oappInfo),
|
|
@@ -703,6 +709,14 @@ export class OApp {
|
|
|
703
709
|
})
|
|
704
710
|
}
|
|
705
711
|
|
|
712
|
+
/**
|
|
713
|
+
* Refresh the cached OApp information by fetching the latest data
|
|
714
|
+
* @returns Promise<void> - Completes when the OApp info is refreshed
|
|
715
|
+
*/
|
|
716
|
+
async refreshOAppInfo(): Promise<void> {
|
|
717
|
+
this.oappInfo = await this.getOAppInfoV1()
|
|
718
|
+
}
|
|
719
|
+
|
|
706
720
|
// === Private Functions ===
|
|
707
721
|
|
|
708
722
|
/**
|