the main goal are to add additional bonus tokens to person which invite buyer.
for example:
invite bonus - 5%
user1 buy 100 tokens, then we check who invite user1 in community contract.
if userX has invited user1 then userX will obtain 5% (5 tokens)
so
- need to add
communityAddress into method __FundContractBase__init
and check mapping(address => address) public invitedBy; in CommunityContract and i guees send bonus tokens to inviter maybe [here](https://github.com/Intercoin/FundContract/blob/19ed537bc2c36af507ac80aef7204ec63926e546/contracts/FundContractBase.sol#L285)
- try to migrate any timestamps data from
uint256 to uint64. it will save storage
function __FundContractBase__init(
address _sellingToken,
uint256[] memory _timestamps,
uint256[] memory _prices,
uint256 _endTime,
uint256[] memory _thresholds,
uint256[] memory _bonuses
)
UPD
replace Group logic (and method setGroup) on Community Contract logic
means for now group is a persons which was invited by user that invite buyer
Very simple
1. Make an optional parameter called “community” which is an address of CommunityContraxt
2. When Y buys, check X who invited them, if anyone. Then give bulk bonuses to array invitedBy X, including Y.
the main goal are to add additional bonus tokens to person which invite buyer.
for example:
invite bonus - 5%
user1 buy 100 tokens, then we check who invite user1 in community contract.
if userX has invited user1 then userX will obtain 5% (5 tokens)
so
communityAddressinto method__FundContractBase__initand check
mapping(address => address) public invitedBy;in CommunityContract and i guees send bonus tokens to inviter maybe[here](https://github.com/Intercoin/FundContract/blob/19ed537bc2c36af507ac80aef7204ec63926e546/contracts/FundContractBase.sol#L285)uint256touint64. it will save storageUPD
replace Group logic (and method setGroup) on Community Contract logic
means for now group is a persons which was invited by user that invite buyer