Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nightfall3 bec optimizations #1448

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
119 changes: 119 additions & 0 deletions .env.deployment.amoy
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# ================================================================================
# [Shared Settings]

# Services to be started during the deployment
# Leaving it blank will default to 'deployer, worker'
# Options are: administrator, client, deployer, optimist, worker
export DEPLOYMENT_SERVICES=

# The network name defined for this deployment
# Information related to this network is present in config/default.js. See the README.md for additional details
# Required!
export ETH_NETWORK=amoy

# The Ethereum address to be used during the deployment
# Required!
export ETH_ADDRESS=

# The private key related to the Ethereum address set in ETH_ADDRESS
# Required!
export ETH_PRIVATE_KEY=

# The blockchain the services will connect to
# Required!
export BLOCKCHAIN_URL=

# Sets the default gas value and price
# Leaving it blank will fallback to the defined defaults
export GAS=
export GAS_PRICE=

# Text free variable indicating the environment name
export ENVIRONMENT=amoy

# Log level
export LOG_LEVEL=

# If the logging of HTTP payload is enabled
export LOG_HTTP_PAYLOAD_ENABLED=

# If the HTTP full data payload should be logged
export LOG_HTTP_FULL_DATA=

# Number of times the app will try to get the contracts info before giving up
export AUTOSTART_RETRIES=

# Used by the client & deployer services - defines the 'worker' host.
# Leave it blank to get the one started in the docker-compose
export CIRCOM_WORKER_HOST=

# Used by the client & optimist services
# Set to 'true' so that client will not wait for the blockchain to initialize
export USE_EXTERNAL_NODE=


# ================================================================================
# [Administrator]

# MongoDB database connection string
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export ADMIN_MONGO_URL=


# ================================================================================
# [Client]

# MongoDB database connection string
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export CLIENT_MONGO_URL=

# Optimist host the client will connect to
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export OPTIMIST_HOST=
export OPTIMIST_PORT=

# If the queue should be enabled
# Leaving it blank will make the apps connect to the RabbitMQ instance
export ENABLE_QUEUE=

# RabbitMQ host the client will connect to
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export RABBITMQ_HOST=
export RABBITMQ_PORT=


# ================================================================================
# [Deployer]

# The L2 Token ID that was defined in the settings ('config/default.js') to be used to pay the fees. See nightfall-deployer/README.md.
# Required!
FEE_L2_TOKEN_ID=

# When submitting a transaction, Nightfall verifies if the sender address is sanctioned on Chainalysis sanctions screening oracle
# If set to 'true', a mocked sanctions contract will be deployed, otherwise the Chainalysis sanctions oracle will be used instead.
# Required!
export DEPLOY_MOCKED_SANCTIONS_CONTRACT=true

# It is enabled by default. Set to 'disable' to disable the whitelisting process. See docs/whitelist.md
export WHITELISTING=disable

# The number of Approvers required to authorise `onlyOwner` transactions. See nightfall-administrator/README.md.
# Required!
export MULTISIG_SIGNATURE_THRESHOLD=1

# A comma separated Ethereum addresses list of the approvers
# Leave it blank if no approvers are needed
export MULTISIG_APPROVERS=

# If the Trusted Setup should always run during the deployment
export ALWAYS_DO_TRUSTED_SETUP=

# If for some reason the contracts deployment went well, but the cirtuits didn't finish well, set to 'true' to skip the contracts' deployment
export SKIP_DEPLOYMENT=

# If the deployment to run will upgrade contracts
export UPGRADE_CONTRACTS=

# When set to anything different of 'false', deploys the Smart Contract mocks, and funds some contracts and users (for Testing)
# Defaults to 'true' if left blank
export DEPLOY_MOCK_TOKENS=false
119 changes: 119 additions & 0 deletions .env.deployment.basesepolia
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# ================================================================================
# [Shared Settings]

# Services to be started during the deployment
# Leaving it blank will default to 'deployer, worker'
# Options are: administrator, client, deployer, optimist, worker
export DEPLOYMENT_SERVICES=

