The Hard Cap Issue: Technical Explanation

uint256 public softCap;

uint256 public hardCap;

uint32 public capFlex;

function hardCapReached() public constant returns (bool) {

return weiRaised >= hardCap.mul(1000 + capFlex).div(1000);

}

function buyTokens(address _beneficiary) saleOpen public payable {

require(_beneficiary != address(0));

uint256 weiAmount = msg.value;

require(weiAmount > 0);

require(weiRaised.add(weiAmount) <= hardCap);

require(weiRaised.add(weiAmount) <= hardCap);

--

--

--

Send Money Smarter.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

In trading, you have to be defensive and aggressive at the same time.

Estimating Smart Contract Costs

creamY USD is LIVE!

Hydraverse AMBASSADOR PROGRAM OPEN NOW

TeraBlock x Blockchain Founders Fund — Partnership Announcement

TeraBlock — Partnership Announcement — Blockchain Founders Fund | ScaleX

Mission Briefing: Luart IDO Whitelist Application

Mello Token: Our Story

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Telcoin

Telcoin

Send Money Smarter.

More from Medium

Is Solana’s (SOL) Price Hitting $500 Possible Before the End of Q2 Trade?

Update from AquaGoat’s Patrick Aberin

Spanish Civil Guard Busts Crypto-Money Laundering Group

Spanish Civil Guard Busts Crypto-Money Laundering Group

If Bitcoin existed during Holocaust, it would have been the best asset for Jews to protect wealth.