1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use abstract_os::cw_staking::{ExecuteMsg, InstantiateMsg, QueryMsg, CW_STAKING};
use boot_core::prelude::boot_contract;
use boot_core::{BootEnvironment, Contract, IndexResponse, TxResponse};
use cosmwasm_std::{Addr, Empty};
#[boot_contract(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)]
pub struct CwStakingApi<Chain>;
impl<Chain: BootEnvironment> CwStakingApi<Chain>
where
TxResponse<Chain>: IndexResponse,
{
pub fn new(id: &str, chain: Chain) -> Self {
Self(Contract::new(id, chain).with_wasm_path("cw_staking"))
}
pub fn load(chain: Chain, addr: &Addr) -> Self {
Self(Contract::new(CW_STAKING, chain).with_address(Some(addr)))
}
}