DealFundraising
Contract behaviors:
purchase(dealUuid,amount) - can be called multiple times to add to previous value
refund(dealUuid) - only when refunds are allowed
Contract properties:
mapping(string => mapping(address => uint256)) dealsWalletsDeposits
mapping(string => address[]) public dealsWallets; //can be multiple times!
mapping(string => uint256) public dealsDeposits
mapping(string => uint256) public dealsWithdrawals
mapping(string => uint256) public dealsLastChangeAt
lastChangeAt
Contract events:
event WalletPurchased(string dealUuid, address wallet, uint256 amount);
emit WalletRefunded(dealUuid, msg.sender, depositedAmount);
Roles:
DEFAULT_ADMIN_ROLE
EDITOR_ROLE
Admin-only functions:
withdrawFundraisedTokens(DEFAULT_ADMIN_ROLE) - withdraw money
Importing original deals
To be able to import original deals, contract contains method importOldDealPurchase
. This method allows to configure deal purchases without transferring real token. This feature is enabled only during deployment and after that it is revoked by revokeImportingOldDealPurchases
. After revoking, there is no way how to enable it again and there is no way how to create deal purchases without money transferring.
importOldDealPurchase(
EDITOR_ROLE) - import original deals
revokeImportingOldDealPurchases() - revoke importing feature
allowedImportingOldDeals - info about importing enabled
CA
Last updated