pub struct ContractStateV1 {
pub admin: Addr,
pub contract_name: String,
pub contract_type: String,
pub contract_version: String,
pub deposit_marker: Denom,
pub trading_marker: Denom,
pub required_deposit_attributes: Vec<String>,
pub required_withdraw_attributes: Vec<String>,
}
Expand description
Stores the core contract configurations created on instantiation and modified on migration.
Fields§
§admin: Addr
The bech32 address of the account that has admin rights within this contract.
contract_name: String
A free-form name defining this particular contract instance. Used for identification on query purposes only.
contract_type: String
The crate name, used to ensure that newly-migrated instances match the same contract format.
contract_version: String
The crate version, used to ensure that newly-migrated instances do not attempt to use an identical or older version.
deposit_marker: Denom
Defines the marker denom that is deposited to this contract in exchange for trading_marker denom.
trading_marker: Denom
Defines the marker denom that is sent to accounts from this contract in exchange for deposit_marker.
required_deposit_attributes: Vec<String>
Defines any blockchain attributes required on accounts in order to execute the fund_trading execution route.
required_withdraw_attributes: Vec<String>
Defines any blockchain attributes required on accounts in order to execute the withdraw_trading execution route.
Implementations§
source§impl ContractStateV1
impl ContractStateV1
sourcepub fn new<S: Into<String>>(
admin: Addr,
contract_name: S,
deposit_marker: &Denom,
trading_marker: &Denom,
required_deposit_attributes: &[String],
required_withdraw_attributes: &[String]
) -> Self
pub fn new<S: Into<String>>( admin: Addr, contract_name: S, deposit_marker: &Denom, trading_marker: &Denom, required_deposit_attributes: &[String], required_withdraw_attributes: &[String] ) -> Self
Constructs a new instance of this struct.
§Parameters
admin
The bech32 address of the account that has admin rights within this contract.contract_name
A free-form name defining this particular contract instance. Used for identification on query purposes only.deposit_marker
Defines the marker denom that is deposited to this contract in exchange for trading_marker denom.trading_marker
Defines the marker denom that is sent to accounts from this contract in exchange for deposit_marker.required_deposit_attributes
Defines any blockchain attributes required on accounts in order to execute the fund_trading execution route.required_withdraw_attributes
Defines any blockchain attributes required on accounts in order to execute the withdraw_trading execution route.
Trait Implementations§
source§impl Clone for ContractStateV1
impl Clone for ContractStateV1
source§fn clone(&self) -> ContractStateV1
fn clone(&self) -> ContractStateV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ContractStateV1
impl Debug for ContractStateV1
source§impl<'de> Deserialize<'de> for ContractStateV1
impl<'de> Deserialize<'de> for ContractStateV1
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 ContractStateV1
impl JsonSchema for ContractStateV1
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(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq for ContractStateV1
impl PartialEq for ContractStateV1
source§fn eq(&self, other: &ContractStateV1) -> bool
fn eq(&self, other: &ContractStateV1) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ContractStateV1
impl Serialize for ContractStateV1
impl Eq for ContractStateV1
impl StructuralPartialEq for ContractStateV1
Auto Trait Implementations§
impl Freeze for ContractStateV1
impl RefUnwindSafe for ContractStateV1
impl Send for ContractStateV1
impl Sync for ContractStateV1
impl Unpin for ContractStateV1
impl UnwindSafe for ContractStateV1
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more