Skip to content

Commit

Permalink
fix: Fix for faucet and node deployment config (AztecProtocol#3722)
Browse files Browse the repository at this point in the history
This PR corrects the deployment config for the node and the faucet.
  • Loading branch information
PhilWindle authored Dec 18, 2023
1 parent 1484c11 commit a60b71a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
1 change: 1 addition & 0 deletions build-system/scripts/deploy_terraform
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export TF_VAR_DOCKERHUB_ACCOUNT=$DOCKERHUB_ACCOUNT
export TF_VAR_FORK_MNEMONIC=$FORK_MNEMONIC
export TF_VAR_INFURA_API_KEY=$INFURA_API_KEY
export TF_VAR_API_KEY=$FORK_API_KEY
export TF_VAR_CHAIN_ID=$CHAIN_ID

# If given a repository name, use it to construct and set/override the backend key.
# Otherwise use the key as specified in the terraform.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dest
node_modules
.cache
.env
.env*
*.log
*.swp
.tsbuildinfo
Expand Down
9 changes: 3 additions & 6 deletions yarn-project/aztec-faucet/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ data "terraform_remote_state" "aztec2_iac" {
}

locals {
api_prefix = var.API_PREFIX == "" ? "/${var.DEPLOY_TAG}/aztec-faucet" : "/${var.DEPLOY_TAG}/aztec-faucet/${var.API_PREFIX}"
api_prefix = "/${var.DEPLOY_TAG}/aztec-faucet/${var.API_KEY}"
rpc_url = "https://${var.DEPLOY_TAG}-mainnet-fork.aztec.network:8545/${var.API_KEY}"
}


Expand Down Expand Up @@ -110,11 +111,7 @@ resource "aws_ecs_task_definition" "aztec-faucet" {
},
{
"name": "RPC_URL",
"value": "${var.RPC_URL}"
},
{
"name": "API_KEY",
"value": "${var.API_KEY}"
"value": "${local.rpc_url}"
},
{
"name": "API_PREFIX",
Expand Down
11 changes: 0 additions & 11 deletions yarn-project/aztec-faucet/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,12 @@ variable "DEPLOY_TAG" {
type = string
}

variable "RPC_URL" {
type = string
default = "testnet"
}

variable "API_KEY" {
type = string
}

variable "API_PREFIX" {
type = string
default = ""
}

variable "CHAIN_ID" {
type = string
default = 31337
}

variable "FAUCET_PRIVATE_KEY" {
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/sequencer-client/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function getConfigEnvVars(): SequencerClientConfig {
REGISTRY_CONTRACT_ADDRESS,
INBOX_CONTRACT_ADDRESS,
CONTRACT_DEPLOYMENT_EMITTER_ADDRESS,
OUTBOX_CONTRACT_ADDRESS,
} = process.env;

const publisherPrivateKey: Hex = SEQ_PUBLISHER_PRIVATE_KEY
Expand All @@ -53,7 +54,7 @@ export function getConfigEnvVars(): SequencerClientConfig {
rollupAddress: ROLLUP_CONTRACT_ADDRESS ? EthAddress.fromString(ROLLUP_CONTRACT_ADDRESS) : EthAddress.ZERO,
registryAddress: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO,
inboxAddress: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO,
outboxAddress: EthAddress.ZERO,
outboxAddress: OUTBOX_CONTRACT_ADDRESS ? EthAddress.fromString(OUTBOX_CONTRACT_ADDRESS) : EthAddress.ZERO,
contractDeploymentEmitterAddress: CONTRACT_DEPLOYMENT_EMITTER_ADDRESS
? EthAddress.fromString(CONTRACT_DEPLOYMENT_EMITTER_ADDRESS)
: EthAddress.ZERO,
Expand Down

0 comments on commit a60b71a

Please sign in to comment.