pub struct CallInput {
pub target: PublicAddress,
pub method: String,
pub arguments: Option<Vec<Vec<u8>>>,
pub amount: Option<u64>,
}
Fields§
§target: PublicAddress
The address of the target contract
method: String
The method to be invoked
arguments: Option<Vec<Vec<u8>>>
The arguments supplied to the invoked method. It is a list of serialized method arguments (see Serializable)
amount: Option<u64>
The amount sent to the target contract. The invoked contract can check the received amount
by host function amount()
according to the CBI.
Trait Implementations§
Source§impl BorshDeserialize for CallInputwhere
PublicAddress: BorshDeserialize,
String: BorshDeserialize,
Option<Vec<Vec<u8>>>: BorshDeserialize,
Option<u64>: BorshDeserialize,
impl BorshDeserialize for CallInputwhere
PublicAddress: BorshDeserialize,
String: BorshDeserialize,
Option<Vec<Vec<u8>>>: BorshDeserialize,
Option<u64>: BorshDeserialize,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for CallInputwhere
PublicAddress: BorshSerialize,
String: BorshSerialize,
Option<Vec<Vec<u8>>>: BorshSerialize,
Option<u64>: BorshSerialize,
impl BorshSerialize for CallInputwhere
PublicAddress: BorshSerialize,
String: BorshSerialize,
Option<Vec<Vec<u8>>>: BorshSerialize,
Option<u64>: BorshSerialize,
Source§impl Deserializable for CallInput
impl Deserializable for CallInput
impl Eq for CallInput
impl StructuralPartialEq for CallInput
Auto Trait Implementations§
impl Freeze for CallInput
impl RefUnwindSafe for CallInput
impl Send for CallInput
impl Sync for CallInput
impl Unpin for CallInput
impl UnwindSafe for CallInput
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
Mutably borrows from an owned value. Read more