Common Types & Utils
This is a collection of common data types and queriers which are commonly used in Astroport contracts

The Astroport codebase reuses several data types, queries, and functions across the whole codebase. This section provides a general overview of these common utils. Each Astroport contract may have its own specific types and utils which are detailed on each specific contract docs page.

Common Utils
Holds utils used to validate token symbols and names. It also defines how an instantiation struct for a token looks like and what data it holds
Holds query functions used to retrieve data about token balances, token supply, the Astroport factory configuration, fee setups for pair types and pair type configurations. It also holds logic that allows someone to simulate or reverse simulate pair swaps
Mock Querier
Has several utils used to transform data and retrieve it. It is mostly used internally. The docs will not go in-depth into this file but you can check it out here to get a general idea of the functionality
Defines unsigned integer functionality used to check for over and underflows when performing addition and multiplication
Defines the struct used when a contract owner proposes a change of ownership as well as the logic to propose and transfer contract ownership
Defines data structures meant to hold information about an asset and an asset amount as well as logic used to transfer native Terra assets. It also defines logic to display asset information as well as query a pair. Finally, it defines a struct used to hold data about a specific pair (LP token address, tokens in the pool etc)
Export as PDF
Copy link
On this page
1. Overview
2. File Descriptions