Skip to content

Commit 7d3fc26

Browse files
authored
Merge branch 'main' into composer-hooks
2 parents 0b74112 + a566db0 commit 7d3fc26

67 files changed

Lines changed: 1124 additions & 499 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/lzapp-migration/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @layerzerolabs/lzapp-migration-example
22

3+
## 0.1.4
4+
5+
### Patch Changes
6+
7+
- eba3669: Rename clear script to retry-payload
8+
39
## 0.1.3
410

511
### Patch Changes

examples/lzapp-migration/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/lzapp-migration-example",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
@@ -54,6 +54,7 @@
5454
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.75",
5555
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.75",
5656
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.75",
57+
"@layerzerolabs/lz-solana-sdk-v2": "^3.0.81",
5758
"@layerzerolabs/lz-v2-utilities": "^3.0.75",
5859
"@layerzerolabs/oapp-evm": "^0.3.2",
5960
"@layerzerolabs/prettier-config-next": "^2.3.39",

examples/lzapp-migration/tasks/solana/clearPayload.ts renamed to examples/lzapp-migration/tasks/solana/retryPayload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Args {
2424
withPriorityFee: number
2525
}
2626

27-
task('lz:oft:solana:clear', 'Clear a stored payload on Solana')
27+
task('lz:oft:solana:retry-payload', 'Retry a stored payload on Solana')
2828
.addParam('srcEid', 'The source EndpointId', undefined, types.eid)
2929
.addParam('nonce', 'The nonce of the payload', undefined, types.bigint)
3030
.addParam('sender', 'The source OApp address (hex)', undefined, types.string)

examples/oapp-aptos-move/.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
EVM_PRIVATE_KEY=
1515
EVM_MNEMONIC=
1616

17-
# Movement config - values below are for bardock testnet
18-
MOVEMENT_INDEXER_URL=https://indexer.testnet.movementnetwork.xyz/v1/graphql
19-
MOVEMENT_FULLNODE_URL=https://aptos.testnet.bardock.movementlabs.xyz/v1
17+
# Movement config
18+
MOVEMENT_INDEXER_URL=
19+
MOVEMENT_FULLNODE_URL=
2020
MOVEMENT_ACCOUNT_ADDRESS=
2121
MOVEMENT_PRIVATE_KEY=
2222

examples/oapp-aptos-move/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @layerzerolabs/oapp-aptos-example
22

3+
## 1.0.5
4+
5+
### Patch Changes
6+
7+
- b1feef7: Devex improvements.
8+
39
## 1.0.4
410

511
### Patch Changes

examples/oapp-aptos-move/README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Setup and Installation
44

5+
### Aptos CLI
6+
57
Install the Aptos CLI (required for deployment):
68

79
Aptos does not have native version management capabilities. To simplify the installation process, LayerZero has developed an Aptos CLI Version Manager.
@@ -14,8 +16,14 @@ git clone https://github.com/LayerZero-Labs/aptosup
1416

1517
> **Important:** Version requirements:
1618
>
17-
> - For deploying to Aptos chain: Use version >= 6.0.1
18-
> - For deploying to Movement chain: Use version <= 3.5.0
19+
> - For Aptos chain: Use version 6.0.1
20+
> - For Movement chain: Use version 3.5.0
21+
22+
### Example installation
23+
24+
To download the example run:
25+
26+
`LZ_ENABLE_EXPERIMENTAL_MOVE_VM_EXAMPLES=1 npx create-lz-oapp@latest`
1927

2028
Set pnpm to the required version:
2129

@@ -67,13 +75,17 @@ Note: Your private key is stored in the .aptos/config.yaml file and will be extr
6775

6876
Create a `.env` file with the following variables:
6977

