Skip to content

Commit

Permalink
Merge pull request #97 from Giveth/extend-GIVpower-2024
Browse files Browse the repository at this point in the history
Extend givpower 2024 optimism
  • Loading branch information
aminlatifi authored Apr 28, 2024
2 parents be1c1b5 + 9e9597f commit 4bc6f64
Show file tree
Hide file tree
Showing 4 changed files with 355 additions and 142 deletions.
42 changes: 33 additions & 9 deletions contracts/Interfaces/IDistroModified.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ interface IDistro {
/**
* @dev Emitted when the DISTRIBUTOR allocate an amount to a grantee
*/
event Allocate(address indexed distributor, address indexed grantee, uint256 amount);
event Allocate(
address indexed distributor,
address indexed grantee,
uint256 amount
);
/**
* @dev Emitted when the DEFAULT_ADMIN assign an amount to a DISTRIBUTOR
*/
event Assign(address indexed admin, address indexed distributor, uint256 amount);
event Assign(
address indexed admin,
address indexed distributor,
uint256 amount
);
/**
* @dev Emitted when someone change their reception address
*/
Expand Down Expand Up @@ -59,17 +67,23 @@ interface IDistro {
* @param amount allocated amount
* @param claim whether claim after allocate
*/
function allocate(address recipient, uint256 amount, bool claim) external;
function allocate(
address recipient,
uint256 amount,
bool claim
) external;

/**
* Function that allows to the distributor address to allocate some amounts of tokens to specific recipients
* @dev Needs to be initialized: Nobody has the DEFAULT_ADMIN_ROLE and all available tokens have been assigned
* @param recipients of token allocation
* @param amounts allocated amount
*/
function allocateMany(address[] memory recipients, uint256[] memory amounts) external;
function allocateMany(address[] memory recipients, uint256[] memory amounts)
external;

function sendGIVbacks(address[] memory recipients, uint256[] memory amounts) external;
function sendGIVbacks(address[] memory recipients, uint256[] memory amounts)
external;

/**
* Function that allows a recipient to change its address
Expand All @@ -86,19 +100,29 @@ interface IDistro {
/**
* Function to get the total unlocked tokes at some moment
*/
function globallyClaimableAt(uint256 timestamp) external view returns (uint256);
function globallyClaimableAt(uint256 timestamp)
external
view
returns (uint256);

/**
* Function to get the unlocked tokes at some moment for a specific address
*/
function claimableAt(address recipient, uint256 timestamp) external view returns (uint256);
function claimableAt(address recipient, uint256 timestamp)
external
view
returns (uint256);

/**
* Function to get the unlocked tokens for a specific address. It uses the current timestamp
*/
function claimableNow(address recipient) external view returns (uint256);

function transferAllocation(address prevRecipient, address newRecipient) external;
function transferAllocation(address prevRecipient, address newRecipient)
external;

function sendPraiseRewards(address[] memory recipients, uint256[] memory amounts) external;
function sendPraiseRewards(
address[] memory recipients,
uint256[] memory amounts
) external;
}
Loading

0 comments on commit 4bc6f64

Please sign in to comment.