pub fn init_whitelist(
        members: impl Iterator<Item = Addr>,
        app: &mut App,
        owner: &Addr,
        tg4_id: u64,
    ) -> Result<Tg4Contract> {
        let members = members
            .map(|addr| Member {
                addr: addr.to_string(),
                points: 10,
            })
            .collect();

        app.instantiate_contract(
            tg4_id,
            owner.clone(),
            &tg4_group::msg::InstantiateMsg {
                admin: Some(owner.to_string()),
                members,
            },
            &[],
            "Whitelist",
            None,
        )
        .map(Tg4Contract)
        .map_err(|err| anyhow!(err))
    }
/// Initializes whitelist contract basing on initial members
Initializes whitelist contract basing on initial members
Initializes whitelist contract basing on initial members
pub fn init_whitelist(
        members: impl Iterator<Item = Addr>,
        app: &mut App,
        owner: &Addr,
        tg4_id: u64,
    ) -> Result<Tg4Contract> {
        let members = members
            .map(|addr| Member {
                addr: addr.to_string(),
                points: 10,
            })
            .collect();
        app.instantiate_contract(
            tg4_id,
            owner.clone(),
            &tg4_group::msg::InstantiateMsg {
                admin: Some(owner.to_string()),
                members,
            },
            &[],
            "Whitelist",
            None,
        )
        .map(Tg4Contract)
        .map_err(|err| anyhow!(err))
    }
pub fn init_whitelist ( members : impl Iterator < Item = Addr > , app : & mut App , owner : & Addr , tg4_id : u64 , ) -> Result < Tg4Contract > { let members = members . map ( | addr | Member { addr : addr . to_string ( ) , points : 10 , } ) . collect ( ) ; app . instantiate_contract ( tg4_id , owner . clone ( ) , & tg4_group :: msg :: InstantiateMsg { admin : Some ( owner . to_string ( ) ) , members , } , & [ ] , " " , None , ) . map ( Tg4Contract ) . map_err ( | err | anyhow ! ( err ) ) }
Initializes whitelist contract basing on initial members
Initializes whitelist contract basing on initial members
members
impl Iterator<Item = Addr>
app
&mut App
owner
&Addr
tg4_id
u64
members
impl Iterator<Item = Addr>
app
&mut App
owner
&Addr
tg4_id
u64