Removed code in initPresale that checked if Darwin-BNB and Finch-BNB pairs existed.
Removed all references to DarwinEcosystem. It was only used to call setAddressPresaleTier on presale purchases but then it was never called again to get these "tiers".
Added a setRouter function that changes router address and also calls Darwin's and Finch's setRouter functions.
Added code to automatically pause Darwin and Finch when this contract is initialized, and automatically unpauses them when LP is added and unsold tokens are sent to team wallets (so when presale ends).
CHANGES TO DARWIN CONTRACT
Removed PAUSER_ROLE, added DEFAULT_ADMIN_ROLE and PRESALE_ROLE
Max supply was wrongly 10e10 (100billion), changed to 1e10 (10billion)
Added another parameter to __tokenomics2_init_unchained to differentiate tokenomics1 and tokenomics2 fees. Tokenomics 1.0 fees will be sent to the Tokenomics 1.0 wallet. Tokenomics 2.0 will be sent to the community fund (will need to hardcode this once created, it is _darwinCommunity for now).
In initialize parameters, removed _devWallet and added _presaleContractAddress.
In __darwin_init_unchained, _devWallet (now refactored to _wallet1) has been hardcoded to Wallet 1 address: 0x0bF1C4139A6168988Fe0d1384296e6df44B27aFd.
__darwin_init_unchained now takes the _presaleContractAddress as a new parameter. It will be granted the PRESALE_ROLE, allowing it to pause/unpause Darwin.
rewardsWallet is nomore created randomly. It is set to the address 0x3Cc90773ebB2714180b424815f390D937974109B.
Added function setRouter only callable by the Presale contract. It takes a router address as parameters. If the Darwin-BNB pair does not exist non this new router, it creates it and registers the pair in the Darwin contract.
CHANGES TO FINCH CONTRACT
Added the whitelist function. Now addresses can be added to the pause whitelist (they can trade Finch even when it is paused). Before this only the Presale contract could.
At launch, now 190m FINCH is automatically minted to the Presale Contract and 110m is minted to Wallet 2.
The work has been done following this spreadsheet. There are still things that need to be checked such as the Tokenomics 2.0 sync issue.
Changes listed here are all made in this commit and this pull request.
CHANGES TO PRESALE CONTRACT
initPresale
that checked if Darwin-BNB and Finch-BNB pairs existed.DarwinEcosystem
. It was only used to callsetAddressPresaleTier
on presale purchases but then it was never called again to get these "tiers".setRouter
function that changes router address and also calls Darwin's and Finch'ssetRouter
functions.CHANGES TO DARWIN CONTRACT
PAUSER_ROLE
, addedDEFAULT_ADMIN_ROLE
andPRESALE_ROLE
__tokenomics2_init_unchained
to differentiate tokenomics1 and tokenomics2 fees. Tokenomics 1.0 fees will be sent to the Tokenomics 1.0 wallet. Tokenomics 2.0 will be sent to the community fund (will need to hardcode this once created, it is_darwinCommunity
for now).initialize
parameters, removed_devWallet
and added_presaleContractAddress
.__darwin_init_unchained
,_devWallet
(now refactored to_wallet1
) has been hardcoded to Wallet 1 address:0x0bF1C4139A6168988Fe0d1384296e6df44B27aFd
.__darwin_init_unchained
now takes the_presaleContractAddress
as a new parameter. It will be granted thePRESALE_ROLE
, allowing it to pause/unpause Darwin.rewardsWallet
is nomore created randomly. It is set to the address0x3Cc90773ebB2714180b424815f390D937974109B
.setRouter
only callable by the Presale contract. It takes a router address as parameters. If the Darwin-BNB pair does not exist non this new router, it creates it and registers the pair in the Darwin contract.CHANGES TO FINCH CONTRACT
whitelist
function. Now addresses can be added to the pause whitelist (they can trade Finch even when it is paused). Before this only the Presale contract could.setRouter
like in Darwin contract.