public static bool Burn(UInt160 minterAccount, BigInteger amount) { if (IsPaused()) { Error("System is paused."); return(false); } if (amount <= 0) { Error("The parameter amount MUST be greater than 0."); return(false); } if (!IsMinter() || !Runtime.CheckWitness(minterAccount)) { Error("No authorization."); return(false); } if (IsBlacklisted(minterAccount)) { Error("Argument account is in blacklist."); return(false); } if (AssetStorage.Get(minterAccount) < amount) { Error("Insufficient balance."); return(false); } TotalSupplyStorage.Reduce(amount); TotalBurnStorage.Increase(amount); AssetStorage.Reduce(minterAccount, amount); Transferred(minterAccount, null, amount); return(true); }
public static BigInteger TotalBurn() => TotalBurnStorage.Get();