Skip to content

Commit b9340cf

Browse files
committed
Merge branch 'main' into init-solana-tests
2 parents 25c7dc5 + 57ec232 commit b9340cf

9 files changed

Lines changed: 39 additions & 17 deletions

File tree

.changeset/brown-icons-push.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/oft-hyperliquid/CHANGELOG.md

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

3+
## 1.0.13
4+
5+
### Patch Changes
6+
7+
- 306ee69: rename FeeAbstraction to PreFundedFeeAbstraction in docs
8+
39
## 1.0.12
410

511
### Patch Changes

examples/oft-hyperliquid/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/oft-hyperliquid-example",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
@@ -27,7 +27,7 @@
2727
"@babel/core": "^7.23.9",
2828
"@layerzerolabs/devtools-evm-hardhat": "^4.0.4",
2929
"@layerzerolabs/eslint-config-next": "~2.3.39",
30-
"@layerzerolabs/hyperliquid-composer": "^2.0.7",
30+
"@layerzerolabs/hyperliquid-composer": "^2.0.8",
3131
"@layerzerolabs/lz-definitions": "^3.0.59",
3232
"@layerzerolabs/lz-evm-messagelib-v2": "^3.0.12",
3333
"@layerzerolabs/lz-evm-protocol-v2": "^3.0.12",

packages/hyperliquid-composer/CHANGELOG.md

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

3+
## 2.0.8
4+
5+
### Patch Changes
6+
7+
- 306ee69: rename FeeAbstraction to PreFundedFeeAbstraction in docs
8+
39
## 2.0.7
410

511
### Patch Changes

packages/hyperliquid-composer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/hyperliquid-composer",
3-
"version": "2.0.7",
3+
"version": "2.0.8",
44
"description": "LayerZero Labs reference EVM OmniChain Fungible Token (OFT) implementation for Hyperliquid",
55
"keywords": [
66
"LayerZero",

packages/protocol-devtools-evm/CHANGELOG.md

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

3+
## 5.0.3
4+
5+
### Patch Changes
6+
7+
- e5db325: Chunk setConfig into batches of 10 to avoid calldata/gas limits on L2s
8+
39
## 5.0.2
410

511
### Patch Changes

packages/protocol-devtools-evm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layerzerolabs/protocol-devtools-evm",
3-
"version": "5.0.2",
3+
"version": "5.0.3",
44
"description": "Utilities for LayerZero EVM protocol contracts",
55
"repository": {
66
"type": "git",

packages/protocol-devtools-evm/src/endpointv2/sdk.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ import { BlockedUln302 } from '@/uln302/blockedSdk'
3838
const CONFIG_TYPE_EXECUTOR = 1
3939
const CONFIG_TYPE_ULN = 2
4040
const CONFIG_TYPE_READ_LIB_CONFIG = 1
41+
const CONFIG_BATCH_SIZE = 10
42+
43+
const chunkArray = <T>(array: T[], size: number): T[][] => {
44+
const chunks: T[][] = []
45+
for (let i = 0; i < array.length; i += size) {
46+
chunks.push(array.slice(i, i + size))
47+
}
48+
return chunks
49+
}
4150

4251
/**
4352
* EVM-specific SDK for EndpointV2 contracts
@@ -283,14 +292,15 @@ export class EndpointV2 extends OmniSDK implements IEndpointV2 {
283292
async setConfig(oapp: OmniAddress, uln: OmniAddress, setConfigParam: SetConfigParam[]): Promise<OmniTransaction[]> {
284293
this.logger.debug(`Setting config for OApp ${oapp} to ULN ${uln} with config ${printJson(setConfigParam)}`)
285294

286-
const data = this.contract.contract.interface.encodeFunctionData('setConfig', [oapp, uln, setConfigParam])
295+
const chunks = chunkArray(setConfigParam, CONFIG_BATCH_SIZE)
287296

288-
return [
289-
{
297+
return chunks.map((chunk) => {
298+
const data = this.contract.contract.interface.encodeFunctionData('setConfig', [oapp, uln, chunk])
299+
return {
290300
...this.createTransaction(data),
291-
description: `Setting config for ULN ${uln} to ${printJson(setConfigParam)}`,
292-
},
293-
]
301+
description: `Setting config for ULN ${uln} to ${printJson(chunk)}`,
302+
}
303+
})
294304
}
295305

296306
async setUlnConfig(

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)