Common Types
Overview
This is a collection of types which are commonly used in Astroport contracts.
Links
- Github: https://github.com/astroport-fi/astroport-core/tree/main/packages/astroport
- asset.rs: https://github.com/astroport-fi/astroport-core/blob/main/packages/astroport/src/asset.rs
- common.rs https://github.com/astroport-fi/astroport-core/blob/main/packages/astroport/src/common.rs
Data Types
AssetInfo
AssetInfo is a convenience wrapper to represent whether a token is the native one (from a specific chain, like LUNA for Terra) or not. It also returns the contract address of that token.
Variants | Description |
---|---|
Token | Non-native Token |
NativeToken | Native token |
Asset
This enum contains asset info and a token amount.
Params | Type | Description |
---|---|---|
info | AssetInfo | Information about an asset stored in a [AssetInfo ] struct |
amount | Uint128 | A token amount |
DecimalAsset
This struct describes an asset as decimal.
Params | Type | Description |
---|---|---|
info | AssetInfo | Information about an asset stored in a [AssetInfo ] struct |
amount | Decimal256 | A token decimal amount |
PairInfo
It is used to represent response data coming from a Pair-Info-Querier
.
Params | Type | Description |
---|---|---|
asset_infos | Vec<AssetInfo> | Asset information for the assets in the pool |
contract_addr | Addr | Pair contract address |
liquidity_token | Addr | Pair LP token address |
pair_type | PairType | The pool type (xyk, stableswap, etc) available in [PairType ] |
OwnershipProposal
This structure describes the parameters used for creating a request for a change of contract ownership.
Params | Type | Description |
---|---|---|
owner | Addr | The newly proposed contract owner |
ttl | u64 | Time until the proposal to change ownership expires |