DealFundraising
Contract behaviors:
purchase(dealUuid,amount) - can be called multiple times to add to previous valuerefund(dealUuid) - only when refunds are allowed
Contract properties:
mapping(string => mapping(address => uint256)) dealsWalletsDepositsmapping(string => address[]) public dealsWallets; //can be multiple times!mapping(string => uint256) public dealsDepositsmapping(string => uint256) public dealsWithdrawalsmapping(string => uint256) public dealsLastChangeAtlastChangeAt
Contract events:
event WalletPurchased(string dealUuid, address wallet, uint256 amount);emit WalletRefunded(dealUuid, msg.sender, depositedAmount);
Roles:
DEFAULT_ADMIN_ROLEEDITOR_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 dealsrevokeImportingOldDealPurchases() - revoke importing feature
allowedImportingOldDeals - info about importing enabled
CA
Last updated