示例#1
0
        public static BigInteger GetExchangedGasByScriptHash(byte[] scriptHash)
        {
            byte[]     exchangedKey   = KeyOfExchangedByScriptHash(scriptHash);
            BigInteger exchangedValue = GenericDao.Get(exchangedKey).AsBigInteger();

            return(exchangedValue);
        }
示例#2
0
        public static BigInteger GetCurrentInCirculation()
        {
            byte[]     currentInCirculationKey = KeyOfCurrentInCirculation();
            BigInteger currentInCirculation    = GenericDao.Get(currentInCirculationKey).AsBigInteger();

            return(currentInCirculation);
        }
示例#3
0
        public static BigInteger GetTotalSupply()
        {
            byte[]     totalSupplyKey = KeyOfTotalSupply();
            BigInteger totalSupply    = GenericDao.Get(totalSupplyKey).AsBigInteger();

            return(totalSupply);
        }
示例#4
0
        public static BigInteger BalanceOf(byte[] addressScriptHash)
        {
            byte[]     balanceKey = KeyOfBalance(addressScriptHash);
            BigInteger balance    = GenericDao.Get(balanceKey).AsBigInteger();

            return(balance);
        }
示例#5
0
        public static BigInteger TotalSupply()
        {
            Runtime.Log("Total Supply called");
            BigInteger returnValue = 0;

            byte[] totalSupplyInBytes = GenericDao.Get("totalSupply".AsByteArray());
            if (totalSupplyInBytes.Length != 0)
            {
                returnValue = totalSupplyInBytes.AsBigInteger();
            }
            Runtime.Log("total supply: " + returnValue);

            Runtime.Log("Total Supply ok");
            return(returnValue);
        }
示例#6
0
 public static byte[] GetBlockHeightFedReef(byte[] reef)
 {
     byte[] keyOfBlockHeightFedReef = KeyOfBlockHeightFedReef(reef);
     return(GenericDao.Get(keyOfBlockHeightFedReef));
 }
示例#7
0
 public static byte[] GetReefFishesDead(byte[] reef)
 {
     byte[] keyOfFromReefFishesDead = KeyOfReefFishesDead(reef);
     return(GenericDao.Get(keyOfFromReefFishesDead));
 }
示例#8
0
 public static byte[] GetReefFishesAlive(byte[] reef)
 {
     byte[] keyOfFromReefFishesAlive = KeyOfReefFishesAlive(reef);
     return(GenericDao.Get(keyOfFromReefFishesAlive));
 }
示例#9
0
 public static BigInteger GetKycStatus(byte[] scriptHash)
 {
     byte[] kycKey = KeyOfKyc(scriptHash);
     return(GenericDao.Get(kycKey).AsBigInteger());
 }