pub struct Issue {
pub version: ReservedBytes<1>,
pub meta: ContractMeta,
pub codex: Codex,
pub genesis: Genesis,
}
Expand description
Information on the issue of the contract.
Fields§
§version: ReservedBytes<1>
Version of the contract issue data structure.
This version defines an overall contract version. Operations and Genesis have independent versioning. Correspondence between these versions will be defined by the future consensus rules.
§Future use
For now, the only supported version is one; thus, a ReservedBytes
is used.
In the future, with more versions coming, this should be replaced with an enum, where the first byte will encode (with standard strict encoding) a version number as an enum variant. For instance,
pub enum Issue {
V0(IssueV0),
V1(IssueV1)
}
pub struct IssueV0 { /*...*/ }
pub struct IssueV1 { /*...*/ }
meta: ContractMeta
Contract metadata.
codex: Codex
The codex under which the contract is issued and against which it must be validated.
genesis: Genesis
Genesis operation.
Implementations§
Source§impl Issue
impl Issue
Sourcepub fn contract_id(&self) -> ContractId
pub fn contract_id(&self) -> ContractId
Computes contract id.
Contract id is a commitment to the contract issue information, which includes contract metadata, codex, and genesis operation.
Sourcepub fn genesis_opid(&self) -> Opid
pub fn genesis_opid(&self) -> Opid
Computes the operation id of the genesis operation.
Equals to the Genesis::opid
called with Self::contract_id
as an argument.
Trait Implementations§
Source§impl CommitEncode for Issue
impl CommitEncode for Issue
Source§type CommitmentId = ContractId
type CommitmentId = ContractId
Source§fn commit_encode(&self, e: &mut CommitEngine)
fn commit_encode(&self, e: &mut CommitEngine)
std::io::Write
writer instanceSource§impl<'de> Deserialize<'de> for Issue
impl<'de> Deserialize<'de> for Issue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Issue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Issue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Issue
impl Serialize for Issue
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl StrictDecode for Issue
impl StrictDecode for Issue
fn strict_decode(reader: &mut impl TypedRead) -> Result<Issue, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for Issue
impl StrictDumb for Issue
fn strict_dumb() -> Issue
Source§impl StrictEncode for Issue
impl StrictEncode for Issue
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for Issue
impl StrictStruct for Issue
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Issue
impl StrictType for Issue
const STRICT_LIB_NAME: &'static str = LIB_NAME_ULTRASONIC
fn strict_name() -> Option<TypeName>
impl Eq for Issue
impl StrictProduct for Issue
Auto Trait Implementations§
impl Freeze for Issue
impl RefUnwindSafe for Issue
impl Send for Issue
impl Sync for Issue
impl Unpin for Issue
impl UnwindSafe for Issue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CommitId for Twhere
T: CommitEncode,
impl<T> CommitId for Twhere
T: CommitEncode,
fn commit(&self) -> CommitEngine
Source§fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
fn commit_id(&self) -> <T as CommitEncode>::CommitmentId
Source§impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
impl<T> CommitmentLayout for Twhere
T: CommitEncode + StrictDumb,
Source§fn commitment_layout() -> CommitLayout
fn commitment_layout() -> CommitLayout
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.