Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0.rc-1] Query App Contract for Non-OS ADOs #332

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/std/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ pub fn andr_query(_metadata: TokenStream, input: TokenStream) -> TokenStream {
Type {},
#[returns(andromeda_std::ado_base::kernel_address::KernelAddressResponse)]
KernelAddress {},
#[returns(andromeda_std::ado_base::app_contract::AppContractResponse)]
AppContract {},
#[returns(andromeda_std::ado_base::ownership::PublisherResponse)]
OriginalPublisher {},
#[returns(andromeda_std::ado_base::block_height::BlockHeightResponse)]
Expand Down
7 changes: 7 additions & 0 deletions packages/std/src/ado_base/app_contract.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use cosmwasm_schema::cw_serde;
use cosmwasm_std::Addr;

#[cw_serde]
pub struct AppContractResponse {
pub app_contract: Addr,
}
3 changes: 2 additions & 1 deletion packages/std/src/ado_base/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod ado_type;
pub mod app_contract;
pub mod block_height;
#[cfg(any(feature = "module_hooks", feature = "modules"))]
pub mod hooks;
Expand Down Expand Up @@ -70,7 +71,7 @@ pub enum AndromedaQuery {
BlockHeightUponCreation {},
#[returns(self::version::VersionResponse)]
Version {},
#[returns(Option<::cosmwasm_std::Addr>)]
#[returns(self::app_contract::AppContractResponse)]
AppContract {},
#[cfg(feature = "modules")]
#[returns(Module)]
Expand Down
Loading