Trait ovmi::executor::ExternalCall[][src]

pub trait ExternalCall {
    type Address: MaybeAddress;
    type Hash: MaybeHash;
    type Hashing: Hasher<Out = Self::Hash>;
Show methods fn not_address() -> Self::Address;
fn and_address() -> Self::Address;
fn or_address() -> Self::Address;
fn for_all_address() -> Self::Address;
fn there_exists_address() -> Self::Address;
fn equal_address() -> Self::Address;
fn is_contained_address() -> Self::Address;
fn is_less_address() -> Self::Address;
fn is_stored_address() -> Self::Address;
fn is_valid_signature_address() -> Self::Address;
fn verify_inclusion_address() -> Self::Address;
fn secp256k1() -> Self::Hash;
fn ext_call(
        &self,
        to: &Self::Address,
        input_data: PredicateCallInputs<Self::Address>
    ) -> ExecResultT<Vec<u8>, Self::Address>;
fn ext_caller(&self) -> Self::Address;
fn ext_address(&self) -> Self::Address;
fn ext_is_stored(
        &self,
        address: &Self::Address,
        key: &[u8],
        value: &[u8]
    ) -> bool;
fn ext_verify(
        &self,
        hash: &Self::Hash,
        signature: &[u8],
        address: &Self::Address
    ) -> bool;
fn ext_verify_inclusion_with_root(
        &self,
        leaf: Self::Hash,
        token_address: Self::Address,
        range: &[u8],
        inclusion_proof: &[u8],
        root: &[u8]
    ) -> bool;
fn ext_is_decided(&self, property: &PropertyOf<Self>) -> bool;
fn ext_is_decided_by_id(&self, id: Self::Hash) -> bool;
fn ext_get_property_id(&self, property: &PropertyOf<Self>) -> Self::Hash;
fn ext_set_predicate_decision(
        &self,
        game_id: Self::Hash,
        decision: bool
    ) -> ExecResult<Self::Address>; fn vec_to_address(key: &Vec<u8>) -> Option<Self::Address> { ... }
fn hash_of<S: Encode>(s: &S) -> Self::Hash { ... }
fn is_placeholder(target: &Vec<u8>) -> bool { ... }
fn is_label(target: &Vec<u8>) -> bool { ... }
fn sub_bytes(
        target: &Vec<u8>,
        start_index: u128,
        end_index: u128
    ) -> Vec<u8> { ... }
fn sub_array(
        target: &Vec<Vec<u8>>,
        start_index: usize,
        end_index: usize
    ) -> Vec<Vec<u8>> { ... }
fn get_input_value(target: &Vec<u8>) -> Vec<u8> { ... }
fn bytes_to_u128(target: &Vec<u8>) -> ExecResultT<u128, Self::Address> { ... }
fn bytes_to_range(target: &Vec<u8>) -> ExecResultT<Range, Self::Address> { ... }
fn bytes_to_address(
        target: &Vec<u8>
    ) -> ExecResultT<Self::Address, Self::Address> { ... }
fn bytes_to_bool(target: &Vec<u8>) -> ExecResultT<bool, Self::Address> { ... }
fn bytes_to_property(
        target: &Vec<u8>
    ) -> ExecResultT<PropertyOf<Self>, Self::Address> { ... }
fn bytes_to_bytes_array(
        target: &Vec<u8>
    ) -> ExecResultT<Vec<Vec<u8>>, Self::Address> { ... }
fn prefix_label(source: &Vec<u8>) -> Vec<u8> { ... }
fn prefix_variable(source: &Vec<u8>) -> Vec<u8> { ... }
fn prefix(prefix: u8, source: &Vec<u8>) -> Vec<u8> { ... }
}

Associated Types

The address type of Plasma child chain (default: AccountId32)

The hash type of Plasma child chain (default: H256)

The hashing type of Plasma child chain (default: Keccak256)

Required methods

The address of not predicate address.

The address of and predicate address.

The address of or predicate address.

The address of for all predicate address.

The address of there exists predicate address.

The address of equal predicate address.

The address of is contained predicate address.

The address of is less than predicate address.

The address of is stored predicate address.

The address of is valid signature predicate address.

The address of verify inclusion predicate address.

relation const any signature algorithm.

Call (other predicate) into the specified account.

Returns a reference to the account id of the caller.

Returns a reference to the account id of the current contract.

Notes a call other storage. Only return true or false. CommitmentAddress(special) isCommitment(address) -> Commitment is_stored_predicate(&self, address, key, value);? ref: https://github.com/cryptoeconomicslab/ovm-contracts/blob/master/contracts/Predicate/Atomic/IsStoredPredicate.sol

Verify messagge hash with signature and address. Should be used by ECDSA.

verifyInclusionWithRoot method verifies inclusion proof in Double Layer Tree. Must be used by kind of Commitment contract by Plasma module.

is_decided function of UniversalAdjudication in OVM module.

is_decided_by_id function of UniversalAdjudication in OVM module.

get_property_id function of UniversalAdjudication in OVM module.

set_predicate_decision function of UniversalAdjudication in OVM module.

Provided methods

Produce the hash of some codec-encodable value.

@dev check target is variable or not. A variable has prefix V and its length is less than 20.

@dev check target is label or not. A label has prefix L and its length is less than 20.

sub_bytes of [start_idnex, end_idnex).

sub array of [start_idnex, end_idnex).

sub_bytes of [1…).

Decoded to u128

Decoded to range

Decoded to Address

Decoded to bool

Decoded to Property

Decoded to Vec<Vec>

Implementors