# The network name defined for this deployment
# Information related to this network is present in config/default.js. See the README.md for additional details
# Required!
export ETH_NETWORK=baseSepolia

# The Ethereum address to be used during the deployment
# Required!
export ETH_ADDRESS=

# The private key related to the Ethereum address set in ETH_ADDRESS
# Required!
export ETH_PRIVATE_KEY=

# The blockchain the services will connect to
# Required!
export BLOCKCHAIN_URL=

# Sets the default gas value and price
# Leaving it blank will fallback to the defined defaults
export GAS=
export GAS_PRICE=

# Text free variable indicating the environment name
export ENVIRONMENT=baseSepolia

# Log level
export LOG_LEVEL=

# If the logging of HTTP payload is enabled
export LOG_HTTP_PAYLOAD_ENABLED=

# If the HTTP full data payload should be logged
export LOG_HTTP_FULL_DATA=

# Number of times the app will try to get the contracts info before giving up
export AUTOSTART_RETRIES=

# Used by the client & deployer services - defines the 'worker' host.
# Leave it blank to get the one started in the docker-compose
export CIRCOM_WORKER_HOST=

# Used by the client & optimist services
# Set to 'true' so that client will not wait for the blockchain to initialize
export USE_EXTERNAL_NODE=


# ================================================================================
# [Administrator]

# MongoDB database connection string
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export ADMIN_MONGO_URL=


# ================================================================================
# [Client]

# MongoDB database connection string
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export CLIENT_MONGO_URL=

# Optimist host the client will connect to
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export OPTIMIST_HOST=
export OPTIMIST_PORT=

# If the queue should be enabled
# Leaving it blank will make the apps connect to the RabbitMQ instance
export ENABLE_QUEUE=

# RabbitMQ host the client will connect to
# Leaving it blank will make the app connect to the mongodb started by the docker-compose
export RABBITMQ_HOST=
export RABBITMQ_PORT=


# ================================================================================
# [Deployer]

# The L2 Token ID that was defined in the settings ('config/default.js') to be used to pay the fees. See nightfall-deployer/README.md.
# Required!
FEE_L2_TOKEN_ID=

# When submitting a transaction, Nightfall verifies if the sender address is sanctioned on Chainalysis sanctions screening oracle
# If set to 'true', a mocked sanctions contract will be deployed, otherwise the Chainalysis sanctions oracle will be used instead.
# Required!
export DEPLOY_MOCKED_SANCTIONS_CONTRACT=true

# It is enabled by default. Set to 'disable' to disable the whitelisting process. See docs/whitelist.md
export WHITELISTING=disable

# The number of Approvers required to authorise `onlyOwner` transactions. See nightfall-administrator/README.md.
# Required!
export MULTISIG_SIGNATURE_THRESHOLD=1

# A comma separated Ethereum addresses list of the approvers
# Leave it blank if no approvers are needed
export MULTISIG_APPROVERS=

# If the Trusted Setup should always run during the deployment
export ALWAYS_DO_TRUSTED_SETUP=

# If for some reason the contracts deployment went well, but the cirtuits didn't finish well, set to 'true' to skip the contracts' deployment
export SKIP_DEPLOYMENT=

# If the deployment to run will upgrade contracts
export UPGRADE_CONTRACTS=

# When set to anything different of 'false', deploys the Smart Contract mocks, and funds some contracts and users (for Testing)
# Defaults to 'true' if left blank
export DEPLOY_MOCK_TOKENS=false
3 changes: 0 additions & 3 deletions apps/gas-estimate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ function getRequest(url) {

exports.handler = async () => {
try {
console.log('ETH_GAS_STATION', process.env.ETH_GAS_STATION);
const result = await getRequest(
`https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=${process.env.ETH_GAS_STATION}`,
);
console.log('result', result);
return {
statusCode: 200,
body: JSON.stringify(result),
};
} catch (error) {
console.log('Error is️:', error);
return {
statusCode: 400,
body: error.message,
Expand Down
Loading
Loading