diff --git a/packages/automation-contracts/autowrap/package.json b/packages/automation-contracts/autowrap/package.json index 016376ddd6..4ff352eb98 100644 --- a/packages/automation-contracts/autowrap/package.json +++ b/packages/automation-contracts/autowrap/package.json @@ -4,7 +4,7 @@ "version": "0.3.0", "devDependencies": { "@openzeppelin/contracts": "^4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.12.0", + "@superfluid-finance/ethereum-contracts": "^1.12.1", "@superfluid-finance/metadata": "^1.5.2" }, "license": "MIT", diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol index 9cb5b20802..f339143436 100644 --- a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol @@ -59,7 +59,7 @@ interface IVestingScheduler { * @param superToken SuperToken to be vested * @param receiver Vesting receiver * @param startDate Timestamp when the vesting should start - * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param cliffDate Timestamp of cliff execution - if 0, startDate acts as cliff * @param flowRate The flowRate for the stream * @param cliffAmount The amount to be transferred at the cliff * @param endDate The timestamp when the stream should stop. diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol index 65561080c9..c88ea78922 100644 --- a/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol @@ -45,7 +45,7 @@ interface IVestingSchedulerV2 { * @param receiver Vesting receiver * @param startDate Timestamp when the vesting should start * @param claimValidityDate Date before which the claimable schedule must be claimed - * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param cliffDate Timestamp of cliff execution - if 0, startDate acts as cliff * @param flowRate The flowRate for the stream * @param cliffAmount The amount to be transferred at the cliff * @param endDate The timestamp when the stream should stop. @@ -98,7 +98,7 @@ interface IVestingSchedulerV2 { * @param superToken SuperToken to be vested * @param receiver Vesting receiver * @param startDate Timestamp when the vesting should start - * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param cliffDate Timestamp of cliff execution - if 0, startDate acts as cliff * @param flowRate The flowRate for the stream * @param cliffAmount The amount to be transferred at the cliff * @param endDate The timestamp when the stream should stop. diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index 697d4da9bb..a12b64129b 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -4,7 +4,7 @@ "version": "1.3.0", "devDependencies": { "@openzeppelin/contracts": "^4.9.6", - "@superfluid-finance/ethereum-contracts": "^1.12.0", + "@superfluid-finance/ethereum-contracts": "^1.12.1", "@superfluid-finance/metadata": "^1.5.2" }, "license": "MIT", diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 7517c30945..e1e3b10c6f 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,12 +3,15 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## UNRELEASED +## [v1.12.1] ### Added - Superfluid Pools now implement `IERC20Metadata`, thus going forward have a name, symbol and decimals - `ISuperfluidPool.createPoolWithCustomERC20Metadata` for creating pools with custom ERC20 metadata +### Changed +- Fixed deployment of SimpleForwarder (solved an issue which caused batch operation `OPERATION_TYPE_SIMPLE_FORWARD_CALL` to always revert) + ## [v1.12.0] ### Added diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol index 6ba1740649..83206208e1 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol @@ -12,7 +12,7 @@ import { CallUtils } from "../libs/CallUtils.sol"; contract SuperfluidUpgradabilityTester is Superfluid { // 3_000_000 is the min callback gas limit used in a prod deployment - constructor() Superfluid(false, false, 3_000_000, address(0)) + constructor() Superfluid(false, false, 3_000_000, address(0), address(0)) // solhint-disable-next-line no-empty-blocks { } @@ -134,9 +134,12 @@ contract SuperfluidMock is Superfluid { bool nonUpgradable, bool appWhiteListingEnabled, uint64 callbackGasLimit, - address erc2771Forwarder + address simpleForwarderAddress, + address erc2771ForwarderAddress ) - Superfluid(nonUpgradable, appWhiteListingEnabled, callbackGasLimit, erc2771Forwarder) + Superfluid( + nonUpgradable, appWhiteListingEnabled, callbackGasLimit, simpleForwarderAddress, erc2771ForwarderAddress + ) // solhint-disable-next-line no-empty-blocks { } diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index 7a1e672544..258a1f4856 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -56,7 +56,6 @@ contract Superfluid is uint64 immutable public CALLBACK_GAS_LIMIT; // simple forwarder contract used to relay arbitrary calls for batch operations - // Note: address will change with every contract upgrade SimpleForwarder immutable public SIMPLE_FORWARDER; ERC2771Forwarder immutable internal _ERC2771_FORWARDER; @@ -105,13 +104,14 @@ contract Superfluid is bool nonUpgradable, bool appWhiteListingEnabled, uint64 callbackGasLimit, + address simpleForwarderAddress, address erc2771ForwarderAddress ) { NON_UPGRADABLE_DEPLOYMENT = nonUpgradable; APP_WHITE_LISTING_ENABLED = appWhiteListingEnabled; CALLBACK_GAS_LIMIT = callbackGasLimit; + SIMPLE_FORWARDER = SimpleForwarder(simpleForwarderAddress); _ERC2771_FORWARDER = ERC2771Forwarder(erc2771ForwarderAddress); - SIMPLE_FORWARDER = new SimpleForwarder(); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol index 3a2cfe3fc2..4a7052e69e 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.t.sol @@ -29,6 +29,7 @@ import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; import { BatchLiquidator } from "./BatchLiquidator.sol"; import { TOGA } from "./TOGA.sol"; import { IResolver } from "../interfaces/utils/IResolver.sol"; +import { SimpleForwarder } from "../utils/SimpleForwarder.sol"; import { ERC2771Forwarder } from "../utils/ERC2771Forwarder.sol"; import { MacroForwarder } from "../utils/MacroForwarder.sol"; @@ -140,10 +141,14 @@ contract SuperfluidFrameworkDeploymentSteps { testGovernance = SuperfluidGovDeployerLibrary.deployTestGovernance(); SuperfluidGovDeployerLibrary.transferOwnership(testGovernance, address(this)); } else if (step == 1) { // CORE CONTRACT: Superfluid (Host) - ERC2771Forwarder erc2771Forwarder = SuperfluidERC2771ForwarderDeployerLibrary.deploy(); + SimpleForwarder simpleForwarder = new SimpleForwarder(); + ERC2771Forwarder erc2771Forwarder = new ERC2771Forwarder(); // Deploy Host and initialize the test governance. // 3_000_000 is the min callback gas limit used in a prod deployment - host = SuperfluidHostDeployerLibrary.deploy(true, false, 3_000_000, address(erc2771Forwarder)); + host = SuperfluidHostDeployerLibrary.deploy( + true, false, 3_000_000, address(simpleForwarder), address(erc2771Forwarder) + ); + simpleForwarder.transferOwnership(address(host)); erc2771Forwarder.transferOwnership(address(host)); host.initialize(testGovernance); @@ -308,23 +313,19 @@ library SuperfluidGovDeployerLibrary { } } -library SuperfluidERC2771ForwarderDeployerLibrary { - // After deploying, you may want to transfer ownership to the host - function deploy() external returns (ERC2771Forwarder) { - return new ERC2771Forwarder(); - } -} - library SuperfluidHostDeployerLibrary { function deploy( bool _nonUpgradable, bool _appWhiteListingEnabled, uint64 callbackGasLimit, + address simpleForwarderAddress, address erc2771ForwarderAddress ) external returns (Superfluid) { - return new Superfluid(_nonUpgradable, _appWhiteListingEnabled, callbackGasLimit, erc2771ForwarderAddress); + return new Superfluid( + _nonUpgradable, _appWhiteListingEnabled, callbackGasLimit, simpleForwarderAddress, erc2771ForwarderAddress + ); } } diff --git a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js index 81e17e09ed..9f6c295f0e 100644 --- a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js +++ b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js @@ -18,7 +18,6 @@ const SuperTokenFactoryDeployerLibraryArtifact = require("@superfluid-finance/et const SuperfluidFrameworkDeployerArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeployer.t.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.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"); @@ -225,12 +224,6 @@ const _deployTestFramework = async (provider, signer) => { TokenDeployerLibraryArtifact, signer ); - const SuperfluidERC2771ForwarderDeployerLibrary = - await _getFactoryAndReturnDeployedContract( - "SuperfluidERC2771ForwarderDeployerLibrary", - SuperfluidERC2771ForwarderDeployerLibraryArtifact, - signer - ); const sfDeployer = await _getFactoryAndReturnDeployedContract( "SuperfluidFrameworkDeployer", @@ -276,9 +269,6 @@ const _deployTestFramework = async (provider, signer) => { SuperTokenFactoryDeployerLibrary ), TokenDeployerLibrary: getContractAddress(TokenDeployerLibrary), - SuperfluidERC2771ForwarderDeployerLibrary: getContractAddress( - SuperfluidERC2771ForwarderDeployerLibrary - ), }, } ); diff --git a/packages/ethereum-contracts/ops-scripts/deploy-framework.js b/packages/ethereum-contracts/ops-scripts/deploy-framework.js index 2dd3d88799..619de4e6fc 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-framework.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-framework.js @@ -232,6 +232,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( "PoolAdminNFT", "PoolMemberNFT", "IAccessControlEnumerable", + "SimpleForwarder", "ERC2771Forwarder", ]; const mockContracts = [ @@ -270,6 +271,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( PoolAdminNFT, PoolMemberNFT, IAccessControlEnumerable, + SimpleForwarder, ERC2771Forwarder, } = await SuperfluidSDK.loadContracts({ ...extractWeb3Options(options), @@ -351,6 +353,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( `Superfluid.${protocolReleaseVersion}`, async (contractAddress) => !(await hasCode(web3, contractAddress)), async () => { + const simpleForwarder = await web3tx(SimpleForwarder.new, "SimpleForwarder.new")(); + console.log("SimpleForwarder address:", simpleForwarder.address); + output += `SIMPLE_FORWARDER=${simpleForwarder.address}\n`; + const erc2771Forwarder = await web3tx(ERC2771Forwarder.new, "ERC2771Forwarder.new")(); console.log("ERC2771Forwarder address:", erc2771Forwarder.address); output += `ERC2771_FORWARDER=${erc2771Forwarder.address}\n`; @@ -359,15 +365,12 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing, appCallbackGasLimit, erc2771Forwarder.address); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, simpleForwarder.address, erc2771Forwarder.address); console.log( `Superfluid new code address ${superfluidLogic.address}` ); output += `SUPERFLUID_HOST_LOGIC=${superfluidLogic.address}\n`; - // get the address of SimpleForwarder (deployed in constructor) for verification - const simpleForwarderAddr = await superfluidLogic.SIMPLE_FORWARDER(); - console.log("SimpleForwarder address", simpleForwarderAddr); - output += `SIMPLE_FORWARDER=${simpleForwarderAddr}\n`; + if (!nonUpgradable) { const proxy = await web3tx( UUPSProxy.new, @@ -383,10 +386,15 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( superfluidAddress = superfluidLogic.address; } const superfluid = await Superfluid.at(superfluidAddress); + await web3tx( + simpleForwarder.transferOwnership, + "simpleForwarder.transferOwnership" + )(superfluid.address); await web3tx( erc2771Forwarder.transferOwnership, "erc2771Forwarder.transferOwnership" )(superfluid.address); + await web3tx( superfluid.initialize, "Superfluid.initialize" @@ -784,33 +792,60 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( throw new Error("Superfluid is not upgradable"); } - async function getPrevERC2771ForwarderAddr() { - try { - return await superfluid.getERC2771Forwarder(); - } catch (err) { - console.error("### Error getting ERC2771Forwarder address, likely not yet deployed"); - return ZERO_ADDRESS; // fallback + async function getOrDeployForwarder( + superfluid, + ForwarderContract, + getPrevAddrFn, + outputKey + ) { + let prevAddr = await getPrevAddrFn().catch(_err => { + console.error(`### Error getting ${ForwarderContract.contractName} address, likely not yet deployed`); + return ZERO_ADDRESS; + }); + + { + // TEMPORARY FIX - can be removed after applied + // we found a previous deployment. Now verify it has the host as owner. + // the first mainnet deployment didn't have this for SimpleForwarder, thus needs a redeployment. + const ownerAddr = await (await Ownable.at(prevAddr)).owner(); + if (ownerAddr != superfluid.address) { + console.log(` !!! ${outputKey} has wrong owner, needs re-deployment`); + prevAddr = ZERO_ADDRESS; // by setting zero, we force a re-deployment + } } + + const newAddress = await deployContractIfCodeChanged( + web3, + ForwarderContract, + prevAddr, + async () => { + const forwarder = await web3tx(ForwarderContract.new, `${ForwarderContract.contractName}.new`)(); + await web3tx( + forwarder.transferOwnership, + "forwarder.transferOwnership" + )(superfluid.address); + + output += `${outputKey}=${forwarder.address}\n`; + return forwarder.address; + } + ); + + return newAddress !== ZERO_ADDRESS ? newAddress : prevAddr; } - const prevERC2771ForwarderAddr = await getPrevERC2771ForwarderAddr(); - const erc2771ForwarderNewAddress = await deployContractIfCodeChanged( - web3, + const simpleForwarderAddress = await getOrDeployForwarder( + superfluid, + SimpleForwarder, + () => superfluid.SIMPLE_FORWARDER(), + "SIMPLE_FORWARDER" + ); + + const erc2771ForwarderAddress = await getOrDeployForwarder( + superfluid, ERC2771Forwarder, - prevERC2771ForwarderAddr, - async () => { - const erc2771Forwarder = await web3tx(ERC2771Forwarder.new, "ERC2771Forwarder.new")(); - await web3tx( - erc2771Forwarder.transferOwnership, - "erc2771Forwarder.transferOwnership" - )(superfluid.address); - output += `ERC2771_FORWARDER=${erc2771Forwarder.address}\n`; - return erc2771Forwarder.address; - } + () => superfluid.getERC2771Forwarder(), + "ERC2771_FORWARDER" ); - const erc2771ForwarderAddress = erc2771ForwarderNewAddress !== ZERO_ADDRESS - ? erc2771ForwarderNewAddress - : prevERC2771ForwarderAddr; // get previous callback gas limit, make sure we don't decrease it const prevCallbackGasLimit = await superfluid.CALLBACK_GAS_LIMIT(); @@ -820,13 +855,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( console.log(` !!! CHANGING APP CALLBACK GAS LIMIT FROM ${prevCallbackGasLimit} to ${appCallbackGasLimit} !!!`); } - // get prev SimpleForwarder addr (only for replacements for codeChanged check) - let simpleForwarderAddr; - try { - simpleForwarderAddr = await superfluid.SIMPLE_FORWARDER(); - } catch (error) { - simpleForwarderAddr = ZERO_ADDRESS; - } // deploy new superfluid host logic superfluidNewLogicAddress = await deployContractIfCodeChanged( web3, @@ -839,13 +867,13 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing, appCallbackGasLimit, erc2771ForwarderAddress); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, simpleForwarderAddress, erc2771ForwarderAddress); output += `SUPERFLUID_HOST_LOGIC=${superfluidLogic.address}\n`; return superfluidLogic.address; }, [ ap(erc2771ForwarderAddress), - ap(simpleForwarderAddr), + ap(simpleForwarderAddress), appCallbackGasLimit.toString(16).padStart(64, "0") ], ); diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 9627eefa72..eff4ccd362 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -1,7 +1,7 @@ { "name": "@superfluid-finance/ethereum-contracts", "description": " Ethereum contracts implementation for the Superfluid Protocol", - "version": "1.12.0", + "version": "1.12.1", "dependencies": { "@decentral.ee/web3-helpers": "0.5.3", "@nomiclabs/hardhat-ethers": "2.2.3", diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index 51bd222f3f..6a453c81dc 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -114,13 +114,15 @@ describe("Superfluid Host Contract", function () { false /* nonUpgradable */, false /* appWhiteListingEnabled */, 3000000 /* callbackGasLimit */, + ZERO_ADDRESS /* simpleForwarder */, ZERO_ADDRESS /* erc2771Forwarder */ ); const mock2 = await sfMockFactory.deploy( true /* nonUpgradable */, false /* appWhiteListingEnabled */, 3000000 /* callbackGasLimit */, - ZERO_ADDRESS /* erc2771Forwader */ + ZERO_ADDRESS /* simpleForwarder */, + ZERO_ADDRESS /* erc2771Forwarder */ ); await governance.updateContracts( superfluid.address, @@ -2693,7 +2695,8 @@ describe("Superfluid Host Contract", function () { false /* nonUpgradable */, false /* appWhiteListingEnabled */, 3000000 /* callbackGasLimit */, - ZERO_ADDRESS /* erc2771Forwader */ + ZERO_ADDRESS /* simpleForwarder */, + ZERO_ADDRESS /* erc2771Forwarder */ ); await expectCustomError( governance.updateContracts( diff --git a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js index d33f192e63..5a0e7da488 100644 --- a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js +++ b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js @@ -127,17 +127,13 @@ contract("Embedded deployment scripts", (accounts) => { false, // nonUpgradable false, // appWhiteListingEnabled callbackGasLimit, // callbackGasLimit - ZERO_ADDRESS // erc2771Forwader + ZERO_ADDRESS, // simpleForwarder + ZERO_ADDRESS // erc2771Forwarder ); - const simpleForwarderAddr = await a1.SIMPLE_FORWARDER(); assert.isFalse( await codeChanged(web3, Superfluid, a1.address, [ // replace immutables with 0 callbackGasLimit.toString(16).padStart(64, "0"), - simpleForwarderAddr - .toLowerCase() - .slice(2) - .padStart(64, "0"), ]) ); } diff --git a/packages/hot-fuzz/hot-fuzz b/packages/hot-fuzz/hot-fuzz index 1ea4908694..9eac87efc5 100755 --- a/packages/hot-fuzz/hot-fuzz +++ b/packages/hot-fuzz/hot-fuzz @@ -43,7 +43,7 @@ cryticArgs: [ "--compile-force-framework=${CRYTIC_COMPILE_FRAMEWORK}", "--foundry-out-directory=${FOUNDRY_ROOT}/${FOUNDRY_OUT:-out}", # "--export-dir=${PROJECT_DIR}/crytic-export", TODO unfortunately this doesn't work - "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12),(SuperfluidERC2771ForwarderDeployerLibrary,0xf13)" + "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidPeripheryDeployerLibrary,0xf0c),(SuperfluidPoolDeployerLibrary,0xf0d),(SuperfluidPoolLogicDeployerLibrary,0xf0e),(SuperfluidPoolNFTLogicDeployerLibrary,0xf0f),(SuperTokenDeployerLibrary,0xf10),(SuperTokenFactoryDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12)" ] deployContracts: [ ["0xf01", "CFAv1ForwarderDeployerLibrary"], @@ -62,7 +62,6 @@ deployContracts: [ ["0xf10", "SuperTokenDeployerLibrary"], ["0xf11", "SuperTokenFactoryDeployerLibrary"], ["0xf12", "TokenDeployerLibrary"], -["0xf13", "SuperfluidERC2771ForwarderDeployerLibrary"], ] deployBytecodes: [ ["0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24", "608060405234801561001057600080fd5b506109c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063a41e7d5111610078578063a41e7d51146101d4578063aabbb8ca1461020a578063b705676514610236578063f712f3e814610280576100a5565b806329965a1d146100aa5780633d584063146100e25780635df8122f1461012457806365ba36c114610152575b600080fd5b6100e0600480360360608110156100c057600080fd5b50600160a060020a038135811691602081013591604090910135166102b6565b005b610108600480360360208110156100f857600080fd5b5035600160a060020a0316610570565b60408051600160a060020a039092168252519081900360200190f35b6100e06004803603604081101561013a57600080fd5b50600160a060020a03813581169160200135166105bc565b6101c26004803603602081101561016857600080fd5b81019060208101813564010000000081111561018357600080fd5b82018360208201111561019557600080fd5b803590602001918460018302840111640100000000831117156101b757600080fd5b5090925090506106b3565b60408051918252519081900360200190f35b6100e0600480360360408110156101ea57600080fd5b508035600160a060020a03169060200135600160e060020a0319166106ee565b6101086004803603604081101561022057600080fd5b50600160a060020a038135169060200135610778565b61026c6004803603604081101561024c57600080fd5b508035600160a060020a03169060200135600160e060020a0319166107ef565b604080519115158252519081900360200190f35b61026c6004803603604081101561029657600080fd5b508035600160a060020a03169060200135600160e060020a0319166108aa565b6000600160a060020a038416156102cd57836102cf565b335b9050336102db82610570565b600160a060020a031614610339576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b6103428361092a565b15610397576040805160e560020a62461bcd02815260206004820152601a60248201527f4d757374206e6f7420626520616e204552433136352068617368000000000000604482015290519081900360640190fd5b600160a060020a038216158015906103b85750600160a060020a0382163314155b156104ff5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012082600160a060020a031663249cb3fa85846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d60208110156104a857600080fd5b5051146104ff576040805160e560020a62461bcd02815260206004820181905260248201527f446f6573206e6f7420696d706c656d656e742074686520696e74657266616365604482015290519081900360640190fd5b600160a060020a03818116600081815260208181526040808320888452909152808220805473ffffffffffffffffffffffffffffffffffffffff19169487169485179055518692917f93baa6efbd2244243bfee6ce4cfdd1d04fc4c0e9a786abd3a41313bd352db15391a450505050565b600160a060020a03818116600090815260016020526040812054909116151561059a5750806105b7565b50600160a060020a03808216600090815260016020526040902054165b919050565b336105c683610570565b600160a060020a031614610624576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b81600160a060020a031681600160a060020a0316146106435780610646565b60005b600160a060020a03838116600081815260016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169585169590951790945592519184169290917f605c2dbf762e5f7d60a546d42e7205dcb1b011ebc62a61736a57c9089d3a43509190a35050565b600082826040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090505b92915050565b6106f882826107ef565b610703576000610705565b815b600160a060020a03928316600081815260208181526040808320600160e060020a031996909616808452958252808320805473ffffffffffffffffffffffffffffffffffffffff19169590971694909417909555908152600284528181209281529190925220805460ff19166001179055565b600080600160a060020a038416156107905783610792565b335b905061079d8361092a565b156107c357826107ad82826108aa565b6107b85760006107ba565b815b925050506106e8565b600160a060020a0390811660009081526020818152604080832086845290915290205416905092915050565b6000808061081d857f01ffc9a70000000000000000000000000000000000000000000000000000000061094c565b909250905081158061082d575080155b1561083d576000925050506106e8565b61084f85600160e060020a031961094c565b909250905081158061086057508015155b15610870576000925050506106e8565b61087a858561094c565b909250905060018214801561088f5750806001145b1561089f576001925050506106e8565b506000949350505050565b600160a060020a0382166000908152600260209081526040808320600160e060020a03198516845290915281205460ff1615156108f2576108eb83836107ef565b90506106e8565b50600160a060020a03808316600081815260208181526040808320600160e060020a0319871684529091529020549091161492915050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff161590565b6040517f01ffc9a7000000000000000000000000000000000000000000000000000000008082526004820183905260009182919060208160248189617530fa90519096909550935050505056fea165627a7a72305820377f4a2d4301ede9949f163f319021a6e9c687c292a5e2b2c4734c126b524e6c0029"], diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index 38b0911087..2deebcc373 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -10,13 +10,13 @@ "@openzeppelin/contracts": "4.9.6" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.12.0" + "@superfluid-finance/ethereum-contracts": "^1.12.1" }, "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme", "license": "AGPL-3.0", "main": "index.js", "peerDependencies": { - "@superfluid-finance/ethereum-contracts": "1.12.0" + "@superfluid-finance/ethereum-contracts": "1.12.1" }, "repository": { "type": "git", diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index fb229b4911..02c193b73e 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -13,7 +13,7 @@ "node-fetch": "2.7.0" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "^1.12.0", + "@superfluid-finance/ethereum-contracts": "^1.12.1", "chai-as-promised": "^8.0.0", "webpack": "^5.94.0", "webpack-bundle-analyzer": "^4.10.2", diff --git a/packages/js-sdk/src/utils/gasMetering/gasMetering.js b/packages/js-sdk/src/utils/gasMetering/gasMetering.js index ec15b69025..f390a7c10d 100644 --- a/packages/js-sdk/src/utils/gasMetering/gasMetering.js +++ b/packages/js-sdk/src/utils/gasMetering/gasMetering.js @@ -56,7 +56,7 @@ module.exports = class GasMeter { // TODO break; default: - throw new Error(`Unsuported report type ${outputFormat}`); + throw new Error(`Unsupported report type ${outputFormat}`); } this.gasPrice = new this.BN(gasPrice); this.records = []; diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 518dde768c..15b1f1ca62 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -4,7 +4,7 @@ "version": "0.9.0", "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "dependencies": { - "@superfluid-finance/ethereum-contracts": "1.12.0", + "@superfluid-finance/ethereum-contracts": "1.12.1", "@superfluid-finance/metadata": "^1.5.2", "graphql-request": "6.1.0", "lodash": "4.17.21",