diff --git a/foundry.toml b/foundry.toml index 74e382c..e801f40 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,7 +1,6 @@ [profile.default] libs = ['lib'] -solc_version = "0.8.21" # Override for the solc version (setting this ignores `auto_detect_solc`) -evm_version = "paris" # to prevent usage of PUSH0, which is not supported on all chains +solc_version = "0.8.19" optimizer = true optimizer_runs = 200 diff --git a/src/ERC1155A.sol b/src/ERC1155A.sol index a3f2c36..89fb6a8 100644 --- a/src/ERC1155A.sol +++ b/src/ERC1155A.sol @@ -1,8 +1,8 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { IERC1155A } from "./interfaces/IERC1155A.sol"; -import { Strings } from "openzeppelin-contracts/contracts/utils/Strings.sol"; +import {IERC1155A} from "./interfaces/IERC1155A.sol"; +import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol"; /** * @title ERC1155A @@ -43,13 +43,7 @@ abstract contract ERC1155A is IERC1155A { /// (full trust assumed) /// @dev If caller only approvedForAll, function executes without reducing allowance (full trust assumed) /// @dev SingleApprove is senior in execution flow, but isApprovedForAll is senior in allowance management - function safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes calldata data - ) + function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) public virtual override @@ -98,10 +92,7 @@ abstract contract ERC1155A is IERC1155A { uint256 id, uint256 amount, bytes calldata data - ) - internal - virtual - { + ) internal virtual { balanceOf[from][id] -= amount; balanceOf[to][id] += amount; @@ -135,11 +126,7 @@ abstract contract ERC1155A is IERC1155A { uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data - ) - public - virtual - override - { + ) public virtual override { bool singleApproval; uint256 len = ids.length; @@ -185,10 +172,7 @@ abstract contract ERC1155A is IERC1155A { } /// @dev Implementation copied from solmate/ERC1155 - function balanceOfBatch( - address[] calldata owners, - uint256[] calldata ids - ) + function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) public view virtual @@ -261,11 +245,7 @@ abstract contract ERC1155A is IERC1155A { /// @notice Public function for increasing multiple id approval amount at once /// @dev extension of single id increase allowance - function increaseAllowanceForMany( - address spender, - uint256[] memory ids, - uint256[] memory addedValues - ) + function increaseAllowanceForMany(address spender, uint256[] memory ids, uint256[] memory addedValues) public virtual returns (bool) @@ -285,11 +265,7 @@ abstract contract ERC1155A is IERC1155A { /// @notice Public function for decreasing multiple id approval amount at once /// @dev extension of single id decrease allowance - function decreaseAllowanceForMany( - address spender, - uint256[] memory ids, - uint256[] memory subtractedValues - ) + function decreaseAllowanceForMany(address spender, uint256[] memory ids, uint256[] memory subtractedValues) public virtual returns (bool) @@ -311,12 +287,7 @@ abstract contract ERC1155A is IERC1155A { /// @dev Only to be used by address(this) /// @dev Notice `owner` param, only contract functions should be able to define it /// @dev Re-adapted from ERC20 - function _decreaseAllowance( - address owner, - address spender, - uint256 id, - uint256 subtractedValue - ) + function _decreaseAllowance(address owner, address spender, uint256 id, uint256 subtractedValue) internal virtual returns (bool) @@ -399,12 +370,7 @@ abstract contract ERC1155A is IERC1155A { } /// @dev Implementation copied from solmate/ERC1155 - function _batchMint( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) + function _batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual { @@ -492,13 +458,7 @@ abstract contract ERC1155TokenReceiver { return ERC1155TokenReceiver.onERC1155Received.selector; } - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external virtual returns (bytes4) diff --git a/src/interfaces/IERC1155A.sol b/src/interfaces/IERC1155A.sol index e9cbdff..838682e 100644 --- a/src/interfaces/IERC1155A.sol +++ b/src/interfaces/IERC1155A.sol @@ -1,7 +1,7 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { IERC1155 } from "openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; +import {IERC1155} from "openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; interface IERC1155A is IERC1155 { /*////////////////////////////////////////////////////////////// @@ -41,21 +41,13 @@ interface IERC1155A is IERC1155 { /// @notice Public function for increasing multiple id approval amount at once /// @dev extension of single id increase allowance - function increaseAllowanceForMany( - address spender, - uint256[] memory ids, - uint256[] memory addedValues - ) + function increaseAllowanceForMany(address spender, uint256[] memory ids, uint256[] memory addedValues) external returns (bool); /// @notice Public function for decreasing multiple id approval amount at once /// @dev extension of single id decrease allowance - function decreaseAllowanceForMany( - address spender, - uint256[] memory ids, - uint256[] memory subtractedValues - ) + function decreaseAllowanceForMany(address spender, uint256[] memory ids, uint256[] memory subtractedValues) external returns (bool); diff --git a/src/interfaces/ITransmuter.sol b/src/interfaces/ITransmuter.sol index b6e8fdf..1057e93 100644 --- a/src/interfaces/ITransmuter.sol +++ b/src/interfaces/ITransmuter.sol @@ -1,5 +1,5 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; interface ITransmuter { /// @notice id given here needs to be the same as id on Source! @@ -9,12 +9,7 @@ interface ITransmuter { /// @param name name of the ERC20 to create /// @param symbol symbol of the ERC20 to create /// @param decimals decimals of the ERC20 to create - function registerTransmuter( - uint256 id, - string memory name, - string memory symbol, - uint8 decimals - ) + function registerTransmuter(uint256 id, string memory name, string memory symbol, uint8 decimals) external returns (address); diff --git a/src/test/ERC1155.t.sol b/src/test/ERC1155.t.sol index 4c95f02..356b323 100644 --- a/src/test/ERC1155.t.sol +++ b/src/test/ERC1155.t.sol @@ -1,10 +1,10 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { DSTestPlus } from "solmate/test/utils/DSTestPlus.sol"; -import { DSInvariantTest } from "solmate/test/utils/DSInvariantTest.sol"; -import { ERC1155TokenReceiver } from "solmate/tokens/ERC1155.sol"; -import { MockERC1155A } from "./mocks/MockERC1155A.sol"; +import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol"; +import {DSInvariantTest} from "solmate/test/utils/DSInvariantTest.sol"; +import {ERC1155TokenReceiver} from "solmate/tokens/ERC1155.sol"; +import {MockERC1155A} from "./mocks/MockERC1155A.sol"; /** * @title ERC1155 Test Suite from Solmate re-adapted for ERC1155A @@ -20,13 +20,7 @@ contract ERC1155Recipient is ERC1155TokenReceiver { uint256 public amount; bytes public mintData; - function onERC1155Received( - address _operator, - address _from, - uint256 _id, - uint256 _amount, - bytes calldata _data - ) + function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _amount, bytes calldata _data) public override returns (bytes4) @@ -60,11 +54,7 @@ contract ERC1155Recipient is ERC1155TokenReceiver { uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data - ) - external - override - returns (bytes4) - { + ) external override returns (bytes4) { batchOperator = _operator; batchFrom = _from; _batchIds = _ids; @@ -76,13 +66,7 @@ contract ERC1155Recipient is ERC1155TokenReceiver { } contract RevertingERC1155Recipient is ERC1155TokenReceiver { - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) + function onERC1155Received(address, address, uint256, uint256, bytes calldata) public pure override @@ -91,13 +75,7 @@ contract RevertingERC1155Recipient is ERC1155TokenReceiver { revert(string(abi.encodePacked(ERC1155TokenReceiver.onERC1155Received.selector))); } - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external pure override @@ -108,13 +86,7 @@ contract RevertingERC1155Recipient is ERC1155TokenReceiver { } contract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver { - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes calldata - ) + function onERC1155Received(address, address, uint256, uint256, bytes calldata) public pure override @@ -123,13 +95,7 @@ contract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver { return 0xCAFEBEEF; } - function onERC1155BatchReceived( - address, - address, - uint256[] calldata, - uint256[] calldata, - bytes calldata - ) + function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external pure override @@ -139,7 +105,7 @@ contract WrongReturnDataERC1155Recipient is ERC1155TokenReceiver { } } -contract NonERC1155Recipient { } +contract NonERC1155Recipient {} contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { MockERC1155A token; @@ -893,12 +859,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { assertBytesEq(to.mintData(), mintData); } - function testBatchMintToEOA( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) + function testBatchMintToEOA(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory mintData) public { if (to == address(0)) to = address(0xBEEF); @@ -932,11 +893,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { } } - function testBatchMintToERC1155Recipient( - uint256[] memory ids, - uint256[] memory amounts, - bytes memory mintData - ) + function testBatchMintToERC1155Recipient(uint256[] memory ids, uint256[] memory amounts, bytes memory mintData) public { ERC1155Recipient to = new ERC1155Recipient(); @@ -996,9 +953,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory mintAmounts, uint256[] memory burnAmounts, bytes memory mintData - ) - public - { + ) public { if (to == address(0)) to = address(0xBEEF); if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; @@ -1049,9 +1004,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, address to, bytes memory transferData - ) - public - { + ) public { if (to == address(0)) to = address(0xBEEF); if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; @@ -1081,9 +1034,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { bytes memory mintData, uint256 transferAmount, bytes memory transferData - ) - public - { + ) public { ERC1155Recipient to = new ERC1155Recipient(); address from = address(0xABCD); @@ -1113,9 +1064,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, address to, bytes memory transferData - ) - public - { + ) public { if (to == address(0)) to = address(0xBEEF); if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; @@ -1137,9 +1086,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { if (to == address(0)) to = address(0xBEEF); if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; @@ -1189,9 +1136,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); ERC1155Recipient to = new ERC1155Recipient(); @@ -1245,9 +1190,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory ids, uint256[] memory amounts, bytes memory mintData - ) - public - { + ) public { uint256 minLength = min3(tos.length, ids.length, amounts.length); address[] memory normalizedTos = new address[](minLength); @@ -1288,11 +1231,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); } - function testFailMintToWrongReturnDataERC155Recipient( - uint256 id, - uint256 mintAmount, - bytes memory mintData - ) + function testFailMintToWrongReturnDataERC155Recipient(uint256 id, uint256 mintAmount, bytes memory mintData) public { token.mint(address(new RevertingERC1155Recipient()), id, mintAmount, mintData); @@ -1304,9 +1243,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 mintAmount, uint256 burnAmount, bytes memory mintData - ) - public - { + ) public { burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); token.mint(to, id, mintAmount, mintData); @@ -1320,9 +1257,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); @@ -1342,9 +1277,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { transferAmount = bound(transferAmount, mintAmount + 1, type(uint256).max); token.mint(address(this), id, mintAmount, mintData); @@ -1357,9 +1290,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { transferAmount = bound(transferAmount, 0, mintAmount); token.mint(address(this), id, mintAmount, mintData); @@ -1372,9 +1303,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { transferAmount = bound(transferAmount, 0, mintAmount); token.mint(address(this), id, mintAmount, mintData); @@ -1387,9 +1316,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { transferAmount = bound(transferAmount, 0, mintAmount); token.mint(address(this), id, mintAmount, mintData); @@ -1404,9 +1331,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256 transferAmount, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { transferAmount = bound(transferAmount, 0, mintAmount); token.mint(address(this), id, mintAmount, mintData); @@ -1422,9 +1347,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); @@ -1464,9 +1387,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); @@ -1504,9 +1425,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); @@ -1546,9 +1465,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); @@ -1588,9 +1505,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); uint256 minLength = min3(ids.length, mintAmounts.length, transferAmounts.length); @@ -1631,9 +1546,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory transferAmounts, bytes memory mintData, bytes memory transferData - ) - public - { + ) public { address from = address(0xABCD); if (ids.length == transferAmounts.length) revert(); @@ -1672,9 +1585,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory ids, uint256[] memory amounts, bytes memory mintData - ) - public - { + ) public { NonERC1155Recipient to = new NonERC1155Recipient(); uint256 minLength = min2(ids.length, amounts.length); @@ -1702,9 +1613,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory ids, uint256[] memory amounts, bytes memory mintData - ) - public - { + ) public { RevertingERC1155Recipient to = new RevertingERC1155Recipient(); uint256 minLength = min2(ids.length, amounts.length); @@ -1732,9 +1641,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory ids, uint256[] memory amounts, bytes memory mintData - ) - public - { + ) public { WrongReturnDataERC1155Recipient to = new WrongReturnDataERC1155Recipient(); uint256 minLength = min2(ids.length, amounts.length); @@ -1763,9 +1670,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory ids, uint256[] memory amounts, bytes memory mintData - ) - public - { + ) public { if (ids.length == amounts.length) revert(); token.batchMint(address(to), ids, amounts, mintData); @@ -1777,9 +1682,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory mintAmounts, uint256[] memory burnAmounts, bytes memory mintData - ) - public - { + ) public { uint256 minLength = min3(ids.length, mintAmounts.length, burnAmounts.length); if (minLength == 0) revert(); @@ -1811,9 +1714,7 @@ contract ERC1155Test is DSTestPlus, ERC1155TokenReceiver { uint256[] memory mintAmounts, uint256[] memory burnAmounts, bytes memory mintData - ) - public - { + ) public { if (ids.length == burnAmounts.length) revert(); token.batchMint(to, ids, mintAmounts, mintData); diff --git a/src/test/ERC1155_A.t.sol b/src/test/ERC1155_A.t.sol index 4828a77..18a39a4 100644 --- a/src/test/ERC1155_A.t.sol +++ b/src/test/ERC1155_A.t.sol @@ -1,8 +1,8 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; import "forge-std/Test.sol"; -import { MockERC1155A } from "./mocks/MockERC1155A.sol"; +import {MockERC1155A} from "./mocks/MockERC1155A.sol"; contract ERC1155ATest is Test { MockERC1155A public SuperShares; diff --git a/src/test/Transmuter.t.sol b/src/test/Transmuter.t.sol index e5b8673..7a793cf 100644 --- a/src/test/Transmuter.t.sol +++ b/src/test/Transmuter.t.sol @@ -1,11 +1,11 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; import "forge-std/Test.sol"; -import { MockTransmuter } from "./mocks/MockTransmuter.sol"; -import { MockERC1155A } from "./mocks/MockERC1155A.sol"; -import { ERC20 } from "solmate/tokens/ERC20.sol"; -import { sERC20 } from "../transmuter/sERC20.sol"; +import {MockTransmuter} from "./mocks/MockTransmuter.sol"; +import {MockERC1155A} from "./mocks/MockERC1155A.sol"; +import {ERC20} from "solmate/tokens/ERC20.sol"; +import {sERC20} from "../transmuter/sERC20.sol"; contract TransmuterTest is Test { uint256 public constant THOUSAND_E18 = 1000 ether; diff --git a/src/test/mocks/MockERC1155A.sol b/src/test/mocks/MockERC1155A.sol index 36c07c9..7394bca 100644 --- a/src/test/mocks/MockERC1155A.sol +++ b/src/test/mocks/MockERC1155A.sol @@ -1,8 +1,8 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { ERC1155A } from "../../ERC1155A.sol"; -import { Strings } from "openzeppelin-contracts/contracts/utils/Strings.sol"; +import {ERC1155A} from "../../ERC1155A.sol"; +import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol"; /// @notice For test purpouses we open mint()/burn() functions of ERC1155A contract MockERC1155A is ERC1155A { diff --git a/src/test/mocks/MockTransmuter.sol b/src/test/mocks/MockTransmuter.sol index ff96beb..264e0a4 100644 --- a/src/test/mocks/MockTransmuter.sol +++ b/src/test/mocks/MockTransmuter.sol @@ -1,9 +1,9 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { IERC1155A } from "../../interfaces/IERC1155A.sol"; -import { Transmuter } from "../../transmuter/Transmuter.sol"; -import { sERC20 } from "../../transmuter/sERC20.sol"; +import {IERC1155A} from "../../interfaces/IERC1155A.sol"; +import {Transmuter} from "../../transmuter/Transmuter.sol"; +import {sERC20} from "../../transmuter/sERC20.sol"; /// @notice For test purpouses we open mint()/burn() functions of ERC1155s contract MockTransmuter is Transmuter { @@ -15,12 +15,7 @@ contract MockTransmuter is Transmuter { deployer = deployer_; } - function registerTransmuter( - uint256 id, - string memory name, - string memory symbol, - uint8 decimals - ) + function registerTransmuter(uint256 id, string memory name, string memory symbol, uint8 decimals) external override returns (address) diff --git a/src/transmuter/Transmuter.sol b/src/transmuter/Transmuter.sol index 4cb40b2..77cb5c5 100644 --- a/src/transmuter/Transmuter.sol +++ b/src/transmuter/Transmuter.sol @@ -1,9 +1,9 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { IERC1155A } from "../interfaces/IERC1155A.sol"; -import { sERC20 } from "./sERC20.sol"; -import { ITransmuter } from "../interfaces/ITransmuter.sol"; +import {IERC1155A} from "../interfaces/IERC1155A.sol"; +import {sERC20} from "./sERC20.sol"; +import {ITransmuter} from "../interfaces/ITransmuter.sol"; /// @title Transmuter /// @author Zeropoint Labs. @@ -24,12 +24,7 @@ abstract contract Transmuter is ITransmuter { } /// @inheritdoc ITransmuter - function registerTransmuter( - uint256 id, - string memory name, - string memory symbol, - uint8 decimals - ) + function registerTransmuter(uint256 id, string memory name, string memory symbol, uint8 decimals) external virtual override @@ -106,11 +101,7 @@ abstract contract Transmuter is ITransmuter { uint256, /*id*/ uint256, /*value*/ bytes calldata /*data*/ - ) - external - pure - returns (bytes4) - { + ) external pure returns (bytes4) { return this.onERC1155Received.selector; } @@ -120,11 +111,7 @@ abstract contract Transmuter is ITransmuter { uint256[] calldata, /*ids*/ uint256[] calldata, /*values*/ bytes calldata /*data*/ - ) - external - pure - returns (bytes4) - { + ) external pure returns (bytes4) { return this.onERC1155BatchReceived.selector; } } diff --git a/src/transmuter/sERC20.sol b/src/transmuter/sERC20.sol index 2b50e20..903989c 100644 --- a/src/transmuter/sERC20.sol +++ b/src/transmuter/sERC20.sol @@ -1,7 +1,7 @@ /// SPDX-License-Identifier: Apache-2.0 -pragma solidity 0.8.21; +pragma solidity ^0.8.19; -import { ERC20 } from "solmate/tokens/ERC20.sol"; +import {ERC20} from "solmate/tokens/ERC20.sol"; /// @title sERC20 /// @author Zeropoint Labs.