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); }
public static void UpdateRandomStep(BigInteger currentStep) { UtilityDao.UpdateRandomStep(currentStep); }
public static BigInteger GetRandomStep() { return(UtilityDao.GetRandomStep()); }