#[repr(C)]pub struct DeployedContractHash {
pub hash: SHA256Hash,
pub contract_size: u32,
pub contract_type: ContractType,
}Expand description
Hash and metadata for a contract deployed at an address.
This allows the system to locate and instantiate the contract code without loading the full contract from storage.
Fields§
§hash: SHA256HashSHA-256 hash of the XDR-encoded Contract deployed at this address.
Computed as SHA256(XDR(Contract)), identically to the contract_hash
field of ContractDeploymentHashPreimage.
contract_size: u32Size of the contract code in bytes.
Always 0 for kNative and kMockTest, which carry no deployable blob.
Optimization: allows computing and updating storage costs without loading the full contract from storage.
contract_type: ContractTypeThe type of contract: RV32, native, or mock.
Optimization: allows the executor to determine which runtime to instantiate without a database lookup. When the contract module is already cached, this avoids loading the contract bytecode entirely.
Trait Implementations§
Source§impl Clone for DeployedContractHash
impl Clone for DeployedContractHash
Source§fn clone(&self) -> DeployedContractHash
fn clone(&self) -> DeployedContractHash
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConstMaxSize for DeployedContractHash
impl ConstMaxSize for DeployedContractHash
Source§impl ConstMaxSize for DeployedContractHash
impl ConstMaxSize for DeployedContractHash
Source§impl Debug for DeployedContractHash
impl Debug for DeployedContractHash
impl EncodesAs<DeployedContractHash> for DeployedContractHash
impl Eq for DeployedContractHash
Source§impl Hash for DeployedContractHash
impl Hash for DeployedContractHash
Source§impl JsonSchema for DeployedContractHash
impl JsonSchema for DeployedContractHash
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for DeployedContractHash
impl Ord for DeployedContractHash
Source§fn cmp(&self, other: &DeployedContractHash) -> Ordering
fn cmp(&self, other: &DeployedContractHash) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DeployedContractHash
impl PartialEq for DeployedContractHash
Source§impl PartialOrd for DeployedContractHash
impl PartialOrd for DeployedContractHash
Source§impl<'_r> ReadXDR<'_r> for DeployedContractHash
impl<'_r> ReadXDR<'_r> for DeployedContractHash
Source§fn read_xdr<R>(r: &mut R) -> Result<DeployedContractHash, ReadError>where
R: Reader<'_r>,
fn read_xdr<R>(r: &mut R) -> Result<DeployedContractHash, ReadError>where
R: Reader<'_r>,
Source§fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, DeployedContractHash>,
) -> Result<Init<'__xdrs_s, DeployedContractHash>, ReadError>where
R: Reader<'_r>,
fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, DeployedContractHash>,
) -> Result<Init<'__xdrs_s, DeployedContractHash>, ReadError>where
R: Reader<'_r>,
slot, without first building it
on the stack. Read more