fn _do_instantiate(
        mut deps: DepsMut,
        addr: &str,
        amount: Uint128,
        mint: Option<MinterResponse>,
    ) -> TokenInfoResponse {
        let instantiate_msg = InstantiateMsg {
            name: "Auto Gen".to_string(),
            symbol: "AUTO".to_string(),
            decimals: 3,
            initial_balances: vec![Cw20Coin {
                address: addr.to_string(),
                amount,
            }],
            mint: mint.clone(),
            marketing: None,
        };
        let info = mock_info("creator", &[]);
        let env = mock_env();
        let res = instantiate(deps.branch(), env, info, instantiate_msg).unwrap();
        assert_eq!(0, res.messages.len());

        let meta = query_token_info(deps.as_ref()).unwrap();
        assert_eq!(
            meta,
            TokenInfoResponse {
                name: "Auto Gen".to_string(),
                symbol: "AUTO".to_string(),
                decimals: 3,
                total_supply: amount,
            }
        );
        assert_eq!(get_balance(deps.as_ref(), addr), amount);
        assert_eq!(query_minter(deps.as_ref()).unwrap(), mint,);
        meta
    }
// this will set up the instantiation for other tests
this will set up the instantiation for other tests
this will set up the instantiation for other tests
fn _do_instantiate(
        mut deps: DepsMut,
        addr: &str,
        amount: Uint128,
        mint: Option<MinterResponse>,
    ) -> TokenInfoResponse {
        let instantiate_msg = InstantiateMsg {
            name: "Auto Gen".to_string(),
            symbol: "AUTO".to_string(),
            decimals: 3,
            initial_balances: vec![Cw20Coin {
                address: addr.to_string(),
                amount,
            }],
            mint: mint.clone(),
            marketing: None,
        };
        let info = mock_info("creator", &[]);
        let env = mock_env();
        let res = instantiate(deps.branch(), env, info, instantiate_msg).unwrap();
        assert_eq!(0, res.messages.len());
        let meta = query_token_info(deps.as_ref()).unwrap();
        assert_eq!(
            meta,
            TokenInfoResponse {
                name: "Auto Gen".to_string(),
                symbol: "AUTO".to_string(),
                decimals: 3,
                total_supply: amount,
            }
        );
        assert_eq!(get_balance(deps.as_ref(), addr), amount);
        assert_eq!(query_minter(deps.as_ref()).unwrap(), mint,);
        meta
    }
fn _do_instantiate ( mut deps : DepsMut , addr : & str , amount : Uint128 , mint : Option < MinterResponse > , ) -> TokenInfoResponse { let instantiate_msg = InstantiateMsg { name : " " . to_string ( ) , symbol : " " . to_string ( ) , decimals : 3 , initial_balances : vec ! [ Cw20Coin { address addr to_string ( ) amount } ] , mint : mint . clone ( ) , marketing : None , } ; let info = mock_info ( " " , & [ ] ) ; let env = mock_env ( ) ; let res = instantiate ( deps . branch ( ) , env , info , instantiate_msg ) . unwrap ( ) ; assert_eq ! ( 0 res messages len ( ) ) ; let meta = query_token_info ( deps . as_ref ( ) ) . unwrap ( ) ; assert_eq ! ( meta TokenInfoResponse { name " " to_string ( ) symbol " " to_string ( ) decimals 3 total_supply amount } ) ; assert_eq ! ( get_balance ( deps as_ref ( ) addr ) amount ) ; assert_eq ! ( query_minter ( deps as_ref ( ) ) unwrap ( ) mint ) ; meta }
this will set up the instantiation for other tests
this will set up the instantiation for other tests
deps
DepsMut
addr
&str
amount
Uint128
mint
Option<MinterResponse>
deps
DepsMut
addr
&str
amount
Uint128
mint
Option<MinterResponse>