Skip to content

Commit

Permalink
update lz-definitions, add ton to normalizePeer
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiStevenson committed Nov 26, 2024
1 parent a246af2 commit 99b828d
Show file tree
Hide file tree
Showing 34 changed files with 107 additions and 102 deletions.
2 changes: 1 addition & 1 deletion examples/native-oft-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oapp-read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oft-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oft-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@layerzerolabs/devtools-solana": "~1.0.1",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/io-devtools": "~0.1.11",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oft-upgradeable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@babel/core": "^7.23.9",
"@layerzerolabs/devtools-evm-hardhat": "^2.0.1",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-sdk-v2": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/oft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@babel/core": "^7.23.9",
"@layerzerolabs/devtools-evm-hardhat": "^2.0.1",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/onft721-zksync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/onft721/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/uniswap-read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@babel/core": "^7.23.9",
"@layerzerolabs/eslint-config-next": "~2.3.39",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",
"@layerzerolabs/lz-evm-v1-0.7": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-evm-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@layerzerolabs/devtools": "~0.4.1",
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/io-devtools": "~0.1.13",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-sdk-v1": "^3.0.12",
"@layerzerolabs/test-devtools": "~0.4.0",
"@layerzerolabs/test-devtools-evm-hardhat": "~0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@ethersproject/providers": "^5.7.2",
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/test-devtools": "~0.4.0",
"@safe-global/safe-core-sdk-types": "^2.3.0",
"@swc/core": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/test-devtools": "~0.4.0",
"@layerzerolabs/test-devtools-solana": "~0.0.3",
"@solana/web3.js": "~1.95.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools-ton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.1",
"@layerzerolabs/io-devtools": "~0.1.13",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
"@ton/core": "^0.59.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@ethersproject/bytes": "~5.7.0",
"@ethersproject/constants": "~5.7.0",
"@layerzerolabs/io-devtools": "~0.1.13",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/test-devtools": "~0.4.0",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
Expand Down
7 changes: 6 additions & 1 deletion packages/devtools/src/common/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ export const normalizePeer = (address: OmniAddress | null | undefined, eid: Endp
case ChainType.SOLANA:
return bs58.decode(address)

case ChainType.TON:
return fromHex(address)

case ChainType.APTOS:
case ChainType.EVM:
return toBytes32(fromHex(address))

default:
throw new Error(`normalizePeer: Unsupported chain type ${chainType} ${formatEid(eid)}`)
}
Expand Down Expand Up @@ -132,6 +134,9 @@ export const denormalizePeer = (bytes: Uint8Array | null | undefined, eid: Endpo
case ChainType.EVM:
return toHex(toBytes20(bytes))

case ChainType.TON:
return toHex(bytes)

default:
throw new Error(`denormalizePeer: Unsupported chain type ${chainType} ${formatEid(eid)}`)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/omnicounter-devtools-evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/omnicounter-devtools": "~3.0.0",
"@layerzerolabs/protocol-devtools": "~1.1.0",
"@layerzerolabs/protocol-devtools-evm": "~3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/omnicounter-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/protocol-devtools": "~1.1.0",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol-devtools-evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-sdk-v2": "^3.0.12",
"@layerzerolabs/protocol-devtools": "~1.1.0",
"@layerzerolabs/test-devtools": "~0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol-devtools-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/devtools-solana": "~1.0.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-solana-sdk-v2": "^3.0.0",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
"@layerzerolabs/protocol-devtools": "~1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/io-devtools": "~0.1.14",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/test-devtools": "~0.4.0",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@scure/bip39": "~1.2.2"
},
"devDependencies": {
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"bs58": "^6.0.0",
"fast-check": "^3.15.1",
"ts-node": "^10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbox-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/devtools-evm-hardhat": "~2.0.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-sdk-v1": "^3.0.12",
"@layerzerolabs/lz-evm-sdk-v2": "^3.0.12",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/ua-devtools-evm-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/devtools-evm-hardhat": "~2.0.2",
"@layerzerolabs/io-devtools": "~0.1.13",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
"@layerzerolabs/protocol-devtools": "~1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ua-devtools-evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/devtools-evm": "~1.0.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
"@layerzerolabs/protocol-devtools": "~1.1.0",
"@layerzerolabs/protocol-devtools-evm": "~3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ua-devtools-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/devtools-solana": "~1.0.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-solana-sdk-v2": "^3.0.0",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
"@layerzerolabs/oft-v2-solana-sdk": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ua-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"devDependencies": {
"@layerzerolabs/devtools": "~0.4.0",
"@layerzerolabs/io-devtools": "~0.1.12",
"@layerzerolabs/lz-definitions": "^3.0.12",
"@layerzerolabs/lz-definitions": "^3.0.18",
"@layerzerolabs/lz-v2-utilities": "^3.0.12",
"@layerzerolabs/protocol-devtools": "~1.1.0",
"@layerzerolabs/test-devtools": "~0.4.0",
Expand Down
Loading

0 comments on commit 99b828d

Please sign in to comment.