Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
da7393c
use latest initia and fix to receive local decimals at adapter creation
beer-1 Nov 3, 2025
5bb46d9
update wrong endpoint id
beer-1 Nov 6, 2025
5a5163d
update confirmations
beer-1 Nov 6, 2025
3055c78
update confirmations
beer-1 Nov 6, 2025
c0a0a08
Merge branch 'main' into feat/latest-initia
beer-1 Nov 7, 2025
a248edd
revert unrelated module
beer-1 Nov 7, 2025
2cfdd27
run install
beer-1 Nov 7, 2025
a17d5c1
Merge branch 'main' into feat/latest-initia
beer-1 Nov 7, 2025
14eb9bd
Merge branch 'main' into feat/latest-initia
beer-1 Nov 8, 2025
227d389
Merge branch 'main' into feat/latest-initia
beer-1 Nov 15, 2025
374a08e
Merge branch 'main' into feat/latest-initia
beer-1 Dec 11, 2025
d26ef77
Merge branch 'main' into feat/latest-initia
beer-1 Dec 15, 2025
733f484
Merge branch 'main' into feat/latest-initia
beer-1 Jan 15, 2026
19754b9
Merge branch 'main' into feat/latest-initia
beer-1 Jan 26, 2026
81a4a42
improve devtools-move
beer-1 Jan 27, 2026
c82bede
remove unused
beer-1 Jan 27, 2026
2fd6c64
update readme
beer-1 Jan 27, 2026
509b749
properly parse arg
beer-1 Feb 2, 2026
12ed464
In devtools-move, the admin owner can sometimes be an empty string du…
beer-1 Feb 2, 2026
d5e3937
Merge branch 'main' into feat/latest-initia
beer-1 Feb 2, 2026
8b96d00
fix tests and getInitiaDeployCount to return properly 0 for first acc…
beer-1 Feb 2, 2026
100f6ad
rollback unwanted changes
beer-1 Feb 2, 2026
e97a392
🔒 Update example lockfiles (#1924)
layerzero-bot Feb 3, 2026
b6aeb1a
DEVREL-997 Solana OFT wiring: warn when provided address is not the a…
nazreen Feb 3, 2026
f22e4f0
feat: verify-contract/config: adding redbelly config for verify-contr…
jadijadi Feb 3, 2026
ccc2883
🚀 Version packages (#1927)
layerzero-bot Feb 5, 2026
a16f0b7
feat(hyperliquid-composer): update docs and contract NatSpec (#1929)
shankars99 Feb 7, 2026
9e76b13
🚀 Version packages (#1930)
layerzero-bot Feb 8, 2026
0e43f10
hyperliquid: rename-feeabstraction (#1932)
shankars99 Feb 9, 2026
2377caf
fix build failure
beer-1 Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/brown-icons-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@layerzerolabs/hyperliquid-composer": patch
"@layerzerolabs/oft-hyperliquid-example": patch
---

rename FeeAbstraction to PreFundedFeeAbstraction in docs
1 change: 1 addition & 0 deletions examples/oft-adapter-initia/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ shell-scripts

transactions/*
!transactions/.gitkeep
deployments
21 changes: 18 additions & 3 deletions examples/oft-adapter-initia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ https://docs.initia.xyz/build-on-initia/initiad
After installation, generate a new key and add it to the keyring:

```bash
initiad keys add <your-key-name> --key-type secp256k1 --coin-type 118 --keyring-backend test
initiad keys add <your-key-name> --keyring-backend test
```

For more information on key management please reference the Initiad docs: https://docs.initia.xyz/build-on-initia/initiad#managing-keys
Expand Down Expand Up @@ -92,7 +92,7 @@ pnpm run lz:sdk:move:build --oapp-config move.layerzero.config.ts --oapp-type of
To build and deploy the contracts, run the following command:

```bash
pnpm run lz:sdk:move:deploy --oapp-config move.layerzero.config.ts --address-name oft --move-deploy-script deploy-move/OFTInitParams.ts --oapp-type oft
pnpm run lz:sdk:move:deploy --oapp-config move.layerzero.config.ts --address-name oft --move-deploy-script deploy-move/OFTAdapterInitParams.ts --oapp-type oft
```

## EVM Deployment
Expand All @@ -110,6 +110,7 @@ First modify deploy-move/OFTAdapterInitParams.ts and replace the oftMetadata wit
```ts
const oftMetadata = {
move_vm_fa_address: "<your fungible asset address>",
localDecimals: 6,
};
```

Expand Down Expand Up @@ -275,12 +276,13 @@ pnpm run lz:sdk:move:mint-to-move-oft --oapp-config move.layerzero.config.ts --a

```bash
pnpm run lz:sdk:move:send-from-move-oft \
--oapp-config move.layerzero.config.ts \
--amount-ld <your-amount-ld> \
--min-amount-ld <your-min-amount-ld> \
--src-address <your-source-account-address> \
--to-address <your-destination-account-address> \
--gas-limit <your-gas-limit> \
--dst-eid <your-dst-eid>\
--dst-eid <your-dst-eid>
```

## Send from EVM
Expand All @@ -297,6 +299,19 @@ pnpm run lz:sdk:evm:send-evm \
--min-amount <your-min-amount>
```

Sending Native Token via NativeAdaptor

```bash
pnpm run lz:sdk:evm:send-evm \
--oapp-config move.layerzero.config.ts \
--src-eid <your-src-eid> \
--dst-eid <your-dst-eid> \
--to <your-source-account-address> \
--amount <your-amount> \
--min-amount <your-min-amount> \
--native-token true
```

## Multi-sig

Multi-sig wallet creation and transaction execution on Initia can be done using the Initia multi-sig builder: https://multisig.testnet.initia.xyz/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { OFTAdapterFaInitParams } from '@layerzerolabs/oft-move'

const oftMetadata: OFTAdapterFaInitParams = {
move_vm_fa_address: '',
localDecimals: 6,
}

export default oftMetadata
1 change: 1 addition & 0 deletions examples/oft-adapter-initia/deploy/MyEVMOFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const deploy: DeployFunction = async (hre) => {
],
log: true,
skipIfAlreadyDeployed: false,
gasLimit: 3_000_000,
})

console.log(`Deployed contract: ${contractName}, network: ${hre.network.name}, address: ${address}`)
Expand Down
11 changes: 3 additions & 8 deletions examples/oft-adapter-initia/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@ const config: HardhatUserConfig = {
],
},
networks: {
'arbitrum-sepolia': {
eid: EndpointId.ARBSEP_V2_TESTNET,
url: process.env.RPC_URL_ARBITRUM_SEPOLIA || 'https://arbitrum-sepolia.gateway.tenderly.co',
accounts,
},
'sepolia-testnet': {
eid: EndpointId.SEPOLIA_V2_TESTNET,
url: process.env.RPC_URL_SEPOLIA || 'https://sepolia.infura.io/v3/',
'bsc-testnet': {
eid: EndpointId.BSC_V2_TESTNET,
url: process.env.RPC_URL_BSC_TESTNET || 'https://data-seed-prebsc-1-s1.binance.org:8545',
accounts,
},
hardhat: {
Expand Down
8 changes: 4 additions & 4 deletions examples/oft-adapter-initia/move.layerzero.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ enum MsgType {
}

const bscContract: OmniPointHardhat = {
eid: EndpointId.ARBSEP_V2_TESTNET,
eid: EndpointId.BSC_V2_TESTNET,
contractName: 'MyOFT',
}

Expand Down Expand Up @@ -90,7 +90,7 @@ const config: OAppOmniGraphHardhat = {
receiveConfig: {
ulnConfig: {
// The number of block confirmations to expect from the `to` chain.
confirmations: BigInt(5),
confirmations: BigInt(10),
// 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: ['0x3f12330ba9e26a604e2149b4b67c0710d32fcbc3de0bea76dd43dbb6b747bc8c'],
Expand Down Expand Up @@ -136,14 +136,14 @@ const config: OAppOmniGraphHardhat = {
executor: '0x31894b190a8bAbd9A067Ce59fde0BfCFD2B18470',
},
ulnConfig: {
confirmations: BigInt(5),
confirmations: BigInt(10),
requiredDVNs: ['0x0eE552262f7B562eFcED6DD4A7e2878AB897d405'],
optionalDVNThreshold: 0,
},
},
receiveConfig: {
ulnConfig: {
confirmations: BigInt(10),
confirmations: BigInt(2),
requiredDVNs: ['0x0eE552262f7B562eFcED6DD4A7e2878AB897d405'],
optionalDVNThreshold: 0,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ module oft::oft_adapter_fa {
public entry fun initialize(
account: &signer,
token_metadata_address: address,
shared_decimals: u8
shared_decimals: u8,
local_decimals: Option<u8>
) acquires OftImpl {
// Only the admin can initialize the OFT
assert_admin(address_of(account));
Expand All @@ -289,8 +290,14 @@ module oft::oft_adapter_fa {
let metadata = address_to_object<Metadata>(token_metadata_address);
store_mut().metadata = option::some(metadata);

// compute the local decimals
let local_decimals = if (option::is_some(&local_decimals)) {
*option::borrow(&local_decimals)
} else {
fungible_asset::decimals(metadata)
};

// Initialize the OFT Core
let local_decimals = fungible_asset::decimals(metadata);
oft_core::initialize(local_decimals, shared_decimals);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module oft::oft_adapter_fa_tests {
// Some of the tests expect that that shared decimals is 6. If this is changed, the tests will need to be
// updated (specifically the values need to be adjusted for dust)
6,
option::none(),
);

mint_ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module oft::oapp_receive_using_oft_adapter_fa_tests {
use std::account::create_signer_for_test;
use std::event::was_event_emitted;
use std::fungible_asset::{Self, MintRef};
use std::option;
use std::primary_fungible_store;
use std::string::utf8;

Expand Down Expand Up @@ -38,7 +39,7 @@ module oft::oapp_receive_using_oft_adapter_fa_tests {

// Generates a fungible asset with 8 decimals
let (fa, _, mint_ref) = create_fa(b"My Test Token");
oft_adapter_fa::initialize(oft_admin, fa, 6);
oft_adapter_fa::initialize(oft_admin, fa, 6, option::none());

oapp_core::set_peer(oft_admin, SRC_EID, from_bytes32(from_address(@1234)));
oapp_core::set_peer(oft_admin, DST_EID, from_bytes32(from_address(@4321)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module oft::oft_using_oft_adapter_fa_tests {

// Generates a fungible asset with 8 decimals
let (fa, _, mint_ref) = create_fa(b"My Test Token");
oft_adapter_fa::initialize(oft_admin, fa, 6);
oft_adapter_fa::initialize(oft_admin, fa, 6, option::none());

let remote_oapp = from_address(@2000);
set_peer(oft_admin, DST_EID, from_bytes32(remote_oapp));
Expand Down
6 changes: 6 additions & 0 deletions examples/oft-hyperliquid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @layerzerolabs/oft-hyperliquid-example

## 1.0.12

### Patch Changes

- 91727cf: docs update and natspec

## 1.0.11

### Patch Changes
Expand Down
20 changes: 10 additions & 10 deletions examples/oft-hyperliquid/HYPERLIQUID.CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Block switching is not present in the default oft deploy script.
| Purchase Spot | CoreSpot Deployer | <https://app.hyperliquid.xyz/deploySpot> | HyperCore |
| Blocked by | none | none | Step 2 |

- [ ] Purchase your HyperCore Spot engaging in the [auction](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-16-purchase-the-ticker)
- [ ] Purchase your HyperCore Spot engaging in the [auction](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-0-purchase-the-ticker-prerequisite)

## Step 2 : Deploy the CoreSpot

Expand All @@ -54,7 +54,7 @@ Block switching is not present in the default oft deploy script.
| Blocked by | OFT Deployer | Step 0 | Step 3 |
| Blocked by | CoreSpot Deployer | Step 1 | Step 2.2 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-0-purchase-the-ticker)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-0-purchase-the-ticker-prerequisite)
- [ ] Core spot deployer needs OFT address and deployed transaction hash

### Step 2.2 : Enable freeze privilege (Optional)
Expand All @@ -64,7 +64,7 @@ Block switching is not present in the default oft deploy script.
| Enable Freeze Privilege | CoreSpot Deployer | `npx @layerzerolabs/hyperliquid-composer` | HyperCore |
| Blocked by | CoreSpot Deployer | Step 2.1 | Step 2.2 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-16-enablefreezeprivilege-optional)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-18-enablefreezeprivilege-optional)
- [ ] **MUST be done before genesis** if you want freeze capability
- [ ] Enables post-launch user freeze/unfreeze operations
- [ ] Once set, can only be revoked (irreversible)
Expand All @@ -76,7 +76,7 @@ Block switching is not present in the default oft deploy script.
| Set User Genesis | CoreSpot Deployer | `npx @layerzerolabs/hyperliquid-composer` | HyperCore |
| Blocked by | CoreSpot Deployer | Step 2.1 | Step 2.3 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-26-usergenesis)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-28-usergenesis)
- [ ] HyperCore balances are u64 - the max balance is `2.pow(64) - 1 = 18446744073709551615`
- [ ] Make sure the total balances in the json does not exceed this value.
- [ ] Re-runnable until the next step is executed.
Expand All @@ -91,7 +91,7 @@ Block switching is not present in the default oft deploy script.
| Confirm User Genesis | CoreSpot Deployer | `npx @layerzerolabs/hyperliquid-composer` | HyperCore |
| Blocked by | CoreSpot Deployer | Step 2.2 | Step 2.4 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-36-genesis)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-38-genesis)
- [ ] Locks in the user genesis step and is now immutable.

### Step 2.5 : Create spot deployment
Expand All @@ -101,7 +101,7 @@ Block switching is not present in the default oft deploy script.
| Create Spot Deployment | CoreSpot Deployer | `npx @layerzerolabs/hyperliquid-composer` | HyperCore |
| Blocked by | CoreSpot Deployer | Step 2.3 | Step 2.5 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-46-createspotdeployment)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-58-createspotdeployment)
- Step MUST be run even though we set `noHyperliquidity=true` in genesis
- This can be run even after deployment and linking

Expand All @@ -112,7 +112,7 @@ Block switching is not present in the default oft deploy script.
| Register Spot | CoreSpot Deployer | `npx @layerzerolabs/hyperliquid-composer` | HyperCore |
| Blocked by | CoreSpot Deployer | Step 2.4 | Step 3 |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-56-registerspot)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-48-registerspot)
- [ ] Only USDC is supported on HyperCore at the moment - the sdk defaults to USDC.
- [ ] Make sure the asset bridge address on HyperCore has all the tokens minted in Step 2.3. Partial funding is not supported.
- The final step to be executed after which the token will be listed on the spot order book.
Expand All @@ -125,11 +125,11 @@ Block switching is not present in the default oft deploy script.
| Blocked by | OFT Deployer | Step 0 | none |
| Blocked by | CoreSpot Deployer | Step 2.1 | none |

- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-67-setdeployertradingfeeshare-optional)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-68-setdeployertradingfeeshare-optional)
- [ ] Trading fee share is usually 100% (default value) - this allocates the trading fees to the token deployer instead of burning it.
- [ ] Do not lose or burn your deployer address as it collects tokens.
- [ ] Step can be re-run as long as the new fee% is lower than the current one.
- [ ] **Important**: If you plan to enable quote token capability (Step 2.8), read the [Permissionless Spot Quote Assets](https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/permissionless-spot-quote-assets) documentation before setting this value as it requires a specific trading fee share.
- [ ] **Important**: If you plan to enable quote token capability (Step 2.8), read the [Permissionless Spot Quote Assets](https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/permissionless-spot-quote-assets) documentation before setting this value as it requires a specific trading fee share
- Even though the default value is 100%, it is recommended that you set it
- This can be run even after deployment and linking

Expand All @@ -142,7 +142,7 @@ Block switching is not present in the default oft deploy script.

- [ ] **Review requirements first**: Read [Permissionless Spot Quote Assets](https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/permissionless-spot-quote-assets) for all requirements
- [ ] Requires specific trading fee share value (see Step 2.7 above)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-657-enablequotetoken-optional)
- [ ] Follow the [guide](https://github.com/LayerZero-Labs/devtools/blob/main/examples/oft-hyperliquid/HYPERLIQUID.README.md#step-78-enablequotetoken-optional)
- [ ] Enables the token to be used as a quote asset for trading pairs (e.g., OTHER_TOKEN/YOUR_TOKEN)
- [ ] Can be executed after trading fee share is set
- [ ] This can be run even after deployment and linking are complete
Expand Down
Loading