[][src]Struct cw20_escrow::msg::CreateMsg

pub struct CreateMsg {
    pub id: String,
    pub arbiter: HumanAddr,
    pub recipient: HumanAddr,
    pub end_height: Option<u64>,
    pub end_time: Option<u64>,
    pub cw20_whitelist: Option<Vec<HumanAddr>>,
}

Fields

id: String

id is a human-readable name for the escrow to use later 3-20 bytes of utf-8 text

arbiter: HumanAddr

arbiter can decide to approve or refund the escrow

recipient: HumanAddr

if approved, funds go to the recipient

end_height: Option<u64>

When end height set and block height exceeds this value, the escrow is expired. Once an escrow is expired, it can be returned to the original funder (via "refund").

end_time: Option<u64>

When end time (in seconds since epoch 00:00:00 UTC on 1 January 1970) is set and block time exceeds this value, the escrow is expired. Once an escrow is expired, it can be returned to the original funder (via "refund").

cw20_whitelist: Option<Vec<HumanAddr>>

Besides any possible tokens sent with the CreateMsg, this is a list of all cw20 token addresses that are accepted by the escrow during a top-up. This is required to avoid a DoS attack by topping-up with an invalid cw20 contract. See https://github.com/CosmWasm/cosmwasm-plus/issues/19

Implementations

impl CreateMsg[src]

pub fn canonical_whitelist<A: Api>(
    &self,
    api: &A
) -> StdResult<Vec<CanonicalAddr>>
[src]

Trait Implementations

impl Clone for CreateMsg[src]

impl Debug for CreateMsg[src]

impl<'de> Deserialize<'de> for CreateMsg[src]

impl JsonSchema for CreateMsg[src]

impl PartialEq<CreateMsg> for CreateMsg[src]

impl Serialize for CreateMsg[src]

impl StructuralPartialEq for CreateMsg[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.