I noticed this code in open zepplins contract:
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
I've never seen the double ** before. What does it mean?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI noticed this code in open zepplins contract:
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
I've never seen the double ** before. What does it mean?
from the solidity documentation :
Arithmetic operators: +, -, unary -, unary +, *, /, % (remainder), ** (exponentiation)
so : a**b
is a
to the power of b
(i.e: a*a*a*...*a
b times)