pub fn register_contracts(
    deps: DepsMut,
    glow_token: String,
    ve_token: String,
    terraswap_factory: String,
) -> Result<Response, ContractError> {
    let mut config = CONFIG.load(deps.storage)?;
    if config.glow_token != Addr::unchecked("") {
        return Err(ContractError::Unauthorized {});
    }

    config.glow_token = deps.api.addr_validate(&glow_token)?;
    config.ve_token = deps.api.addr_validate(&ve_token)?;
    config.terraswap_factory = deps.api.addr_validate(&terraswap_factory)?;

    CONFIG.save(deps.storage, &config)?;

    Ok(Response::default())
}
/// Register the addresses of the glow_token, ve_token, and terraswap_factory contracts
Register the addresses of the glow_token, ve_token, and terraswap_factory contracts
Register the addresses of the glow_token ve_token and terraswap_factory contracts
pub fn register_contracts(
    deps: DepsMut,
    glow_token: String,
    ve_token: String,
    terraswap_factory: String,
) -> Result<Response, ContractError> {
    let mut config = CONFIG.load(deps.storage)?;
    if config.glow_token != Addr::unchecked("") {
        return Err(ContractError::Unauthorized {});
    }
    config.glow_token = deps.api.addr_validate(&glow_token)?;
    config.ve_token = deps.api.addr_validate(&ve_token)?;
    config.terraswap_factory = deps.api.addr_validate(&terraswap_factory)?;
    CONFIG.save(deps.storage, &config)?;
    Ok(Response::default())
}
pub fn register_contracts ( deps : DepsMut , glow_token : String , ve_token : String , terraswap_factory : String , ) -> Result < Response , ContractError > { let mut config = CONFIG . load ( deps . storage ) ? ; if config . glow_token != Addr :: unchecked ( " " ) { return Err ( ContractError :: Unauthorized { } ) ; } config . glow_token = deps . api . addr_validate ( & glow_token ) ? ; config . ve_token = deps . api . addr_validate ( & ve_token ) ? ; config . terraswap_factory = deps . api . addr_validate ( & terraswap_factory ) ? ; CONFIG . save ( deps . storage , & config ) ? ; Ok ( Response :: default ( ) ) }
Register the addresses of the glow_token, ve_token, and terraswap_factory contracts
Register the addresses of the glow_token ve_token and terraswap_factory contracts
deps
DepsMut
glow_token
String
ve_token
String
terraswap_factory
String