Skip to content

Instantly share code, notes, and snippets.

@bthaile
Last active January 8, 2025 01:41
Show Gist options
  • Select an option

  • Save bthaile/d1a5361adc3e559908e58a74ff8aa925 to your computer and use it in GitHub Desktop.

Select an option

Save bthaile/d1a5361adc3e559908e58a74ff8aa925 to your computer and use it in GitHub Desktop.
mainnet.layerzero.config.ts
import { MainnetV2EndpointId } from '@layerzerolabs/lz-definitions'
import layerZero from './config/layerzero.json'
import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat'
const flowMainnet = layerZero['Flow-Mainnet']
const ethereumMainnet = layerZero['Ethereum-Mainnet']
const EthMainnetContract: OmniPointHardhat = {
eid: MainnetV2EndpointId.ETHEREUM_V2_MAINNET,
contractName: 'PYUSDLocker',
}
const FlowMainnetContract: OmniPointHardhat = {
eid: MainnetV2EndpointId.FLOW_V2_MAINNET,
contractName: 'USDF',
}
const config: OAppOmniGraphHardhat = {
contracts: [{ contract: EthMainnetContract }, { contract: FlowMainnetContract }],
connections: [
{
from: EthMainnetContract,
to: FlowMainnetContract,
config: {
sendLibrary: ethereumMainnet.sendUln302,
receiveLibraryConfig: {
receiveLibrary: ethereumMainnet.receiveUln302,
gracePeriod: BigInt(0),
},
sendConfig: {
executorConfig: {
executor: ethereumMainnet.executor,
maxMessageSize: 10000,
},
ulnConfig: {
confirmations: BigInt(0),
requiredDVNs: ['0x589dedbd617e0cbcb916a9223f4d1300c294236b'],
},
},
receiveConfig: {
ulnConfig: {
confirmations: BigInt(0),
requiredDVNs: ['0x589dedbd617e0cbcb916a9223f4d1300c294236b'],
},
},
},
},
{
from: FlowMainnetContract,
to: EthMainnetContract,
config: {
sendLibrary: flowMainnet.sendUln302,
receiveLibraryConfig: {
receiveLibrary: flowMainnet.receiveUln302,
gracePeriod: BigInt(0),
},
sendConfig: {
executorConfig: {
executor: flowMainnet.executor,
maxMessageSize: 10000,
},
ulnConfig: {
confirmations: BigInt(0),
requiredDVNs: ['0x6788f52439aca6bff597d3eec2dc9a44b8fee842'],
},
},
receiveConfig: {
ulnConfig: {
confirmations: BigInt(0),
requiredDVNs: ['0x6788f52439aca6bff597d3eec2dc9a44b8fee842'],
},
},
},
},
],
}
export default config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment