Skip to content

Commit d917544

Browse files
authored
Merge branch 'main' into initia-version-bump-standalone
2 parents aa01d84 + 57ec232 commit d917544

10 files changed

Lines changed: 50 additions & 22 deletions

File tree

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/deploy/MyHyperLiquidComposer_FeeAbstraction.ts renamed to examples/oft-hyperliquid/deploy/MyHyperLiquidComposer_PreFundedFeeAbstraction.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const deploy: DeployFunction = async (hre) => {
8787
{
8888
type: 'confirm',
8989
name: 'continueAnyway',
90-
message: 'Do you want to continue with FeeAbstraction anyway?',
90+
message: 'Do you want to continue with PreFundedFeeAbstraction anyway?',
9191
default: false,
9292
},
9393
])
@@ -136,7 +136,7 @@ const deploy: DeployFunction = async (hre) => {
136136
console.log(`Deplying a contract uses big block which is mined at a transaction per minute.`)
137137
}
138138

139-
// Deploy the OFT composer with FeeAbstraction extension
139+
// Deploy the OFT composer with PreFundedFeeAbstraction extension
140140
const { address: address_composer } = await deploy(contractName_composer, {
141141
from: deployer,
142142
args: [
@@ -152,7 +152,7 @@ const deploy: DeployFunction = async (hre) => {
152152
})
153153

154154
console.log(
155-
`Deployed HyperliquidComposer with FeeAbstraction: ${contractName_composer}, network: ${hre.network.name}, address: ${address_composer}`
155+
`Deployed HyperliquidComposer with PreFundedFeeAbstraction: ${contractName_composer}, network: ${hre.network.name}, address: ${address_composer}`
156156
)
157157
console.log(` - Spot ID: ${spotId}`)
158158
console.log(

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/HYPERLIQUID.README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ npx @layerzerolabs/hyperliquid-composer list-quote-asset \
229229
If you're deploying a quote asset token (or plan to make it one):
230230

231231
- **Use `MyHyperLiquidComposer_FeeToken`** - This composer variant provides automatic user activation using the token itself as the fee token
232-
- Regular composers (`MyHyperliquidComposer`, `FeeAbstraction`, `Recoverable`) will work but require users to have HYPE for gas fees
232+
- Regular composers (`MyHyperliquidComposer`, `PreFundedFeeAbstraction`, `Recoverable`) will work but require users to have HYPE for gas fees
233233

234234
The deployment scripts automatically check if your token is a quote asset and guide you to use the appropriate composer type.
235235

@@ -396,7 +396,7 @@ When the composer detects that a user's address has not been activated on HyperC
396396
On-chain deployments:
397397
USDT0 : [0x80123Ab57c9bc0C452d6c18F92A653a4ee2e7585](https://hyperevmscan.io/address/0x80123Ab57c9bc0C452d6c18F92A653a4ee2e7585)
398398

399-
#### FeeAbstraction Extension
399+
#### PreFundedFeeAbstraction Extension
400400

401401
This extension provides automatic user activation using a **different token** for fees, combined with price oracle integration for dynamic fee calculation.
402402

@@ -438,12 +438,12 @@ ENA : [0x5879d9821909A41cd3A382A990A4A5A6Ca77F2f0](https://hyperevmscan.io/addre
438438

439439
### Choosing the Right Composer
440440

441-
| Composer Type | Best For | Key Feature |
442-
| ------------------ | --------------------- | --------------------------------------------- |
443-
| **Regular** | Standard tokens | Basic functionality, no extensions |
444-
| **Recoverable** | Any token | Token recovery capability |
445-
| **FeeToken** | **Quote assets only** | Automatic activation using your token |
446-
| **FeeAbstraction** | Non-quote assets | Automatic activation using oracle-priced fees |
441+
| Composer Type | Best For | Key Feature |
442+
| --------------------------- | --------------------- | --------------------------------------------- |
443+
| **Regular** | Standard tokens | Basic functionality, no extensions |
444+
| **Recoverable** | Any token | Token recovery capability |
445+
| **FeeToken** | **Quote assets only** | Automatic activation using your token |
446+
| **PreFundedFeeAbstraction** | Non-quote assets | Automatic activation using oracle-priced fees |
447447

448448
> ⚠️ **Important**: The deployment scripts automatically check if your token is a quote asset and guide you to use the appropriate composer type. See [Quote Assets (Fee Tokens)](#quote-assets-fee-tokens) for more details.
449449

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)