-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `make lint` command * Detect JSON config parsing error * Return error on DB automigrate * Handle `anvil.Mine` error * Remove unused error * Use defer to ensure lock release * Ignore test files when linting * Handle `TxMgr.GetNoSendTxOpts` possible error * Add TODO to linter config
- Loading branch information
1 parent
d4dda75
commit 70b51e8
Showing
7 changed files
with
43 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
run: | ||
# TODO: We want to eventually enable linting for all files, including test code | ||
tests: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,17 +16,17 @@ INDEXER_NEAR_CLI_LOCALNET_KEY_PATH=${HOME}/.near/localnet/validator_key.json | |
CHAINID=31337 | ||
DEPLOYMENT_FILES_DIR=contracts/evm/script/output/${CHAINID} | ||
|
||
-----------------------------: ## | ||
-----------------------------: ## | ||
|
||
___CONTRACTS___: ## | ||
___CONTRACTS___: ## | ||
|
||
deploy-eigenlayer-contracts-to-anvil-and-save-state: ## Deploy eigenlayer | ||
./tests/anvil/deploy-eigenlayer-save-anvil-state.sh | ||
|
||
deploy-sffl-contracts-to-anvil-and-save-state: ## Deploy avs | ||
./tests/anvil/deploy-avs-save-anvil-state.sh | ||
|
||
deploy-all-to-anvil-and-save-state: deploy-eigenlayer-contracts-to-anvil-and-save-state deploy-sffl-contracts-to-anvil-and-save-state ## deploy eigenlayer, shared avs contracts, and inc-sq contracts | ||
deploy-all-to-anvil-and-save-state: deploy-eigenlayer-contracts-to-anvil-and-save-state deploy-sffl-contracts-to-anvil-and-save-state ## deploy eigenlayer, shared avs contracts, and inc-sq contracts | ||
|
||
start-anvil-chain-with-el-and-avs-deployed: ## starts anvil from a saved state file (with el and avs contracts deployed) | ||
./tests/anvil/start-anvil-chain-with-el-and-avs-deployed.sh | ||
|
@@ -59,7 +59,7 @@ docker-build-images: docker-build-indexer docker-build-relayer docker-build-aggr | |
docker-start-everything: docker-build-images ## starts aggregator and operator docker containers | ||
docker compose up | ||
|
||
__CLI__: ## | ||
__CLI__: ## | ||
|
||
cli-setup-operator: export OPERATOR_BLS_KEY_PASSWORD=$(OPERATOR_BLS_KEY_PASS) | ||
cli-setup-operator: export OPERATOR_ECDSA_KEY_PASSWORD=$(OPERATOR_ECDSA_KEY_PASS) | ||
|
@@ -68,48 +68,48 @@ cli-setup-operator: send-fund cli-register-operator-with-eigenlayer cli-deposit- | |
cli-register-operator-with-eigenlayer: ## registers operator with delegationManager | ||
go run cli/main.go --config config-files/operator.anvil.yaml register-operator-with-eigenlayer | ||
|
||
cli-deposit-into-mocktoken-strategy: ## | ||
cli-deposit-into-mocktoken-strategy: ## | ||
./scripts/deposit-into-mocktoken-strategy.sh | ||
|
||
cli-register-operator-with-avs: ## | ||
cli-register-operator-with-avs: ## | ||
go run cli/main.go --config config-files/operator.anvil.yaml register-operator-with-avs | ||
|
||
cli-deregister-operator-with-avs: ## | ||
cli-deregister-operator-with-avs: ## | ||
go run cli/main.go --config config-files/operator.anvil.yaml deregister-operator-with-avs | ||
|
||
cli-print-operator-status: ## | ||
cli-print-operator-status: ## | ||
go run cli/main.go --config config-files/operator.anvil.yaml print-operator-status | ||
|
||
send-fund: ## sends fund to the first operator saved in tests/keys/ecdsa/* | ||
cast send 0xD5A0359da7B310917d7760385516B2426E86ab7f --value 10ether --private-key 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 --rpc-url http://127.0.0.1:8545 | ||
|
||
-----------------------------: ## | ||
-----------------------------: ## | ||
# We pipe all zapper logs through https://github.com/maoueh/zap-pretty so make sure to install it | ||
# TODO: piping to zap-pretty only works when zapper environment is set to production, unsure why | ||
____OFFCHAIN_SOFTWARE___: ## | ||
start-aggregator: ## | ||
____OFFCHAIN_SOFTWARE___: ## | ||
start-aggregator: ## | ||
go run aggregator/cmd/main.go --config config-files/aggregator.yaml \ | ||
--sffl-deployment ${DEPLOYMENT_FILES_DIR}/sffl_avs_deployment_output.json \ | ||
--ecdsa-private-key ${AGGREGATOR_ECDSA_PRIV_KEY} \ | ||
2>&1 | zap-pretty | ||
|
||
start-operator: export OPERATOR_BLS_KEY_PASSWORD=fDUMDLmBROwlzzPXyIcy | ||
start-operator: export OPERATOR_ECDSA_KEY_PASSWORD=EnJuncq01CiVk9UbuBYl | ||
start-operator: ## | ||
start-operator: ## | ||
go run operator/cmd/main.go --config config-files/operator.anvil.yaml \ | ||
2>&1 | zap-pretty | ||
|
||
start-indexer: ## | ||
start-indexer: ## | ||
cargo run -p indexer --release -- --home-dir ~/.near/localnet init --chain-id localnet | ||
cargo run -p indexer --release -- --home-dir ~/.near/localnet run --da-contract-ids da.test.near --rollup-ids 2 --rmq-address "amqp://127.0.0.1:5672" | ||
|
||
start-test-relayer: ## | ||
go run relayer/cmd/main.go --rpc-url ws://127.0.0.1:8546 --da-account-id da.test.near | ||
|
||
run-plugin: ## | ||
run-plugin: ## | ||
go run plugin/cmd/main.go --config config-files/operator.anvil.yaml | ||
-----------------------------: ## | ||
_____HELPER_____: ## | ||
-----------------------------: ## | ||
_____HELPER_____: ## | ||
mocks: ## generates mocks for tests | ||
go install go.uber.org/mock/[email protected] | ||
go generate ./... | ||
|
@@ -125,3 +125,7 @@ tests-integration: ## runs all integration tests | |
go test ./tests/integration/integration_test.go -v -count=1 | ||
go test ./tests/integration/registration_test.go -v -count=1 | ||
|
||
## runs linter on all files | ||
## TODO: For now, only Go files are linted | ||
lint: | ||
golangci-lint run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters