getConfig function

PredictConfig getConfig(
  1. String network
)

The recorded Predict config for network ('testnet' / 'mainnet').

Throws for other networks rather than returning placeholder ids; for your own deployment pass a PredictConfig to PredictClient directly.

Implementation

PredictConfig getConfig(String network) {
  if (network == 'testnet') return TESTNET_CONFIG;
  if (network == 'mainnet') return MAINNET_CONFIG;
  throw ConfigurationError(
      "deepbook/predict: no Predict deployment recorded for network "
      "'$network'. Predict is recorded for testnet and mainnet; for your own "
      'deployment pass `config` to PredictClient.');
}