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
// To connect all the above chains to each other, we need the following pathways:
19
-
// ZamaGatewayTestnet <-> Sepolia
16
+
// To connect the above chains to each other, we need the following pathway:
17
+
// Sepolia -> ZamaGatewayTestnet
20
18
21
-
// For this example's simplicity, we will use the same enforced options values for sending to all chains
22
-
// For production, you should ensure `gas` is set to the correct value through profiling the gas usage of calling GovernanceOAppReceiver._lzReceive(...) on the destination chain
19
+
// We don't use enforce executor gas options here, so we should ensure `options` is set to the correct value through profiling the gas usage of calling GovernanceOAppReceiver._lzReceive(...) on the destination chain.
23
20
// To learn more, read https://docs.layerzero.network/v2/concepts/applications/oapp-standard#execution-options-and-enforced-settings
24
-
constEVM_ENFORCED_OPTIONS: OAppEnforcedOption[]=[
25
-
{
26
-
msgType: 1,
27
-
optionType: ExecutorOptionType.LZ_RECEIVE,
28
-
gas: 80000,
29
-
value: 0,
30
-
},
31
-
]
32
21
33
22
// With the config generator, pathways declared are automatically bidirectional
34
23
// i.e. if you declare A,B there's no need to declare B,A
[15,undefined],// [A to B confirmations, B to A confirmations] // NOTE: undefined is used here because we want an uniderectional pathway
42
-
[EVM_ENFORCED_OPTIONS,undefined],// Chain B enforcedOptions, Chain A enforcedOptions // NOTE: undefined is used here because we want an uniderectional pathway
30
+
[15,undefined],// [A to B confirmations, B to A confirmations] // NOTE: `undefined` is used here because we want an uniderectional pathway
31
+
[undefined,undefined],// NOTE: first `undefined` is because we do not enforce gas, since proposals are arbitrary calls. Instead, we will use a gas profiler to calculate the gas needed for proposal execution and adds a relative buffer on top. Second `undefined` is used here because we want an uniderectional pathway.
43
32
],
44
33
]
45
34
46
35
exportdefaultasyncfunction(){
47
36
// Generate the connections config based on the pathways
0 commit comments