Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Oct 30, 2024
1 parent c6423d2 commit f42adf6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ MIN_APPROVALS="1" # How many multisig approvals are required
MULTISIG_PROPOSAL_EXPIRATION_PERIOD="864000" # How long until a pending proposal expires (10 days)

# GAUGE VOTER PARAMETERS
# The token to be used for the escrow
# The main token for the escrow and the escrow details
TOKEN1_ADDRESS="0x0000000000000000000000000000000000000000"
VE_TOKEN1_NAME="Voting Escrow Token 1"
VE_TOKEN1_SYMBOL="veTK1"

# Additional tokens these will have secondary escrow contracts
TOKEN2_ADDRESS="0x0000000000000000000000000000000000000000" # Ignored if 0x0
# Additional tokens (optional)
# Each token gets its own escrow
TOKEN2_ADDRESS="0x0000000000000000000000000000000000000000" # Ignored when zero
VE_TOKEN2_NAME="Voting Escrow Token 2"
VE_TOKEN2_SYMBOL="veTK2"

Expand All @@ -42,7 +43,7 @@ WARMUP_PERIOD="259200" # 3 days
COOLDOWN_PERIOD="259200" # 3 days

# Min seconds a user must have locked in escrow before they can queue an exit
MIN_LOCK_DURATION="3600" # 1 hour
MIN_LOCK_DURATION="259200" # 3 days

# Prevent voting until manually activated by the multisig
VOTING_PAUSED=true
Expand Down
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
-include .env
-include .env.test

# RULE SPECIFIC ENV VARS
# RULE SPECIFIC ENV VARS [optional]

# Override the verifier and block explorer parameters (network dependent)
deploy-testnet: export VERIFIER_TYPE_PARAM = --verifier blockscout
deploy-testnet: export VERIFIER_URL_PARAM = --verifier-url "https://sepolia.explorer.mode.network/api\?"
deploy-prodnet: export ETHERSCAN_API_KEY_PARAM = --etherscan-api-key $(ETHERSCAN_API_KEY)
# deploy-testnet: export VERIFIER_TYPE_PARAM = --verifier blockscout
# deploy-testnet: export VERIFIER_URL_PARAM = --verifier-url "https://sepolia.explorer.mode.network/api\?"

# CONSTANTS

Expand Down Expand Up @@ -51,7 +51,8 @@ clean: ## Clean the artifacts

: ##

test-unit: ## Run unit tests, locally
.PHONY: test
test: ## Run unit tests, locally
forge test --no-match-path $(FORK_TEST_WILDCARD)

test-coverage: report/index.html ## Generate an HTML coverage report under ./report
Expand Down Expand Up @@ -94,6 +95,7 @@ test-fork-factory-prodnet: export FORK_TEST_MODE = existing-factory
test-fork-factory-testnet: test-fork-testnet ## Fork test using an existing factory (testnet)
test-fork-factory-prodnet: test-fork-prodnet ## Fork test using an existing factory (production network)

.PHONY: test-fork
test-fork:
forge test --match-contract $(E2E_TEST_NAME) --rpc-url $(RPC_URL) $(VERBOSITY)

Expand All @@ -107,7 +109,7 @@ pre-deploy-testnet: export NETWORK = $(TESTNET_NETWORK)
pre-deploy-prodnet: export RPC_URL = $(PRODNET_RPC_URL)
pre-deploy-prodnet: export NETWORK = $(PRODNET_NETWORK)

pre-deploy-mint-testnet: pre-deploy ## Simulate a deployment to the testnet, minting test token(s)
pre-deploy-mint-testnet: pre-deploy-testnet ## Simulate a deployment to the testnet, minting test token(s)
pre-deploy-testnet: pre-deploy ## Simulate a deployment to the testnet
pre-deploy-prodnet: pre-deploy ## Simulate a deployment to the production network

Expand All @@ -119,17 +121,21 @@ deploy-testnet: export NETWORK = $(TESTNET_NETWORK)
deploy-prodnet: export RPC_URL = $(PRODNET_RPC_URL)
deploy-prodnet: export NETWORK = $(PRODNET_NETWORK)

deploy-mint-testnet: deploy ## Deploy to the testnet, mint test tokens and verify
deploy-mint-testnet: deploy-testnet ## Deploy to the testnet, mint test tokens and verify
deploy-testnet: deploy ## Deploy to the testnet and verify
deploy-prodnet: deploy ## Deploy to the production network and verify

.PHONY: pre-deploy
pre-deploy:
@echo "Simulating the deployment"
forge script $(DEPLOY_SCRIPT) \
--chain $(NETWORK) \
--rpc-url $(RPC_URL) \
$(VERBOSITY)

deploy:
.PHONY: deploy
deploy: test
@echo "Starting the deployment"
forge script $(DEPLOY_SCRIPT) \
--chain $(NETWORK) \
--rpc-url $(RPC_URL) \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Available targets:
- make init Check the required tools and dependencies
- make clean Clean the artifacts
- make test-unit Run unit tests, locally
- make test Run unit tests, locally
- make test-coverage Generate an HTML coverage report under ./report
- make test-fork-mint-testnet Clean fork test, minting test tokens (testnet)
Expand Down

0 comments on commit f42adf6

Please sign in to comment.