Skip to content

Commit

Permalink
Add "secretcli tx sign-doc" to support SNIP20 & SNIP721 query permits
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Oct 5, 2021
1 parent f591ed0 commit 7fea840
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,24 @@ go.sum: go.mod

xgo_build_secretcli: go.sum
@echo "--> WARNING! This builds from origin/$(CURRENT_BRANCH)!"
xgo --go latest --targets $(XGO_TARGET) -tags="$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' --branch "$(CURRENT_BRANCH)" github.com/enigmampc/SecretNetwork/cmd/secretcli
xgo --go 1.13.8 --targets $(XGO_TARGET) -tags="$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' --branch "$(CURRENT_BRANCH)" github.com/enigmampc/SecretNetwork/cmd/secretcli

# Install go1.13.8 with:
# $ go install golang.org/dl/go1.13.8@latest
# $ go1.13.8 download
build_local_cli:
go build -mod=readonly -tags "$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' ./cmd/secretcli
go1.13.8 build -mod=readonly -tags "$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' ./cmd/secretcli

build_local_no_rust: build_local_cli bin-data-$(IAS_BUILD)
cp go-cosmwasm/target/release/libgo_cosmwasm.so go-cosmwasm/api
go build -mod=readonly -tags "$(GO_TAGS)" -ldflags '$(LD_FLAGS)' ./cmd/secretd
go1.13.8 build -mod=readonly -tags "$(GO_TAGS)" -ldflags '$(LD_FLAGS)' ./cmd/secretd

build-linux: vendor bin-data-$(IAS_BUILD)
BUILD_PROFILE=$(BUILD_PROFILE) $(MAKE) -C go-cosmwasm build-rust
cp go-cosmwasm/target/$(BUILD_PROFILE)/libgo_cosmwasm.so go-cosmwasm/api
# this pulls out ELF symbols, 80% size reduction!
go build -mod=readonly -tags "$(GO_TAGS)" -ldflags '$(LD_FLAGS)' ./cmd/secretd
go build -mod=readonly -tags "$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' ./cmd/secretcli
go1.13.8 build -mod=readonly -tags "$(GO_TAGS)" -ldflags '$(LD_FLAGS)' ./cmd/secretd
go1.13.8 build -mod=readonly -tags "$(GO_TAGS) secretcli" -ldflags '$(LD_FLAGS)' ./cmd/secretcli

build_windows_cli:
$(MAKE) xgo_build_secretcli XGO_TARGET=windows/amd64
Expand Down
6 changes: 4 additions & 2 deletions cmd/secretcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"fmt"
scrt "github.com/enigmampc/SecretNetwork/types"
sdk "github.com/enigmampc/cosmos-sdk/types"
"os"
"path"

scrt "github.com/enigmampc/SecretNetwork/types"
sdk "github.com/enigmampc/cosmos-sdk/types"

"github.com/enigmampc/cosmos-sdk/client"
"github.com/enigmampc/cosmos-sdk/client/flags"
"github.com/enigmampc/cosmos-sdk/client/keys"
Expand Down Expand Up @@ -108,6 +109,7 @@ func txCmd(cdc *amino.Codec) *cobra.Command {
bankcmd.SendTxCmd(cdc),
flags.LineBreak,
authcmd.GetSignCommand(cdc),
authcmd.GetSignDocCommand(cdc),
authcmd.GetMultiSignCommand(cdc),
flags.LineBreak,
authcmd.GetBroadcastCommand(cdc),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/enigmampc/SecretNetwork
go 1.14

require (
github.com/enigmampc/cosmos-sdk v0.9.1-scrt
github.com/enigmampc/cosmos-sdk v0.9.2-scrt
github.com/google/gofuzz v1.0.0
github.com/gorilla/mux v1.7.4
github.com/miscreant/miscreant.go v0.0.0-20200214223636-26d376326b75
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/enigmampc/cosmos-sdk v0.9.1-scrt h1:PXOVcjo/ZWUvyR04CYI3jhWCgCMiJzEBQNbsdvbvJuY=
github.com/enigmampc/cosmos-sdk v0.9.1-scrt/go.mod h1:3bJQ86UAzUlL3G7/HdTdFn4cfRtu7WBbE02sv85bqZY=
github.com/enigmampc/cosmos-sdk v0.9.2-scrt h1:cAX6oQcxZLlEMJwPD375ZuBrTkKIiiXVxkxhl5dcIcM=
github.com/enigmampc/cosmos-sdk v0.9.2-scrt/go.mod h1:3bJQ86UAzUlL3G7/HdTdFn4cfRtu7WBbE02sv85bqZY=
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down

0 comments on commit 7fea840

Please sign in to comment.