コード例 #1
0
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
コード例 #2
0
ファイル: CCMC.cs プロジェクト: neo-ngd/n3-asset
 public static void update(ByteString nefFile, string manifest)
 {
     if (!verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest);
 }
コード例 #3
0
 public static void Update(ByteString nef, string manifest)
 {
     if (!CheckCommittee())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nef, manifest);
 }
コード例 #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);
 }
コード例 #5
0
ファイル: Neo.NativeCall.cs プロジェクト: ProDog/NEO-Contract
 public static void Update(byte[] nefFile, string manifest)
 {
     if (!Verify())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile.ToByteString(), manifest);
 }
コード例 #6
0
 public static void Update(ByteString nefFile, string manifest, object data)
 {
     if (!IsOwner())
     {
         throw new Exception("No authorization.");
     }
     ContractManagement.Update(nefFile, manifest, data);
 }
コード例 #7
0
ファイル: Nep11Contract.cs プロジェクト: ProDog/NeoN3Contract
 public static bool Update(ByteString nef, string manifest)
 {
     if (!Runtime.CheckWitness(Owner))
     {
         return(false);
     }
     ContractManagement.Update(nef, manifest, null);
     return(true);
 }
コード例 #8
0
ファイル: NEP17.cs プロジェクト: neo-project/examples
 public static bool Update(ByteString nefFile, string manifest)
 {
     if (!IsOwner())
     {
         throw new InvalidOperationException("No Authorization!");
     }
     ContractManagement.Update(nefFile, manifest, null);
     return(true);
 }
コード例 #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);
        }
コード例 #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);
 }
コード例 #11
0
 public static int OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return(123);
 }
コード例 #12
0
ファイル: Proxy.cs プロジェクト: neo-ngd/n3-asset
 // 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);
 }
コード例 #13
0
 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);
 }
コード例 #15
0
 public static bool Update(ByteString nefFile, string manifest)
 {
     Assert(CheckSuperOwner(), "Forbidden");
     ContractManagement.Update(nefFile, manifest);
     return(true);
 }
コード例 #16
0
 public static string OldContract(byte[] nefFile, string manifest)
 {
     ContractManagement.Update((ByteString)nefFile, manifest, null);
     return ContractManagement.GetContract(Runtime.ExecutingScriptHash).Manifest.Name;
 }
コード例 #17
0
ファイル: pnUSDT.cs プロジェクト: neo-ngd/n3-asset
        public static void Update(ByteString nefFile, string manifest)
        {
            Assert(IsOwner(), "No authorization.");

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