Contratos Inteligentes (Smart Contracts)
ImpactMarket
CommunityFactory
Community
// When the beneficiary can claim again (timestamp)mapping(address => uint256) public cooldown;// What was the last interval when the user claim.// This is used to calculate the next intervalmapping(address => uint256) public lastInterval;// How much has the beneficiary claimed so far.mapping(address => uint256) public claimed;// In what state is the beneficiary (enum BeneficiaryState {NONE, Valid, Locked, Removed})mapping(address => BeneficiaryState) public beneficiaries;// community amount per claim (in cUSD)uint256 public claimAmount;// community base interval (we have been using 1 day or 1 week) (in seconds)uint256 public baseInterval;// community increment interval (in seconds)uint256 public incrementInterval;// community maximun claim per beneficiary (in cUSD)uint256 public maxClaim;// if the community was migrated, will have here the addressaddress public previousCommunityContract;// impactMarket contract addressaddress public impactMarketAddress;// cUSD contract addressaddress public cUSDAddress;Functions
/** * @dev Allow community managers to add other managers. */function addManager(address _account) external onlyManagers;/** * @dev Allow community managers to remove other managers. */function removeManager(address _account) external onlyManagers;/** * @dev Allow community managers to add beneficiaries. */function addBeneficiary(address _account) external onlyManagers;/** * @dev Allow community managers to lock beneficiaries. */function lockBeneficiary(address _account) external onlyManagers;/** * @dev Allow community managers to unlock locked beneficiaries. */function unlockBeneficiary(address _account) external onlyManagers;/** * @dev Allow community managers to remove beneficiaries. */function removeBeneficiary(address _account) external onlyManagers;/** * @dev Allow beneficiaries to claim. */function claim() external onlyValidBeneficiary;/** * @dev Allow community managers to edit community variables. */function edit( uint256 _claimAmount, uint256 _maxClaim, uint256 _baseInterval, uint256 _incrementInterval) external onlyManagers;Última actualización
¿Te fue útil?
