Skip to content

Commit

Permalink
feat: update huffmate to target shanghai
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jul 10, 2023
1 parent 764e151 commit 710d0f2
Show file tree
Hide file tree
Showing 65 changed files with 67 additions and 66 deletions.
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
out = 'out'
libs = ['lib']
ffi = true
evm_version = "shanghai"
fs_permissions = [
{ access = "read", path = "./test/auth/mocks/AuthWrappers.huff" },
{ access = "read", path = "./test/auth/mocks/OwnedWrappers.huff" },
Expand Down
2 changes: 1 addition & 1 deletion src/tokens/ERC20.huff
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
[INITIAL_DOMAIN_SEPARATOR] sstore // []

// Copy the runtime bytecode with constructor argument concatenated.
0x67 // [offset] - constructor code size
0x66 // [offset] - constructor code size
dup1 // [offset, offset]
codesize // [total_size, offset, offset]
sub // [runtime_size, offset]
Expand Down
2 changes: 1 addition & 1 deletion src/tokens/interfaces/IERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

interface TSOwnable {
function owner() external returns (address);
Expand Down
1 change: 0 additions & 1 deletion src/utils/JumpTableUtil.huff
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/// @title JumpTableUtil
/// @notice SPDX-License-Identifier: MIT
/// @author clabby <https://github.com/clabby>
Expand Down
2 changes: 1 addition & 1 deletion test/auth/Auth.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "forge-std/console.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/auth/NonPayable.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import {HuffDeployer} from "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/auth/OnlyContract.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import {Test} from "forge-std/Test.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/auth/Owned.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import {HuffConfig} from "foundry-huff/HuffConfig.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/auth/RolesAuthority.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import { HuffDeployer } from "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/data-structures/Arrays.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/data-structures/Bytes.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/data-structures/Hashmap.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import {HuffConfig} from "foundry-huff/HuffConfig.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/factories/Factory.t.sol
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;
2 changes: 1 addition & 1 deletion test/factories/ProxyFactory.t.sol
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;
2 changes: 1 addition & 1 deletion test/math/FixedPointMath.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/math/Math.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/math/SafeMath.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/math/Trigonometry.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-clones/HuffClone.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import {Test} from "forge-std/Test.sol";
import {HuffDeployer} from "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-clones/HuffCloneFactory.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import {Test} from "forge-std/Test.sol";
import {HuffDeployer} from "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-clones/Interfaces.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

interface IExampleClone {
function param1() external pure returns (address);
Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-vrgda/LinearVRGDA.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-vrgda/LogisticVRGDA.t.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/mechanisms/huff-vrgda/utils/SignedWadMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

/// @title Signed Wad Math
/// @author transmissions11 <t11s@paradigm.xyz>
Expand Down
2 changes: 1 addition & 1 deletion test/proxies/Clones.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
pragma solidity 0.8.19;


import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/proxies/ERC1967Proxy.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
pragma solidity 0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/proxies/mocks/MockBeacon.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

pragma solidity 0.8.15;
pragma solidity 0.8.19;

/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
Expand Down
2 changes: 1 addition & 1 deletion test/proxies/mocks/MockProxiableUUID.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity 0.8.15;
pragma solidity 0.8.19;

import { MockERC1155 } from "solmate/test/utils/mocks/MockERC1155.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/proxies/mocks/MockReturner.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity 0.8.15;
pragma solidity 0.8.19;

/// @dev Used to test proxies that they can both receive and return data
contract MockReturner {
Expand Down
2 changes: 1 addition & 1 deletion test/proxies/mocks/NotUUPSMockProxiableUUID.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity 0.8.15;
pragma solidity 0.8.19;


import { MockERC1155 } from "solmate/test/utils/mocks/MockERC1155.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/test-utils/FuzzingUtils.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

// adapter from: https://github.com/transmissions11/solmate/blob/main/src/test/utils/DSTestPlus.sol
abstract contract FuzzingUtils {
Expand Down
2 changes: 1 addition & 1 deletion test/test-utils/NonMatchingSelectorHelper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/tokens/ERC1155.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/tokens/ERC20.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down Expand Up @@ -53,6 +53,7 @@ contract ERC20Test is Test {

// Deploy the Mintable ERC20
address mintableTokenAddress = HuffDeployer.config()
.with_evm_version("shanghai")
.with_code(mintable_wrapper)
.with_deployer(deployer)
.with_args(bytes.concat(abi.encode("Token"), abi.encode("TKN"), abi.encode(DECIMALS)))
Expand Down
2 changes: 1 addition & 1 deletion test/tokens/ERC4626.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/tokens/ERC721.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/BitPackLib.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/CREATE3.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Calls.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Constants.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/DateTimeLib.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/console.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/ECDSA.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Errors.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Ethers.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "forge-std/Test.sol";
import "foundry-huff/HuffDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/InsertionSort.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
6 changes: 3 additions & 3 deletions test/utils/JumpTableUtil.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand All @@ -12,15 +12,15 @@ interface IJumpTableUtil {
}

contract JumpTableUtilTest is Test {
uint constant FIRST_LABEL_PC = 147;
uint constant FIRST_LABEL_PC = 141;

IJumpTableUtil jtUtil;

function setUp() public {
/// @notice deploy a new instance of IJumpTableUtil by
/// passing in the address of the deployed Huff contract
string memory wrapper_code = vm.readFile("test/utils/mocks/JumpTableUtilWrappers.huff");
jtUtil = IJumpTableUtil(HuffDeployer.deploy_with_code("utils/JumpTableUtil", wrapper_code));
jtUtil = IJumpTableUtil(HuffDeployer.config().with_evm_version("shanghai").with_code(wrapper_code).deploy("utils/JumpTableUtil"));
}

function testGetJumpdestFromJT_Mem() public {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/LibBit.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/MerkleDistributor.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/MerkleProofLib.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Multicallable.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Pausable.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/ReentrancyGuard.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Refunded.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/SSTORE2.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity ^0.8.19;

import "foundry-huff/HuffDeployer.sol";
import "forge-std/Test.sol";
Expand Down
Loading

0 comments on commit 710d0f2

Please sign in to comment.