Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fc23701
refactor: initializeAssetToken and receive are virtual for nativePool…
shankars99 Oct 3, 2025
60ee7d1
refactor: _send() and _refund() to use virtual functions sendLocal an…
shankars99 Oct 3, 2025
e84f500
docs: cleanup to under 120 characters
shankars99 Oct 3, 2025
5dfefcd
chore: interfaces for ComposerNative and WETH
shankars99 Oct 3, 2025
abe2807
feat: PoolNative (ETH) compatible vault composer
shankars99 Oct 3, 2025
6bd8ae6
test: mock contracts and interfaces
shankars99 Oct 3, 2025
6aa8a3b
test: testing against poolERC20 and poolNative with new base
shankars99 Oct 3, 2025
0dc45bb
chore: update fuzz runs
shankars99 Oct 3, 2025
a87ff95
docs: comment _sendRemote custom behavior
shankars99 Oct 3, 2025
cd43b60
Refactor msg value to be passed down vs. direct reference (#1749)
TRileySchwarz Oct 7, 2025
f5e888a
chore: test ovault sync native composer and apply small nits (#1752)
tinom9 Oct 8, 2025
5608ee0
fix - wrap ETH in lzCompose (#1764)
shankars99 Oct 17, 2025
903c135
Integrate Stargate Native asset pools into OVault SDK (#1769)
arekLZ Oct 22, 2025
ad6e0b3
ovault/native-asset-audit (#1766)
shankars99 Oct 23, 2025
1cb1735
vault - fixes 2 (#1775)
shankars99 Oct 27, 2025
f6292dd
ovault: wrap deposit and redeem with balance checks to force synchron…
shankars99 Oct 30, 2025
199e864
Merge branch 'main' into feat/ovault-stargate-assets
St0rmBr3w Nov 4, 2025
24a3c77
native-pool-review (#1788)
shankars99 Nov 4, 2025
9702caa
chore: artifacts
shankars99 Nov 4, 2025
d437dd1
Update packages/ovault-evm/src/types.ts
arekLZ Nov 4, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract VaultComposerSyncProxySendTest is VaultComposerSyncBaseTest {
vm.deal(userA, 100 ether);
}

function test_target_is_hub_reverts_when_msg_value_provided() public {
function test_target_is_hub_does_not_revert_when_msg_value_provided() public {
SendParam memory sendParam = SendParam(ARB_EID, addressToBytes32(userA), TOKENS_TO_SEND, 0, "", "", "");
assetOFT_arb.mint(address(userA), TOKENS_TO_SEND);
vault_arb.mint(address(userA), TOKENS_TO_SEND);
Expand All @@ -31,11 +31,11 @@ contract VaultComposerSyncProxySendTest is VaultComposerSyncBaseTest {
assetOFT_arb.approve(address(VaultComposerSyncArb), TOKENS_TO_SEND);
vault_arb.approve(address(VaultComposerSyncArb), TOKENS_TO_SEND);

vm.expectRevert(IVaultComposerSync.NoMsgValueExpected.selector);
VaultComposerSyncArb.depositAndSend{ value: 1 wei }(TOKENS_TO_SEND, sendParam, userA);
assertEq(address(VaultComposerSyncArb).balance, 1 wei);

vm.expectRevert(IVaultComposerSync.NoMsgValueExpected.selector);
VaultComposerSyncArb.redeemAndSend{ value: 2 wei }(TOKENS_TO_SEND, sendParam, userA);
assertEq(address(VaultComposerSyncArb).balance, 3 wei);
vm.stopPrank();
}

Expand Down
34 changes: 0 additions & 34 deletions examples/ovault-evm/test/vault-sync/VaultComposerSync_Unit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -119,40 +119,6 @@ contract VaultComposerSyncUnitTest is VaultComposerSyncBaseTest {
assertEq(vault_arb.totalSupply(), vault_arb.balanceOf(address(userA)), TOKENS_TO_SEND);
}

function test_lzCompose_pass_dst_is_hub_no_msgValue_causes_refund() public {
bytes32 guid = _randomGUID();
assetOFT_arb.mint(address(VaultComposerSyncArb), TOKENS_TO_SEND);
uint256 userABalanceEth = assetOFT_eth.balanceOf(userA);

SendParam memory internalSendParam = SendParam(
VaultComposerSyncArb.VAULT_EID(),
addressToBytes32(userA),
TOKENS_TO_SEND,
0,
"",
"",
""
);

bytes memory composeMsg = _createComposePayload(ETH_EID, internalSendParam, 1 wei, TOKENS_TO_SEND, userA);

/// @dev Internal revert on try...catch
/// vm.expectRevert(abi.encodeWithSelector(IVaultComposerSync.NoMsgValueExpected.selector));

vm.expectEmit(true, true, true, true, address(VaultComposerSyncArb));
emit IVaultComposerSync.Refunded(guid);

vm.prank(arbEndpoint);
VaultComposerSyncArb.lzCompose{ value: 1 ether }(address(assetOFT_arb), guid, composeMsg, arbExecutor, "");

verifyPackets(ETH_EID, address(assetOFT_eth));
assertEq(
assetOFT_eth.balanceOf(userA),
userABalanceEth + TOKENS_TO_SEND,
"userA should have received refund on Ethereum"
);
}

function test_lzCompose_fail_invalid_payload_auto_refunds() public {
bytes32 guid = _randomGUID();
assetOFT_arb.mint(address(VaultComposerSyncArb), TOKENS_TO_SEND);
Expand Down
7 changes: 2 additions & 5 deletions packages/ovault-evm/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ cache
# artifacts; ignore all files except the local contract artifacts.
artifacts/*
!artifacts/VaultComposerSync.sol/
!artifacts/VaultComposerSyncNative.sol/
!artifacts/IVaultComposerSync.sol/
!artifacts/VaultComposerSync_Base.t.sol
!artifacts/VaultComposerSync_E2E.t.sol
!artifacts/VaultComposerSync_ProxySend.t.sol
!artifacts/VaultComposerSync_Unit.t.sol

!artifacts/IVaultComposerSyncNative.sol/

# sdk
.env
Expand Down
9 changes: 7 additions & 2 deletions packages/ovault-evm/README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run prettier on this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @arekLZ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What styling is off?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier adds an empty line after the titles and formats the code blocks differently to me.

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ pnpm install @layerzerolabs/ovault-evm
npm install @layerzerolabs/ovault-evm
```


## Ovault SDK
## Ovault SDK

This is an SDK to make depositing/redeeming on OVaults simple.

Expand Down Expand Up @@ -126,6 +125,12 @@ const tx = await walletClient.writeContract({
For more example usage you can check `./test/sdk.test.ts`. It will run transactions against the deployed OVault contracts
on Base-Sepolia and Arbitrum-Sepolia

### Using Stargate native pools
If you are staking in Stargate's native pools you will need a slightly different setup. As the asset is the native token there is not
really an OFT or an ERC20 address. So for the asset OFT and ERC20 address you need to supply the Native Pool and `0x0`(or some other 0 value hex string).
The Native Pool implements the OFT interface, and the `0x0` address will let the library know that it should handle it as a native pool. Other than that
it is the same. If you are using wETH, you can supply arguments normally. This is just for ETH or other native tokens specifically.
Comment on lines +129 to +132
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arekLZ can you help with this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so it is compatible with more editors. Many don't wrap markdown and single line breaks like this will show as a single line when rendering markdown.

Example:
Screenshot 2025-11-04 at 1 29 09 PM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand.

Doing a quick (and completely non-exhaustive) check of the repo, I'd say that it's not very consistent with how we're formatting .md files so far, so I'd prioritize consistency (and, to me, more readable code) over compatibility.


#### Adding Buffer to Hub Chain Fee
You can add a buffer to the fee on the hub chain by override the `calculateHubChainFee` function.

Expand Down

Large diffs are not rendered by default.

Loading