global:
  env: optimism-goerli
# enable Blockscout deploy
blockscout:
  app: blockscout
  enabled: true
  image:
    _default: &image blockscout/blockscout-optimism-l2-advanced:5.1.0-prerelease-7a8c745e
  replicas:
    app: 1
  # init container
  init:
    enabled: true
    image:
      _default: *image
  # enable ingress
  ingress:
    enabled: true
    annotations:
      - 'nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.blockscout-main.test.aws-k8s.blockscout.com, https://*.test.aws-k8s.blockscout.com, http://localhost:3000"'
      - 'nginx.ingress.kubernetes.io/cors-allow-credentials: "true"'
      - 'nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS, DELETE, PATCH'
      - 'nginx.ingress.kubernetes.io/enable-cors: "true"'
      - 'nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,x-csrf-token"'
      # - 'nginx.ingress.kubernetes.io/rewrite-target: /$2'
    host:
      _default: blockscout-optimism-goerli.test.aws-k8s.blockscout.com
    # enable https
    #
    tls:
      enabled: true
    path:
      prefix:
        # - "/poa/sokol(/|$)(.*)"
        - "/"
  # probes
  livenessProbe:
    enabled: true
    path: /
    params:
      initialDelaySeconds: 100
      periodSeconds: 100
  readinessProbe:
    enabled: true
    path: /
    params:
      initialDelaySeconds: 60
      periodSeconds: 10
      timeoutSeconds: 60
  resources:
    limits:
      memory:
        _default: "1Gi"
      cpu:
        _default: "1"
    requests:
      memory:
        _default: "1Gi"
      cpu:
        _default: "1"
  # Blockscout environment variables
  environment:
    ENV:
      _default: test
    RESOURCE_MODE:
      _default: account
    PUBLIC:
      _default: 'false'
    PORT:
      _default: 4000
    PORT_PG:
      _default: 5432
    PORT_NETWORK_HTTP:
      _default: 8545
    PORT_NETWORK_WS:
      _default: 8546
    ETHEREUM_JSONRPC_VARIANT:
      _default: geth
    COIN:
      _default: ETH
    COIN_NAME:
      _default: ETH
    MIX_ENV:
      _default: prod
    ECTO_USE_SSL:
      _default: 'false'
    ENABLE_RUST_VERIFICATION_SERVICE:
      _default: 'true'
    RUST_VERIFICATION_SERVICE_URL:
      _default: http://sc-verifier-svc:8043
    ACCOUNT_ENABLED:
      _default: 'true'
    DISABLE_EXCHANGE_RATES:
      _default: 'true'
    BLOCKSCOUT_HOST:
      _default: 'blockscout-optimism-goerli.test.aws-k8s.blockscout.com'
    SOCKET_ROOT:
      _default: "/"
    NETWORK_PATH:
      _default: "/"
    API_PATH:
      _default: "/"
    API_BASE_PATH:
      _default: "/"
    APPS_MENU:
      _default: 'true'
    EXTERNAL_APPS:
      _default: '[{"title": "Marketplace", "url": "/apps"}]'
    JSON_RPC:
      _default: https://goerli.optimism.io
    API_V2_ENABLED:
      _default: 'true'
    FIRST_BLOCK:
      _default: '4066066'
    TRACE_FIRST_BLOCK:
      _default: '4066066'
    LAST_BLOCK:
      _default: '4076066'
    TRACE_LAST_BLOCK:
      _default: '4076066'
    DISABLE_REALTIME_INDEXER:
      _default: 'true'
    INDEXER_OPTIMISM_PORTAL_L1:
      _default: 0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383
    INDEXER_OPTIMISM_WITHDRAWALS_START_BLOCK_L1:
      _default: '8299683'
    INDEXER_OPTIMISM_WITHDRAWALS_START_BLOCK_L2:
      _default: '4066066'
    INDEXER_OPTIMISM_MESSAGE_PASSER_L2:
      _default: 0x4200000000000000000000000000000000000016
    INDEXER_OPTIMISM_OUTPUT_ROOTS_START_BLOCK_L1:
      _default: '8299683'
    INDEXER_OPTIMISM_OUTPUT_ORACLE_L1:
      _default: 0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0
    INDEXER_OPTIMISM_BATCH_START_BLOCK_L1:
      _default: '8381594'
    INDEXER_OPTIMISM_BATCH_INBOX:
      _default: 0xff00000000000000000000000000000000000420
    INDEXER_OPTIMISM_BATCH_SUBMITTER:
      _default: 0x7431310e026b69bfc676c0013e12a1a11411eec9

