The following are common data types used across White Whale's contracts. There might be few more that are used
internally, though this list contains the types that are exposed via the entry points.
Struct |
Description |
Contains |
Asset |
Represents an asset |
info : AssetInfo - asset informationamount : Uint128 - asset amount
|
Contract |
Represents a contract, either a Pool or Vault |
address : String - contract addresscontract_type : ContractType - type of the contract, vault or pool
|
Factory |
Represents a Factory for either Collecting or Querying fees for |
factory_addr : String - factory addressfactory_type : FactoryType - the type of factory, either pool or vault
|
FeatureToggle |
Feature toggle for the pair/pool contract |
withdrawals_enabled : bool - toggle for withdrawalsdeposits_enabled : bool - toggle for depositsswaps_enabled : bool - toggle for swaps
|
Fee |
Represents a fee |
share : Decimal - fee share
|
Flow |
Represents an incentive flow |
flow_id : u64 - A unique identifier of the flow.flow_label : Option<String> - An alternative flow label. flow_creator : Addr - The account which opened the flow and can manage it. flow_asset : Asset - The asset the flow was created to distribute. claimed_amount : Uint128 - The amount of the flow_asset that has been claimed so far. curve : Curve - The type of curve the flow has.start_epoch : u64 - The epoch at which the flow starts. end_epoch : u64 - The epoch at which the flow ends.emitted_tokens : HashMap<u64, Uint128> - Map containing emitted tokens.asset_history : BTreeMap<u64, (Uint128, u64)> - Map containing the amount of tokens it was expanded to at a given epoch. |
IncentivesContract |
Provides an incentive contract information |
incentive_address : Addr - The address of the incentive contractlp_reference : Vec<u8> - A byte-array reference to the LP address
|
PairInfo |
Defines information about a pair/pool |
asset_infos : [AssetInfo; 2] - asset infos within the poolcontract_addr : String - pool addressliquidity_token : String - LP token addressasset_decimals : [u8; 2] - decimals for the assets in the pool
|
PoolFee |
Fees used by the pool |
protocol_fee : Fee - protocol feesswap_fee : Fee - swap feesburn_fee : Fee - burn fees
|
UpdateConfigParams |
Parameters to update the vault configuration with |
flash_loan_enabled : Option<bool> - if users should be allowed to perform flash-loansdeposit_enabled : Option<bool> - if users should be able to deposit funds to the contractwithdraw_enabled : Option<bool> - if users should be able to withdraw funds from the contractnew_owner : Option<String> - the new owner of the contractnew_vault_fees : Option<VaultFee> - the new fees used for the vaultnew_fee_collector_addr : Option<String> - the new address of the fee collector
|
VaultFee |
Fees used by the vault |
protocol_fee : Fee - protocol feesflash_loan_fee : Fee - flash loan feesburn_fee : Fee - burn fees
|
VaultInfo |
Response for the vaults query |
vault : String - vault addressasset_info_reference : Vec<u8> - Asset info reference
|
Enums |
Description |
Alternatives |
AssetInfo |
Represents asset information |
Token { contract_addr: String } - used for cw20 tokensNativeToken { denom: String } - used for native or IBC tokens
|
CallbackMsg |
Callback messages for the vault |
AfterTrade { old_balance: Uint128, loan_balance: Uint128 } - used for making sure the flash loan is paid back after all operations were executed
|
CollectFeesFor |
Represents what to collect fees from |
Contracts { contracts: Vec<Contract> } - collects the fees accumulated by the given contractsFactory { factory_addr: String, factory_type: FactoryType } - collects the fees accumulated by the contracts the given factory created
|
FactoryType |
Represents the type of factory |
Vault { start_after: Option<Vec<u8>>, limit: Option<u32> } - vault factory option, supports paginationPool { start_after: Option<[AssetInfo; 2]>, limit: Option<u32> } - pool factory option, supports pagination
|
FlowIdentifier |
A flow identifier |
Id(u64) - flow idLabel(String) - flow label
|
QueryFeesFor |
Represents what to query fees from |
Contracts { contracts: Vec<Contract> } - specifies list of Contract s to query fees forFactory { factory_addr: String, factory_type: FactoryType } - defines a factory for which to query fees from its children
|
SwapOperation |
A swap operation, used by the pool router |
TerraSwap { offer_asset_info: AssetInfo, ask_asset_info: AssetInfo } - terraswap type of operation
|