Exemplo n.º 1
0
        private bool Contract_Destroy(ExecutionEngine engine)
        {
            UInt160       hash     = new UInt160(engine.CurrentContext.ScriptHash);
            ContractState contract = contracts.TryGet(hash);

            if (contract == null)
            {
                return(true);
            }
            contracts.Delete(hash);
            if (contract.HasStorage)
            {
                foreach (var pair in storages.Find(hash.ToArray()))
                {
                    storages.Delete(pair.Key);
                }
            }
            return(true);
        }