postgres:
  enabled: true
  image: postgres:13.8
  port: 5432

  command: '["docker-entrypoint.sh", "-c"]'
  args: '["max_connections=300"]'

  files:
    enabled: true
    mountPath: /docker-entrypoint-initdb.d
    list:
      init.sql: |
        CREATE DATABASE stats;
        GRANT ALL PRIVILEGES ON DATABASE stats TO postgres;

  resources:
    limits:
      memory:
        _default: "1Gi"
      cpu:
        _default: "1"
    requests:
      memory:
        _default: "1Gi"
      cpu:
        _default: "1"

  environment:
    POSTGRES_USER:
      _default: 'postgres'
    POSTGRES_HOST_AUTH_METHOD:
      _default: 'trust'
# enable Smart-contract-verifier deploy
scVerifier:
  enabled: true
  image:
    _default: ghcr.io/blockscout/smart-contract-verifier:main
  # enable ingress
  ingress:
    enabled: true
    host:
      _default: verifier-optimism-goerli.test.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true
  resources:
    limits:
      memory:
        _default: "0.5Gi"
      cpu:
        _default: "0.25"
    requests:
      memory:
        _default: "0.5Gi"
      cpu:
        _default: "0.25"
  environment:
    SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR:
      _default: 0.0.0.0:8050
    SMART_CONTRACT_VERIFIER__SERVER__GRPC__ADDR:
      _default: 0.0.0.0:8051
    # SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED:
    #   _default: 'true'
    SMART_CONTRACT_VERIFIER__SOLIDITY__COMPILERS_DIR:
      _default: /tmp/solidity-compilers
    SMART_CONTRACT_VERIFIER__SOLIDITY__REFRESH_VERSIONS_SCHEDULE:
      _default: 0 0 * * * * *
    # It depends on the OS you are running the service on
    # SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL:
    #   _default: https://solc-bin.ethereum.org/linux-amd64/list.json
    #SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL=https://solc-bin.ethereum.org/macosx-amd64/list.json
    #SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL=https://solc-bin.ethereum.org/windows-amd64/list.json
    SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__S3__REGION:
      _default: ""
    SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__S3__ENDPOINT:
      _default: https://storage.googleapis.com
    SMART_CONTRACT_VERIFIER__SOURCIFY__ENABLED:
      _default: 'true'
    SMART_CONTRACT_VERIFIER__SOURCIFY__API_URL:
      _default: https://sourcify.dev/server/
    SMART_CONTRACT_VERIFIER__SOURCIFY__VERIFICATION_ATTEMPTS:
      _default: 3
    SMART_CONTRACT_VERIFIER__SOURCIFY__REQUEST_TIMEOUT:
      _default: 10
    SMART_CONTRACT_VERIFIER__METRICS__ENABLED:
      _default: 'true'
    SMART_CONTRACT_VERIFIER__METRICS__ADDR:
      _default: 0.0.0.0:6060
    SMART_CONTRACT_VERIFIER__METRICS__ROUTE:
      _default: /metrics
    SMART_CONTRACT_VERIFIER__JAEGER__ENABLED:
      _default: 'false'

# enable stats deploy
stats:
  enabled: true
  image:
    _default: ghcr.io/blockscout/stats:main

  # enable ingress
  ingress:
    enabled: true
    annotations:
      - 'nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.blockscout-main.test.aws-k8s.blockscout.com, https://*.test.aws-k8s.blockscout.com, https://*.blockscout.com, http://localhost:3000"'
      - 'nginx.ingress.kubernetes.io/cors-allow-credentials: "true"'
      - 'nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS, DELETE, PATCH'
      - 'nginx.ingress.kubernetes.io/enable-cors: "true"'
    host:
      _default: stats-optimism-goerli.test.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true

  resources:
    limits:
      memory:
        _default: "0.5Gi"
      cpu:
        _default: "0.25"
    requests:
      memory:
        _default: "0.5Gi"
      cpu:
        _default: "0.25"

  environment:
    RUST_LOG:
      _default: info
    STATS__RUN_MIGRATIONS:
      _default: true
    STATS__TRACING__FORMAT:
      _default: json
    STATS__METRICS__ENABLED:
      _default: true

