Esempio n. 1
0
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
Esempio n. 2
0
 public static void update(ByteString nefFile, string manifest)
 {
     if (!verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
Esempio n. 3
0
 public static void Update(ByteString nef, string manifest)
 {
     if (!CheckCommittee())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nef, manifest);
 }
Esempio n. 4
0
 public static void Update(ByteString nefFile, string manifest)
 {
     if (!ValidateContractOwner())
     {
         throw new Exception("Only the contract owner can update the contract");
     }
     ContractManagement.Update(nefFile, manifest, null);
 }
Esempio n. 5
0
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!Verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile.ToByteString(), manifest);
 }
Esempio n. 6
0
 public static void Update(ByteString nefFile, string manifest, object data)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest, data);
 }
Esempio n. 7
0
 public static bool Update(ByteString nef, string manifest)
 {
     if (!Runtime.CheckWitness(Owner))
     {
         return(false);
     }
     ContractManagement.Update(nef, manifest, null);
     return(true);
 }
Esempio n. 8
0
 public static bool Update(ByteString nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new InvalidOperationException("No Authorization!");
     }
     ContractManagement.Update(nefFile, manifest, null);
     return(true);
 }
Esempio n. 9
0
        public static void Update(ByteString nefFile, string manifest)
        {
            var key           = new byte[] { Prefix_ContractOwner };
            var contractOwner = (UInt160)Storage.Get(Storage.CurrentContext, key);
            var tx            = (Transaction)Runtime.ScriptContainer;

            if (!contractOwner.Equals(tx.Sender))
            {
                throw new Exception("Only the contract owner can update the contract");
            }

            ContractManagement.Update(nefFile, manifest, null);
        }
Esempio n. 10
0
 public static bool Migrate(UInt160 script, string manifest)
 {
     if (!IsPaused())
     {
         Error("System is not paused.");
         return(false);
     }
     if (!IsAdmin())
     {
         Error("No authorization.");
         return(false);
     }
     if (script != null && script.Equals(ContractManagement.GetContract(Runtime.ExecutingScriptHash)))
     {
         return(true);
     }
     ContractManagement.Update(script, manifest);
     return(true);
 }
Esempio n. 11
0
 public static int OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return(123);
 }
Esempio n. 12
0
 // used to upgrade this proxy contract
 public static bool Update(ByteString nefFile, string manifest)
 {
     Assert(IsSuperAdmin(), "upgrade: CheckWitness failed!");
     ContractManagement.Update(nefFile, manifest);
     return(true);
 }
 public static void Update(byte[] nef, string manifest)
 {
     ContractManagement.Update((ByteString)nef, manifest, null);
 }
 /// <summary>
 /// 升级
 /// </summary>
 /// <param name="nefFile"></param>
 /// <param name="manifest"></param>
 /// <param name="data"></param>
 public static void Update(ByteString nefFile, string manifest, object data)
 {
     Assert(Verify(), "No authorization.");
     ContractManagement.Update(nefFile, manifest, data);
 }
Esempio n. 15
0
 public static bool Update(ByteString nefFile, string manifest)
 {
     Assert(CheckSuperOwner(), "Forbidden");
     ContractManagement.Update(nefFile, manifest);
     return(true);
 }
Esempio n. 16
0
 public static string OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return ContractManagement.GetContract(Runtime.ExecutingScriptHash).Manifest.Name;
 }
Esempio n. 17
0
        public static void Update(ByteString nefFile, string manifest)
        {
            Assert(IsOwner(), "No authorization.");

            ContractManagement.Update(nefFile, manifest);
        }
Esempio n. 18
0
 public static void Update(byte[] nef, string manifest)
 {
     ContractManagement.Update(nef, manifest);
 }
Esempio n. 19
0
 public static void Update(ByteString nef, string manifest)
 {
     CheckCommittee();
     ContractManagement.Update(nef, manifest);
 }
Esempio n. 20
0
 // Upgrades the contract code (can only be invoked by the shop owner).
 public static void Update(ByteString nefFile, string manifest)
 {
     ValidateShopOwner();
     ContractManagement.Update(nefFile, manifest, null);
 }