@@ -16,6 +16,7 @@ const INCLUDE_EVM = true
1616const INCLUDE_SOLANA = false // Set to true when you deploy Solana OFT
1717const INCLUDE_SUI = true
1818const INCLUDE_STARKNET = true
19+ const INCLUDE_APTOS = true
1920
2021// =============================================================================
2122// ENFORCED OPTIONS
@@ -59,13 +60,23 @@ const STARKNET_ENFORCED_OPTIONS: OAppEnforcedOption[] = [
5960 } ,
6061]
6162
63+ const APTOS_ENFORCED_OPTIONS : OAppEnforcedOption [ ] = [
64+ {
65+ msgType : 1 ,
66+ optionType : ExecutorOptionType . LZ_RECEIVE ,
67+ gas : 50000 , // Gas units for lzReceive on Aptos
68+ value : 0 ,
69+ } ,
70+ ]
71+
6272// =============================================================================
6373// DEPLOYMENT TYPES
6474// =============================================================================
6575
6676type SolanaDeployment = { oftStore : string }
6777type SuiDeployment = { oftPackageId : string }
6878type StarknetDeployment = { oftAddress : string }
79+ type AptosDeployment = { oftAddress : string }
6980
7081// =============================================================================
7182// HELPER FUNCTIONS
@@ -134,6 +145,16 @@ const starknetContract: OmniPointHardhat | null =
134145 }
135146 : null
136147
148+ // Aptos Contract
149+ const aptosDeployment = loadJsonOptional < AptosDeployment > ( './aptos/deploy.json' )
150+ const aptosContract : OmniPointHardhat | null =
151+ INCLUDE_APTOS && aptosDeployment ?. oftAddress
152+ ? {
153+ eid : EndpointId . APTOS_V2_MAINNET ,
154+ address : aptosDeployment . oftAddress ,
155+ }
156+ : null
157+
137158// =============================================================================
138159// PATHWAY GENERATION
139160// =============================================================================
@@ -178,6 +199,9 @@ const generatePathways = (): Pathway[] => {
178199 if ( starknetContract ) {
179200 contracts . push ( { contract : starknetContract , options : STARKNET_ENFORCED_OPTIONS , dvns : [ ] } )
180201 }
202+ if ( aptosContract ) {
203+ contracts . push ( { contract : aptosContract , options : APTOS_ENFORCED_OPTIONS , dvns : [ 'LayerZero Labs' ] } )
204+ }
181205
182206 // Generate full mesh pathways
183207 for ( let i = 0 ; i < contracts . length ; i ++ ) {
@@ -211,6 +235,7 @@ export default async function () {
211235 if ( solanaContract ) contracts . push ( { contract : solanaContract } )
212236 if ( suiContract ) contracts . push ( { contract : suiContract } )
213237 if ( starknetContract ) contracts . push ( { contract : starknetContract } )
238+ if ( aptosContract ) contracts . push ( { contract : aptosContract } )
214239
215240 console . log ( `LayerZero Config: ${ contracts . length } contracts, ${ pathways . length } pathways` )
216241 console . log ( ` Contracts: ${ contracts . map ( ( c ) => c . contract . eid ) . join ( ', ' ) } ` )
0 commit comments