frontend:
  app: blockscout
  enabled: true
  image:
    _default: ghcr.io/blockscout/frontend:main
  ingress:
    enabled: true
    # annotations:
    #   - 'nginx.ingress.kubernetes.io/use-regex: "true"'
    host:
      _default: blockscout-optimism-goerli.test.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true
    path:
      exact:
        # - "/(apps|auth/profile|account)"
        - "/"
      prefix:
        # - "/(apps|auth/profile|account)"
        - "/_next"
        - "/node-api"
        - "/account"
        - "/apps"
        - "/static"
        - "/auth/profile"
        - "/txs"
        - "/tx"
        - "/blocks"
        - "/block"
        - "/login"
        - "/address"
        - "/stats"
        - "/search-results"
        - "/token"
        - "/tokens"
        - "/accounts"
        - "/visualize"
        - "/api-docs"
        - "/csv-export"
        - "/verified-contracts"
        - "/graphiql"

  resources:
    limits:
      memory:
        _default: "0.3Gi"
      cpu:
        _default: "0.2"
    requests:
      memory:
        _default: "0.3Gi"
      cpu:
        _default: "0.2"
  environment:
    NEXT_PUBLIC_BLOCKSCOUT_VERSION:
      _default: v5.1.0-beta
    NEXT_PUBLIC_FOOTER_GITHUB_LINK:
      _default: https://github.com/blockscout/blockscout
    NEXT_PUBLIC_FOOTER_TWITTER_LINK:
      _default: https://www.twitter.com/blockscoutcom
    NEXT_PUBLIC_APP_ENV:
      _default: stable
    NEXT_PUBLIC_APP_INSTANCE:
      _default: base_goerli
    NEXT_PUBLIC_NETWORK_NAME:
      _default: "Base Göerli"
    NEXT_PUBLIC_NETWORK_SHORT_NAME:
      _default: Base
    NEXT_PUBLIC_NETWORK_ASSETS_PATHNAME:
      _default: optimism
    NEXT_PUBLIC_NETWORK_TYPE:
      _default: base_goerli
    NEXT_PUBLIC_NETWORK_ID:
      _default: 420
    NEXT_PUBLIC_NETWORK_CURRENCY_NAME:
      _default: Ether
    NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL:
      _default: ETH
    NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS:
      _default: 18
    NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE:
      _default: validation
    NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED:
      _default: 'true'
    NEXT_PUBLIC_FEATURED_NETWORKS:
      _default: "[{'title':'Göerli','url':'https://eth-goerli.blockscout.com/','group':'testnets','type':'goerli'},{'title':'Base Göerli','url':'https://l2-goerli.blockscout.com/','group':'testnets','type':'base_goerli'}]"
    NEXT_PUBLIC_API_HOST:
      _default: blockscout-optimism-goerli.test.aws-k8s.blockscout.com
    NEXT_PUBLIC_APP_HOST:
      _default: blockscout-optimism-goerli.test.aws-k8s.blockscout.com
    NEXT_PUBLIC_API_BASE_PATH:
      _default: /
    NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM:
      _default: https://airtable.com/shrqUAcjgGJ4jU88C
    NEXT_PUBLIC_MARKETPLACE_APP_LIST:
      _default: "[{'author':'Uniswap','id':'uniswap','title':'Uniswap','logo':'https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FT8RR0UqqvH6wAVfaaM4f%252FUniswap.png%3Falt%3Dmedia%26token%3D797851a0-2d80-4f7b-8d80-f9ba664c0b3d','categories':['tools'],'shortDescription':'Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.','site':'https://docs.uniswap.org/','description':'Uniswap is a cryptocurrency exchange which uses a decentralized network protocol.','url':'https://app.uniswap.org/swap'}, {'author':'Aave','id': 'aave','title': 'Aave','logo': 'https://www.gitbook.com/cdn-cgi/image/width=288,dpr=2.200000047683716,format=auto/https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lq1XoWGmy8zggj_u2fM%252Fuploads%252FaNQY8jHNue30P2caV79v%252FAave.png%3Falt%3Dmedia%26token%3Dda9ea09b-a5d8-4bf1-bdfe-41837eebdd03','categories':['tools'],'shortDescription':'Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.','site': 'https://docs.aave.com/faq/','description': 'Aave is a decentralised non-custodial liquidity market protocol where users can participate as suppliers or borrowers. Suppliers provide liquidity to the market to earn a passive income, while borrowers are able to borrow in an overcollateralised (perpetually) or undercollateralised (one-block liquidity) fashion.','url': 'https://staging.aave.com/'}, {'author': 'Blockscout','id':'token-approval-tracker','title':'Token Approval Tracker','logo':'https://approval-tracker.apps.blockscout.com/icon-192.png','categories':['security','tools'],'shortDescription':'Token Approval Tracker shows all approvals for any ERC20-compliant tokens and NFTs and lets to revoke them or adjust the approved amount.','site':'https://docs.blockscout.com/for-users/blockscout-apps/token-approval-tracker','description':'Token Approval Tracker shows all approvals for any ERC20-compliant tokens and NFTs and lets to revoke them or adjust the approved amount.','url':'https://approval-tracker.apps.blockscout.com/'}]"
    NEXT_PUBLIC_LOGOUT_URL:
      _default: https://blockscoutcom.us.auth0.com/v2/logout
    NEXT_PUBLIC_LOGOUT_RETURN_URL:
      _default: http://blockscout-optimism-goerli.test.aws-k8s.blockscout.com/auth/logout
    NEXT_PUBLIC_STATS_API_HOST:
      _default: https://stats-optimism-goerli.test.aws-k8s.blockscout.com
    NEXT_PUBLIC_API_SPEC_URL:
      _default: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
    NEXT_PUBLIC_NETWORK_EXPLORERS:
      _default: ''
    NEXT_PUBLIC_HOMEPAGE_PLATE_GRADIENT:
      _default: "linear-gradient(136.9deg,rgb(107 94 236) 1.5%,rgb(0 82 255) 56.84%,rgb(82 62 231) 98.54%)"
    NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS:
      _default: ''
    NEXT_PUBLIC_NETWORK_RPC_URL:
      _default: https://goerli.optimism.io
    NEXT_PUBLIC_HOMEPAGE_CHARTS:
      _default: "['daily_txs']"
    NEXT_PUBLIC_IS_TESTNET:
      _default: "true"
    NEXT_PUBLIC_VISUALIZE_API_HOST:
      _default: https://visualizer-optimism-goerli.test.aws-k8s.blockscout.com
    NEXT_PUBLIC_IS_L2_NETWORK:
      _default: "true"
    NEXT_PUBLIC_L1_BASE_URL:
      _default: https://blockscout-main.test.aws-k8s.blockscout.com
    NEXT_PUBLIC_L2_WITHDRAWAL_URL:
      _default: https://app.optimism.io/bridge/withdraw
    NEXT_PUBLIC_GRAPHIQL_TRANSACTION: 
      _default: 0x4a0ed8ddf751a7cb5297f827699117b0f6d21a0b2907594d300dc9fed75c7e62
