-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayerzero.config.mainnet.ts
More file actions
71 lines (66 loc) · 1.93 KB
/
layerzero.config.mainnet.ts
File metadata and controls
71 lines (66 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities'
import { OAppEnforcedOption, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat'
import { EndpointId } from '@layerzerolabs/lz-definitions'
import { generateConnectionsConfig } from '@layerzerolabs/metadata-tools'
/**
* WARNING: ONLY 1 ZkVerifyOFTAdapter should exist for a given global mesh.
*/
const zkVerifyContract: OmniPointHardhat = {
eid: EndpointId.ZKVERIFY_V2_MAINNET,
contractName: 'ZkVerifyOFTAdapter',
}
const baseContract: OmniPointHardhat = {
eid: EndpointId.BASE_V2_MAINNET,
contractName: 'ZkVerifyToken',
}
const EVM_ENFORCED_OPTIONS: OAppEnforcedOption[] = [
{
msgType: 1,
optionType: ExecutorOptionType.LZ_RECEIVE,
gas: 110_000,
value: 0,
},
{
msgType: 2,
optionType: ExecutorOptionType.LZ_RECEIVE,
gas: 110_000,
value: 0,
},
{
msgType: 2,
optionType: ExecutorOptionType.COMPOSE,
index: 0,
gas: 110_000,
value: 0,
},
]
export default async function () {
const connections = await generateConnectionsConfig([
[
zkVerifyContract,
baseContract,
[['Horizen'], [['LayerZero Labs'], 1]],
[6, 3],
[EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS],
],
])
return {
contracts: [
{
contract: zkVerifyContract,
config: {
delegate: '0xF7Db1A1Dfb47796F9FD0DB13Ada743054c7B02B4',
owner: '0xF7Db1A1Dfb47796F9FD0DB13Ada743054c7B02B4',
},
},
{
contract: baseContract,
config: {
delegate: '0x4599ECB720dAfa588825084EC9F5c1D699Ccc57f',
owner: '0x4599ECB720dAfa588825084EC9F5c1D699Ccc57f',
},
},
],
connections,
}
}