You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/oft-adapter/.eslintrc.js
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,5 +7,6 @@ module.exports = {
7
7
// @layerzerolabs/eslint-config-next defines rules for turborepo-based projects
8
8
// that are not relevant for this particular project
9
9
'turbo/no-undeclared-env-vars': 'off',
10
+
'import/no-unresolved': 'warn',// Updated to warn to avoid erratic popping up of this particular error for '@layerzerolabs/metadata-tools' even when the package has been installed correctly
* WARNING: ONLY 1 OFTAdapter should exist for a given global mesh.
@@ -17,59 +20,69 @@ import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/tool
17
20
* },
18
21
* },
19
22
*/
20
-
constsepoliaContract: OmniPointHardhat={
21
-
eid: EndpointId.SEPOLIA_V2_TESTNET,
23
+
constoptimismContract: OmniPointHardhat={
24
+
eid: EndpointId.OPTSEP_V2_TESTNET,
22
25
contractName: 'MyOFTAdapter',
23
26
}
24
27
25
-
constfujiContract: OmniPointHardhat={
28
+
constavalancheContract: OmniPointHardhat={
26
29
eid: EndpointId.AVALANCHE_V2_TESTNET,
27
30
contractName: 'MyOFT',
28
31
}
29
32
30
-
constamoyContract: OmniPointHardhat={
31
-
eid: EndpointId.AMOY_V2_TESTNET,
33
+
constarbitrumContract: OmniPointHardhat={
34
+
eid: EndpointId.ARBSEP_V2_TESTNET,
32
35
contractName: 'MyOFT',
33
36
}
34
37
35
-
constconfig: OAppOmniGraphHardhat={
36
-
contracts: [
37
-
{
38
-
contract: fujiContract,
39
-
},
40
-
{
41
-
contract: sepoliaContract,
42
-
},
43
-
{
44
-
contract: amoyContract,
45
-
},
38
+
// To connect all the above chains to each other, we need the following pathways:
39
+
// Optimism <-> Avalanche
40
+
// Optimism <-> Arbitrum
41
+
// Avalanche <-> Arbitrum
42
+
43
+
// For this example's simplicity, we will use the same enforced options values for sending to all chains
44
+
// For production, you should ensure `gas` is set to the correct value through profiling the gas usage of calling OFT._lzReceive(...) on the destination chain
45
+
// To learn more, read https://docs.layerzero.network/v2/concepts/applications/oapp-standard#execution-options-and-enforced-settings
46
+
constEVM_ENFORCED_OPTIONS: OAppEnforcedOption[]=[
47
+
{
48
+
msgType: 1,
49
+
optionType: ExecutorOptionType.LZ_RECEIVE,
50
+
gas: 80000,
51
+
value: 0,
52
+
},
53
+
]
54
+
55
+
// With the config generator, pathways declared are automatically bidirectional
56
+
// i.e. if you declare A,B there's no need to declare B,A
0 commit comments