# enable blockscout-allowance
allowance:
  enabled: false

  image:
    _default: ghcr.io/blockscout/blockscout-allowance:main

  replicas:
    app: 1
  docker:
    port: 80
    targetPort: 3000

  service:
    # ClusterIP, NodePort or LoadBalancer
    type: ClusterIP

  ingress:
    enabled: true
    annotations: {}
    host:
      _default: blockscout-allowance.apps.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true
      createSecret: false
    path:
      prefix:
        - "/"
      exact: {}

  resources:
    limits:
      memory:
        _default: "0.3Gi"
      cpu:
        _default: "0.2"
    requests:
      memory:
        _default: "0.3Gi"
      cpu:
        _default: "0.2"

  # node label
  nodeSelector:
    enabled: true
    labels:
      _default:
        app: blockscout

  environment: {}

# enable visualizer deploy
visualizer:
  enabled: true
  image:
    _default: ghcr.io/blockscout/visualizer:latest

  replicas:
    app: 1
  docker:
    port: 80
    targetPort: 8050
    # metricsPort: 6060

  service:
    # ClusterIP, NodePort or LoadBalancer
    type: ClusterIP

  # enable ingress
  ingress:
    enabled: true
    host:
      _default: visualizer-optimism-goerli.test.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true
      createSecret: false

  resources:
    limits:
      memory:
        _default: "0.05Gi"
      cpu:
        _default: "0.05"
    requests:
      memory:
        _default: "0.05Gi"
      cpu:
        _default: "0.05"

  # node label
  nodeSelector:
    enabled: true
    labels:
      _default:
        app: blockscout

  # probes
  livenessProbe:
    enabled: true
    path: /health
  readinessProbe:
    enabled: true
    path: /health

  # enable Horizontal Pod Autoscaler
  hpa:
    enabled: false
    minReplicas: 1
    maxReplicas: 10
    cpuTarget: 90

  environment:
    VISUALIZER__SERVER__HTTP__ENABLED:
      _default: 'true'
    VISUALIZER__SERVER__HTTP__ADDR:
      _default: 0.0.0.0:8050
    VISUALIZER__SERVER__GRPC__ENABLED:
      _default: 'false'
