diff --git a/atp-indexer/bootstrap.sh b/atp-indexer/bootstrap.sh index a2e26f3ec..5a49f957a 100755 --- a/atp-indexer/bootstrap.sh +++ b/atp-indexer/bootstrap.sh @@ -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 @@ -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 \ @@ -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 \ diff --git a/atp-indexer/terraform/app.tf b/atp-indexer/terraform/app.tf index e92ecbf0c..9966e6893 100644 --- a/atp-indexer/terraform/app.tf +++ b/atp-indexer/terraform/app.tf @@ -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 = [ @@ -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 }, ] } diff --git a/atp-indexer/terraform/variables.tf b/atp-indexer/terraform/variables.tf index 1a7b5fb8f..b176b13ca 100644 --- a/atp-indexer/terraform/variables.tf +++ b/atp-indexer/terraform/variables.tf @@ -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