From 16394d758eaebe3b3dd3997a844d38b493ee6909 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Wed, 9 Aug 2023 21:11:06 +0800 Subject: [PATCH] chore(protocol): remove deprecated test files (#14425) --- .../test/ExampleStaticAddressManager.sol | 49 ------------------ .../contracts/test/L1/TestTaikoL1.sol | 31 ------------ .../test/L1/TestTaikoL1EnableTokenomics.sol | 32 ------------ .../protocol/contracts/test/TestContracts.sol | 40 --------------- .../contracts/test/bridge/TestHeaderSync.sol | 32 ------------ .../test/bridge/libs/TestLibBridgeData.sol | 40 --------------- .../test/bridge/libs/TestLibBridgeInvoke.sol | 32 ------------ .../test/bridge/libs/TestLibBridgeRetry.sol | 37 -------------- .../test/bridge/libs/TestLibBridgeSend.sol | 31 ------------ .../test/bridge/libs/TestReceiver.sol | 28 ----------- .../test/libs/TestLibBlockHeader.sol | 48 ------------------ .../contracts/test/libs/TestLibTrieProof.sol | 17 ------- .../test/thirdparty/TestLibMerkleTrie.sol | 35 ------------- .../test/thirdparty/TestLibRLPReader.sol | 43 ---------------- .../test/thirdparty/TestLibRLPWriter.sol | 50 ------------------- .../thirdparty/TestLibSecureMerkleTrie.sol | 38 -------------- .../test/thirdparty/TestMessageSender.sol | 19 ------- 17 files changed, 602 deletions(-) delete mode 100644 packages/protocol/contracts/test/ExampleStaticAddressManager.sol delete mode 100644 packages/protocol/contracts/test/L1/TestTaikoL1.sol delete mode 100644 packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol delete mode 100644 packages/protocol/contracts/test/TestContracts.sol delete mode 100644 packages/protocol/contracts/test/bridge/TestHeaderSync.sol delete mode 100644 packages/protocol/contracts/test/bridge/libs/TestLibBridgeData.sol delete mode 100644 packages/protocol/contracts/test/bridge/libs/TestLibBridgeInvoke.sol delete mode 100644 packages/protocol/contracts/test/bridge/libs/TestLibBridgeRetry.sol delete mode 100644 packages/protocol/contracts/test/bridge/libs/TestLibBridgeSend.sol delete mode 100644 packages/protocol/contracts/test/bridge/libs/TestReceiver.sol delete mode 100644 packages/protocol/contracts/test/libs/TestLibBlockHeader.sol delete mode 100644 packages/protocol/contracts/test/libs/TestLibTrieProof.sol delete mode 100644 packages/protocol/contracts/test/thirdparty/TestLibMerkleTrie.sol delete mode 100644 packages/protocol/contracts/test/thirdparty/TestLibRLPReader.sol delete mode 100644 packages/protocol/contracts/test/thirdparty/TestLibRLPWriter.sol delete mode 100644 packages/protocol/contracts/test/thirdparty/TestLibSecureMerkleTrie.sol delete mode 100644 packages/protocol/contracts/test/thirdparty/TestMessageSender.sol diff --git a/packages/protocol/contracts/test/ExampleStaticAddressManager.sol b/packages/protocol/contracts/test/ExampleStaticAddressManager.sol deleted file mode 100644 index fea6e15cb3a..00000000000 --- a/packages/protocol/contracts/test/ExampleStaticAddressManager.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { AddressManager } from "../common/AddressManager.sol"; - -/** - * @title ExampleStaticAddressManager - * Such a static lookup AddressManager can be used to replace - * existing storage-based lookup AddressManager so we can avoid - * SSLOAD easily. - */ -contract ExampleStaticAddressManager is AddressManager { - function setAddress( - uint256, - /*domain*/ - bytes32, - /*nameHash*/ - address /*newAddress*/ - ) - external - pure - override - { - revert(""); - } - - /// @dev This function must be a pure function in order to avoid - /// reading from storage. - function getAddress( - uint256 domain, - bytes32 nameHash - ) - external - pure - override - returns (address addr) - { - if (domain == 1) { - if (nameHash == "ether_vault") addr = address(0x123); - } else if (domain == 167) { - if (nameHash == "taiko") addr = address(0x456); - } - } -} diff --git a/packages/protocol/contracts/test/L1/TestTaikoL1.sol b/packages/protocol/contracts/test/L1/TestTaikoL1.sol deleted file mode 100644 index 9977ad63236..00000000000 --- a/packages/protocol/contracts/test/L1/TestTaikoL1.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { TaikoL1 } from "../../L1/TaikoL1.sol"; -import { TaikoData } from "../../L1/TaikoData.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; - -contract TestTaikoL1 is TaikoL1 { - function getConfig() - public - pure - override - returns (TaikoData.Config memory config) - { - config.chainId = 167; - // up to 2048 pending blocks - config.blockMaxProposals = 4; - config.blockRingBufferSize = 6; - // This number is calculated from blockMaxProposals to make - // the 'the maximum value of the multiplier' close to 20.0 - config.blockMaxVerificationsPerTx = 0; - config.blockMaxGasLimit = 30_000_000; - config.blockMaxTransactions = 20; - config.blockMaxTxListBytes = 120_000; - } -} diff --git a/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol b/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol deleted file mode 100644 index a37e6ca2767..00000000000 --- a/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { TaikoL1 } from "../../L1/TaikoL1.sol"; -import { TaikoData } from "../../L1/TaikoData.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; - -contract TestTaikoL1EnableTokenomics is TaikoL1 { - function getConfig() - public - pure - override - returns (TaikoData.Config memory config) - { - config.chainId = 167; - // up to 2048 pending blocks - config.blockMaxProposals = 6; - config.blockRingBufferSize = 8; - // This number is calculated from blockMaxProposals to make - // the 'the maximum value of the multiplier' close to 20.0 - config.blockMaxVerificationsPerTx = 0; // dont verify blocks - // automatically - config.blockMaxGasLimit = 30_000_000; - config.blockMaxTransactions = 20; - config.blockMaxTxListBytes = 120_000; - } -} diff --git a/packages/protocol/contracts/test/TestContracts.sol b/packages/protocol/contracts/test/TestContracts.sol deleted file mode 100644 index f01dabdc0a0..00000000000 --- a/packages/protocol/contracts/test/TestContracts.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import { SignalService } from "../signal/SignalService.sol"; -import { ERC20Vault } from "../tokenvault/ERC20Vault.sol"; -import { EtherVault } from "../bridge/EtherVault.sol"; -import { BridgedERC20 } from "../tokenvault/BridgedERC20.sol"; -import { Bridge } from "../bridge/Bridge.sol"; -import { TaikoToken } from "../L1/TaikoToken.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; - -// The old implementation that is also used in hardhat tests. - -contract TestERC20 is ERC20 { - constructor(uint256 initialSupply) ERC20("TestERC20", "TEST") { - _mint(msg.sender, initialSupply); - } -} - -contract TestSignalService is SignalService { } - -contract TestERC20Vault is ERC20Vault { } - -contract TestEtherVault is EtherVault { } - -contract TestBridgedERC20 is BridgedERC20 { } - -contract TestBridge is Bridge { } - -contract TestTaikoToken is TaikoToken { - function mintAnyone(address account, uint256 amount) public { - _mint(account, amount); - } -} diff --git a/packages/protocol/contracts/test/bridge/TestHeaderSync.sol b/packages/protocol/contracts/test/bridge/TestHeaderSync.sol deleted file mode 100644 index 66c4e6b571d..00000000000 --- a/packages/protocol/contracts/test/bridge/TestHeaderSync.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { ICrossChainSync } from "../../common/ICrossChainSync.sol"; - -// TODO(roger): remove this file. If you need extra functionality in -// the Bridge contract, create a TestBridge.sol contract instead. -contract TestCrossChainSync is ICrossChainSync { - bytes32 private _blockHash; - bytes32 private _signalRoot; - - function setCrossChainBlockHeader(bytes32 blockHash) external { - _blockHash = blockHash; - } - - function setCrossChainSignalRoot(bytes32 signalRoot) external { - _signalRoot = signalRoot; - } - - function getCrossChainBlockHash(uint256) external view returns (bytes32) { - return _blockHash; - } - - function getCrossChainSignalRoot(uint256) external view returns (bytes32) { - return _signalRoot; - } -} diff --git a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeData.sol b/packages/protocol/contracts/test/bridge/libs/TestLibBridgeData.sol deleted file mode 100644 index ab6f453268e..00000000000 --- a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeData.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { LibBridgeData } from "../../../bridge/libs/LibBridgeData.sol"; -import { LibBridgeStatus } from "../../../bridge/libs/LibBridgeStatus.sol"; -import { IBridge } from "../../../bridge/IBridge.sol"; - -// TODO(roger): remove this file. If you need extra functionality in -// the Bridge contract, create a TestBridge.sol contract instead. -contract TestLibBridgeData { - function updateMessageStatus( - bytes32 signal, - LibBridgeStatus.MessageStatus status - ) - public - { - LibBridgeStatus.updateMessageStatus(signal, status); - } - - function getMessageStatus(bytes32 signal) - public - view - returns (LibBridgeStatus.MessageStatus) - { - return LibBridgeStatus.getMessageStatus(signal); - } - - function hashMessage(IBridge.Message memory message) - public - pure - returns (bytes32) - { - return LibBridgeData.hashMessage(message); - } -} diff --git a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeInvoke.sol b/packages/protocol/contracts/test/bridge/libs/TestLibBridgeInvoke.sol deleted file mode 100644 index 73e81ef0bc7..00000000000 --- a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeInvoke.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { LibBridgeInvoke } from "../../../bridge/libs/LibBridgeInvoke.sol"; -import { LibBridgeData } from "../../../bridge/libs/LibBridgeData.sol"; -import { IBridge } from "../../../bridge/IBridge.sol"; - -// TODO(roger): remove this file. If you need extra functionality in -// the Bridge contract, create a TestBridge.sol contract instead. -contract TestLibBridgeInvoke { - LibBridgeData.State public state; - - event MessageInvoked(bytes32 signal, bool success); - - function invokeMessageCall( - IBridge.Message calldata message, - bytes32 signal, - uint256 gasLimit - ) - public - payable - { - bool success = - LibBridgeInvoke.invokeMessageCall(state, message, signal, gasLimit); - emit MessageInvoked(signal, success); - } -} diff --git a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeRetry.sol b/packages/protocol/contracts/test/bridge/libs/TestLibBridgeRetry.sol deleted file mode 100644 index 6b4861a8a0e..00000000000 --- a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeRetry.sol +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { EssentialContract } from "../../../common/EssentialContract.sol"; -import { LibBridgeData } from "../../../bridge/libs/LibBridgeData.sol"; -import { LibBridgeRetry } from "../../../bridge/libs/LibBridgeRetry.sol"; -import { IBridge } from "../../../bridge/IBridge.sol"; -import { AddressResolver } from "../../../common/AddressResolver.sol"; - -// TODO(roger): remove this file. If you need extra functionality in -// the Bridge contract, create a TestBridge.sol contract instead. -contract TestLibBridgeRetry is EssentialContract { - LibBridgeData.State public state; - - receive() external payable { } - - function init(address _addressManager) external initializer { - EssentialContract._init(_addressManager); - } - - function retryMessage( - IBridge.Message calldata message, - bool lastAttempt - ) - public - payable - { - LibBridgeRetry.retryMessage( - state, AddressResolver(this), message, lastAttempt - ); - } -} diff --git a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeSend.sol b/packages/protocol/contracts/test/bridge/libs/TestLibBridgeSend.sol deleted file mode 100644 index 8d783e9feb8..00000000000 --- a/packages/protocol/contracts/test/bridge/libs/TestLibBridgeSend.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { EssentialContract } from "../../../common/EssentialContract.sol"; -import { LibBridgeSend } from "../../../bridge/libs/LibBridgeSend.sol"; -import { AddressResolver } from "../../../common/AddressResolver.sol"; -import { IBridge } from "../../../bridge/IBridge.sol"; -import { LibBridgeData } from "../../../bridge/libs/LibBridgeData.sol"; - -// TODO(roger): remove this file. If you need extra functionality in -// the Bridge contract, create a TestBridge.sol contract instead. -contract TestLibBridgeSend is EssentialContract { - LibBridgeData.State public state; - - function init(address _addressManager) external initializer { - EssentialContract._init(_addressManager); - } - - function sendMessage(IBridge.Message memory message) - public - payable - returns (bytes32 signal) - { - return LibBridgeSend.sendMessage(state, AddressResolver(this), message); - } -} diff --git a/packages/protocol/contracts/test/bridge/libs/TestReceiver.sol b/packages/protocol/contracts/test/bridge/libs/TestReceiver.sol deleted file mode 100644 index dba741360a1..00000000000 --- a/packages/protocol/contracts/test/bridge/libs/TestReceiver.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -contract TestReceiver { - event Received(address from, uint256 amount); - event Fallback(address from, uint256 amount); - - receive() external payable { - emit Received(msg.sender, msg.value); - } - - fallback() external payable { - emit Fallback(msg.sender, msg.value); - } - - function receiveTokens(uint256 amt) external payable { - emit Received(msg.sender, amt); - } - - function getBalance() external view returns (uint256) { - return address(this).balance; - } -} diff --git a/packages/protocol/contracts/test/libs/TestLibBlockHeader.sol b/packages/protocol/contracts/test/libs/TestLibBlockHeader.sol deleted file mode 100644 index 476e2c0fc76..00000000000 --- a/packages/protocol/contracts/test/libs/TestLibBlockHeader.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { LibBlockHeader, BlockHeader } from "../../libs/LibBlockHeader.sol"; -import { LibRLPWriter } from "../../thirdparty/LibRLPWriter.sol"; - -contract TestLibBlockHeader { - function hashBlockHeader(BlockHeader calldata header) - public - pure - returns (bytes32) - { - return LibBlockHeader.hashBlockHeader(header); - } - - function rlpBlockHeader(BlockHeader calldata header) - public - pure - returns (bytes memory) - { - bytes[] memory list = new bytes[](15); - list[0] = LibRLPWriter.writeHash(header.parentHash); - list[1] = LibRLPWriter.writeHash(header.ommersHash); - list[2] = LibRLPWriter.writeAddress(header.beneficiary); - list[3] = LibRLPWriter.writeHash(header.stateRoot); - list[4] = LibRLPWriter.writeHash(header.transactionsRoot); - list[5] = LibRLPWriter.writeHash(header.receiptsRoot); - list[6] = LibRLPWriter.writeBytes(abi.encodePacked(header.logsBloom)); - list[7] = LibRLPWriter.writeUint(header.difficulty); - list[8] = LibRLPWriter.writeUint(header.height); - list[9] = LibRLPWriter.writeUint64(header.gasLimit); - list[10] = LibRLPWriter.writeUint64(header.gasUsed); - list[11] = LibRLPWriter.writeUint64(header.timestamp); - list[12] = LibRLPWriter.writeBytes(header.extraData); - list[13] = LibRLPWriter.writeHash(header.mixHash); - // According to the ethereum yellow paper, we should treat `nonce` - // as [8]byte when hashing the block. - list[14] = LibRLPWriter.writeBytes(abi.encodePacked(header.nonce)); - - bytes memory rlpHeader = LibRLPWriter.writeList(list); - return rlpHeader; - } -} diff --git a/packages/protocol/contracts/test/libs/TestLibTrieProof.sol b/packages/protocol/contracts/test/libs/TestLibTrieProof.sol deleted file mode 100644 index 61f3bc6d572..00000000000 --- a/packages/protocol/contracts/test/libs/TestLibTrieProof.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MIT -// _____ _ _ _ _ -// |_ _|_ _(_) |_____ | | __ _| |__ ___ -// | |/ _` | | / / _ \ | |__/ _` | '_ (_-< -// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/ - -pragma solidity ^0.8.20; - -import { LibTrieProof } from "../../libs/LibTrieProof.sol"; - -contract TestLibTrieProof { - function writeStorageAt(bytes32 slot, bytes32 val) public { - assembly { - sstore(slot, val) - } - } -} diff --git a/packages/protocol/contracts/test/thirdparty/TestLibMerkleTrie.sol b/packages/protocol/contracts/test/thirdparty/TestLibMerkleTrie.sol deleted file mode 100644 index da805d323fe..00000000000 --- a/packages/protocol/contracts/test/thirdparty/TestLibMerkleTrie.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import { LibMerkleTrie } from "../../thirdparty/LibMerkleTrie.sol"; - -/** - * @title TestLibMerkleTrie - */ -contract TestLibMerkleTrie { - function verifyInclusionProof( - bytes memory _key, - bytes memory _value, - bytes memory _proof, - bytes32 _root - ) - public - pure - returns (bool) - { - return LibMerkleTrie.verifyInclusionProof(_key, _value, _proof, _root); - } - - function get( - bytes memory _key, - bytes memory _proof, - bytes32 _root - ) - public - pure - returns (bool, bytes memory) - { - return LibMerkleTrie.get(_key, _proof, _root); - } -} diff --git a/packages/protocol/contracts/test/thirdparty/TestLibRLPReader.sol b/packages/protocol/contracts/test/thirdparty/TestLibRLPReader.sol deleted file mode 100644 index 26fa118eeee..00000000000 --- a/packages/protocol/contracts/test/thirdparty/TestLibRLPReader.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import { LibRLPReader } from "../../thirdparty/LibRLPReader.sol"; - -/** - * @title TestLibRLPReader - */ -contract TestLibRLPReader { - function readList(bytes memory _in) public pure returns (bytes[] memory) { - LibRLPReader.RLPItem[] memory decoded = LibRLPReader.readList(_in); - bytes[] memory out = new bytes[](decoded.length); - for (uint256 i; i < out.length; ++i) { - out[i] = LibRLPReader.readRawBytes(decoded[i]); - } - return out; - } - - function readString(bytes memory _in) public pure returns (string memory) { - return LibRLPReader.readString(_in); - } - - function readBytes(bytes memory _in) public pure returns (bytes memory) { - return LibRLPReader.readBytes(_in); - } - - function readBytes32(bytes memory _in) public pure returns (bytes32) { - return LibRLPReader.readBytes32(_in); - } - - function readUint256(bytes memory _in) public pure returns (uint256) { - return LibRLPReader.readUint256(_in); - } - - function readBool(bytes memory _in) public pure returns (bool) { - return LibRLPReader.readBool(_in); - } - - function readAddress(bytes memory _in) public pure returns (address) { - return LibRLPReader.readAddress(_in); - } -} diff --git a/packages/protocol/contracts/test/thirdparty/TestLibRLPWriter.sol b/packages/protocol/contracts/test/thirdparty/TestLibRLPWriter.sol deleted file mode 100644 index 56e931cf993..00000000000 --- a/packages/protocol/contracts/test/thirdparty/TestLibRLPWriter.sol +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import { LibRLPWriter } from "../../thirdparty/LibRLPWriter.sol"; - -/** - * @title TestLibRLPWriter - */ -contract TestLibRLPWriter { - function writeBytes(bytes memory _in) - public - pure - returns (bytes memory _out) - { - return LibRLPWriter.writeBytes(_in); - } - - function writeList(bytes[] memory _in) - public - pure - returns (bytes memory _out) - { - return LibRLPWriter.writeList(_in); - } - - function writeString(string memory _in) - public - pure - returns (bytes memory _out) - { - return LibRLPWriter.writeString(_in); - } - - function writeAddress(address _in) - public - pure - returns (bytes memory _out) - { - return LibRLPWriter.writeAddress(_in); - } - - function writeUint(uint256 _in) public pure returns (bytes memory _out) { - return LibRLPWriter.writeUint(_in); - } - - function writeBool(bool _in) public pure returns (bytes memory _out) { - return LibRLPWriter.writeBool(_in); - } -} diff --git a/packages/protocol/contracts/test/thirdparty/TestLibSecureMerkleTrie.sol b/packages/protocol/contracts/test/thirdparty/TestLibSecureMerkleTrie.sol deleted file mode 100644 index 735d20c8736..00000000000 --- a/packages/protocol/contracts/test/thirdparty/TestLibSecureMerkleTrie.sol +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -/* Library Imports */ -import { LibSecureMerkleTrie } from "../../thirdparty/LibSecureMerkleTrie.sol"; - -/** - * @title TestLibSecureMerkleTrie - */ -contract TestLibSecureMerkleTrie { - function verifyInclusionProof( - bytes memory _key, - bytes memory _value, - bytes memory _proof, - bytes32 _root - ) - public - pure - returns (bool) - { - return LibSecureMerkleTrie.verifyInclusionProof( - _key, _value, _proof, _root - ); - } - - function get( - bytes memory _key, - bytes memory _proof, - bytes32 _root - ) - public - pure - returns (bool, bytes memory) - { - return LibSecureMerkleTrie.get(_key, _proof, _root); - } -} diff --git a/packages/protocol/contracts/test/thirdparty/TestMessageSender.sol b/packages/protocol/contracts/test/thirdparty/TestMessageSender.sol deleted file mode 100644 index 22440b1ae33..00000000000 --- a/packages/protocol/contracts/test/thirdparty/TestMessageSender.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.20; - -import { IBridge } from "../../bridge/IBridge.sol"; - -contract TestMessageSender { - bytes32 public signal = - 0x3fd54831f488a22b28398de0c567a3b064b937f54f81739ae9bd545967f3abab; - - function sendMessage(IBridge.Message calldata message) - external - payable - returns (bytes32) - { - message; - return signal; - } -}