Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Rename adapter and app api objects to Apps and Adapters (#372)
Browse files Browse the repository at this point in the history
* First interface macro implementation

* formatting

* formatting

* Added app_messages macro

* Modified imports

* formatting

* Added interface definition

* Modified app-name

* add sudo endpoint to contract_wrapper

* rename App sdk api object to Apps

* rename Adapter sdk api object to Adapters

---------

Co-authored-by: Kayanski <kowalski.kowalskin@gmail.com>
  • Loading branch information
CyberHoward and Kayanski committed Jun 14, 2023
1 parent 1d9e1c5 commit 57ef926
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/abstract-sdk/src/apis/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pub trait AdapterInterface: ModuleInterface {
let adapter: Adapter<MockModule> = module.adapters(deps.as_ref());
```
*/
fn adapters<'a>(&'a self, deps: Deps<'a>) -> Adapter<Self> {
Adapter { base: self, deps }
fn adapters<'a>(&'a self, deps: Deps<'a>) -> Adapters<Self> {
Adapters { base: self, deps }
}
}

Expand All @@ -43,12 +43,12 @@ impl<T> AdapterInterface for T where T: ModuleInterface {}
```
*/
#[derive(Clone)]
pub struct Adapter<'a, T: AdapterInterface> {
pub struct Adapters<'a, T: AdapterInterface> {
base: &'a T,
deps: Deps<'a>,
}

impl<'a, T: AdapterInterface> Adapter<'a, T> {
impl<'a, T: AdapterInterface> Adapters<'a, T> {
/// Interactions with Abstract Adapters
/// Construct an adapter request message.
pub fn request<M: Serialize + Into<abstract_core::adapter::ExecuteMsg<M, Empty>>>(
Expand Down
8 changes: 4 additions & 4 deletions packages/abstract-sdk/src/apis/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub trait AppInterface: ModuleInterface {
let app: App<MockModule> = module.apps(deps.as_ref());
```
*/
fn apps<'a>(&'a self, deps: Deps<'a>) -> App<Self> {
App { base: self, deps }
fn apps<'a>(&'a self, deps: Deps<'a>) -> Apps<Self> {
Apps { base: self, deps }
}
}

Expand All @@ -44,12 +44,12 @@ impl<T> AppInterface for T where T: ModuleInterface {}
```
*/
#[derive(Clone)]
pub struct App<'a, T: AppInterface> {
pub struct Apps<'a, T: AppInterface> {
base: &'a T,
deps: Deps<'a>,
}

impl<'a, T: AppInterface> App<'a, T> {
impl<'a, T: AppInterface> Apps<'a, T> {
/// Construct an app request message.
pub fn request<M: Serialize>(
&self,
Expand Down

0 comments on commit 57ef926

Please sign in to comment.