Example #1
0
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
Example #2
0
 public static void update(ByteString nefFile, string manifest)
 {
     if (!verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
Example #3
0
 public static void Update(ByteString nef, string manifest)
 {
     if (!CheckCommittee())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nef, manifest);
 }
Example #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);
 }
Example #5
0
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!Verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile.ToByteString(), manifest);
 }
Example #6
0
 public static void Update(ByteString nefFile, string manifest, object data)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest, data);
 }
Example #7
0
 public static bool Update(ByteString nef, string manifest)
 {
     if (!Runtime.CheckWitness(Owner))
     {
         return(false);
     }
     ContractManagement.Update(nef, manifest, null);
     return(true);
 }
Example #8
0
 public static bool Update(ByteString nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new InvalidOperationException("No Authorization!");
     }
     ContractManagement.Update(nefFile, manifest, null);
     return(true);
 }
Example #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);
        }
Example #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);
 }
Example #11
0
 public static int OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return(123);
 }
Example #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);
 }
Example #15
0
 public static bool Update(ByteString nefFile, string manifest)
 {
     Assert(CheckSuperOwner(), "Forbidden");
     ContractManagement.Update(nefFile, manifest);
     return(true);
 }
Example #16
0
 public static string OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return ContractManagement.GetContract(Runtime.ExecutingScriptHash).Manifest.Name;
 }
Example #17
0
        public static void Update(ByteString nefFile, string manifest)
        {
            Assert(IsOwner(), "No authorization.");

            ContractManagement.Update(nefFile, manifest);
        }
Example #18
0
 public static void Update(byte[] nef, string manifest)
 {
     ContractManagement.Update(nef, manifest);
 }
 public static void Update(ByteString nef, string manifest)
 {
     CheckCommittee();
     ContractManagement.Update(nef, manifest);
 }
Example #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);
 }