Skip to content
Draft
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
4 changes: 2 additions & 2 deletions contracts/FraxOFTWalletUpgradeable.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;

import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable-4.8.1/access/Ownable2StepUpgradeable.sol";
import { SendParam, OFTReceipt, MessagingFee, IOFT } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oft/interfaces/IOFT.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/contracts-4.8.1/token/ERC20/IERC20.sol";

error WithdrawEthFailed();
error MismatchedArrayLengths();
Expand Down
9 changes: 9 additions & 0 deletions contracts/mocks/ConsoleMock.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pragma solidity ^0.8.0;

import "forge-std/console2.sol";

contract ConsoleMock {
function log(string memory message) public pure {
console2.log(message);
}
}
6 changes: 3 additions & 3 deletions contracts/mocks/CustodianMock.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pragma solidity ^0.8.22;

import { OptionsBuilder } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oapp/libs/OptionsBuilder.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/contracts-4.8.1/token/ERC20/IERC20.sol";
import { SendParam, MessagingFee, IOFT } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oft/interfaces/IOFT.sol";

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { Ownable } from "@openzeppelin/contracts-4.8.1/access/Ownable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable-4.8.1/proxy/utils/Initializable.sol";

/// @dev used in conjunction with `scripts/ops/MoveLegacyLiquidity/1_DeployMockOFTs.s.sol`
contract CustodianMock is Ownable, Initializable {
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC20Mock.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC20} from "@openzeppelin/contracts-4.8.1/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts-4.8.1/access/Ownable.sol";

contract ERC20Mock is Ownable, ERC20 {
constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}
Expand Down
6 changes: 3 additions & 3 deletions contracts/mocks/FXSCustodianMock.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pragma solidity ^0.8.22;

import { OptionsBuilder } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oapp/libs/OptionsBuilder.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IERC20 } from "@openzeppelin/contracts-4.8.1/token/ERC20/IERC20.sol";
import { SendParam, MessagingFee, IOFT } from "@fraxfinance/layerzero-v2-upgradeable/oapp/contracts/oft/interfaces/IOFT.sol";

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { Ownable } from "@openzeppelin/contracts-4.8.1/access/Ownable.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable-4.8.1/proxy/utils/Initializable.sol";

/// @dev used in conjunction with `scripts/ops/MoveLegacyLiquidity/2_DeployMockFXS.s.sol`
contract FXSCustodianMock is Ownable, Initializable {
Expand Down
8 changes: 4 additions & 4 deletions contracts/mocks/FrxUsdImplementationMock.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;

import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";
import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable-4.8.1/token/ERC20/ERC20Upgradeable.sol";
import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable-4.8.1/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable-4.8.1/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable-4.8.1/access/AccessControlUpgradeable.sol";

/// @notice This contract uses OZ 4.x, which does not namespace storage. Upgrades to this contract must be done carefully to avoid storage clashing.
contract FrxUsdImplementationMock is ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PermitUpgradeable, AccessControlUpgradeable {
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ remappings = [
'forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std',
'@layerzerolabs/=node_modules/@layerzerolabs/',
'frax-std/=node_modules/frax-standard-solidity/src/',
'@openzeppelin/=node_modules/@openzeppelin/'
]

via_ir = false
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@babel/core": "^7.27.7",
"@coral-xyz/anchor": "^0.29.0",
"@ethersproject/bytes": "^5.8.0",
"@fraxfinance/layerzero-v2-upgradeable": "github:fraxfinance/LayerZero-v2-upgradeable#v1.0.0",
"@fraxfinance/layerzero-v2-upgradeable": "github:fraxfinance/LayerZero-v2-upgradeable#deps/pin-oz",
"@jest/globals": "^29.7.0",
"@layerzerolabs/devtools": "~0.4.10",
"@layerzerolabs/devtools-evm": "~1.0.6",
Expand Down Expand Up @@ -84,8 +84,6 @@
"@nomicfoundation/hardhat-ethers": "^3.0.9",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@openzeppelin/contracts": "4.9.6",
"@openzeppelin/contracts-upgradeable": "4.9.6",
"@rushstack/eslint-patch": "^1.12.0",
"@solana-developers/helpers": "~2.8.1",
"@solana/spl-token": "^0.4.13",
Expand Down Expand Up @@ -166,8 +164,12 @@
"@ethersproject/abi": "^5.8.0",
"@ethersproject/abstract-signer": "^5.8.0",
"@ethersproject/hash": "^5.8.0",
"@openzeppelin-5/contracts": "npm:@openzeppelin/contracts@^5.3.0",
"@openzeppelin-5/contracts-upgradeable": "npm:@openzeppelin/contracts-upgradeable@^5.3.0",
"@openzeppelin/contracts": "npm:@openzeppelin/contracts@4.8.1",
"@openzeppelin/contracts-4.8.1": "npm:@openzeppelin/contracts@4.8.1",
"@openzeppelin/contracts-5.3.0": "npm:@openzeppelin/contracts@5.3.0",
"@openzeppelin/contracts-upgradeable": "npm:@openzeppelin/contracts-upgradeable@4.8.1",
"@openzeppelin/contracts-upgradeable-4.8.1": "npm:@openzeppelin/contracts-upgradeable@4.8.1",
"@openzeppelin/contracts-upgradeable-5.3.0": "npm:@openzeppelin/contracts-upgradeable@5.3.0",
"viem": "^2.31.4"
}
}
Loading