Skip to content

Commit

Permalink
fix: folders structure, small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAustrian committed Sep 10, 2024
1 parent f4d3a77 commit 858b362
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

/**
* @title IGitcoinPassportDecoder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

interface ISuperfluidGovernance {
function owner() external view returns (address);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

import {
ISuperfluid,
ISuperToken,
ISuperApp
} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {SuperTokenV1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol";
import {SQFSuperfluid} from "contracts/strategies/SQFSuperfluid.sol";
import {SQFSuperfluid} from "contracts/strategies/examples/sqf-superfluid/SQFSuperfluid.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract RecipientSuperApp is ISuperApp {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

import {
ISuperfluid,
ISuperToken,
ISuperApp,
SuperAppDefinitions
} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/interfaces/IRecipientSuperAppFactory.sol";
import {RecipientSuperApp} from "contracts/strategies/RecipientSuperApp.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/examples/sqf-superfluid/IRecipientSuperAppFactory.sol";
import {RecipientSuperApp} from "contracts/strategies/examples/sqf-superfluid/RecipientSuperApp.sol";

contract RecipientSuperAppFactory is IRecipientSuperAppFactory {
/// @notice Creates a new RecipientSuperApp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;
pragma solidity ^0.8.19;

// External Libraries
import {
Expand All @@ -9,17 +9,21 @@ import {
import {PoolConfig} from
"@superfluid-finance/ethereum-contracts/contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol";
import {SuperTokenV1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol";
import {IGitcoinPassportDecoder} from "contracts/strategies/interfaces/IGitcoinPassportDecoder.sol";
import {IGitcoinPassportDecoder} from "contracts/strategies/examples/sqf-superfluid/IGitcoinPassportDecoder.sol";
import {FixedPointMathLib} from "solady/utils/FixedPointMathLib.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/interfaces/IRecipientSuperAppFactory.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/examples/sqf-superfluid/IRecipientSuperAppFactory.sol";

// Core Contracts
import {RecipientsExtension} from "contracts/extensions/contracts/RecipientsExtension.sol";
import {CoreBaseStrategy} from "contracts/strategies/CoreBaseStrategy.sol";
import {RecipientsExtension} from "contracts/strategies/extensions/register/RecipientsExtension.sol";
import {BaseStrategy} from "contracts/strategies/BaseStrategy.sol";

contract SQFSuperfluid is CoreBaseStrategy, RecipientsExtension {
// Internal Libraries
import {Transfer} from "contracts/core/libraries/Transfer.sol";

contract SQFSuperfluid is BaseStrategy, RecipientsExtension {
using SuperTokenV1Library for ISuperToken;
using FixedPointMathLib for uint256;
using Transfer for address;

/// ================================
/// ========== Struct ==============
Expand Down Expand Up @@ -338,7 +342,7 @@ contract SQFSuperfluid is CoreBaseStrategy, RecipientsExtension {
/// @notice Close the stream
function closeStream() external onlyPoolManager(msg.sender) {
poolSuperToken.distributeFlow(address(this), gdaPool, 0, "0x");
_transferAmount(address(poolSuperToken), msg.sender, poolSuperToken.balanceOf(address(this)));
address(poolSuperToken).transferAmount(msg.sender, poolSuperToken.balanceOf(address(this)));
}

/// @notice Checks if the allocator is valid
Expand Down
18 changes: 9 additions & 9 deletions test/integration/SQFSuperfluid.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ pragma solidity ^0.8.19;

import {Test} from "forge-std/Test.sol";
import {Allo, IAllo} from "contracts/core/Allo.sol";
import {SQFSuperfluid} from "contracts/strategies/SQFSuperfluid.sol";
import {IRecipientsExtension} from "contracts/extensions/interfaces/IRecipientsExtension.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/interfaces/IRecipientSuperAppFactory.sol";
import {RecipientSuperAppFactory} from "contracts/strategies/RecipientSuperAppFactory.sol";
import {IOwnable} from "./IOwnable.sol";
import {ITransparentUpgradeableProxy} from "./ITransparentUpgradeableProxy.sol";
import {SQFSuperfluid} from "contracts/strategies/examples/sqf-superfluid/SQFSuperfluid.sol";
import {IRecipientsExtension} from "contracts/strategies/extensions/register/IRecipientsExtension.sol";
import {IRecipientSuperAppFactory} from "contracts/strategies/examples/sqf-superfluid/IRecipientSuperAppFactory.sol";
import {RecipientSuperAppFactory} from "contracts/strategies/examples/sqf-superfluid/RecipientSuperAppFactory.sol";
import {IOwnable} from "test/utils/IOwnable.sol";
import {ITransparentUpgradeableProxy} from "test/utils/ITransparentUpgradeableProxy.sol";
import {Metadata, IRegistry} from "contracts/core/Registry.sol";
import {IGitcoinPassportDecoder} from "contracts/strategies/interfaces/IGitcoinPassportDecoder.sol";
import {RecipientsExtension} from "contracts/extensions/contracts/RecipientsExtension.sol";
import {ISuperfluidGovernance} from "contracts/strategies/ISuperfluidGovernance.sol";
import {IGitcoinPassportDecoder} from "contracts/strategies/examples/sqf-superfluid/IGitcoinPassportDecoder.sol";
import {RecipientsExtension} from "contracts/strategies/extensions/register/RecipientsExtension.sol";
import {ISuperfluidGovernance} from "contracts/strategies/examples/sqf-superfluid/ISuperfluidGovernance.sol";
import {ISuperToken} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import {SuperTokenV1Library} from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol";

Expand Down

0 comments on commit 858b362

Please sign in to comment.