Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions atp-indexer/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ get_contract_addresses() {
STAKING_REGISTRY_ADDRESS="${STAKING_REGISTRY_ADDRESS:-}"
ROLLUP_ADDRESS="${ROLLUP_ADDRESS:-}"
START_BLOCK="${START_BLOCK:-0}"
MATP_FACTORY_START_BLOCK="${MATP_FACTORY_START_BLOCK:-0}"
LATP_FACTORY_START_BLOCK="${LATP_FACTORY_START_BLOCK:-0}"
return 0
fi

Expand Down Expand Up @@ -351,6 +353,8 @@ function deploy() {

# Ensure START_BLOCK is set for deployment
START_BLOCK="${START_BLOCK:-0}"
MATP_FACTORY_START_BLOCK="${MATP_FACTORY_START_BLOCK:-0}"
LATP_FACTORY_START_BLOCK="${LATP_FACTORY_START_BLOCK:-0}"

# Initialize Terraform with the S3 backend
(cd terraform && terraform init \
Expand All @@ -374,6 +378,8 @@ function deploy() {
-var=staking_registry_address=$STAKING_REGISTRY_ADDRESS \
-var=rollup_address=$ROLLUP_ADDRESS \
-var=start_block=$START_BLOCK \
-var=matp_factory_start_block=$MATP_FACTORY_START_BLOCK \
-var=latp_factory_start_block=$LATP_FACTORY_START_BLOCK \
-var=db_password_ssm_name=/atp-indexer/${infra_environment}${deployment_suffix}/db_password \
-var=db_instance_class=$DB_INSTANCE_CLASS \
-var=db_read_replica_count=$DB_READ_REPLICA_COUNT \
Expand Down
6 changes: 5 additions & 1 deletion atp-indexer/terraform/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ locals {
{ name = "NODE_ENV", value = "production" },
{ name = "TRUST_PROXY", value = var.trust_proxy },
{ name = "PONDER_TELEMETRY_DISABLED", value = "true" },
{ name = "MATP_FACTORY_START_BLOCK", value = var.matp_factory_start_block },
{ name = "LATP_FACTORY_START_BLOCK", value = var.latp_factory_start_block },
]

server_env_vars = [
Expand All @@ -296,7 +298,9 @@ locals {
{ name = "PONDER_LOG_LEVEL", value = "info" },
{ name = "PORT", value = tostring(var.container_port) },
{ name = "API_PORT", value = tostring(var.container_port) },
{ name = "TRUST_PROXY", value = var.trust_proxy }
{ name = "TRUST_PROXY", value = var.trust_proxy },
{ name = "MATP_FACTORY_START_BLOCK", value = var.matp_factory_start_block },
{ name = "LATP_FACTORY_START_BLOCK", value = var.latp_factory_start_block },
]
}

Expand Down
10 changes: 10 additions & 0 deletions atp-indexer/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ variable "start_block" {
type = string
}

variable "matp_factory_start_block" {
description = "MATP Factory start block"
type = string
}

variable "latp_factory_start_block" {
description = "LATP Factory start block"
type = string
}

variable "block_batch_size" {
description = "Number of blocks to process in each batch"
type = string
Expand Down
Loading