-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding changes from previous branch to new + fixing stricter linting
- Loading branch information
1 parent
1d96927
commit e811648
Showing
68 changed files
with
18,303 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import { EndpointId } from '@layerzerolabs/lz-definitions-v3' | ||
import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities-v3' | ||
|
||
import { bscConfig } from './evmOAppConfig' | ||
|
||
import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' | ||
|
||
const bscContract: OmniPointHardhat = { | ||
eid: EndpointId.BSC_V2_TESTNET, | ||
contractName: 'MyOFT', | ||
} | ||
|
||
const aptosContract: OmniPointHardhat = { | ||
eid: EndpointId.APTOS_V2_TESTNET, | ||
contractName: 'oft', | ||
} | ||
|
||
const config: OAppOmniGraphHardhat = { | ||
contracts: [ | ||
{ | ||
contract: bscContract, | ||
config: bscConfig.accountConfig, | ||
}, | ||
{ | ||
contract: aptosContract, | ||
config: { | ||
delegate: '58b730d07e98a22f2b357bee721115c986e4dc873c1884763708ee3d4006f74e', | ||
owner: '58b730d07e98a22f2b357bee721115c986e4dc873c1884763708ee3d4006f74e', | ||
}, | ||
}, | ||
], | ||
connections: [ | ||
{ | ||
from: aptosContract, | ||
to: bscContract, | ||
config: { | ||
enforcedOptions: [ | ||
{ | ||
msgType: 1, | ||
optionType: ExecutorOptionType.LZ_RECEIVE, | ||
gas: 80000, // gas limit in wei for EndpointV2.lzReceive | ||
value: 0, // msg.value in wei for EndpointV2.lzReceive | ||
}, | ||
{ | ||
msgType: 2, | ||
optionType: ExecutorOptionType.LZ_RECEIVE, | ||
gas: 80000, // gas limit in wei for EndpointV2.lzCompose | ||
value: 0, // msg.value in wei for EndpointV2.lzCompose | ||
}, | ||
], | ||
sendLibrary: '0xbe533727aebe97132ec0a606d99e0ce137dbdf06286eb07d9e0f7154df1f3f10', | ||
receiveLibraryConfig: { | ||
// Required Receive Library Address on Aptos | ||
receiveLibrary: '0xbe533727aebe97132ec0a606d99e0ce137dbdf06286eb07d9e0f7154df1f3f10', | ||
// Optional Grace Period for Switching Receive Library Address on Aptos | ||
gracePeriod: BigInt(0), | ||
}, | ||
// Optional Receive Library Timeout for when the Old Receive Library Address will no longer be valid on Aptos | ||
receiveLibraryTimeoutConfig: { | ||
lib: '0xbe533727aebe97132ec0a606d99e0ce137dbdf06286eb07d9e0f7154df1f3f10', | ||
expiry: BigInt(1000000000), | ||
}, | ||
sendConfig: { | ||
executorConfig: { | ||
maxMessageSize: 10000, | ||
// The configured Executor address on Aptos | ||
executor: '0xeb514e8d337485dd9ce7492f70128ef5aaa8c34023866e261a24ffa3d61a686d', | ||
}, | ||
ulnConfig: { | ||
// The number of block confirmations to wait on Aptos before emitting the message from the source chain. | ||
confirmations: BigInt(0), | ||
// The address of the DVNs you will pay to verify a sent message on the source chain. | ||
// The destination tx will wait until ALL `requiredDVNs` verify the message. | ||
requiredDVNs: [], | ||
// The address of the DVNs you will pay to verify a sent message on the source chain. | ||
// The destination tx will wait until the configured threshold of `optionalDVNs` verify a message. | ||
optionalDVNs: [], | ||
// The number of `optionalDVNs` that need to successfully verify the message for it to be considered Verified. | ||
optionalDVNThreshold: 0, | ||
}, | ||
}, | ||
// Optional Receive Configuration | ||
// @dev Controls how the `from` chain receives messages from the `to` chain. | ||
receiveConfig: { | ||
ulnConfig: { | ||
// The number of block confirmations to expect from the `to` chain. | ||
confirmations: BigInt(0), | ||
// The address of the DVNs your `receiveConfig` expects to receive verifications from on the `from` chain. | ||
// The `from` chain's OApp will wait until the configured threshold of `requiredDVNs` verify the message. | ||
requiredDVNs: [], | ||
// The address of the `optionalDVNs` you expect to receive verifications from on the `from` chain. | ||
// The destination tx will wait until the configured threshold of `optionalDVNs` verify the message. | ||
optionalDVNs: [], | ||
// The number of `optionalDVNs` that need to successfully verify the message for it to be considered Verified. | ||
optionalDVNThreshold: 0, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
from: bscContract, | ||
to: aptosContract, | ||
config: bscConfig.oappConfig, | ||
}, | ||
], | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"sandbox-addresses": { | ||
"oft_common": "0x49eec680042ba13d54b2343f1551aadfb3dbf549da4f5a3ab55dd49316c1732f", | ||
"router_node_0": "0xde8f887ac62c3ddad6de4df32e30977f0327c8cfeca56e5981dec1f111e189c1", | ||
"simple_msglib": "0xbb29964fac328dc2cd1dbf03982e51fad9de67e2a525c35d6e52cde4b66e7997", | ||
"blocked_msglib": "0xfe58a1557dd30f5f69df9ebd0466f514840fba81a4c6fbcd536f088fe9e58100", | ||
"uln_302": "0x3f2714ef2d63f1128f45e4a3d31b354c1c940ccdb38aca697c9797ef95e7a09f", | ||
"router_node_1": "0x3dc5c01fde9a92724de233adc32878638ddc98b2178282d137ba2bafb1f4b935", | ||
"endpoint_v2_common": "0xf8ce9f0030cb1fa5fb48f481d9b2da3909cd922992e7085e76a196653a707bbf", | ||
"endpoint_v2": "0x824f76b2794de0a0bf25384f2fde4db5936712e6c5c45cf2c3f9ef92e75709c", | ||
"layerzero_admin": "0x75de231a1ea32a14ed5be6a52475b16d7d8eeac35d378afd4c361979c0ae1531", | ||
"layerzero_treasury_admin": "0x75de231a1ea32a14ed5be6a52475b16d7d8eeac35d378afd4c361979c0ae1531", | ||
"msglib_types": "0x147b2ca35d8d6101a49690b3c108e67b174665d13b0fbba515e3b99d48b9fe42", | ||
"treasury": "0xd83cb5c494daec692964a3599c3b36d4bd618dc54e7bcb2bbe444a7f9732f740", | ||
"worker_peripherals": "0x75de231a1ea32a14ed5be6a52475b16d7d8eeac35d378afd4c361979c0ae1531", | ||
"price_feed_router_0": "0x86c53b1187769b354e59b44111d90ab74f3162240d3f35ea1ca451281137cf2c", | ||
"price_feed_router_1": "0xd78078a798d87940a9783ea4b8b09eb47117f36f23f57fe31a96faeb775046c4", | ||
"price_feed_module_0": "0x894473c4f48d05a65d5bfb106ab91bc0881c7a1c7e9c66fbea2859c2ba9bff83", | ||
"worker_common": "0x9d8a2cc4cd5563028107b792fd3c7f4068064405ef1bc4fce1cbc3af916032e8", | ||
"executor_fee_lib_router_0": "0x551bd1f03eaba95f5aae59c0f382acf74e051b3d0890d63574069e45fce0118e", | ||
"executor_fee_lib_router_1": "0xf1265e9c0ae38b49f099355587290d830ab46484df87d95cbad66c4ee3af8967", | ||
"dvn_fee_lib_router_0": "0xc09c085aafdb39e4aa66f3311f3d293fe67ee88dab2aec772df9c2f0a1d60abd", | ||
"dvn_fee_lib_router_1": "0xd9df2854349456b32d482d25db0b3917964f6fbae9737b3b4b62bf6d0a27ed51", | ||
"executor_fee_lib_0": "0xff72f529a579e922e0edba30f384b4c9c86d05020cbd2401a23fe708f29c6664", | ||
"dvn_fee_lib_0": "0xf63f6b01ea6688189e09e2be035bef512049288ff1d307c2470a913f3831330f", | ||
"dvn": "0x1f79b324153abe0ca18a279822f3b561acbaabb4d68d47ed3639b5a53e4d3470" | ||
}, | ||
"testnet-addresses": { | ||
"oft_common": "0x1fa2c7365c88f7db4995f10ce5ffa93043e04f7ec797fb97c022d52d5ed870b9", | ||
"router_node_0": "0x864554801ac1fd3611c1f9470c5d62fae447233933564667ff947c5b446237af", | ||
"simple_msglib": "0xfa0ca06bf52334a3e9e040e807bbd532d90fc7651e594a42cdae919605a94d31", | ||
"blocked_msglib": "0x197b99f723c6ea412bc7adebb840d38113252296bc80612f6a92e3d56678b87e", | ||
"uln_302": "0xbe533727aebe97132ec0a606d99e0ce137dbdf06286eb07d9e0f7154df1f3f10", | ||
"router_node_1": "0x169216d2983bfbee456d20e6a902d17cc2b09c2a936c1d2d43d057047dababab", | ||
"endpoint_v2_common": "0x7832affd0909f4ae3363efc372d7b86dd3be80ed5efe9cbb9b250ffb89a6e4b", | ||
"endpoint_v2": "0xa53352d6eb261173560111b83eb898611a8e87f7dabada415159f749fbd185e4", | ||
"layerzero_admin": "0xde46aadc73f380cf51005afaf0a32c58d8e8d63c6dc36155935a3d0422e93c37", | ||
"layerzero_treasury_admin": "0xde46aadc73f380cf51005afaf0a32c58d8e8d63c6dc36155935a3d0422e93c37", | ||
"msglib_types": "0x302b77de23fd4189623e587fe48b87ec807db57c410e0f0a1f140b99be80f6b1", | ||
"treasury": "0x6b3c61050170fd85a9ebe324688d092502bad3255856d61ecabec15c54b6ff90", | ||
"worker_peripherals": "0xde46aadc73f380cf51005afaf0a32c58d8e8d63c6dc36155935a3d0422e93c37", | ||
"price_feed_router_0": "0xc952a002c95ee5880a54e054764fbda13a2eda3b9698528629863921f6c2c74c", | ||
"price_feed_router_1": "0x2dd6cca9b6220ed18ed5c1e611c8989efc0a0d2a441dd24074180509db6d9926", | ||
"price_feed_module_0": "0x36536dc5f158e3701521614e4e2b2fff07fff15877f36123196bb37356afe404", | ||
"worker_common": "0xc3cd6ba2758a9acf604c9e5382a6f76ee71598b863b93efc7c4fe542a397a9db", | ||
"executor_fee_lib_router_0": "0xfa6f8d82188bfe34cb37e0aeba3bcf5a21610116d01c187d7779817a9441f3ad", | ||
"executor_fee_lib_router_1": "0x221a5f2158d7aa67c5939a57cce0ce0e3d5915ae4a575fa7ce50c76d115023", | ||
"dvn_fee_lib_router_0": "0x709b216b828fe42596d860d0126907b43f89564ae4bc81ec153b02fe492174a4", | ||
"dvn_fee_lib_router_1": "0x27c840aa072206a4e190042158c1ce4cf23b3f04fa22dcd5c092859ab1e54c48", | ||
"executor_fee_lib_0": "0xcd94220a2632ea96e2b05bd5056a8234a418cf647abfe92949a8f7623732dbce", | ||
"dvn_fee_lib_0": "0xf3e18cf48c09fdd1fe529e23861fb4d63fad70068c64dd4b8237daf3e136ed26", | ||
"dvn": "0xd6f420483a90c7db5ce2ec12e8acfc2bfb7b93829c9e6a3b0760bca330be64dd" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"address": "0x0310adb63938156c56715ac03772843e8665775600d4ebdcddfe44ed4bbe5fd4", | ||
"abi": [], | ||
"transactionHash": "", | ||
"receipt": {}, | ||
"args": [], | ||
"numDeployments": 1, | ||
"solcInputHash": "", | ||
"metadata": "", | ||
"bytecode": "", | ||
"deployedBytecode": "", | ||
"devdoc": {}, | ||
"storageLayout": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
43113 |
Oops, something went wrong.