/// <summary> /// a new token is minted, set the total supply value /// </summary> /// <param name="newlyMintedTokens">the number of tokens to add to the total supply</param> public static void SetTotalSupply(BigInteger newlyMintedTokens) { BigInteger currentTotalSupply = NEP5.TotalSupply(); Runtime.Notify("SetTotalSupply() setting new totalSupply", newlyMintedTokens + currentTotalSupply); Storage.Put(Storage.CurrentContext, StorageKeys.TokenTotalSupply(), currentTotalSupply + newlyMintedTokens); }
public static BigInteger TotalSupply() { return(Storage.Get(Storage.CurrentContext, StorageKeys.TokenTotalSupply()).AsBigInteger()); }