コード例 #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());
 }