Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
File: NEP5.cs Progetto: Eluvade/DIVE
 public static BigInteger TotalSupply()
 {
     return(Storage.Get(Storage.CurrentContext, StorageKeys.TokenTotalSupply()).AsBigInteger());
 }