Esempio n. 1
0
        public static bool Deploy()
        {
            Runtime.Log("Deploy called");
            if (!Runtime.CheckWitness(AppGlobals.FishEffectScriptHash))
            {
                return(false);
            }

            BigInteger totalSupply = FishCoinDao.GetTotalSupply();

            if (totalSupply != 0)
            {
                //Already deployed
                return(false);
            }

            BigInteger maximumSupply = MaxSupplyUnits * DecimalsFactor;

            FishCoinDao.SetTotalSupply(maximumSupply);
            UtilityDao.UpdateRandomStep(1);

            FishCoinDao.UpdateBalance(AppGlobals.FishEffectScriptHash, maximumSupply);

            Notifier.Transfer(null, AppGlobals.FishEffectScriptHash, maximumSupply);

            Runtime.Log("Deploy ok");
            return(true);
        }
Esempio n. 2
0
 public static void UpdateRandomStep(BigInteger currentStep)
 {
     UtilityDao.UpdateRandomStep(currentStep);
 }
Esempio n. 3
0
 public static BigInteger GetRandomStep()
 {
     return(UtilityDao.GetRandomStep());
 }