/// <summary> /// allow the contract administrator to update the admin address /// </summary> /// <param name="newAdminAddress"></param> /// <returns></returns> public static bool UpdateAdminAddress(byte[] newAdminAddress) { if (newAdminAddress.Length != 20) { return(false); } Storage.Put(Storage.CurrentContext, StorageKeys.ContractAdmin(), newAdminAddress); return(true); }
/// <summary> /// verify the contract invoker is the defined administrator /// </summary> /// <returns></returns> public static bool VerifyIsAdminAccount() { if (ContractInitialised()) { return(VerifyWitness(Storage.Get(Storage.CurrentContext, StorageKeys.ContractAdmin()))); } else { return(VerifyWitness(ICOTemplate.InitialAdminAccount)); } }
/// <summary> /// allow the contract administrator to update the admin address /// </summary> /// <param name="newAdminAddress"></param> /// <returns></returns> public static bool UpdateAdminAddress(byte[] newAdminAddress) { Storage.Put(Storage.CurrentContext, StorageKeys.ContractAdmin(), newAdminAddress); return(true); }