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
type Address: MaybeAddress
[src]
type Address: MaybeAddress
[src]The address type of Plasma child chain (default: AccountId32)
Required methods
fn not_address() -> Self::Address
[src]
fn not_address() -> Self::Address
[src]The address of not predicate address.
fn and_address() -> Self::Address
[src]
fn and_address() -> Self::Address
[src]The address of and predicate address.
fn or_address() -> Self::Address
[src]
fn or_address() -> Self::Address
[src]The address of or predicate address.
fn for_all_address() -> Self::Address
[src]
fn for_all_address() -> Self::Address
[src]The address of for all predicate address.
fn there_exists_address() -> Self::Address
[src]
fn there_exists_address() -> Self::Address
[src]The address of there exists predicate address.
fn equal_address() -> Self::Address
[src]
fn equal_address() -> Self::Address
[src]The address of equal predicate address.
fn is_contained_address() -> Self::Address
[src]
fn is_contained_address() -> Self::Address
[src]The address of is contained predicate address.
fn is_less_address() -> Self::Address
[src]
fn is_less_address() -> Self::Address
[src]The address of is less than predicate address.
fn is_stored_address() -> Self::Address
[src]
fn is_stored_address() -> Self::Address
[src]The address of is stored predicate address.
fn is_valid_signature_address() -> Self::Address
[src]
fn is_valid_signature_address() -> Self::Address
[src]The address of is valid signature predicate address.
fn verify_inclusion_address() -> Self::Address
[src]
fn verify_inclusion_address() -> Self::Address
[src]The address of verify inclusion predicate address.
fn ext_call(
&self,
to: &Self::Address,
input_data: PredicateCallInputs<Self::Address>
) -> ExecResultT<Vec<u8>, Self::Address>
[src]
fn ext_call(
&self,
to: &Self::Address,
input_data: PredicateCallInputs<Self::Address>
) -> ExecResultT<Vec<u8>, Self::Address>
[src]Call (other predicate) into the specified account.
fn ext_caller(&self) -> Self::Address
[src]
fn ext_caller(&self) -> Self::Address
[src]Returns a reference to the account id of the caller.
fn ext_address(&self) -> Self::Address
[src]
fn ext_address(&self) -> Self::Address
[src]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.
fn ext_is_decided(&self, property: &PropertyOf<Self>) -> bool
[src]
fn ext_is_decided(&self, property: &PropertyOf<Self>) -> bool
[src]is_decided
function of UniversalAdjudication in OVM module.
fn ext_is_decided_by_id(&self, id: Self::Hash) -> bool
[src]
fn ext_is_decided_by_id(&self, id: Self::Hash) -> bool
[src]is_decided_by_id
function of UniversalAdjudication in OVM module.
fn ext_get_property_id(&self, property: &PropertyOf<Self>) -> Self::Hash
[src]
fn ext_get_property_id(&self, property: &PropertyOf<Self>) -> Self::Hash
[src]get_property_id
function of UniversalAdjudication in OVM module.
fn ext_set_predicate_decision(
&self,
game_id: Self::Hash,
decision: bool
) -> ExecResult<Self::Address>
[src]
fn ext_set_predicate_decision(
&self,
game_id: Self::Hash,
decision: bool
) -> ExecResult<Self::Address>
[src]set_predicate_decision
function of UniversalAdjudication in OVM module.
Provided methods
fn is_placeholder(target: &Vec<u8>) -> bool
[src]
fn is_placeholder(target: &Vec<u8>) -> bool
[src]@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).
fn bytes_to_u128(target: &Vec<u8>) -> ExecResultT<u128, Self::Address>
[src]
fn bytes_to_u128(target: &Vec<u8>) -> ExecResultT<u128, Self::Address>
[src]Decoded to u128
fn bytes_to_range(target: &Vec<u8>) -> ExecResultT<Range, Self::Address>
[src]
fn bytes_to_range(target: &Vec<u8>) -> ExecResultT<Range, Self::Address>
[src]Decoded to range
fn bytes_to_address(
target: &Vec<u8>
) -> ExecResultT<Self::Address, Self::Address>
[src]
fn bytes_to_address(
target: &Vec<u8>
) -> ExecResultT<Self::Address, Self::Address>
[src]Decoded to Address
fn bytes_to_bool(target: &Vec<u8>) -> ExecResultT<bool, Self::Address>
[src]
fn bytes_to_bool(target: &Vec<u8>) -> ExecResultT<bool, Self::Address>
[src]Decoded to bool
fn bytes_to_property(
target: &Vec<u8>
) -> ExecResultT<PropertyOf<Self>, Self::Address>
[src]
fn bytes_to_property(
target: &Vec<u8>
) -> ExecResultT<PropertyOf<Self>, Self::Address>
[src]Decoded to Property
fn bytes_to_bytes_array(
target: &Vec<u8>
) -> ExecResultT<Vec<Vec<u8>>, Self::Address>
[src]
fn bytes_to_bytes_array(
target: &Vec<u8>
) -> ExecResultT<Vec<Vec<u8>>, Self::Address>
[src]Decoded to Vec<Vec