-
Notifications
You must be signed in to change notification settings - Fork 7
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
Use new node contract in registry #107
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,6 @@ linters: | |
- ineffassign | ||
- staticcheck | ||
- unused | ||
issues: | ||
exclude-files: | ||
- tools.go |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source dev/contracts/.env | ||
|
||
export CHAIN_RPC_URL=$DOCKER_RPC_URL # From contracts/.env | ||
export NODE_PRIVATE_KEY=$PRIVATE_KEY # From contracts/.env | ||
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use the stuff in |
||
export WRITER_CONNECTION_STRING="postgres://postgres:xmtp@localhost:8765/postgres?sslmode=disable" | ||
NODES_CONTRACT_ADDRESS="$(jq -r '.deployedTo' build/Nodes.json)" # Built by contracts/deploy-local | ||
export NODES_CONTRACT_ADDRESS | ||
GROUP_MESSAGES_CONTRACT_ADDRESS="$(jq -r '.deployedTo' build/GroupMessages.json)" # Built by contracts/deploy-local | ||
export GROUP_MESSAGES_CONTRACT_ADDRESS |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
. dev/local.env | ||
|
||
go run cmd/replication/main.go \ | ||
--db.writer-connection-string=$WRITER_CONNECTION_STRING \ | ||
--private-key=${NODE_PRIVATE_KEY} \ | ||
--contracts.nodes-address=$NODES_CONTRACT_ADDRESS \ | ||
--contracts.messages-address=$GROUP_MESSAGES_CONTRACT_ADDRESS \ | ||
--contracts.rpc-url=$CHAIN_RPC_URL |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,18 @@ | |
set -e | ||
|
||
go mod tidy | ||
git submodule update --init --recursive | ||
|
||
if ! which forge &>/dev/null; then curl -L https://foundry.paradigm.xyz | bash ; fi | ||
if ! which migrate &>/dev/null; then brew install golang-migrate; fi | ||
if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi | ||
if ! which shellcheck &>/dev/null; then brew install shellcheck; fi | ||
if ! which mockery &>/dev/null; then brew install mockery; fi | ||
if ! which mockery &>/dev/null; then go install github.com/vektra/mockery/v2; fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the tools.go file puts this in our There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be simpler to just specify the version in the install command here, rather than updating the |
||
if ! which sqlc &> /dev/null; then brew install sqlc; fi | ||
if ! which buf &> /dev/null; then brew install buf; fi | ||
if ! which golines &>/dev/null; then go install github.com/segmentio/golines@latest; fi | ||
if ! which abigen &>/dev/null; then go install github.com/ethereum/go-ethereum/cmd/abigen; fi | ||
|
||
|
||
dev/generate | ||
dev/docker/up | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think my editor has a default Markdown formatter. We can make that standard issue in the repo so we don't get diffs like this.