Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/pink-spies-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@layerzerolabs/oapp-read-example": patch
---

Update to use slim testhelper
7 changes: 7 additions & 0 deletions .changeset/weak-cobras-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@layerzerolabs/test-devtools-evm-foundry": patch
"@layerzerolabs/oapp-example": patch
"@layerzerolabs/oft-example": patch
---

Silenced warnings in MyOApp and MyOFT, added a SlimTestHelper to the test-devtools
4 changes: 2 additions & 2 deletions examples/oapp-read/test/foundry/ReadPublic.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import "forge-std/console.sol";
import "forge-std/Test.sol";

// DevTools imports
import { TestHelperOz5 } from "@layerzerolabs/test-devtools-evm-foundry/contracts/TestHelperOz5.sol";
import { SlimLzTestHelper } from "@layerzerolabs/test-devtools-evm-foundry/contracts/SlimLzTestHelper.sol";

contract ReadPublicTest is TestHelperOz5 {
contract ReadPublicTest is SlimLzTestHelper {
using OptionsBuilder for bytes;

uint32 private aEid = 1; // Chain A Endpoint ID
Expand Down
6 changes: 3 additions & 3 deletions examples/oapp/test/foundry/MyOApp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Met
import "forge-std/console.sol";

// DevTools imports
import { TestHelperOz5 } from "@layerzerolabs/test-devtools-evm-foundry/contracts/TestHelperOz5.sol";
import { SlimLzTestHelper } from "@layerzerolabs/test-devtools-evm-foundry/contracts/SlimLzTestHelper.sol";

contract MyOAppTest is TestHelperOz5 {
contract MyOAppTest is SlimLzTestHelper {
using OptionsBuilder for bytes;

uint32 private aEid = 1;
Expand Down Expand Up @@ -47,7 +47,7 @@ contract MyOAppTest is TestHelperOz5 {
this.wireOApps(oapps);
}

function test_constructor() public {
function test_constructor() public view {
assertEq(aOApp.owner(), address(this));
assertEq(bOApp.owner(), address(this));

Expand Down
8 changes: 4 additions & 4 deletions examples/oft/test/foundry/MyOFT.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import { IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Met
import "forge-std/console.sol";

// DevTools imports
import { TestHelperOz5 } from "@layerzerolabs/test-devtools-evm-foundry/contracts/TestHelperOz5.sol";
import { SlimLzTestHelper } from "@layerzerolabs/test-devtools-evm-foundry/contracts/SlimLzTestHelper.sol";

contract MyOFTTest is TestHelperOz5 {
contract MyOFTTest is SlimLzTestHelper {
using OptionsBuilder for bytes;

uint32 private aEid = 1;
Expand All @@ -43,7 +43,7 @@ contract MyOFTTest is TestHelperOz5 {
vm.deal(userB, 1000 ether);

super.setUp();
setUpEndpoints(2, LibraryType.UltraLightNode);
setUpEndpoints(2); //setUpEndpoints(2, LibraryType.UltraLightNode); also works

aOFT = OFTMock(
_deployOApp(type(OFTMock).creationCode, abi.encode("aOFT", "aOFT", address(endpoints[aEid]), address(this)))
Expand All @@ -64,7 +64,7 @@ contract MyOFTTest is TestHelperOz5 {
bOFT.mint(userB, initialBalance);
}

function test_constructor() public {
function test_constructor() public view {
assertEq(aOFT.owner(), address(this));
assertEq(bOFT.owner(), address(this));

Expand Down
Loading