DittocoinCrowdSale Contract

https://bscscan.com/address/0xd46dda71ac7b061c3aa3315078ae855296233377


Implementation Notes

Our public sale contract CrowdSale is adapted from the SettleMint ERC-20 Crowdsale template. It uses OpenZeppelin security primitives and an a Chainlink price feed for BNB price in USD. The only functional change vs. SettleMint’s sample is removing the whitelist so anyone can buy when the sale is unpaused. No additional sale powers or admin backdoors were added.


Key Components


What We Changed vs the Template (and Why)

  1. Removed whitelist logic → public sale: anyone can purchase while the contract is not paused.
  2. Kept admin surface minimal:
  3. Pricing: kept the same mechanism: getTokenAmount(wei) (public buy) and getWeiAmount(tokenAmount) (admin-recorded purchases). If an oracle is configured, USD pricing comes from Chainlink; otherwise the explicit fallback is used (documented below).

What Stayed the Same (No New Powers)