pub enum CallMessage<C: Context> {
    CreateToken {
        salt: u64,
        token_name: String,
        initial_balance: Amount,
        minter_address: C::Address,
        authorized_minters: Vec<C::Address>,
    },
    Transfer {
        to: C::Address,
        coins: Coins<C>,
    },
    Burn {
        coins: Coins<C>,
    },
    Mint {
        coins: Coins<C>,
        minter_address: C::Address,
    },
    Freeze {
        token_address: C::Address,
    },
}
Expand description

Specifies the call methods using in that module. This enumeration represents the available call messages for interacting with the sov-bank module.

Variants§

§

CreateToken

Fields

§salt: u64

Random value use to create a unique token address.

§token_name: String

The name of the new token.

§initial_balance: Amount

The initial balance of the new token.

§minter_address: C::Address

The address of the account that the new tokens are minted to.

§authorized_minters: Vec<C::Address>

Authorized minter list.

Creates a new token with the specified name and initial balance.

§

Transfer

Fields

§to: C::Address

The address to which the tokens will be transferred.

§coins: Coins<C>

The amount of tokens to transfer.

Transfers a specified amount of tokens to the specified address.

§

Burn

Fields

§coins: Coins<C>

The amount of tokens to burn.

Burns a specified amount of tokens.

§

Mint

Fields

§coins: Coins<C>

The amount of tokens to mint.

§minter_address: C::Address

Address to mint tokens to

Mints a specified amount of tokens.

§

Freeze

Fields

§token_address: C::Address

Address of the token to be frozen

Freezes a token so that the supply is frozen

Trait Implementations§

source§

impl<C: Context> BorshDeserialize for CallMessage<C>where u64: BorshDeserialize, String: BorshDeserialize, Amount: BorshDeserialize, C::Address: BorshDeserialize, Vec<C::Address>: BorshDeserialize, Coins<C>: BorshDeserialize,

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

source§

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>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,

source§

impl<C: Context> BorshSerialize for CallMessage<C>where u64: BorshSerialize, String: BorshSerialize, Amount: BorshSerialize, C::Address: BorshSerialize, Vec<C::Address>: BorshSerialize, Coins<C>: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>

Serialize this instance into a vector of bytes.
source§

impl<C: Clone + Context> Clone for CallMessage<C>where C::Address: Clone,

source§

fn clone(&self) -> CallMessage<C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C: Debug + Context> Debug for CallMessage<C>where C::Address: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<C: Context> EnumExt for CallMessage<C>where u64: BorshDeserialize, String: BorshDeserialize, Amount: BorshDeserialize, C::Address: BorshDeserialize, Vec<C::Address>: BorshDeserialize, Coins<C>: BorshDeserialize,

source§

fn deserialize_variant<R: Read>( reader: &mut R, variant_idx: u8 ) -> Result<Self, Error>

Deserialises given variant of an enum from the reader. Read more
source§

impl<C: PartialEq + Context> PartialEq<CallMessage<C>> for CallMessage<C>where C::Address: PartialEq,

source§

fn eq(&self, other: &CallMessage<C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C: Context> StructuralPartialEq for CallMessage<C>

Auto Trait Implementations§

§

impl<C> RefUnwindSafe for CallMessage<C>where <C as Spec>::Address: RefUnwindSafe,

§

impl<C> Send for CallMessage<C>

§

impl<C> Sync for CallMessage<C>

§

impl<C> Unpin for CallMessage<C>where <C as Spec>::Address: Unpin,

§

impl<C> UnwindSafe for CallMessage<C>where <C as Spec>::Address: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more