The Solidity Contract-Oriented Programming Language - By chatting here you agree to the https://github.com/ethereum/solidity/blob/develop/CODE_OF_CONDUCT.md
call
or delegatecall
. On the flip side, if your contract has too many functions, you might end hitting the contract size limit.
call
or delegatecall
. On the flip side, if your contract has too many functions, you might end up hitting the contract size limit.
@lovecodeing1995 And what about if you need the exact percentage of a token?
So lets say: 60000000000000 (60k tokens with 9 decimals) , how would we get the percentage amount the 60000000000000(60k tokens with 9 decimals) would be from 60000000000000000 (60m tokens with 9 decimals)
amountPercentageTokensRemaining = amountUnsoldTokensRemaining.div((allocatedTokensForPresale.mul(1000000000))).mul(10000); //99990000000
if
. Can't say what exactly without seeing the whole statement.// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
contract Function {
function deneme() public pure returns (uint , bool, uint) {
return (199,false,299);
}
// Functions can return multiple values.
function returnMany(uint t) public pure returns (uint , bool, uint) {
if (t < 10) {
return (1, true, 2);
} else if (t < 20) {
return (3, false, 4);
else if (t<30){
return deneme();
}
} else {
return (99, true, 99);
}
}
ParserError
(as opposed to other kinds of errors) basically means that it's a fundamental error in your syntax that was already detected at the parsing stage. return (3, false, 4);
else if (t<30){
return deneme();
}
else
.
return
. if (t < 10)
return (1, true, 2);
else if (t < 20)
return (3, false, 4);
else if (t < 30)
return deneme();
else
return (99, true, 99);