78+
Note: the aptos specific values can be found in `.aptos/config.yaml` after running `aptos init`
79+
80+
Note: the Movement specific values can be found at: https://docs.movementnetwork.xyz/devs/networkEndpoints#movement-bardock-testnet-aptos-environment and currently Bardock testnet is the only Movement testnet with a deployed layerzero endpoint.
81+
7082
```bash
7183
EVM_PRIVATE_KEY=<your-evm-private-key>
7284
EVM_MNEMONIC=<your-mnemonic>
7385

7486
# If you are deploying to Movement chain
75-
MOVEMENT_INDEXER_URL=https://indexer.testnet.movementnetwork.xyz/v1/graphql
76-
MOVEMENT_FULLNODE_URL=https://aptos.testnet.bardock.movementlabs.xyz/v1
87+
MOVEMENT_INDEXER_URL=<indexer-url>
88+
MOVEMENT_FULLNODE_URL=<fullnode-url>
7789
MOVEMENT_ACCOUNT_ADDRESS=<your-movement-account-address>
7890
MOVEMENT_PRIVATE_KEY=<your-movement-private-key>
7991

@@ -84,10 +96,6 @@ APTOS_PRIVATE_KEY=<your-aptos-private-key>
8496

8597
Then run `source .env` in order for your values to be mapped.
8698

87-
Note: the aptos specific values can be found in `.aptos/config.yaml` after running `aptos init`
88-
89-
Note: the Movement specific values can be found at: https://docs.movementnetwork.xyz/devs/networkEndpoints#movement-bardock-testnet-aptos-environment and currently Bardock testnet is the only Movement testnet with a deployed layerzero endpoint.
90-
9199
> **Important:** If using Aptos CLI version >= 6.1.0 (required for Aptos chain), you need to uncomment the following lines in Move.toml and remove the existing AptosFramework dependency:
92100
>
93101
> ```
@@ -97,14 +105,27 @@ Note: the Movement specific values can be found at: https://docs.movementnetwork
97105
> # subdir = "aptos-framework"
98106
> ```
99107
100-
### Wire setup
108+
## OApp Config Setup
101109
102110
Before running the deploy and wire commands, first inside of `move.layerzero.config.ts`, set the delegate and owner address to your deployer account address. These can be changed in the future with commands shown later in this README, but for now they should be set to the address you will be running the commands from (deployer account address).
103111
112+
> **Important:** Follow the [LayerZero Project Configuration Guide](https://docs.layerzero.network/v2/developers/evm/create-lz-oapp/project-config) to properly set up your `move.layerzero.config.ts` file with correct endpoint IDs and network configurations before running wiring commands. The configuration can be modified to wire any number supported networks to each other. The current move.layerzero.config.ts file is an example of what is required to deploy and wire BSC testnet to Movement testnet.
113+
114+
`move.layerzero.config.ts`:
115+
104116
```ts
117+
// Create contract entries for all contracts you would like to deploy.
118+
// This is an example entry for Movement testnet.
119+
const movementContract: OmniPointHardhat = {
120+
eid: EndpointId.MOVEMENT_V2_TESTNET,
121+
contractName: 'MyOApp',
122+
}
123+
124+
...
125+
105126
contracts: [
106127
{
107-
contract: your_contract_name,
128+
contract: movementContract,
108129
config: {
109130
delegate: 'YOUR_ACCOUNT_ADDRESS',
110131
owner: 'YOUR_ACCOUNT_ADDRESS',

examples/oapp-aptos-move/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/oapp-aptos-example",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
@@ -37,7 +37,7 @@
3737
"@babel/core": "^7.23.9",
3838
"@jest/globals": "^29.7.0",
3939
"@layerzerolabs/devtools-extensible-cli": "^0.0.6",
40-
"@layerzerolabs/devtools-move": "^1.0.3",
40+
"@layerzerolabs/devtools-move": "^1.0.7",
4141
"@layerzerolabs/eslint-config-next": "~2.3.39",
4242
"@layerzerolabs/lz-config-types": "^3.0.15",
4343
"@layerzerolabs/lz-definitions": "^3.0.75",
@@ -51,7 +51,7 @@
5151
"@layerzerolabs/move-definitions": "^3.0.15",
5252
"@layerzerolabs/oapp-evm": "^0.3.2",
5353
"@layerzerolabs/oft-evm": "^3.1.3",
54-
"@layerzerolabs/oft-move": "^1.0.1",
54+
"@layerzerolabs/oft-move": "^1.0.2",
5555
"@layerzerolabs/prettier-config-next": "^2.3.39",
5656
"@layerzerolabs/solhint-config": "^3.0.12",
5757
"@layerzerolabs/test-devtools-evm-foundry": "~6.0.3",

examples/oapp/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ module.exports = {
77
// @layerzerolabs/eslint-config-next defines rules for turborepo-based projects
88
// that are not relevant for this particular project
99
'turbo/no-undeclared-env-vars': 'off',
10+
'import/no-unresolved': 'warn', // Updated to warn to avoid erratic popping up of this particular error even when the package has been installed correctly
1011
},
1112
};

examples/oapp/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @layerzerolabs/oapp-example
22

3+
## 0.5.9
4+
5+
### Patch Changes
6+
7+
- d24cc34: examples/oapp: update to use simple config
8+
39
## 0.5.8
410

511
### Patch Changes

examples/oapp/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ More information about available CLI arguments can be found using the `--help` f
9999
npx hardhat lz:deploy --help
100100
```
101101

102+
## 2) Configuring Contracts
103+
104+
Wire your deployed contracts by running:
105+
106+
```bash
107+
npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
108+
```
109+
102110
By following these steps, you can focus more on creating innovative omnichain solutions and less on the complexities of cross-chain communication.
103111

104112
<br></br>

0 commit comments

Comments
 (0)