-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aptos CLI #1121
Open
AlexanderLiteplo
wants to merge
219
commits into
main
Choose a base branch
from
aptos-cli
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Aptos CLI #1121
Changes from all commits
Commits
Show all changes
219 commits
Select commit
Hold shift + click to select a range
204469c
aptos-v2-examples
abaltes-lz c4184b5
add Aptos Move build and test automation scripts
AlexanderLiteplo 7227bbd
adding turbo (FULL TURBO)
AlexanderLiteplo 511521f
Nov 25 OFT Examples Updates (#1081)
abaltes-lz f4bca05
adding endpoint
AlexanderLiteplo bccba2e
wip
AlexanderLiteplo 7fe4aa9
wip
AlexanderLiteplo 25f267a
wip
AlexanderLiteplo c6277e5
wip
shankars99 66879e9
wip
AlexanderLiteplo a1c66ff
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
AlexanderLiteplo 73bbb35
test works
AlexanderLiteplo 116d4c6
adding package updates
AlexanderLiteplo 7178ae1
deploment file type
shankars99 d486067
feat: deployment script
shankars99 e5b0d65
pnpm i argparse
shankars99 70ae1c6
feat: builds oft
shankars99 bf4704c
wip
AlexanderLiteplo 50a7f6e
sample: deployments
shankars99 2f5f35b
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 878e343
aptos
shankars99 6db4315
wip
AlexanderLiteplo 2d5fc34
updating utils
AlexanderLiteplo 5381a27
pnpm i hardhat and ethers stuff
shankars99 6d18910
deployed test OFT
shankars99 bb8d5f8
uncomment namedAccounts
shankars99 dc2c6ed
wip
shankars99 14fa43b
evm wiring
shankars99 3333ee7
eid to network url
shankars99 7b7d605
todo: fetch the aptos oft address dynamicaly
shankars99 73c3bd1
updating configs
AlexanderLiteplo f165491
todo: cleanup
shankars99 e7504e0
updating wire + merge
AlexanderLiteplo 848fc0e
todo: aptos mapping based on network.type
shankars99 a38a34b
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 440a2b3
merge conflicts resolved
shankars99 b3a1ea9
add set enforced options and libs
AlexanderLiteplo 90188f1
updated readme
AlexanderLiteplo 6016bbe
pnpm lock
shankars99 99ceb98
tsconfig paths
shankars99 d285ab4
overload createEidToNetworkMapping
shankars99 f4763df
pre check balance across all evm networks before setPeerX
shankars99 8fe908d
fixed build
shankars99 2f0b584
evm-oft
shankars99 3fa03b7
evm-oft
shankars99 425130a
evm-oft deployment
shankars99 8a588b1
ignore cache
shankars99 bbe1774
chore: types for evm wire
shankars99 5245552
checkBalance and setPeer
shankars99 4b34f2a
wip: wire evm
shankars99 b691d83
wire functionality completed
AlexanderLiteplo 053e9c5
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
AlexanderLiteplo dce510e
@layerzerolabs/lz-definitions-v3
shankars99 d188f17
default folder created at aptos-sandbox
shankars99 ae265a6
using lz-def-v3
shankars99 b74a17e
cleanup: arg parser
shankars99 3b6d49b
cleanup: deploy
shankars99 88d5228
bsc-sandbox oft deployment file
shankars99 ba6e50e
lz-defs and lz-utils to v3
shankars99 d2de2ff
remove: copy of aptos config
shankars99 9256da5
refactor to match new packages
shankars99 b2e2615
split lz config
shankars99 4128f9e
unify aptos and evm lz config
shankars99 4b8cbba
new pnpm lock
shankars99 cf25a21
adding ulnConfig parsing
AlexanderLiteplo 12f4fec
merging
AlexanderLiteplo 2173898
committing in order to pull shankars branch
AlexanderLiteplo c8a481c
wip
AlexanderLiteplo 82febf5
diff printer
shankars99 32ce108
merge branch
shankars99 0481adb
removed hardhat
shankars99 1457259
First working version of aptos: build,deploy,wire completed
AlexanderLiteplo 557c64e
feat: eth deployment
shankars99 c9add4d
ethereum sandbox added:
shankars99 7698333
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 553f221
creates setPeer transactions
shankars99 fc06b67
batch executes all transactions
shankars99 4158db8
wip
shankars99 c6945b9
wip
shankars99 bb3634d
lz configs
shankars99 d7e97ee
type imports
shankars99 f696c5e
wip sending transactions at end of script
AlexanderLiteplo 0120905
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
AlexanderLiteplo d090763
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 5852c69
reads account configs from lz config
shankars99 2e245bc
add account config obj
shankars99 dff75d0
simulates all transactions
shankars99 fd4ce05
obtain signer from contract factory
shankars99 82d9c87
rename: transaction executor
shankars99 5b5dae2
feat: transaction similator
shankars99 8c84cb0
update: does not use signer as a field in the WireEVM type
shankars99 3bb570f
chore: improve console logging
shankars99 af2c308
add: delegate and owner addresses
shankars99 a934aa6
feat: delegate set
shankars99 2a3fb59
update: diffPrinter
shankars99 5a32ee1
wip
shankars99 2ef90e4
wip extracted setters
AlexanderLiteplo aea3154
wip extracted setters
AlexanderLiteplo e3e57d1
config setting and diffing supported
AlexanderLiteplo ae0914f
added initialization script
AlexanderLiteplo 346750c
cleanup
AlexanderLiteplo 55b54c8
set delegate + transfer ownership created + read delegate and owner f…
AlexanderLiteplo 2d8c440
Fixed printing for options and allowed diffprinter to handle nested o…
AlexanderLiteplo e8c9ec5
wire aptos OFT in working state
AlexanderLiteplo f8e421a
cleanup
AlexanderLiteplo 3e3448f
cleanup + send from aptos to evm script
AlexanderLiteplo bb31f92
dynamic address retrieval, cleanups, updated readme
AlexanderLiteplo b58bbd8
retrieving endpoint address from config in wire script
AlexanderLiteplo f1dadbc
diffPrinter orange boxes the entire diff
shankars99 f536a3c
Wire and send functionality working on testnet
AlexanderLiteplo 24a1607
native drop as enforced options
shankars99 58296f0
remove extra blank lines
shankars99 d9f5158
feat: new types for migration of evmWire
shankars99 9d51693
setPeer upgraded
shankars99 ccdc3e4
txSimulator upgraded
shankars99 58d547e
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 72cb1a8
upgrade eth-sandbox to eth-testnet
shankars99 f6fa588
use eth-testnet config
shankars99 fce0b83
wireEVMOFT uses testnets instead of sandbox
shankars99 9702ea0
docs
shankars99 55faa73
minor readme change
AlexanderLiteplo 3b20e8d
merge
AlexanderLiteplo cc71994
fixed bug in get ReceiveLibraryTimeout
AlexanderLiteplo ef95562
keep eth-testnet in aptos config
shankars99 a8d627d
refactor location
shankars99 de85d44
update imports
shankars99 b2dd6c8
pnpm-lock.yaml
shankars99 1ac80a5
todo: dynamic width for diffPrinter for smaller width terminals
shankars99 be96b9d
setDelegate
shankars99 dea963c
feat: include upgraded setDelegate
shankars99 0266acf
enforcedOptionParam typing
shankars99 0d610ce
docs
shankars99 87fd883
pnpm
shankars99 39b222d
feat: enforced options
shankars99 95a64a3
docs + enforced options
shankars99 9166e95
LZRead as an enforcedOption
shankars99 58d6d18
cleaner handling when delegate is not part of config
shankars99 153b4b8
using sandbox
shankars99 758bce3
sendLibAddress
shankars99 8df9ba1
setDelegate checks for optional paramters configAccount.delegate
shankars99 9cd8cc6
contains EVM EndpointV2 deployment
shankars99 74ca12a
ContractMetadata generalized for addresses and contracts
shankars99 bbc0fe7
using simplemessagelib for alternate send lib
shankars99 d285d34
creates ethers contract for EndpointV2
shankars99 0baac9b
feat: setSendLibrary
shankars99 1bc4c01
chore: add ReceiveLibParams
shankars99 48336ed
chore: using SimpleMsgLib for receiveLibrary
shankars99 69d685f
feat: setReceiveLibrary
shankars99 b896161
docs: natspec comments
shankars99 4658cc3
fix readme
AlexanderLiteplo 681cf28
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
AlexanderLiteplo 91425f6
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 dbc9df4
cleanups
AlexanderLiteplo a925c15
deploys recvuln302
shankars99 f14b4d4
uses custom ReceiveUln302 for timeout testing
shankars99 00de5e9
using SimpleMessageLib as custom alternate MessageLib
shankars99 00570f3
update deployments
shankars99 e089ecf
type: RecvLibraryTimeoutConfig
shankars99 750a0e5
todo: handle default libs
shankars99 55dd2dc
using SimpleMessageLib for all Libs
shankars99 fca7fab
feat: setReceiveLibraryTimeout
shankars99 7bfd0ff
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 0e0d76e
using deployed SimpleMessageLib
shankars99 ab47dad
feat: anvil fork
shankars99 e3e853b
deployments
shankars99 7b05cfa
Account information - gasprice, nonce, signer
shankars99 64c689e
do not check default lib
shankars99 c129cdd
chore: improve diffPrinter result
shankars99 dc74153
fix: handling of expiry
shankars99 951bd07
feat: unified simulation and transaction submission
shankars99 216855a
feat: integrated the new transaction executor
shankars99 ac27d19
cleanup
shankars99 b7a18ae
docs + cleanup
shankars99 6f3fd83
reasoning for not handling Zero Address
shankars99 6e5888f
ready for Krak testing
AlexanderLiteplo a1a355d
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
AlexanderLiteplo cdd64fa
removing old aptos folders from examples
AlexanderLiteplo a11cb5c
cleanups
AlexanderLiteplo e64d15c
cleanups
AlexanderLiteplo 39a84ac
cleanups
AlexanderLiteplo 38432b3
creating message builders and other cleanups
AlexanderLiteplo 1896c0d
cleaning up tests, renaming folder, adding test commands
AlexanderLiteplo ef43ce1
cleanup
AlexanderLiteplo f12e2c0
reverting artifact
AlexanderLiteplo ff8b91c
cleanup
AlexanderLiteplo 770c8b6
send config
shankars99 f4c6865
send config
shankars99 fed4065
merge
shankars99 84b84ae
Merge branch 'aptos-cli' of https://github.com/LayerZero-Labs/devtool…
shankars99 867bdfd
decompose utils and types into aptos utils and evm utils, types
shankars99 40e4968
decompose utils and types into aptos utils and evm utils, types
shankars99 a7afdcb
refactor
shankars99 54b0db2
pnpm lock file
shankars99 5a0aaa9
path fixes
AlexanderLiteplo dd0b0df
cleanup
AlexanderLiteplo e71e3fb
reverting accidental change
AlexanderLiteplo 608aeae
reverting toolbox changes
AlexanderLiteplo ef4ba36
Merge branch 'main' into aptos-cli
AlexanderLiteplo 36be65e
running pnpm i after merging with main to updated lock file
AlexanderLiteplo 49903a0
wire evm dynamic address retrieval
AlexanderLiteplo 06c5c26
cleanups
AlexanderLiteplo b68ed0d
pnpm i ts-node
shankars99 aba13a2
fix: total transaction counter
shankars99 b319170
remove: SetReceiveLibraryTimeout
shankars99 09f1314
migrate to testnet
shankars99 95c7ad4
dyanmicially read EndpointV2 abi and address per network:
shankars99 1d7d621
pnpm i @layerzerolabs/lz-evm-sdk-v2
shankars99 e8d793f
receive config
shankars99 562684f
checksum addresses
shankars99 b2dcb0e
check if setting the same config
shankars99 2b31a98
generalize config utils
shankars99 8d29d93
refactor utils into utils folder
shankars99 ef4fd1d
feat: setReceiveConfig
shankars99 7365a19
from->curr and to->new
shankars99 8133bde
move promptForConfirmation to shared utils
shankars99 dabcd7d
ZEROEVMADDRESS is no longer in shared utils
shankars99 eff41fe
takes user input before submitting transactions
shankars99 c3ab04b
handles when totalTransactions=0
shankars99 1c25ff8
clean imports
shankars99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PUBLIC_KEY= | ||
PRIVATE_KEY= |
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,6 @@ | ||
.env | ||
*/build | ||
*/node_modules | ||
.aptos | ||
cache/hardhat | ||
deployments/* | ||
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,135 @@ | ||
# Aptos OFT Deployment | ||
### connecting to aptos via cli | ||
To install aptos cli, run the following command: | ||
``` | ||
brew install aptos | ||
``` | ||
If you need to generate a new key, run the following command: | ||
``` | ||
aptos key generate --output-file my_key.pub | ||
``` | ||
Then initialize the aptos cli and connect to the aptos network: | ||
``` | ||
aptos init --network=testnet --private-key=<your-private-key> | ||
``` | ||
You can then verify that your initialization was successful by running the following command: | ||
``` | ||
cat .aptos/config.yaml | ||
``` | ||
If successful the config will be populated with the RPC links and your account private key, account address, and network. | ||
## Build the OFT: | ||
We reccomend using the account address in printed by `cat .aptos/config.yaml` as the deployer and admin during the build and deploy steps to ensure wiring is successful. Afterwards you can use the transfer ownership script to set your desired admin. | ||
``` | ||
ts-node tasks/move/build.ts --package-dir=oft --named-addresses oft=<account-address-of-deployer>,oft_admin=<account-address-of-admin> | ||
``` | ||
## Deploy the OFT: | ||
``` | ||
ts-node tasks/move/deploy.ts --package-dir oft --address-name oft --named-addresses oft_admin=<account-address-of-your-admin> | ||
``` | ||
|
||
Make sure to set the account that will be used for administrative functions such as settting the peers should be set in the move.toml as OFT_ADMIN | ||
|
||
Account Descriptions: | ||
- oft is the owner of the deployer object which gives the account that owns the object the abilitiy to upgrade the object and also burn and mint the fungible asset. | ||
- oft_admin is the account that is responsible for administrative functions such as setting the peers, set uln config... etc. | ||
|
||
The address of the deployed oft is printed out in the terminal: | ||
``` | ||
Code was successfully deployed to object address 0xaebb730cc67b4b0987ec99cd20b9eaf7c5c0d517f4424ab4f4b1450c6c8d9bb4. | ||
{ | ||
"Result": "Success" | ||
} | ||
``` | ||
## Set the delegate: | ||
Run the following command to set the delegate to the oft. Ensure first that you have specified the delegate address in the layerzero.config.ts file. | ||
``` | ||
npx hardhat run tasks/move/setDelegate.ts | ||
``` | ||
## Initialize the OFT: | ||
Inside the file tasks/move/initAptosOFT.ts, set the following parameters: | ||
```typescript | ||
const tokenName = '<your-token-name>' | ||
const tokenSymbol = '<your-token-symbol>' | ||
const iconUri = '<your-icon-uri>' | ||
const projectUri = '<your-project-uri>' | ||
const sharedDecimals = <your-shared-decimals> | ||
const localDecimals = <your-local-decimals> | ||
``` | ||
Then run the following command to initialize the oft: | ||
``` | ||
ts-node tasks/move/initAptosOFT.ts | ||
``` | ||
## Wiring your aptos OFT: | ||
|
||
#### layerzero.config.ts: | ||
ensure that all of the contracts you wish to wire your aptos oft to are included under the contracts array and connections array. For example, if you want to wire your aptos oft to fuji, you would include both contracts under the contracts array, and specify them like this: | ||
```typescript | ||
const aptosContract: OmniPointHardhat = { | ||
eid: EndpointId.APTOS_TESTNET, | ||
contractName: 'oft', | ||
} | ||
|
||
const fujiContract: OmniPointHardhat = { | ||
eid: EndpointId.AVALANCHE_V2_TESTNET, | ||
contractName: 'MyOFT', | ||
} | ||
|
||
const config: OAppOmniGraphHardhat = { | ||
contracts: [ | ||
{ | ||
contract: fujiContract, | ||
}, | ||
{ | ||
contract: aptosContract, | ||
config: { | ||
delegate: '<your-aptos-account-address>', | ||
owner: '<your-aptos-owner-address>', | ||
}, | ||
}, | ||
], | ||
connections: [ | ||
{ | ||
from: aptosContract, | ||
to: fujiContract, | ||
}, | ||
{ | ||
from: aptosContract, | ||
to: sepoliaContract, | ||
}, | ||
], | ||
} | ||
``` | ||
|
||
IMPORTANT: Before running the wire script ensure that you have run aptos init and configuered your desired network such as custom, testnet, mainnet, etc. and have also deployed the oft to that network. | ||
``` | ||
npx hardhat run tasks/move/wireAptosOFT.ts | ||
``` | ||
|
||
## Scripts For internal testing: | ||
These scripts will not be shipped in the final version of the aptos cli. They are only for internal testing purposes. | ||
shankars99 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### Mint Aptos OFT: | ||
First add this function to oft/sources/internal_oft/oft_impl.move in order to expose minting functionality to our aptos sdk script: | ||
``` | ||
public entry fun mint( | ||
admin: &signer, | ||
recipient: address, | ||
amount: u64, | ||
) acquires OftImpl { | ||
assert_admin(address_of(admin)); | ||
primary_fungible_store::mint(&store().mint_ref, recipient, amount); | ||
} | ||
``` | ||
Then run the following command to mint the aptos oft: | ||
``` | ||
npx hardhat run tasks/move/mintAptosOFT.ts | ||
``` | ||
### Send Aptos OFT: | ||
Currently running into bugs with this script. Particularly around quoting send. | ||
``` | ||
npx hardhat run tasks/move/sendFromAptosOFT.ts | ||
``` | ||
|
||
# Movement OFT Deployment: | ||
``` | ||
aptos init --network custom --rest-url https://aptos.testnet.porto.movementlabs.xyz/v1 --faucet-url https://faucet.testnet.bardock.movementnetwork.xyz/ | ||
``` |
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,107 @@ | ||
import { EndpointId } from '@layerzerolabs/lz-definitions-v3' | ||
import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities-v3' | ||
shankars99 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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: [ | ||
{ | ||
shankars99 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
contract: bscContract, | ||
config: bscConfig.accountConfig, | ||
}, | ||
{ | ||
contract: aptosContract, | ||
config: { | ||
delegate: '58b730d07e98a22f2b357bee721115c986e4dc873c1884763708ee3d4006f74e', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove prepopulated address for delegate and owner If we leave it here we risk someone by mistake deploys and transfers their rights to this address from example config |
||
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(1000), | ||
}, | ||
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,65 @@ | ||
import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities-v3' | ||
|
||
import type { OAppNodeConfig, OAppEdgeConfig } from '@layerzerolabs/toolbox-hardhat' | ||
|
||
const bscAccountConfig: OAppNodeConfig = { | ||
owner: '0xEa3115C2aD19261E88AAc06e66ac5AFACb724b10', | ||
delegate: '0xEa3115C2aD19261E88AAc06e66ac5AFACb724b10', | ||
} | ||
|
||
const bscOAppConfig: OAppEdgeConfig = { | ||
enforcedOptions: [ | ||
{ | ||
msgType: 1, | ||
optionType: ExecutorOptionType.LZ_RECEIVE, | ||
gas: 200000, // gas limit in wei for EndpointV2.lzReceive | ||
value: 0, // msg.value in wei for EndpointV2.lzReceive | ||
}, | ||
{ | ||
msgType: 2, | ||
optionType: ExecutorOptionType.LZ_RECEIVE, | ||
gas: 200000, // gas limit in wei for EndpointV2.lzCompose | ||
value: 0, // msg.value in wei for EndpointV2.lzCompose | ||
}, | ||
{ | ||
msgType: 1, | ||
AlexanderLiteplo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
optionType: ExecutorOptionType.NATIVE_DROP, | ||
amount: 0, // amount of native gas token in wei to drop to receiver address | ||
receiver: '0x0000000000000000000000000000000000000000', | ||
}, | ||
], | ||
sendLibrary: '0x55f16c442907e86D764AFdc2a07C2de3BdAc8BB7', | ||
receiveLibraryConfig: { | ||
receiveLibrary: '0x188d4bbCeD671A7aA2b5055937F79510A32e9683', | ||
gracePeriod: BigInt(0), | ||
}, | ||
receiveLibraryTimeoutConfig: { | ||
lib: '0x188d4bbCeD671A7aA2b5055937F79510A32e9683', | ||
expiry: BigInt(500), | ||
}, | ||
sendConfig: { | ||
executorConfig: { | ||
maxMessageSize: 65536, | ||
executor: '0x3ebD570ed38B1b3b4BC886999fcF507e9D584859', | ||
}, | ||
ulnConfig: { | ||
confirmations: BigInt(5), | ||
requiredDVNs: ['0x0eE552262f7B562eFcED6DD4A7e2878AB897d405', '0x6f99eA3Fc9206E2779249E15512D7248dAb0B52e'], | ||
optionalDVNs: ['0x2dDf08e397541721acD82E5b8a1D0775454a180B', '0x6F978ee5bfd7b1A8085A3eA9e54eB76e668E195a'], | ||
optionalDVNThreshold: 1, | ||
}, | ||
}, | ||
receiveConfig: { | ||
ulnConfig: { | ||
confirmations: BigInt(5), | ||
requiredDVNs: ['0x0eE552262f7B562eFcED6DD4A7e2878AB897d405', '0x6f99eA3Fc9206E2779249E15512D7248dAb0B52e'], | ||
optionalDVNs: ['0x2dDf08e397541721acD82E5b8a1D0775454a180B', '0x6F978ee5bfd7b1A8085A3eA9e54eB76e668E195a'], | ||
optionalDVNThreshold: 1, | ||
}, | ||
}, | ||
} | ||
|
||
export const bscConfig = { | ||
accountConfig: bscAccountConfig, | ||
oappConfig: bscOAppConfig, | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deployments folder shouldn't be in gitignore, it also isn't in other code examples we have in devtools please cross check