fn init_actors(app: &mut App, actors: Vec<ActorConfig>) -> Result<(Vec<Addr>, Vec<Cw20Coin>)> {
        let pairs = actors
            .into_iter()
            .map(|lp| -> Result<_> {
                app.execute(
                    Addr::unchecked(TEST_RESERVE),
                    BankMsg::Send {
                        to_address: lp.addr.to_string(),
                        amount: coins(lp.btc, DENOM),
                    }
                    .into(),
                )
                .unwrap();

                let cash = Cw20Coin {
                    address: lp.addr.to_string(),
                    amount: Uint128::new(lp.cash),
                };

                Ok((lp.addr, cash))
            })
            .collect::<Result<Vec<_>>>()?;

        Ok(pairs.into_iter().unzip())
    }
/// Initializes given actors with initial btc balance, returning back actors addresses and
/// configuration of initial cash balance to be set later while creating cash contract
Initializes given actors with initial btc balance, returning back actors addresses and
configuration of initial cash balance to be set later while creating cash contract
Initializes given actors with initial btc balance returning back actors addresses and configuration of initial cash balance to be set later while creating cash contract
fn init_actors(app: &mut App, actors: Vec<ActorConfig>) -> Result<(Vec<Addr>, Vec<Cw20Coin>)> {
        let pairs = actors
            .into_iter()
            .map(|lp| -> Result<_> {
                app.execute(
                    Addr::unchecked(TEST_RESERVE),
                    BankMsg::Send {
                        to_address: lp.addr.to_string(),
                        amount: coins(lp.btc, DENOM),
                    }
                    .into(),
                )
                .unwrap();
                let cash = Cw20Coin {
                    address: lp.addr.to_string(),
                    amount: Uint128::new(lp.cash),
                };
                Ok((lp.addr, cash))
            })
            .collect::<Result<Vec<_>>>()?;
        Ok(pairs.into_iter().unzip())
    }
fn init_actors ( app : & mut App , actors : Vec < ActorConfig > ) -> Result < ( Vec < Addr > , Vec < Cw20Coin > ) > { let pairs = actors . into_iter ( ) . map ( | lp | -> Result < _ > { app . execute ( Addr :: unchecked ( TEST_RESERVE ) , BankMsg :: Send { to_address : lp . addr . to_string ( ) , amount : coins ( lp . btc , DENOM ) , } . into ( ) , ) . unwrap ( ) ; let cash = Cw20Coin { address : lp . addr . to_string ( ) , amount : Uint128 :: new ( lp . cash ) , } ; Ok ( ( lp . addr , cash ) ) } ) . collect :: < Result < Vec < _ > > > ( ) ? ; Ok ( pairs . into_iter ( ) . unzip ( ) ) }
Initializes given actors with initial btc balance, returning back actors addresses and
configuration of initial cash balance to be set later while creating cash contract
Initializes given actors with initial btc balance returning back actors addresses and configuration of initial cash balance to be set later while creating cash contract
app
&mut App
actors
Vec<ActorConfig>
app
&mut App
actors
Vec<ActorConfig>