示例#1
0
        /// <summary>
        /// Checks if this ABI implements a specific event
        /// </summary>
        public bool Implements(ContractEvent evt)
        {
            foreach (var entry in this.Events)
            {
                if (entry.name == evt.name && entry.value == evt.value && entry.returnType == evt.returnType)
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        public void UnserializeData(BinaryReader reader)
        {
            var len = reader.ReadByte();

            _methods.Clear();
            for (int i = 0; i < len; i++)
            {
                var method = ContractMethod.Unserialize(reader);
                _methods[method.name] = method;
            }

            len          = reader.ReadByte();
            this._events = new ContractEvent[len];
            for (int i = 0; i < len; i++)
            {
                _events[i] = ContractEvent.Unserialize(reader);
            }
        }