pub struct InstantiateMsg {
pub owner: Option<String>,
pub recipient: String,
pub title: String,
pub description: Option<String>,
pub total: Uint128,
pub denom: UncheckedDenom,
pub schedule: Schedule,
pub start_time: Option<Timestamp>,
pub vesting_duration_seconds: u64,
pub unbonding_duration_seconds: u64,
}Fields§
§owner: Option<String>The optional owner address of the contract. If an owner is specified, the owner may cancel the vesting contract at any time and withdraw unvested funds.
recipient: StringThe receiver address of the vesting tokens.
title: StringThe a name or title for this payment.
description: Option<String>A description for the payment to provide more context.
total: Uint128The total amount of tokens to be vested.
denom: UncheckedDenomThe type and denom of token being vested.
schedule: ScheduleThe vesting schedule, can be either SaturatingLinear vesting
(which vests evenly over time), or PiecewiseLinear which can
represent a more complicated vesting schedule.
start_time: Option<Timestamp>The time to start vesting, or None to start vesting when the
contract is instantiated. start_time may be in the past,
though the contract checks that start_time + vesting_duration_seconds > now. Otherwise, this would amount
to a regular fund transfer.
vesting_duration_seconds: u64The length of the vesting schedule in seconds. Must be
non-zero, though one second vesting durations are
allowed. This may be combined with a start_time in the
future to create an agreement that instantly vests at a time
in the future, and allows the receiver to stake vesting tokens
before the agreement completes.
See suite_tests/tests.rs
test_almost_instavest_in_the_future for an example of this.
unbonding_duration_seconds: u64The unbonding duration for the chain this contract is deployed on. Smart contracts do not have access to this data as stargate queries are disabled on most chains, and cosmwasm-std provides no way to query it.
This value being too high will cause this contract to hold funds for longer than needed, this value being too low will reduce the quality of error messages and require additional external calculations with correct values to withdraw avaliable funds from the contract.
Trait Implementations§
Source§impl Clone for InstantiateMsg
impl Clone for InstantiateMsg
Source§fn clone(&self) -> InstantiateMsg
fn clone(&self) -> InstantiateMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstantiateMsg
impl Debug for InstantiateMsg
Source§impl<'de> Deserialize<'de> for InstantiateMsg
impl<'de> Deserialize<'de> for InstantiateMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for InstantiateMsg
impl JsonSchema for InstantiateMsg
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more