ui/ui/src/main/java/com/squareup/subzero/SubzeroConfig.java
public static PlutusConfig load() throws IOException {
    // load subzero.yaml
    EnvironmentsMap environmentsMap = loadEnvMap();

    // Get HSM's security world. Default to dev.
    EnvironmentsMap.Environments env;
    String securityWorld = new NCipher().getSecurityWorld();
    env = environmentsMap.environments.get(securityWorld);
    if (env == null) {
      env = EnvironmentsMap.Environments.development;
    }
    System.out.printf("Env: %s\n", env.name());

    // Load the right config file
    ClassLoader classLoader = PlutusCli.class.getClassLoader();
    URL resource = classLoader.getResource(format("subzero-%s.yaml", env.name()));
    return new Yaml().loadAs(resource.openStream(), PlutusConfig.class);
  }
/**
   * PlutusCli does not use ServiceContainer, so we implement our own config loading.
   */
PlutusCli does not use ServiceContainer, so we implement our own config loading.
PlutusCli does not use ServiceContainer so we implement our own config loading .
public static PlutusConfig load() throws IOException {
    EnvironmentsMap environmentsMap = loadEnvMap();
    EnvironmentsMap.Environments env;
    String securityWorld = new NCipher().getSecurityWorld();
    env = environmentsMap.environments.get(securityWorld);
    if (env == null) {
      env = EnvironmentsMap.Environments.development;
    }
    System.out.printf("Env: %s\n", env.name());
    ClassLoader classLoader = PlutusCli.class.getClassLoader();
    URL resource = classLoader.getResource(format("subzero-%s.yaml", env.name()));
    return new Yaml().loadAs(resource.openStream(), PlutusConfig.class);
  }
public static PlutusConfig load ( ) throws IOException { EnvironmentsMap environmentsMap = loadEnvMap ( ) ; EnvironmentsMap . Environments env ; String securityWorld = new NCipher ( ) . getSecurityWorld ( ) ; env = environmentsMap . environments . get ( securityWorld ) ; if ( env == null ) { env = EnvironmentsMap . Environments . development ; } System . out . printf ( "Env: %s\n" , env . name ( ) ) ; ClassLoader classLoader = PlutusCli . class . getClassLoader ( ) ; URL resource = classLoader . getResource ( format ( "subzero-%s.yaml" , env . name ( ) ) ) ; return new Yaml ( ) . loadAs ( resource . openStream ( ) , PlutusConfig . class ) ; }
PlutusCli does not use ServiceContainer, so we implement our own config loading.
PlutusCli does not use ServiceContainer so we implement our own config loading .
// load subzero.yaml // Get HSM's security world. Default to dev. // Load the right config file