コード例 #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);
        }
コード例 #2
0
ファイル: NEP5.cs プロジェクト: Eluvade/DIVE
 public static BigInteger TotalSupply()
 {
     return(Storage.Get(Storage.CurrentContext, StorageKeys.TokenTotalSupply()).AsBigInteger());
 }