Skip to content

Commit

Permalink
fix: 🐛 remove member finance statistics
Browse files Browse the repository at this point in the history
Closes: #305
  • Loading branch information
siriusyim committed Feb 27, 2024
1 parent b589e39 commit 324d986
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 183 deletions.
5 changes: 2 additions & 3 deletions src/v0.8/core/finance/Finance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {FinanceAccountLIB} from "src/v0.8/core/finance/library/FinanceAccountLIB
import {FinanceModifiers} from "src/v0.8/shared/modifiers/FinanceModifiers.sol";

import {BusinessFinanceStatistics} from "src/v0.8/core/statistics/BusinessFinanceStatistics.sol";
import {MemberFinanceStatistics} from "src/v0.8/core/statistics/MemberFinanceStatistics.sol";

/// @title Finance
/// @dev Base finance contract, holds funds designated for a payee until they withdraw them.
Expand All @@ -49,20 +48,20 @@ contract Finance is
RolesModifiers,
FinanceModifiers,
BusinessFinanceStatistics,
MemberFinanceStatistics,
IFinance
{
using FinanceAccountLIB for FinanceType.Account;
mapping(uint256 => mapping(uint256 => mapping(address => mapping(address => FinanceType.Account))))
private financeAccount; // mapping(datasetId => mapping(matchingId => mapping(sc/sp/da/dp => mapping(tokentype=>Account))));

IRoles public roles;
/// @dev This empty reserved space is put in place to allow future versions to add new
uint256[32] private __gap;

/// @notice Initialize function to initialize the contract and grant the default admin role to the deployer.
function initialize(address _roles) public initializer {
roles = IRoles(_roles);
businessFinanceStatisticsInitialize();
memberFinanceStatisticsInitialize(_roles);
__UUPSUpgradeable_init();
}

Expand Down
128 changes: 0 additions & 128 deletions src/v0.8/core/statistics/MemberFinanceStatistics.sol

This file was deleted.

3 changes: 1 addition & 2 deletions src/v0.8/interfaces/core/IFinance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ pragma solidity ^0.8.21;

import {FinanceType} from "src/v0.8/types/FinanceType.sol";
import {IBusinessFinanceStatistics} from "src/v0.8/interfaces/core/statistics/IBusinessFinanceStatistics.sol";
import {IMemberFinanceStatistics} from "src/v0.8/interfaces/core/statistics/IMemberFinanceStatistics.sol";

/// @title IPayment Interface
/// @notice This interface defines the payment-related functions within the system.
/// @notice instance example,type: mapping(uint256 => mapping(uint256 => mapping(address => mapping(address=>Account))));
/// explain: mapping(datasetId => mapping(matchingId => mapping(sc/sp/da/dp => mapping(tokentype=>Account))));
/// If matchingId is set to 0, it indicates the dataset phase.
interface IFinance is IBusinessFinanceStatistics, IMemberFinanceStatistics {
interface IFinance is IBusinessFinanceStatistics {
/// @dev Records the deposited amount for a given dataset and matching ID.
/// @param _datasetId The ID of the dataset.
/// @param _matchingId The ID of the matching process.
Expand Down
50 changes: 0 additions & 50 deletions src/v0.8/interfaces/core/statistics/IMemberFinanceStatistics.sol

This file was deleted.

0 comments on commit 324d986

Please sign in to comment.