public static BigInteger totalSupply(NPCNEP5Base tokenBase) { BigInteger totalSupply = NPCNEP5Base.GetTotalSupply(tokenBase); if (NeoTrace.VERBOSE) { NeoTrace.Trace("totalSupply():entered$INT", totalSupply); } return(totalSupply); }
public static bool deploy(NPCNEP5Base tokenbase) { bool result = false; if (NeoTrace.VERBOSE) { NeoTrace.Trace("deploy():entered"); } NPCEnvironment env = NPCEnvironment.New(); NPCEnvironment.Initialize(env); NPCNEP5LedgerEntry ownerLedgerEntry = NPCNEP5LedgerEntry.Get(OwnerAccountScriptHash); if (NeoTrace.VERBOSE) { NPCNEP5LedgerEntry.Log("deploy().ownerLedgerEntry", ownerLedgerEntry); } if (NPCNEP5LedgerEntry.IsMissing(ownerLedgerEntry)) { if (NeoTrace.VERBOSE) { NeoTrace.Trace("ownerLedgerEntry is Missing"); } NPCNEP5LedgerEntry.Set(ownerLedgerEntry, NPCEnvironment.GetBlockTimestamp(env), 0, NPCNEP5Base.GetTotalSupply(tokenbase)); NPCNEP5LedgerEntry.Put(ownerLedgerEntry, OwnerAccountScriptHash); if (NeoTrace.VERBOSE) { NPCNEP5LedgerEntry.Log("deploy().ownerLedgerEntry", ownerLedgerEntry); } result = true; } return(result); }