-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayerzero.config.ts
More file actions
57 lines (52 loc) · 1.72 KB
/
Copy pathlayerzero.config.ts
File metadata and controls
57 lines (52 loc) · 1.72 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
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';
const ethereumContract: OmniPointHardhat = {
eid: EndpointId.ETHEREUM_V2_MAINNET,
contractName: 'SPKOFTAdapter',
};
const bscContract: OmniPointHardhat = {
eid: EndpointId.BSC_V2_MAINNET,
contractName: 'SPKOFT',
};
const EVM_ENFORCED_OPTIONS: OAppEnforcedOption[] = [
{
msgType: 1,
optionType: ExecutorOptionType.LZ_RECEIVE,
gas: 100000,
value: 0,
},
];
export default async function () {
// note: pathways declared here are automatically bidirectional
// if you declare A,B there's no need to declare B,A
const connections = await generateConnectionsConfig([
[
ethereumContract, // Chain A contract
bscContract, // Chain B contract
[['LayerZero Labs', 'Google'], []], // [ requiredDVN[], [ optionalDVN[], threshold ] ]
[15, 20], // [A to B confirmations, B to A confirmations]
[EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS], // Chain B enforcedOptions, Chain A enforcedOptions
],
]);
return {
contracts: [
{
contract: ethereumContract,
config: {
delegate: '0x7a27a9f2A823190140cfb4027f4fBbfA438bac79',
owner: '0x7a27a9f2A823190140cfb4027f4fBbfA438bac79'
}
},
{
contract: bscContract,
config: {
delegate: '0x7a27a9f2A823190140cfb4027f4fBbfA438bac79',
owner: '0x7a27a9f2A823190140cfb4027f4fBbfA438bac79'
}
}
],
connections,
};
}