From b2a9c8ace4b286dd2bc9cd592b65d43d8045419e Mon Sep 17 00:00:00 2001 From: didi Date: Wed, 20 Nov 2024 21:29:44 +0100 Subject: [PATCH] rename testing solidity files to .t.sol in order to get expected behaviour with forge build --- .../autowrap/test/Manager.t.sol | 2 +- .../autowrap/test/WrapStrategy.t.sol | 2 +- .../autowrap/test/WrapUp.t.sol | 2 +- .../scheduler/test/FlowScheduler.t.sol | 2 +- .../test/FlowSchedulerResolver.t.sol | 2 +- .../scheduler/test/VestingScheduler.t.sol | 2 +- .../VestingSchedulerV2.StatefulFuzz.t.sol | 2 +- .../scheduler/test/VestingSchedulerV2.t.sol | 2 +- .../utils/SuperfluidFrameworkDeployer.s.sol | 2 +- ... SuperfluidFrameworkDeploymentSteps.t.sol} | 0 .../dev-scripts/deploy-test-framework.js | 34 +++++++++--------- .../ethereum-contracts/docs/diagrams.drawio | 2 +- .../docs/user-defined-macros-architecture.png | Bin 299874 -> 299876 bytes packages/ethereum-contracts/package.json | 2 +- .../tasks/contracts-size.sh | 9 ----- ...ster.sol => FoundrySuperfluidTester.t.sol} | 0 .../foundry/SuperfluidFrameworkDeployer.t.sol | 2 +- .../ConstantFlowAgreementV1.ACL.t.sol | 2 +- .../agreements/ConstantFlowAgreementV1.t.sol | 2 +- .../InstantDistributionAgreementV1.t.sol | 2 +- .../gdav1/GeneralDistributionAgreement.t.sol | 2 +- .../test/foundry/apps/CFASuperAppBase.t.sol | 2 +- .../foundry/apps/CrossStreamSuperApp.t.sol | 2 +- .../apps/SuperAppTester/SuperAppTest.t.sol | 2 +- .../foundry/echidna/EchidnaTestCases.t.sol | 2 +- .../foundry/gov/SuperfluidGovernanceII.t.sol | 2 +- .../test/foundry/superfluid/ERC721.t.sol | 2 +- .../test/foundry/superfluid/SuperToken.t.sol | 4 +-- .../superfluid/SuperTokenFactory.t.sol | 2 +- .../superfluid/Superfluid.BatchCall.t.sol | 2 +- .../test/foundry/superfluid/Superfluid.t.sol | 2 +- .../test/foundry/utils/BatchLiquidator.t.sol | 2 +- .../test/foundry/utils/IDAv1Forwarder.t.sol | 2 +- .../test/foundry/utils/MacroForwarder.t.sol | 2 +- .../test/foundry/utils/TOGA.t.sol | 2 +- packages/hot-fuzz/contracts/HotFuzzBase.sol | 2 +- .../hot-fuzz/contracts/SuperfluidTester.sol | 2 +- 37 files changed, 50 insertions(+), 59 deletions(-) rename packages/ethereum-contracts/contracts/utils/{SuperfluidFrameworkDeploymentSteps.s.sol => SuperfluidFrameworkDeploymentSteps.t.sol} (100%) delete mode 100755 packages/ethereum-contracts/tasks/contracts-size.sh rename packages/ethereum-contracts/test/foundry/{FoundrySuperfluidTester.sol => FoundrySuperfluidTester.t.sol} (100%) diff --git a/packages/automation-contracts/autowrap/test/Manager.t.sol b/packages/automation-contracts/autowrap/test/Manager.t.sol index 72297d548a..5c40171403 100644 --- a/packages/automation-contracts/autowrap/test/Manager.t.sol +++ b/packages/automation-contracts/autowrap/test/Manager.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { Manager } from "./../contracts/Manager.sol"; import { IManager } from "./../contracts/interfaces/IManager.sol"; import { WrapStrategy } from "./../contracts/strategies/WrapStrategy.sol"; diff --git a/packages/automation-contracts/autowrap/test/WrapStrategy.t.sol b/packages/automation-contracts/autowrap/test/WrapStrategy.t.sol index f563eb2f20..856f486866 100644 --- a/packages/automation-contracts/autowrap/test/WrapStrategy.t.sol +++ b/packages/automation-contracts/autowrap/test/WrapStrategy.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { Manager } from "./../contracts/Manager.sol"; import { WrapStrategy } from "./../contracts/strategies/WrapStrategy.sol"; import { IStrategy } from "./../contracts/interfaces/IStrategy.sol"; diff --git a/packages/automation-contracts/autowrap/test/WrapUp.t.sol b/packages/automation-contracts/autowrap/test/WrapUp.t.sol index 5d396dcf0f..96b09c5932 100644 --- a/packages/automation-contracts/autowrap/test/WrapUp.t.sol +++ b/packages/automation-contracts/autowrap/test/WrapUp.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.0; import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { Manager } from "./../contracts/Manager.sol"; import { WrapStrategy } from "./../contracts/strategies/WrapStrategy.sol"; import { ISETH } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/tokens/ISETH.sol"; diff --git a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol index 10c63dabc2..7c1bb94efd 100644 --- a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol @@ -5,7 +5,7 @@ import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/in import { FlowOperatorDefinitions } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; import { IFlowScheduler } from "./../contracts/interface/IFlowScheduler.sol"; import { FlowScheduler } from "./../contracts/FlowScheduler.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { SuperToken } from "@superfluid-finance/ethereum-contracts/contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; diff --git a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol index ae98f43848..573ef10a31 100644 --- a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol @@ -5,7 +5,7 @@ import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/in import { FlowOperatorDefinitions } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; import { FlowScheduler } from "./../contracts/FlowScheduler.sol"; import { FlowSchedulerResolver } from "./../contracts/FlowSchedulerResolver.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { SuperToken } from "@superfluid-finance/ethereum-contracts/contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; diff --git a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol index 756523c954..fa93d90178 100644 --- a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol @@ -5,7 +5,7 @@ import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/in import { FlowOperatorDefinitions } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; import { IVestingScheduler } from "./../contracts/interface/IVestingScheduler.sol"; import { VestingScheduler } from "./../contracts/VestingScheduler.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; /// @title VestingSchedulerTests diff --git a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.StatefulFuzz.t.sol b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.StatefulFuzz.t.sol index 62ffa95dc2..0ecc2e9cbb 100644 --- a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.StatefulFuzz.t.sol +++ b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.StatefulFuzz.t.sol @@ -5,7 +5,7 @@ import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/inte import {FlowOperatorDefinitions} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; import {IVestingSchedulerV2} from "./../contracts/interface/IVestingSchedulerV2.sol"; import {VestingSchedulerV2} from "./../contracts/VestingSchedulerV2.sol"; -import {FoundrySuperfluidTester} from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import {FoundrySuperfluidTester} from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import {SuperTokenV1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; import "forge-std/console2.sol"; diff --git a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol index 888f58d7df..2ad00c07b6 100644 --- a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol +++ b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol @@ -5,7 +5,7 @@ import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/in import { FlowOperatorDefinitions, ISuperfluid, BatchOperation, ISuperApp } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; import { IVestingSchedulerV2 } from "./../contracts/interface/IVestingSchedulerV2.sol"; import { VestingSchedulerV2 } from "./../contracts/VestingSchedulerV2.sol"; -import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol index 1dfacb8364..ce98d91d71 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.11; import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { SuperfluidFrameworkDeploymentSteps, TokenDeployerLibrary } from "./SuperfluidFrameworkDeploymentSteps.s.sol"; +import { SuperfluidFrameworkDeploymentSteps, TokenDeployerLibrary } from "./SuperfluidFrameworkDeploymentSteps.t.sol"; import { ISuperTokenFactory } from "../superfluid/SuperTokenFactory.sol"; import { SuperToken } from "../superfluid/SuperToken.sol"; import { TestToken } from "./TestToken.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.s.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol similarity index 100% rename from packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.s.sol rename to packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol diff --git a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js index 82c1c5f1d1..f5a81f7978 100644 --- a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js +++ b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js @@ -2,24 +2,24 @@ const {ethers} = require("hardhat"); const {JsonRpcProvider} = require("@ethersproject/providers"); const SuperfluidPoolDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol/SuperfluidPoolDeployerLibrary.json"); -const SuperfluidGovDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidGovDeployerLibrary.json"); -const SuperfluidHostDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidHostDeployerLibrary.json"); -const SuperfluidCFAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidCFAv1DeployerLibrary.json"); -const SuperfluidIDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidIDAv1DeployerLibrary.json"); -const SuperfluidGDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidGDAv1DeployerLibrary.json"); -const SuperTokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperTokenDeployerLibrary.json"); -const SuperfluidPeripheryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPeripheryDeployerLibrary.json"); -const SuperfluidPoolLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolLogicDeployerLibrary.json"); -const SuperfluidPoolNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolNFTLogicDeployerLibrary.json"); -const ProxyDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/ProxyDeployerLibrary.json"); -const CFAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/CFAv1ForwarderDeployerLibrary.json"); -const IDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/IDAv1ForwarderDeployerLibrary.json"); -const GDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/GDAv1ForwarderDeployerLibrary.json"); -const SuperTokenFactoryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperTokenFactoryDeployerLibrary.json"); -const SuperfluidFrameworkDeployerArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeployer.sol/SuperfluidFrameworkDeployer.json"); +const SuperfluidGovDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidGovDeployerLibrary.json"); +const SuperfluidHostDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidHostDeployerLibrary.json"); +const SuperfluidCFAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidCFAv1DeployerLibrary.json"); +const SuperfluidIDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidIDAv1DeployerLibrary.json"); +const SuperfluidGDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidGDAv1DeployerLibrary.json"); +const SuperTokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperTokenDeployerLibrary.json"); +const SuperfluidPeripheryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidPeripheryDeployerLibrary.json"); +const SuperfluidPoolLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidPoolLogicDeployerLibrary.json"); +const SuperfluidPoolNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidPoolNFTLogicDeployerLibrary.json"); +const ProxyDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/ProxyDeployerLibrary.json"); +const CFAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/CFAv1ForwarderDeployerLibrary.json"); +const IDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/IDAv1ForwarderDeployerLibrary.json"); +const GDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/GDAv1ForwarderDeployerLibrary.json"); +const SuperTokenFactoryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperTokenFactoryDeployerLibrary.json"); +const SuperfluidFrameworkDeployerArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeployer.s.sol/SuperfluidFrameworkDeployer.json"); const SlotsBitmapLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/libs/SlotsBitmapLibrary.sol/SlotsBitmapLibrary.json"); -const TokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/TokenDeployerLibrary.json"); -const SuperfluidERC2771ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidERC2771ForwarderDeployerLibrary.json"); +const TokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/TokenDeployerLibrary.json"); +const SuperfluidERC2771ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol/SuperfluidERC2771ForwarderDeployerLibrary.json"); const ERC1820Registry = require("../dev-scripts/artifacts/ERC1820Registry.json"); diff --git a/packages/ethereum-contracts/docs/diagrams.drawio b/packages/ethereum-contracts/docs/diagrams.drawio index 878c22d289..b732bcd812 100644 --- a/packages/ethereum-contracts/docs/diagrams.drawio +++ b/packages/ethereum-contracts/docs/diagrams.drawio @@ -161,7 +161,7 @@ - + diff --git a/packages/ethereum-contracts/docs/user-defined-macros-architecture.png b/packages/ethereum-contracts/docs/user-defined-macros-architecture.png index 23b5bdd9c80910727cee03625933e099c7b76547..37d39bd20f9794dadf2a235721594e01dc8f3d55 100644 GIT binary patch delta 32 lcmaE~Oz6onp$!l68B3b)=eOU_X9Qv build/contracts-sizes.txt", "verify-framework": "tasks/etherscan-verify-framework.sh", "testenv:start": "test/testenv-ctl.sh start", "testenv:stop": "test/testenv-ctl.sh stop", diff --git a/packages/ethereum-contracts/tasks/contracts-size.sh b/packages/ethereum-contracts/tasks/contracts-size.sh deleted file mode 100755 index b0e0161166..0000000000 --- a/packages/ethereum-contracts/tasks/contracts-size.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -# Writes the sizes of contracts (exluding those only used for ephemeral testing) to a file using foundry. -# It specifically also excludes SuperfluidFrameworkDeployer and SuperfluidFrameworkDeploymentSteps. - -set -e - -# shellcheck disable=SC2046 -forge build --sizes $(find contracts -not -path 'contracts/mocks/*' -type f -name '*.sol' -not \( -name '*.t.sol' -o -name 'SuperfluidFrameworkDeploy*' \)) > build/contracts-sizes.txt diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol similarity index 100% rename from packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol rename to packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.t.sol diff --git a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol index a5031eabe9..74fa436ab1 100644 --- a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol +++ b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { FoundrySuperfluidTester } from "./FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "./FoundrySuperfluidTester.t.sol"; import { IPureSuperToken, ISETH, TestToken, SuperToken } from "../../contracts/utils/SuperfluidFrameworkDeployer.s.sol"; import { SuperfluidLoader } from "../../contracts/utils/SuperfluidLoader.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol index 2d8256baa9..eb835f6c5e 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol @@ -5,7 +5,7 @@ import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToke import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; import { FlowOperatorDefinitions } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; contract ConstantFlowAgreementV1ACLTest is FoundrySuperfluidTester { diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol index 556f96955f..e2b883a6fa 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.23; import { console } from "forge-std/Test.sol"; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.t.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; contract ConstantFlowAgreementV1IntegrationTest is FoundrySuperfluidTester { diff --git a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol index ab58a6dab8..5dd754757a 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import "../FoundrySuperfluidTester.sol"; +import "../FoundrySuperfluidTester.t.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 64314f4e1e..5ddee61851 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.23; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; -import "../../FoundrySuperfluidTester.sol"; +import "../../FoundrySuperfluidTester.t.sol"; import { GeneralDistributionAgreementV1, IGeneralDistributionAgreementV1 diff --git a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol index eefa08c094..13d0cda4f3 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.23; import "forge-std/console.sol"; -import "../FoundrySuperfluidTester.sol"; +import "../FoundrySuperfluidTester.t.sol"; import { ISuperToken, diff --git a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol index 570e04dfd8..3f119fbe6b 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol @@ -7,7 +7,7 @@ import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import "forge-std/Test.sol"; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol index 797b5f0fa1..d85ee5e27c 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "forge-std/console.sol"; -import "../../FoundrySuperfluidTester.sol"; +import "../../FoundrySuperfluidTester.t.sol"; import { ISuperApp, ISuperfluid } from "../../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { Handler } from "./handlers/Handler.sol"; diff --git a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol index c25489a0a1..4a4140fac3 100644 --- a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol +++ b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { FoundrySuperfluidTester } from "../../foundry/FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../../foundry/FoundrySuperfluidTester.t.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol index 8ce9cbda94..33531006ad 100644 --- a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol +++ b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import "../FoundrySuperfluidTester.sol"; +import "../FoundrySuperfluidTester.t.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol index befdcadd4d..090e46de20 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import { PoolAdminNFTMock, PoolMemberNFTMock } from "./PoolNFTMock.t.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol index a5e1a13305..e0bf1e7166 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol @@ -8,9 +8,9 @@ import { IERC20, ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNF from "../../../contracts/superfluid/SuperToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; -import { TokenDeployerLibrary } from "../../../contracts/utils/SuperfluidFrameworkDeploymentSteps.s.sol"; +import { TokenDeployerLibrary } from "../../../contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol"; contract SuperTokenIntegrationTest is FoundrySuperfluidTester { constructor() FoundrySuperfluidTester(0) { } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol index 068871c872..1a7d397b44 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import { SuperTokenFactory } from "../../../contracts/superfluid/SuperTokenFactory.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol index ea15ad888c..90e3426610 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol @@ -7,7 +7,7 @@ import { BatchOperation, ISuperfluid, Superfluid } from "../../../contracts/supe import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { IGeneralDistributionAgreementV1, ISuperfluidPool, PoolConfig } from "../../../contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; import { IConstantFlowAgreementV1, ISuperToken, ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.t.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.t.sol"; import { SimpleForwarder } from "../../../contracts/utils/SimpleForwarder.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol index 68480e9d0b..e36ac75b84 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import "../FoundrySuperfluidTester.sol"; +import "../FoundrySuperfluidTester.t.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol index 60fab41092..fdd42b729b 100644 --- a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.t.sol"; import { ISuperfluid, ISuperToken, diff --git a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol index 856d7fb504..00cc942701 100644 --- a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 pragma solidity ^0.8.23; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.t.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { IDAv1Forwarder } from "../../../contracts/utils/IDAv1Forwarder.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol index 5bef515c5d..cbfbfc294c 100644 --- a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol @@ -5,7 +5,7 @@ import { ISuperfluid, BatchOperation } from "../../../contracts/interfaces/super import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; import { MacroForwarder, IUserDefinedMacro } from "../../../contracts/utils/MacroForwarder.sol"; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.t.sol"; using SuperTokenV1Library for ISuperToken; diff --git a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol index d39afe4456..51c7bda1e5 100644 --- a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.23; import "forge-std/Test.sol"; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.t.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { TOGA } from "../../../contracts/utils/TOGA.sol"; import { IERC1820Registry } from "@openzeppelin/contracts/interfaces/IERC1820Registry.sol"; diff --git a/packages/hot-fuzz/contracts/HotFuzzBase.sol b/packages/hot-fuzz/contracts/HotFuzzBase.sol index 5e0fb92659..bc2a7082ec 100644 --- a/packages/hot-fuzz/contracts/HotFuzzBase.sol +++ b/packages/hot-fuzz/contracts/HotFuzzBase.sol @@ -14,7 +14,7 @@ import { } from "@superfluid-finance/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol"; import { SuperfluidFrameworkDeployer -} from "@superfluid-finance/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol"; +} from "@superfluid-finance/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol"; import "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol"; import "@superfluid-finance/ethereum-contracts/contracts/apps/IDAv1Library.sol"; import { diff --git a/packages/hot-fuzz/contracts/SuperfluidTester.sol b/packages/hot-fuzz/contracts/SuperfluidTester.sol index b6e1cf3e53..fdfbc395c6 100644 --- a/packages/hot-fuzz/contracts/SuperfluidTester.sol +++ b/packages/hot-fuzz/contracts/SuperfluidTester.sol @@ -12,7 +12,7 @@ import "@superfluid-finance/ethereum-contracts/contracts/agreements/InstantDistr import "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol"; import "@superfluid-finance/ethereum-contracts/contracts/apps/IDAv1Library.sol"; import {SuperTokenV1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; -import "@superfluid-finance/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol"; +import "@superfluid-finance/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.s.sol"; contract SuperfluidTester { using SuperTokenV1Library for ISuperToken;