Skip to content

Commit a60b71a

Browse files
authored
fix: Fix for faucet and node deployment config (AztecProtocol#3722)
This PR corrects the deployment config for the node and the faucet.
1 parent 1484c11 commit a60b71a

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

build-system/scripts/deploy_terraform

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export TF_VAR_DOCKERHUB_ACCOUNT=$DOCKERHUB_ACCOUNT
2929
export TF_VAR_FORK_MNEMONIC=$FORK_MNEMONIC
3030
export TF_VAR_INFURA_API_KEY=$INFURA_API_KEY
3131
export TF_VAR_API_KEY=$FORK_API_KEY
32+
export TF_VAR_CHAIN_ID=$CHAIN_ID
3233

3334
# If given a repository name, use it to construct and set/override the backend key.
3435
# Otherwise use the key as specified in the terraform.

yarn-project/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dest
22
node_modules
33
.cache
4-
.env
4+
.env*
55
*.log
66
*.swp
77
.tsbuildinfo

yarn-project/aztec-faucet/terraform/main.tf

+3-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ data "terraform_remote_state" "aztec2_iac" {
3535
}
3636

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

4142

@@ -110,11 +111,7 @@ resource "aws_ecs_task_definition" "aztec-faucet" {
110111
},
111112
{
112113
"name": "RPC_URL",
113-
"value": "${var.RPC_URL}"
114-
},
115-
{
116-
"name": "API_KEY",
117-
"value": "${var.API_KEY}"
114+
"value": "${local.rpc_url}"
118115
},
119116
{
120117
"name": "API_PREFIX",

yarn-project/aztec-faucet/terraform/variables.tf

-11
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,12 @@ variable "DEPLOY_TAG" {
22
type = string
33
}
44

5-
variable "RPC_URL" {
6-
type = string
7-
default = "testnet"
8-
}
9-
105
variable "API_KEY" {
116
type = string
127
}
138

14-
variable "API_PREFIX" {
15-
type = string
16-
default = ""
17-
}
18-
199
variable "CHAIN_ID" {
2010
type = string
21-
default = 31337
2211
}
2312

2413
variable "FAUCET_PRIVATE_KEY" {

yarn-project/sequencer-client/src/config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export function getConfigEnvVars(): SequencerClientConfig {
4343
REGISTRY_CONTRACT_ADDRESS,
4444
INBOX_CONTRACT_ADDRESS,
4545
CONTRACT_DEPLOYMENT_EMITTER_ADDRESS,
46+
OUTBOX_CONTRACT_ADDRESS,
4647
} = process.env;
4748

4849
const publisherPrivateKey: Hex = SEQ_PUBLISHER_PRIVATE_KEY
@@ -53,7 +54,7 @@ export function getConfigEnvVars(): SequencerClientConfig {
5354
rollupAddress: ROLLUP_CONTRACT_ADDRESS ? EthAddress.fromString(ROLLUP_CONTRACT_ADDRESS) : EthAddress.ZERO,
5455
registryAddress: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO,
5556
inboxAddress: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO,
56-
outboxAddress: EthAddress.ZERO,
57+
outboxAddress: OUTBOX_CONTRACT_ADDRESS ? EthAddress.fromString(OUTBOX_CONTRACT_ADDRESS) : EthAddress.ZERO,
5758
contractDeploymentEmitterAddress: CONTRACT_DEPLOYMENT_EMITTER_ADDRESS
5859
? EthAddress.fromString(CONTRACT_DEPLOYMENT_EMITTER_ADDRESS)
5960
: EthAddress.ZERO,

0 commit comments

Comments
 (0)