AndromedaQuery

The set of query messages common to all ADOs in the Andromeda Logic Library.

AndromedaQuery

All of the ADOs can call the base query messages found in the AndromedaMsg.

pub enum AndromedaQuery {
    #[returns(self::ownership::ContractOwnerResponse)]
    Owner {},
    #[returns(self::ownership::ContractPotentialOwnerResponse)]
    OwnershipRequest {},
    #[returns(self::ado_type::TypeResponse)]
    Type {},
    #[returns(self::kernel_address::KernelAddressResponse)]
    KernelAddress {},
    #[returns(self::ownership::PublisherResponse)]
    OriginalPublisher {},
    #[returns(self::block_height::BlockHeightResponse)]
    BlockHeightUponCreation {},
    #[returns(self::version::VersionResponse)]
    Version {},
    #[returns(self::version::ADOBaseVersionResponse)]
    ADOBaseVersion {},
    #[returns(Option<::cosmwasm_std::Addr>)]
    AppContract {},
    #[returns(Vec<self::permissioning::PermissionInfo>)]
    Permissions {
        actor: AndrAddr,
        limit: Option<u32>,
        start_after: Option<String>,
    },
    #[returns(Vec<self::permissioning::PermissionedActionsResponse>)]
    PermissionedActions {},
    #[cfg(feature = "rates")]
    #[returns(Option<self::rates::Rate>)]
    GetRate { action: String },
}

Owner

Queries the owner of the contract.

ContractOwnerResponse

OwnershipRequest

Returns the owner that has a request to take ownership of the ADO.

An OwnershipRequest is present when UpdateOwner is called.

ContractPotentialOwnerResponse

A struct that returns the address that has the ownership offer for the ADO.

Name
Type
Description

potential_owner

Option<Addr>

The address that has been offered ownership of the ADO.

expiration

When the ownership request expires. Specified as a timestamp in milliseconds.

Type

Queries the ADO type.

TypeResponse

Name
Type
Description

ado_type

String

The type of the ado.

KernelAddress

Queries the kernel address of the chain the ADO is deployed on.

Returns a String containing the contract address of the Kernel.

BlockHeightUponCreation

Queries the block height when the ADO was created.

BlockHeightResponse

Name
Type
Description

block_height

u64

The block height at the time of creation of the ADO.

Version

Queries the version of the ADO.

VersionResponse

Name
Type
Descripton

version

String

The version of the ADO.

ADOBaseVersion

Queries the version of the andromeda-std..

ADOBaseVersionResponse

AppContract

Returns the address of the App ADO that instantiated the ADO.

AppContractResponse

The struct containing the address of the App ADO.

Name
Type
Description

app_contract

Addr

The address of the App that instantiated the ADO.

OriginalPublisher

Queries the orginal address that published/instantiated the ADO.

PublisherResponse

Name
Type
Description

original_publisher

String

The original address that instantiated/published the ADO.

Permisions

Queries the permissions set for the specified actor address.

Name
Type
Description

actor

The address we are checking permissions for.

limit

Option<u32>

Optional limit to the number of permissions returned. Defaults to 25 and can be set to a maximum of 50.

start_after

Option<String>

Optional permission to start after. Used for pagination.

PermissionInfo

Returns a vector of the PermissionInfo struct containing all the permissions for the actor.

Name
Type
Description

permission

The permission that the actor was given.

action

String

The action or message that the permission is for.

actor

String

The address that has these permissions.

PermissionedActions

Queries the actions or execute messages that are permissioned in the ADO.

Returns a Vector of String containing the actions that are permissioned.

Rate

Only available to the ADOs that implement rates.

Queries the rates applied for the specified action.

Returns a rate struct containing the configurations of the rate.

AllRates

Queries all the rates applied on an ADO.

Only available to the ADOs that implement rates.

Queries the rates applied for the specified action.

AllRatesResponse

Name
Type
Description

all_rates

Vec<(String, Rate)>

A vector containing the name of the action and its applied rates.

Last updated

Was this helpful?