diff --git a/.env b/.env new file mode 100644 index 000000000..5262455fc --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +CGO_CFLAGS="-O -D__BLST_PORTABLE__" +CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__" diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index a202e6e23..fc6d595e4 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -50,5 +50,6 @@ jobs: make build - name: run local chain run: bash ./deployment/localup/localup.sh all 1 - - name: run cli test - run: bash ./e2e/cli_test.sh + - name: run e2e test + run: | + make e2e_test diff --git a/Makefile b/Makefile index 84522269a..ea02b71ea 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: build build-linux build-macos build-windows -.PHONY: tools proto-gen proto-format test +.PHONY: tools proto-gen proto-format test e2e_test ci lint VERSION=$(shell git describe --tags --always) GIT_COMMIT=$(shell git rev-parse HEAD) @@ -12,6 +12,8 @@ ldflags = -X $(REPO)/version.AppVersion=$(VERSION) \ -X $(REPO)/version.GitCommit=$(GIT_COMMIT) \ -X $(REPO)/version.GitCommitDate=$(GIT_COMMIT_DATE) +include .env + format: bash scripts/format.sh @@ -27,12 +29,24 @@ proto-swagger-gen: proto-format: buf format -w +proto-format-check: + buf format --diff --exit-code + build: - CGO_CFLAGS="-O -D__BLST_PORTABLE__" CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__" go build -o build/bin/gnfd -ldflags="$(ldflags)" ./cmd/gnfd/main.go + go build -o build/bin/gnfd -ldflags="$(ldflags)" ./cmd/gnfd/main.go docker-image: go mod vendor # temporary, should be removed after open source docker build . -t ${IMAGE_NAME} test: - go test ./... + go test $$(go list ./... | grep -v e2e | grep -v sdk) + +e2e_test: + go test ./e2e/... + +lint: + golangci-lint run --fix + +ci: proto-format-check build test e2e_test lint + echo "ci passed" diff --git a/e2e/core/basesuite.go b/e2e/core/basesuite.go new file mode 100644 index 000000000..38c36f4cd --- /dev/null +++ b/e2e/core/basesuite.go @@ -0,0 +1,68 @@ +package core + +import ( + "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/keys" + "github.com/bnb-chain/greenfield/sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/stretchr/testify/suite" +) + +type BaseSuite struct { + suite.Suite + config *Config + Client client.GreenfieldClient + TestAccount keys.KeyManager +} + +func (s *BaseSuite) SetupSuite() { + s.config = InitConfig() + s.Client = client.NewGreenfieldClient(s.config.GrpcAddr, s.config.ChainId) + var err error + s.TestAccount, err = keys.NewMnemonicKeyManager(s.config.Mnemonic) + s.Require().NoError(err) +} + +func (s *BaseSuite) SendTxBlock(msg sdk.Msg, from keys.KeyManager) (txRes *sdk.TxResponse) { + mode := tx.BroadcastMode_BROADCAST_MODE_BLOCK + txOpt := &types.TxOption{ + Mode: &mode, + GasLimit: 1000000, + Memo: "", + FeeAmount: sdk.Coins{{Denom: s.config.Denom, Amount: sdk.NewInt(1)}}, + } + s.Client.SetKeyManager(from) + response, err := s.Client.BroadcastTx([]sdk.Msg{msg}, txOpt) + s.Require().NoError(err) + s.T().Logf("tx_hash: %s", response.TxResponse.TxHash) + s.Require().Equal(response.TxResponse.Code, uint32(0)) + return response.TxResponse +} + +func (s *BaseSuite) GenAndChargeAccounts(n int, balance int64) (accounts []keys.KeyManager) { + var outputs []banktypes.Output + denom := s.config.Denom + for i := 0; i < n; i++ { + km := GenRandomKeyManager() + accounts = append(accounts, km) + outputs = append(outputs, banktypes.Output{ + Address: km.GetAddr().String(), + Coins: []sdk.Coin{{Denom: denom, Amount: sdk.NewInt(balance)}}, + }) + } + if balance == 0 { + return + } + in := banktypes.Input{ + Address: s.TestAccount.GetAddr().String(), + Coins: []sdk.Coin{{Denom: denom, Amount: sdk.NewInt(balance * int64(n))}}, + } + msg := banktypes.MsgMultiSend{ + Inputs: []banktypes.Input{in}, + Outputs: outputs, + } + _ = s.SendTxBlock(&msg, s.TestAccount) + return accounts +} diff --git a/e2e/core/config.go b/e2e/core/config.go new file mode 100644 index 000000000..e3a953d09 --- /dev/null +++ b/e2e/core/config.go @@ -0,0 +1,46 @@ +package core + +import ( + "bufio" + "fmt" + "os" +) + +type Config struct { + GrpcAddr string `yaml:"GrpcAddr"` + ChainId string `yaml:"ChainId"` + Mnemonic string `yaml:"Mnemonic"` // test account mnemonic with enough balance + Denom string `yaml:"Denom"` +} + +func InitConfig() *Config { + // todo: support qa and testnet config + return InitE2eConfig() +} + +func InitE2eConfig() *Config { + return &Config{ + GrpcAddr: "localhost:9090", + ChainId: "greenfield_9000-121", + Denom: "bnb", + Mnemonic: ParseValidatorMnemonic(0), + } +} + +// ParseValidatorMnemonic read a file and return the last non-empty line +func ParseValidatorMnemonic(i int) string { + file, err := os.Open(fmt.Sprintf("../../deployment/localup/.local/validator%d/info", i)) + if err != nil { + panic(err) + } + defer file.Close() + + scanner := bufio.NewScanner(file) + var line string + for scanner.Scan() { + if scanner.Text() != "" { + line = scanner.Text() + } + } + return line +} diff --git a/e2e/core/utils.go b/e2e/core/utils.go new file mode 100644 index 000000000..134e8e510 --- /dev/null +++ b/e2e/core/utils.go @@ -0,0 +1,31 @@ +package core + +import ( + "fmt" + "math/rand" + + "github.com/bnb-chain/greenfield/sdk/keys" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tendermint/tendermint/crypto" +) + +func GenRandomAddr() sdk.AccAddress { + return sdk.AccAddress(crypto.AddressHash([]byte(fmt.Sprintf("%d", rand.Int())))) +} + +func GenRandomHexString(len int) string { + b := make([]byte, len) + _, err := rand.Read(b) + if err != nil { + panic(err) + } + return fmt.Sprintf("%x", b) +} + +func GenRandomKeyManager() keys.KeyManager { + keyManager, err := keys.NewPrivateKeyManager(GenRandomHexString(32)) + if err != nil { + panic(err) + } + return keyManager +} diff --git a/e2e/tests/payment_test.go b/e2e/tests/payment_test.go new file mode 100644 index 000000000..f7519f75e --- /dev/null +++ b/e2e/tests/payment_test.go @@ -0,0 +1,65 @@ +package tests + +// Basic imports +import ( + "context" + "testing" + + "github.com/bnb-chain/greenfield/e2e/core" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" + "github.com/stretchr/testify/suite" +) + +type PaymentTestSuite struct { + core.BaseSuite +} + +func (s *PaymentTestSuite) SetupSuite() { + s.BaseSuite.SetupSuite() +} + +func (s *PaymentTestSuite) SetupTest() { +} + +func (s *PaymentTestSuite) TestPaymentAccount() { + user := s.GenAndChargeAccounts(1, 100)[0] + ctx := context.Background() + // create a new payment account + msgCreatePaymentAccount := &paymenttypes.MsgCreatePaymentAccount{ + Creator: user.GetAddr().String(), + } + _ = s.SendTxBlock(msgCreatePaymentAccount, user) + // query user's payment accounts + queryGetPaymentAccountsByOwnerRequest := paymenttypes.QueryGetPaymentAccountsByOwnerRequest{ + Owner: user.GetAddr().String(), + } + paymentAccounts, err := s.Client.GetPaymentAccountsByOwner(ctx, &queryGetPaymentAccountsByOwnerRequest) + s.Require().NoError(err) + s.T().Log(paymentAccounts) + s.Require().Equal(1, len(paymentAccounts.PaymentAccounts)) + paymentAccountAddr := paymentAccounts.PaymentAccounts[0] + // query this payment account + queryGetPaymentAccountRequest := paymenttypes.QueryGetPaymentAccountRequest{ + Addr: paymentAccountAddr, + } + paymentAccount, err := s.Client.PaymentAccount(ctx, &queryGetPaymentAccountRequest) + s.Require().NoError(err) + s.T().Log(paymentAccount) + s.Require().Equal(user.GetAddr().String(), paymentAccount.PaymentAccount.Owner) + s.Require().Equal(true, paymentAccount.PaymentAccount.Refundable) + // set this payment account to non-refundable + msgDisableRefund := &paymenttypes.MsgDisableRefund{ + Owner: user.GetAddr().String(), + Addr: paymentAccountAddr, + } + _ = s.SendTxBlock(msgDisableRefund, user) + // query this payment account + paymentAccount, err = s.Client.PaymentAccount(ctx, &queryGetPaymentAccountRequest) + s.Require().NoError(err) + s.T().Log(paymentAccount) + s.Require().Equal(false, paymentAccount.PaymentAccount.Refundable) +} + +func TestPaymentTestSuite(t *testing.T) { + suite.Run(t, new(PaymentTestSuite)) +} diff --git a/go.mod b/go.mod index c399289c5..f0132f1b3 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( require golang.org/x/text v0.6.0 // indirect require ( + github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.4 github.com/prysmaticlabs/prysm v0.0.0-20220124113610-e26cde5e091b github.com/rakyll/statik v0.1.7 @@ -69,7 +70,6 @@ require ( github.com/containerd/cgroups v1.0.3 // indirect github.com/containerd/containerd v1.6.8 // indirect github.com/cosmos/btcutil v1.0.4 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.4 // indirect github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect @@ -228,7 +228,7 @@ require ( replace ( github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 - github.com/cosmos/cosmos-sdk => github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214041918-873d75242b68 + github.com/cosmos/cosmos-sdk => github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214050107-c8beb3e72b61 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/tendermint/tendermint => github.com/bnb-chain/gnfd-tendermint v0.0.1 ) diff --git a/go.sum b/go.sum index 013003943..ec61e1750 100644 --- a/go.sum +++ b/go.sum @@ -218,8 +218,8 @@ github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdn github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214041918-873d75242b68 h1:94uyqcuXWb/zMJ9GQ/GdvlbGJp6mc6lVCb5XrOe4uyE= -github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214041918-873d75242b68/go.mod h1:NlIOmju3uhTOJ2YAzLPidpmh7sAgJ+J9dkUlSysHmjw= +github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214050107-c8beb3e72b61 h1:L+oI2VYN0GxQDqossulvO0InsZ/cBkPBSzRZg8iOP0Y= +github.com/bnb-chain/gnfd-cosmos-sdk v0.0.2-0.20230214050107-c8beb3e72b61/go.mod h1:NlIOmju3uhTOJ2YAzLPidpmh7sAgJ+J9dkUlSysHmjw= github.com/bnb-chain/gnfd-tendermint v0.0.1 h1:KWFuxWv8m6t1vUi3ADyVcEG0qVnEzQt1tjA6dk/b7+Q= github.com/bnb-chain/gnfd-tendermint v0.0.1/go.mod h1:/v9z9F6cq0+f7EGG92lYSLBcPYQDILoK91X8YM28hWo= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= diff --git a/sdk/client/gnfd_client.go b/sdk/client/gnfd_client.go new file mode 100644 index 000000000..248b85046 --- /dev/null +++ b/sdk/client/gnfd_client.go @@ -0,0 +1,139 @@ +package client + +import ( + _ "encoding/json" + + "github.com/bnb-chain/greenfield/sdk/keys" + "github.com/bnb-chain/greenfield/sdk/types" + bridgetypes "github.com/bnb-chain/greenfield/x/bridge/types" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" + sptypes "github.com/bnb-chain/greenfield/x/sp/types" + storagetypes "github.com/bnb-chain/greenfield/x/storage/types" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/types/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authztypes "github.com/cosmos/cosmos-sdk/x/authz" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + crosschaintypes "github.com/cosmos/cosmos-sdk/x/crosschain/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" + gashubtypes "github.com/cosmos/cosmos-sdk/x/gashub/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + oracletypes "github.com/cosmos/cosmos-sdk/x/oracle/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" +) + +type AuthQueryClient = authtypes.QueryClient +type AuthzQueryClient = authztypes.QueryClient +type BankQueryClient = banktypes.QueryClient +type CrosschainQueryClient = crosschaintypes.QueryClient +type DistrQueryClient = distrtypes.QueryClient +type FeegrantQueryClient = feegranttypes.QueryClient +type GashubQueryClient = gashubtypes.QueryClient +type PaymentQueryClient = paymenttypes.QueryClient +type SpQueryClient = sptypes.QueryClient +type BridgeQueryClient = bridgetypes.QueryClient +type StorageQueryClient = storagetypes.QueryClient +type GovQueryClientV1 = govv1.QueryClient +type OracleQueryClient = oracletypes.QueryClient +type ParamsQueryClient = paramstypes.QueryClient +type SlashingQueryClient = slashingtypes.QueryClient +type StakingQueryClient = stakingtypes.QueryClient +type TxClient = tx.ServiceClient +type UpgradeQueryClient = upgradetypes.QueryClient + +type GreenfieldClient struct { + AuthQueryClient + AuthzQueryClient + BankQueryClient + CrosschainQueryClient + DistrQueryClient + FeegrantQueryClient + GashubQueryClient + PaymentQueryClient + SpQueryClient + BridgeQueryClient + StorageQueryClient + GovQueryClientV1 + OracleQueryClient + ParamsQueryClient + SlashingQueryClient + StakingQueryClient + TxClient + UpgradeQueryClient + keyManager keys.KeyManager + chainId string + codec *codec.ProtoCodec +} + +func grpcConn(addr string) *grpc.ClientConn { + conn, err := grpc.Dial( + addr, + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + if err != nil { + panic(err) + } + return conn +} + +func NewGreenfieldClient(grpcAddr, chainId string) GreenfieldClient { + conn := grpcConn(grpcAddr) + cdc := types.Cdc() + return GreenfieldClient{ + authtypes.NewQueryClient(conn), + authztypes.NewQueryClient(conn), + banktypes.NewQueryClient(conn), + crosschaintypes.NewQueryClient(conn), + distrtypes.NewQueryClient(conn), + feegranttypes.NewQueryClient(conn), + gashubtypes.NewQueryClient(conn), + paymenttypes.NewQueryClient(conn), + sptypes.NewQueryClient(conn), + bridgetypes.NewQueryClient(conn), + storagetypes.NewQueryClient(conn), + govv1.NewQueryClient(conn), + oracletypes.NewQueryClient(conn), + paramstypes.NewQueryClient(conn), + slashingtypes.NewQueryClient(conn), + stakingtypes.NewQueryClient(conn), + tx.NewServiceClient(conn), + upgradetypes.NewQueryClient(conn), + nil, + chainId, + cdc, + } +} + +func NewGreenfieldClientWithKeyManager(grpcAddr, chainId string, keyManager keys.KeyManager) GreenfieldClient { + gnfdClient := NewGreenfieldClient(grpcAddr, chainId) + gnfdClient.keyManager = keyManager + return gnfdClient +} + +func (c *GreenfieldClient) GetKeyManager() (keys.KeyManager, error) { + if c.keyManager == nil { + return nil, types.KeyManagerNotInitError + } + return c.keyManager, nil +} + +func (c *GreenfieldClient) SetKeyManager(keyManager keys.KeyManager) { + c.keyManager = keyManager +} + +func (c *GreenfieldClient) SetChainId(id string) { + c.chainId = id +} + +func (c *GreenfieldClient) GetChainId() (string, error) { + if c.chainId == "" { + return "", types.ChainIdNotSetError + } + return c.chainId, nil +} diff --git a/sdk/client/tendermint_client.go b/sdk/client/tendermint_client.go new file mode 100644 index 000000000..bcdc3417c --- /dev/null +++ b/sdk/client/tendermint_client.go @@ -0,0 +1,29 @@ +package client + +import ( + "github.com/tendermint/tendermint/rpc/client" + chttp "github.com/tendermint/tendermint/rpc/client/http" + libclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" +) + +type TendermintClient struct { + TmClient client.Client +} + +func httpClient(addr string) *chttp.HTTP { + httpCli, err := libclient.DefaultHTTPClient(addr) + if err != nil { + panic(err) + } + cli, err := chttp.NewWithClient(addr, "/websocket", httpCli) + if err != nil { + panic(err) + } + return cli +} + +func NewTendermintClient(addr string) TendermintClient { + return TendermintClient{ + TmClient: httpClient(addr), + } +} diff --git a/sdk/client/tendermint_client_test.go b/sdk/client/tendermint_client_test.go new file mode 100644 index 000000000..af7fe741a --- /dev/null +++ b/sdk/client/tendermint_client_test.go @@ -0,0 +1,52 @@ +package client + +import ( + "context" + "testing" + + "github.com/bnb-chain/greenfield/sdk/client/test" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/types" +) + +func TestGetABCIInfo(t *testing.T) { + client := NewTendermintClient(test.TEST_RPC_ADDR) + abci, err := client.TmClient.ABCIInfo(context.Background()) + assert.NoError(t, err) + t.Log(abci.Response.LastBlockHeight) +} + +func TestGetStatus(t *testing.T) { + client := NewTendermintClient(test.TEST_RPC_ADDR) + status, err := client.TmClient.Status(context.Background()) + assert.NoError(t, err) + t.Log(status.ValidatorInfo) +} + +func TestGetValidators(t *testing.T) { + client := NewTendermintClient(test.TEST_RPC_ADDR) + validators, err := client.TmClient.Validators(context.Background(), nil, nil, nil) + assert.NoError(t, err) + t.Log(validators.Validators) +} + +func TestSubscribeEvent(t *testing.T) { + const subscriber = "TestBlockEvents" + client := NewTendermintClient(test.TEST_RPC_ADDR) + err := client.TmClient.Start() + require.NoError(t, err) + eventCh, err := client.TmClient.Subscribe(context.Background(), subscriber, types.QueryForEvent(types.EventNewBlock).String()) + require.NoError(t, err) + var firstBlockHeight int64 + for i := int64(0); i < 3; i++ { + event := <-eventCh + blockEvent, ok := event.Data.(types.EventDataNewBlock) + require.True(t, ok) + block := blockEvent.Block + if firstBlockHeight == 0 { + firstBlockHeight = block.Header.Height + } + require.Equal(t, firstBlockHeight+i, block.Header.Height) + } +} diff --git a/sdk/client/test/bank/client_query_test.go b/sdk/client/test/bank/client_query_test.go new file mode 100644 index 000000000..2799fe095 --- /dev/null +++ b/sdk/client/test/bank/client_query_test.go @@ -0,0 +1,116 @@ +package bank + +import ( + "context" + "testing" + + gnfdclient "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/client/test" + "github.com/bnb-chain/greenfield/sdk/keys" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/stretchr/testify/assert" +) + +func TestBankBalance(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryBalanceRequest{ + Address: test.TEST_ADDR, + Denom: "bnb", + } + res, err := client.BankQueryClient.Balance(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.Balance.String()) +} + +func TestBankAllBalances(t *testing.T) { + km, err := keys.NewPrivateKeyManager("e3ac46e277677f0f103774019d03bd89c7b4b5ecc554b2650bd5d5127992c20c") + assert.NoError(t, err) + t.Log(km) + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryAllBalancesRequest{ + Address: test.TEST_ADDR, + } + res, err := client.BankQueryClient.AllBalances(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.Balances.String()) +} + +func TestBankDenomMetadata(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryDenomMetadataRequest{} + res, err := client.BankQueryClient.DenomMetadata(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestBankDenomOwners(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryDenomOwnersRequest{ + Denom: "bnb", + } + res, err := client.BankQueryClient.DenomOwners(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestBankDenomsMetadata(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryDenomsMetadataRequest{} + res, err := client.BankQueryClient.DenomsMetadata(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestBankParams(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryParamsRequest{} + res, err := client.BankQueryClient.Params(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestBankSpendableBalance(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QuerySpendableBalancesRequest{ + Address: test.TEST_ADDR, + } + res, err := client.BankQueryClient.SpendableBalances(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.GetBalances().String()) +} + +func TestBankSupplyOf(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QuerySupplyOfRequest{ + Denom: "bnb", + } + res, err := client.BankQueryClient.SupplyOf(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestBankTotalSupply(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := banktypes.QueryTotalSupplyRequest{} + res, err := client.BankQueryClient.TotalSupply(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.Supply.String()) +} diff --git a/sdk/client/test/config.go b/sdk/client/test/config.go new file mode 100644 index 000000000..2fa68f033 --- /dev/null +++ b/sdk/client/test/config.go @@ -0,0 +1,13 @@ +package test + +const ( + TEST_PRIVATE_KEY = "3018f5ceec22c2a1389fe3a0933b52f3fc31450c5322002dd76477964797fb13" + TEST_ADDR = "0x76d244CE05c3De4BbC6fDd7F56379B145709ade9" + TEST_ADDR2 = "0x5dEfC28ce1Ed331D56aB6F607f78708880e11Bea" + TEST_ADDR3 = "0x593107F1D5D10A68D3C3722C35ADa2eb779D44A4" + TEST_VAL_ADDR = "0x80C7Fa8FC825C5e622cdbcAEa0A22d188634BDd3" + TEST_VAL_ADDR2 = "0x8b7Df76E1b5161B773BD7D16BC15cb238921383E" + TEST_GRPC_ADDR = "localhost:9090" + TEST_RPC_ADDR = "http://0.0.0.0:26750" + TEST_CHAIN_ID = "greenfield_9000-121" +) diff --git a/sdk/client/test/crosschain/client_query_test.go b/sdk/client/test/crosschain/client_query_test.go new file mode 100644 index 000000000..963fc0296 --- /dev/null +++ b/sdk/client/test/crosschain/client_query_test.go @@ -0,0 +1,51 @@ +package bank + +import ( + "context" + "testing" + + gnfdclient "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/client/test" + crosschaintypes "github.com/cosmos/cosmos-sdk/x/crosschain/types" + "github.com/stretchr/testify/assert" +) + +func TestCrosschainParams(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := crosschaintypes.QueryParamsRequest{} + res, err := client.CrosschainQueryClient.Params(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res) +} + +func TestCrosschainPackageRequest(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := crosschaintypes.QueryCrossChainPackageRequest{} + res, err := client.CrosschainQueryClient.CrossChainPackage(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestCrosschainReceiveSequence(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := crosschaintypes.QueryReceiveSequenceRequest{} + res, err := client.CrosschainQueryClient.ReceiveSequence(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestCrosschainSendSequence(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := crosschaintypes.QuerySendSequenceRequest{} + res, err := client.CrosschainQueryClient.SendSequence(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} diff --git a/sdk/client/test/gashub/client_query_test.go b/sdk/client/test/gashub/client_query_test.go new file mode 100644 index 000000000..a6d9741a3 --- /dev/null +++ b/sdk/client/test/gashub/client_query_test.go @@ -0,0 +1,21 @@ +package gashub + +import ( + "context" + "testing" + + gnfdclient "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/client/test" + gashubtypes "github.com/cosmos/cosmos-sdk/x/gashub/types" + "github.com/stretchr/testify/assert" +) + +func TestGashubParams(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := gashubtypes.QueryParamsRequest{} + res, err := client.GashubQueryClient.Params(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} diff --git a/sdk/client/test/oracle/client_query_test.go b/sdk/client/test/oracle/client_query_test.go new file mode 100644 index 000000000..ef3587836 --- /dev/null +++ b/sdk/client/test/oracle/client_query_test.go @@ -0,0 +1,21 @@ +package bank + +import ( + "context" + "testing" + + gnfdclient "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/client/test" + oracletypes "github.com/cosmos/cosmos-sdk/x/oracle/types" + "github.com/stretchr/testify/assert" +) + +func TestOracleParams(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := oracletypes.QueryParamsRequest{} + res, err := client.OracleQueryClient.Params(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.GetParams()) +} diff --git a/sdk/client/test/staking/client_query_test.go b/sdk/client/test/staking/client_query_test.go new file mode 100644 index 000000000..57c2f6ad5 --- /dev/null +++ b/sdk/client/test/staking/client_query_test.go @@ -0,0 +1,151 @@ +package staking + +import ( + "context" + "testing" + + gnfdclient "github.com/bnb-chain/greenfield/sdk/client" + "github.com/bnb-chain/greenfield/sdk/client/test" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/assert" +) + +func TestStakingValidator(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryValidatorRequest{ + ValidatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.Validator(context.Background(), &query) + assert.NoError(t, err) + assert.Equal(t, res.Validator.SelfDelAddress, test.TEST_VAL_ADDR) +} + +func TestStakingValidators(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryValidatorsRequest{ + Status: "", + } + res, err := client.StakingQueryClient.Validators(context.Background(), &query) + assert.NoError(t, err) + assert.True(t, len(res.Validators) > 0) +} + +func TestStakingDelagatorValidator(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryDelegatorValidatorRequest{ + DelegatorAddr: test.TEST_ADDR, + ValidatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.DelegatorValidator(context.Background(), &query) + assert.NoError(t, err) + + assert.Equal(t, res.Validator.SelfDelAddress, test.TEST_VAL_ADDR) +} + +func TestStakingDelagatorValidators(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryDelegatorValidatorsRequest{ + DelegatorAddr: test.TEST_ADDR, + } + res, err := client.StakingQueryClient.DelegatorValidators(context.Background(), &query) + assert.NoError(t, err) + + assert.True(t, len(res.Validators) > 0) +} + +func TestStakingUnbondingDelagation(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryUnbondingDelegationRequest{ + DelegatorAddr: test.TEST_ADDR, + ValidatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.UnbondingDelegation(context.Background(), &query) + assert.NoError(t, err) + + assert.Equal(t, res.Unbond.DelegatorAddress, test.TEST_ADDR) +} + +func TestStakingDelagatorDelegations(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryDelegatorDelegationsRequest{ + DelegatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.DelegatorDelegations(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStakingValidatorDelegations(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryValidatorDelegationsRequest{ + ValidatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.ValidatorDelegations(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStakingDelegatorUnbondingDelagation(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryDelegatorUnbondingDelegationsRequest{ + DelegatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.DelegatorUnbondingDelegations(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStaking(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryRedelegationsRequest{ + DelegatorAddr: test.TEST_VAL_ADDR, + } + res, err := client.StakingQueryClient.Redelegations(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStakingParams(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryParamsRequest{} + res, err := client.StakingQueryClient.Params(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStakingPool(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryPoolRequest{} + res, err := client.StakingQueryClient.Pool(context.Background(), &query) + assert.NoError(t, err) + + t.Log(res.String()) +} + +func TestStakingHistoricalInfo(t *testing.T) { + client := gnfdclient.NewGreenfieldClient(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID) + + query := stakingtypes.QueryHistoricalInfoRequest{ + Height: 1, + } + res, err := client.StakingQueryClient.HistoricalInfo(context.Background(), &query) + assert.NoError(t, err) + + assert.True(t, len(res.GetHist().Valset) > 0) +} diff --git a/sdk/client/tx.go b/sdk/client/tx.go new file mode 100644 index 000000000..b66d21cbc --- /dev/null +++ b/sdk/client/tx.go @@ -0,0 +1,224 @@ +package client + +import ( + "context" + + "github.com/bnb-chain/greenfield/sdk/types" + "github.com/cosmos/cosmos-sdk/client" + clitx "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "google.golang.org/grpc" +) + +const GasMultiplier = float64(1.2) + +type TransactionClient interface { + BroadcastTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.BroadcastTxResponse, error) + SimulateTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.SimulateResponse, error) + SignTx(msgs []sdk.Msg, txOpt *types.TxOption) ([]byte, error) +} + +// BroadcastTx signs and broadcasts a tx with simulated gas(if not provided in txOpt) +func (c *GreenfieldClient) BroadcastTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.BroadcastTxResponse, error) { + + txConfig := authtx.NewTxConfig(c.codec, []signing.SignMode{signing.SignMode_SIGN_MODE_EIP_712}) + txBuilder := txConfig.NewTxBuilder() + + // txBuilder holds tx info + if err := c.constructTxWithGasLimit(msgs, txOpt, txConfig, txBuilder); err != nil { + return nil, err + } + + // sign a tx + txSignedBytes, err := c.signTx(txConfig, txBuilder) + if err != nil { + return nil, err + } + + mode := tx.BroadcastMode_BROADCAST_MODE_SYNC + if txOpt != nil && txOpt.Mode != nil { + mode = *txOpt.Mode + } + txRes, err := c.TxClient.BroadcastTx( + context.Background(), + &tx.BroadcastTxRequest{ + Mode: mode, + TxBytes: txSignedBytes, + }, + opts..., + ) + if err != nil { + return nil, err + } + return txRes, nil +} + +// SimulateTx simulates a tx and gets Gas info +func (c *GreenfieldClient) SimulateTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.SimulateResponse, error) { + txConfig := authtx.NewTxConfig(c.codec, []signing.SignMode{signing.SignMode_SIGN_MODE_EIP_712}) + txBuilder := txConfig.NewTxBuilder() + err := c.constructTx(msgs, txOpt, txBuilder) + if err != nil { + return nil, err + } + txBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return nil, err + } + simulateResponse, err := c.simulateTx(txBytes, opts...) + if err != nil { + return nil, err + } + return simulateResponse, nil +} + +func (c *GreenfieldClient) simulateTx(txBytes []byte, opts ...grpc.CallOption) (*tx.SimulateResponse, error) { + simulateResponse, err := c.TxClient.Simulate( + context.Background(), + &tx.SimulateRequest{ + TxBytes: txBytes, + }, + opts..., + ) + if err != nil { + return nil, err + } + return simulateResponse, nil +} + +// SignTx signs the tx with private key and returns bytes +func (c *GreenfieldClient) SignTx(msgs []sdk.Msg, txOpt *types.TxOption) ([]byte, error) { + txConfig := authtx.NewTxConfig(c.codec, []signing.SignMode{signing.SignMode_SIGN_MODE_EIP_712}) + txBuilder := txConfig.NewTxBuilder() + if err := c.constructTxWithGasLimit(msgs, txOpt, txConfig, txBuilder); err != nil { + return nil, err + } + return c.signTx(txConfig, txBuilder) +} + +func (c *GreenfieldClient) signTx(txConfig client.TxConfig, txBuilder client.TxBuilder) ([]byte, error) { + km, err := c.GetKeyManager() + if err != nil { + return nil, err + } + account, err := c.getAccount() + if err != nil { + return nil, err + } + signerData := xauthsigning.SignerData{ + ChainID: c.chainId, + AccountNumber: account.GetAccountNumber(), + Sequence: account.GetSequence(), + } + sig, err := clitx.SignWithPrivKey(signing.SignMode_SIGN_MODE_EIP_712, + signerData, + txBuilder, + km.GetPrivKey(), + txConfig, + account.GetSequence(), + ) + if err != nil { + return nil, err + } + err = txBuilder.SetSignatures(sig) + if err != nil { + return nil, err + } + txSignedBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return nil, err + } + return txSignedBytes, nil +} + +// setSingerInfo gathers the signer info by doing "empty signature" hack, and inject it into txBuilder +func (c *GreenfieldClient) setSingerInfo(txBuilder client.TxBuilder) error { + km, err := c.GetKeyManager() + if err != nil { + return err + } + account, err := c.getAccount() + if err != nil { + return err + } + sig := signing.SignatureV2{ + PubKey: km.GetPrivKey().PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: signing.SignMode_SIGN_MODE_EIP_712, + }, + Sequence: account.GetSequence(), + } + if err := txBuilder.SetSignatures(sig); err != nil { + return err + } + return nil +} + +func (c *GreenfieldClient) constructTx(msgs []sdk.Msg, txOpt *types.TxOption, txBuilder client.TxBuilder) error { + for _, m := range msgs { + if err := m.ValidateBasic(); err != nil { + return err + } + } + + if err := txBuilder.SetMsgs(msgs...); err != nil { + return err + } + if txOpt != nil { + if txOpt.Memo != "" { + txBuilder.SetMemo(txOpt.Memo) + } + if !txOpt.FeeAmount.IsZero() { + txBuilder.SetFeeAmount(txOpt.FeeAmount) + } + if !txOpt.FeePayer.Empty() { + txBuilder.SetFeePayer(txOpt.FeePayer) + } + } + // inject signer info into txBuilder, it is needed for simulating and signing + return c.setSingerInfo(txBuilder) +} + +func (c *GreenfieldClient) constructTxWithGasLimit(msgs []sdk.Msg, txOpt *types.TxOption, txConfig client.TxConfig, txBuilder client.TxBuilder) error { + // construct a tx with txOpt excluding GasLimit + err := c.constructTx(msgs, txOpt, txBuilder) + if err != nil { + return err + } + if txOpt != nil && txOpt.GasLimit != 0 { + txBuilder.SetGasLimit(txOpt.GasLimit) + return nil + } + + txBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return err + } + simulateRes, err := c.simulateTx(txBytes) + if err != nil { + return err + } + txBuilder.SetGasLimit(uint64(GasMultiplier * float64(simulateRes.GasInfo.GetGasUsed()))) + return nil +} + +func (c *GreenfieldClient) getAccount() (authtypes.AccountI, error) { + km, err := c.GetKeyManager() + if err != nil { + return nil, err + } + acct, err := c.AuthQueryClient.Account(context.Background(), &authtypes.QueryAccountRequest{Address: km.GetAddr().String()}) + if err != nil { + return nil, err + } + var account authtypes.AccountI + if err := c.codec.InterfaceRegistry().UnpackAny(acct.Account, &account); err != nil { + return nil, err + } + return account, nil +} diff --git a/sdk/client/tx_test.go b/sdk/client/tx_test.go new file mode 100644 index 000000000..041d1a9b3 --- /dev/null +++ b/sdk/client/tx_test.go @@ -0,0 +1,61 @@ +package client + +import ( + "testing" + + "github.com/bnb-chain/greenfield/sdk/client/test" + "github.com/bnb-chain/greenfield/sdk/keys" + "github.com/bnb-chain/greenfield/sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/stretchr/testify/assert" +) + +func TestSendTokenSucceedWithSimulatedGas(t *testing.T) { + km, err := keys.NewPrivateKeyManager(test.TEST_PRIVATE_KEY) + assert.NoError(t, err) + gnfdCli := NewGreenfieldClientWithKeyManager(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID, km) + to, err := sdk.AccAddressFromHexUnsafe(test.TEST_ADDR) + assert.NoError(t, err) + transfer := banktypes.NewMsgSend(km.GetAddr(), to, sdk.NewCoins(sdk.NewInt64Coin("bnb", 12))) + response, err := gnfdCli.BroadcastTx([]sdk.Msg{transfer}, nil) + assert.NoError(t, err) + assert.Equal(t, uint32(0), response.TxResponse.Code) + t.Log(response.TxResponse.String()) +} + +func TestSendTokenWithTxOptionSucceed(t *testing.T) { + km, err := keys.NewPrivateKeyManager(test.TEST_PRIVATE_KEY) + assert.NoError(t, err) + gnfdCli := NewGreenfieldClientWithKeyManager(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID, km) + to, err := sdk.AccAddressFromHexUnsafe(test.TEST_ADDR) + assert.NoError(t, err) + transfer := banktypes.NewMsgSend(km.GetAddr(), to, sdk.NewCoins(sdk.NewInt64Coin("bnb", 100))) + payerAddr, err := sdk.AccAddressFromHexUnsafe(km.GetAddr().String()) + assert.NoError(t, err) + mode := tx.BroadcastMode_BROADCAST_MODE_ASYNC + txOpt := &types.TxOption{ + Mode: &mode, + GasLimit: 123456, + Memo: "test", + FeeAmount: sdk.Coins{{Denom: "bnb", Amount: sdk.NewInt(1)}}, + FeePayer: payerAddr, + } + response, err := gnfdCli.BroadcastTx([]sdk.Msg{transfer}, txOpt) + assert.NoError(t, err) + assert.Equal(t, uint32(0), response.TxResponse.Code) + t.Log(response.TxResponse.String()) +} + +func TestSimulateTx(t *testing.T) { + km, err := keys.NewPrivateKeyManager(test.TEST_PRIVATE_KEY) + assert.NoError(t, err) + gnfdCli := NewGreenfieldClientWithKeyManager(test.TEST_GRPC_ADDR, test.TEST_CHAIN_ID, km) + to, err := sdk.AccAddressFromHexUnsafe(test.TEST_ADDR) + assert.NoError(t, err) + transfer := banktypes.NewMsgSend(km.GetAddr(), to, sdk.NewCoins(sdk.NewInt64Coin("bnb", 100))) + simulateRes, err := gnfdCli.SimulateTx([]sdk.Msg{transfer}, nil) + assert.NoError(t, err) + t.Log(simulateRes.GasInfo.String()) +} diff --git a/sdk/keys/key_manager.go b/sdk/keys/key_manager.go new file mode 100644 index 000000000..345d204fd --- /dev/null +++ b/sdk/keys/key_manager.go @@ -0,0 +1,95 @@ +package keys + +import ( + "encoding/hex" + "fmt" + + "github.com/cosmos/cosmos-sdk/crypto/hd" + ctypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/evmos/ethermint/crypto/ethsecp256k1" + ethHd "github.com/evmos/ethermint/crypto/hd" + + "strings" + + "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/go-bip39" +) + +const ( + defaultBIP39Passphrase = "" + FullPath = "m/44'/60'/0'/0/0" +) + +type KeyManager interface { + GetPrivKey() ctypes.PrivKey + GetAddr() types.AccAddress +} + +type keyManager struct { + privKey ctypes.PrivKey + addr types.AccAddress + mnemonic string +} + +func NewPrivateKeyManager(priKey string) (KeyManager, error) { + k := keyManager{} + err := k.recoveryFromPrivateKey(priKey) + return &k, err +} + +func NewMnemonicKeyManager(mnemonic string) (KeyManager, error) { + k := keyManager{} + err := k.recoveryFromMnemonic(mnemonic, FullPath) + return &k, err +} + +//TODO NewKeyStoreKeyManager to be implemented + +func (m *keyManager) recoveryFromPrivateKey(privateKey string) error { + priBytes, err := hex.DecodeString(privateKey) + if err != nil { + return err + } + + if len(priBytes) != 32 { + return fmt.Errorf("Len of Keybytes is not equal to 32 ") + } + var keyBytesArray [32]byte + copy(keyBytesArray[:], priBytes[:32]) + priKey := ethHd.EthSecp256k1.Generate()(keyBytesArray[:]).(*ethsecp256k1.PrivKey) + addr := types.AccAddress(priKey.PubKey().Address()) + m.addr = addr + m.privKey = priKey + return nil +} + +func (m *keyManager) recoveryFromMnemonic(mnemonic, keyPath string) error { + words := strings.Split(mnemonic, " ") + if len(words) != 12 && len(words) != 24 { + return fmt.Errorf("mnemonic length should either be 12 or 24") + } + seed, err := bip39.NewSeedWithErrorChecking(mnemonic, defaultBIP39Passphrase) + if err != nil { + return err + } + // create master key and derive first key: + masterPriv, ch := hd.ComputeMastersFromSeed(seed) + derivedPriv, err := hd.DerivePrivateKeyForPath(masterPriv, ch, keyPath) + if err != nil { + return err + } + priKey := ethHd.EthSecp256k1.Generate()(derivedPriv[:]).(*ethsecp256k1.PrivKey) + addr := types.AccAddress(priKey.PubKey().Address()) + m.addr = addr + m.privKey = priKey + m.mnemonic = mnemonic + return nil +} + +func (m *keyManager) GetPrivKey() ctypes.PrivKey { + return m.privKey +} + +func (m *keyManager) GetAddr() types.AccAddress { + return m.addr +} diff --git a/sdk/keys/key_manager_test.go b/sdk/keys/key_manager_test.go new file mode 100644 index 000000000..4b330ec30 --- /dev/null +++ b/sdk/keys/key_manager_test.go @@ -0,0 +1,30 @@ +package keys + +import ( + "encoding/hex" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCreateKeyManagerFromPrivateKeyHex(t *testing.T) { + planText := []byte("Test") + priv := "ab463aca3d2965233da3d1d6108aa521274c5ddc2369ff72970a52a451863fbf" + keyManager, err := NewPrivateKeyManager(priv) + assert.NoError(t, err) + sigs, err := keyManager.GetPrivKey().Sign(planText) + assert.NoError(t, err) + valid := keyManager.GetPrivKey().PubKey().VerifySignature(planText, sigs) + assert.True(t, valid) +} + +func TestCreateKeyManagerFromMnemonic(t *testing.T) { + mnemonic := "dragon shy author wave swamp avoid lens hen please series heavy squeeze alley castle crazy action peasant green vague camp mirror amount person legal" + keyManager, err := NewMnemonicKeyManager(mnemonic) + assert.NoError(t, err) + address := keyManager.GetAddr().String() + assert.Equal(t, "0x535E34B319B3575108Deaf2f4FEeeC73AEbE3eF9", address) + key := keyManager.GetPrivKey() + assert.Equal(t, "ab463aca3d2965233da3d1d6108aa521274c5ddc2369ff72970a52a451863fbf", hex.EncodeToString(key.Bytes())) + +} diff --git a/sdk/types/codec.go b/sdk/types/codec.go new file mode 100644 index 000000000..1c60d031f --- /dev/null +++ b/sdk/types/codec.go @@ -0,0 +1,37 @@ +package types + +import ( + bridgetypes "github.com/bnb-chain/greenfield/x/bridge/types" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" + sptypes "github.com/bnb-chain/greenfield/x/sp/types" + storagetypes "github.com/bnb-chain/greenfield/x/storage/types" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authztypes "github.com/cosmos/cosmos-sdk/x/authz" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" + proposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +func Cdc() *codec.ProtoCodec { + interfaceRegistry := types.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(interfaceRegistry) + authtypes.RegisterInterfaces(interfaceRegistry) + authztypes.RegisterInterfaces(interfaceRegistry) + banktypes.RegisterInterfaces(interfaceRegistry) + distrtypes.RegisterInterfaces(interfaceRegistry) + feegranttypes.RegisterInterfaces(interfaceRegistry) + proposaltypes.RegisterInterfaces(interfaceRegistry) + slashingtypes.RegisterInterfaces(interfaceRegistry) + stakingtypes.RegisterInterfaces(interfaceRegistry) + bridgetypes.RegisterInterfaces(interfaceRegistry) + sptypes.RegisterInterfaces(interfaceRegistry) + paymenttypes.RegisterInterfaces(interfaceRegistry) + storagetypes.RegisterInterfaces(interfaceRegistry) + return codec.NewProtoCodec(interfaceRegistry) +} diff --git a/sdk/types/errors.go b/sdk/types/errors.go new file mode 100644 index 000000000..8f66cc6e2 --- /dev/null +++ b/sdk/types/errors.go @@ -0,0 +1,8 @@ +package types + +import "errors" + +var ( + KeyManagerNotInitError = errors.New("Key manager is not initialized yet ") + ChainIdNotSetError = errors.New("ChainID is not set yet ") +) diff --git a/sdk/types/msgTypes.go b/sdk/types/msgTypes.go new file mode 100644 index 000000000..db3334ae8 --- /dev/null +++ b/sdk/types/msgTypes.go @@ -0,0 +1,72 @@ +package types + +import ( + bridgetypes "github.com/bnb-chain/greenfield/x/bridge/types" + paymenttypes "github.com/bnb-chain/greenfield/x/payment/types" + sptypes "github.com/bnb-chain/greenfield/x/sp/types" + storagetypes "github.com/bnb-chain/greenfield/x/storage/types" + authztypes "github.com/cosmos/cosmos-sdk/x/authz" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + oracletypes "github.com/cosmos/cosmos-sdk/x/oracle/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +type ( + MsgGrant = authztypes.MsgGrant + MsgRevoke = authztypes.MsgRevoke + + MsgSend = banktypes.MsgSend + + MsgCreateValidator = stakingtypes.MsgCreateValidator + MsgEditValidator = stakingtypes.MsgEditValidator + MsgDelegate = stakingtypes.MsgDelegate + MsgBeginRedelegate = stakingtypes.MsgBeginRedelegate + MsgUndelegate = stakingtypes.MsgUndelegate + MsgCancelUnbondingDelegation = stakingtypes.MsgCancelUnbondingDelegation + + MsgSetWithdrawAddress = distrtypes.MsgSetWithdrawAddress + MsgWithdrawDelegatorReward = distrtypes.MsgWithdrawDelegatorReward + MsgWithdrawValidatorCommission = distrtypes.MsgWithdrawValidatorCommission + MsgFundCommunityPool = distrtypes.MsgFundCommunityPool + + MsgSubmitProposal = govv1.MsgSubmitProposal + MsgExecLegacyContent = govv1.MsgExecLegacyContent + MsgVote = govv1.MsgVote + MsgGovDeposit = govv1.MsgDeposit + MsgVoteWeighted = govv1.MsgVoteWeighted + + MsgUnjail = slashingtypes.MsgUnjail + MsgImpeach = slashingtypes.MsgImpeach + + MsgGrantAllowance = feegranttypes.MsgGrantAllowance + MsgRevokeAllowance = feegranttypes.MsgRevokeAllowance + + MsgClaim = oracletypes.MsgClaim + + MsgTransferOut = bridgetypes.MsgTransferOut + + MsgCreatePaymentAccount = paymenttypes.MsgCreatePaymentAccount + MsgPaymentDeposit = paymenttypes.MsgDeposit + MsgWithdraw = paymenttypes.MsgWithdraw + MsgDisableRefund = paymenttypes.MsgDisableRefund + + MsgCreateStorageProvider = sptypes.MsgCreateStorageProvider + MsgSpDeposit = sptypes.MsgDeposit + MsgEditStorageProvider = sptypes.MsgEditStorageProvider + + MsgCreateBucket = storagetypes.MsgCreateBucket + MsgDeleteBucket = storagetypes.MsgDeleteBucket + MsgCreateObject = storagetypes.MsgCreateObject + MsgSealObject = storagetypes.MsgSealObject + MsgRejectSealObject = storagetypes.MsgRejectSealObject + MsgCopyObject = storagetypes.MsgCopyObject + MsgDeleteObject = storagetypes.MsgDeleteObject + MsgCreateGroup = storagetypes.MsgCreateGroup + MsgDeleteGroup = storagetypes.MsgDeleteGroup + MsgUpdateGroupMember = storagetypes.MsgUpdateGroupMember + MsgLeaveGroup = storagetypes.MsgLeaveGroup +) diff --git a/sdk/types/type.go b/sdk/types/type.go new file mode 100644 index 000000000..e0b977722 --- /dev/null +++ b/sdk/types/type.go @@ -0,0 +1,14 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" +) + +type TxOption struct { + Mode *tx.BroadcastMode + GasLimit uint64 + Memo string + FeeAmount sdk.Coins + FeePayer sdk.AccAddress +} diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index 504f949ac..22c7f8235 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -121,27 +121,27 @@ func init() { func init() { proto.RegisterFile("greenfield/bridge/query.proto", fileDescriptor_376b860178c53121) } var fileDescriptor_376b860178c53121 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0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d, 0xf5, 0x0e, 0xac, 0x57, 0xe4, 0x14, 0xd7, - 0x12, 0xbc, 0x89, 0x76, 0xd1, 0xc1, 0x7a, 0xb3, 0x60, 0xab, 0x7f, 0xc6, 0x12, 0xdb, 0xfa, 0x3f, - 0x79, 0xdd, 0xc9, 0xda, 0x15, 0xd7, 0x7c, 0x42, 0x78, 0x2d, 0x26, 0x93, 0x47, 0x84, 0x6b, 0xc9, - 0x42, 0xd8, 0x6f, 0x31, 0xcb, 0xed, 0x72, 0xfe, 0x67, 0x7f, 0xea, 0x5d, 0x1c, 0xdd, 0x3d, 0xbf, - 0x3f, 0xfc, 0xdb, 0x27, 0x7b, 0x5c, 0x5a, 0x79, 0x1c, 0x49, 0xbe, 0xea, 0x2e, 0xad, 0xb3, 0xc9, - 0x8c, 0xa2, 0xe9, 0x8c, 0xa2, 0xb7, 0x19, 0x45, 0xf7, 0x73, 0x9a, 0x4d, 0xe7, 0x34, 0x7b, 0x99, - 0xd3, 0xec, 0x8a, 0x69, 0x13, 0x7a, 0x23, 0xc9, 0x3a, 0x30, 0xf8, 0x39, 0xe8, 0xf6, 0x33, 0x2a, - 0x8c, 0x9d, 0xf2, 0xb2, 0x16, 0x4f, 0x7c, 0xf2, 0x11, 0x00, 0x00, 0xff, 0xff, 0x03, 0x99, 0xf5, - 0x5d, 0x1f, 0x02, 0x00, 0x00, + // 308 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0x7b, 0x31, + 0x14, 0xc5, 0x5f, 0xfe, 0xfc, 0xed, 0x10, 0xb7, 0xd8, 0x41, 0x9f, 0x1a, 0xf5, 0x4d, 0x22, 0x98, + 0xd0, 0xfa, 0x05, 0xa4, 0x93, 0xa3, 0x76, 0x11, 0xdc, 0x92, 0x36, 0xa6, 0x81, 0x36, 0x37, 0x7d, + 0x49, 0xc5, 0xae, 0xce, 0x0e, 0x82, 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xdc, 0x3d, 0xbf, 0x3f, + 0xfe, 0xdb, 0x26, 0x5b, 0x7c, 0xd5, 0x35, 0x5a, 0x67, 0x93, 0x19, 0x45, 0xd3, 0x19, 0x45, 0x6f, + 0x33, 0x8a, 0x1e, 0xe6, 0x34, 0x9b, 0xce, 0x69, 0xf6, 0x32, 0xa7, 0xd9, 0x15, 0xd3, 0x26, 0xf4, + 0x46, 0x92, 0x75, 0x60, 0xc0, 0xa5, 0x95, 0xc7, 0x71, 0xf1, 0x77, 0xd0, 0xed, 0x27, 0x2a, 0x8c, + 0x9d, 0xf2, 0xb2, 0x16, 0x0f, 0x7b, 0xf2, 0x11, 0x00, 0x00, 0xff, 0xff, 0x70, 0x4f, 0xd8, 0x2b, + 0x15, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index f2d25fa75..524d26e79 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -145,7 +145,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bnb-chain", "greenfield", "bridge", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "bridge", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/payment/types/query.pb.go b/x/payment/types/query.pb.go index b111734bc..04812b892 100644 --- a/x/payment/types/query.pb.go +++ b/x/payment/types/query.pb.go @@ -1262,90 +1262,90 @@ func init() { func init() { proto.RegisterFile("greenfield/payment/query.proto", fileDescriptor_f62e6684473ccf4a) } var fileDescriptor_f62e6684473ccf4a = []byte{ - // 1323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x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e, 0x9c, 0x21, 0xdf, - 0x9e, 0x64, 0x06, 0x1e, 0x9f, 0x64, 0x06, 0x9e, 0x9e, 0x64, 0x06, 0x3e, 0x91, 0x3b, 0x6e, 0xc4, - 0x81, 0x60, 0x5f, 0xb6, 0xe1, 0xc4, 0xf5, 0x58, 0x1d, 0x12, 0x3f, 0xff, 0xae, 0xbd, 0x08, 0x00, - 0x00, 0xff, 0xff, 0x12, 0x00, 0x38, 0x10, 0xac, 0x17, 0x00, 0x00, + // 1316 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xc4, 0x6d, 0xa1, 0xaf, 0x55, 0x1a, 0x26, 0x11, 0xa4, 0x6e, 0xea, 0x84, 0x09, 0x31, + 0xf9, 0x51, 0xef, 0x36, 0x49, 0x4b, 0x9b, 0x34, 0x55, 0xb1, 0x8b, 0x88, 0x72, 0x22, 0x38, 0x1c, + 0x80, 0x8b, 0xb5, 0x6b, 0x0f, 0x8e, 0xc5, 0x7a, 0xd7, 0xf5, 0xae, 0x01, 0x2b, 0xca, 0x05, 0xb8, + 0x17, 0x89, 0xbf, 0x80, 0x03, 0x37, 0x2e, 0x48, 0x1c, 0x0a, 0x82, 0x0b, 0xe2, 0xd0, 0x03, 0x42, + 0x55, 0x7b, 0xa9, 0x38, 0x54, 0x28, 0x41, 0xe2, 0xdf, 0x40, 0x3b, 0xfb, 0xd6, 0xd9, 0x5d, 0xef, + 0xae, 0x37, 0xce, 0x5e, 0x12, 0xef, 0xec, 0x7b, 0xdf, 0x7c, 0xdf, 0x7b, 0x6f, 0x66, 0xde, 0x2c, + 0xe4, 0xea, 0x6d, 0xce, 0xf5, 0x4f, 0x1a, 0x5c, 0xab, 0xc9, 0x2d, 0xa5, 0xdb, 0xe4, 0xba, 0x25, + 0x3f, 0xe8, 0xf0, 0x76, 0x57, 0x6a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0x1f, 0xd0, 0xef, 0x08, + 0x5c, 0x70, 0x21, 0xec, 0x20, 0xdf, 0x48, 0x14, 0xa6, 0x21, 0xa8, 0x86, 0x74, 0x89, 0x6c, 0x5e, + 0x50, 0x9d, 0xa1, 0x57, 0x63, 0xa9, 0x96, 0xb6, 0x1f, 0x1f, 0xe6, 0xc8, 0x93, 0xc3, 0x1c, 0xf9, + 0xe7, 0x30, 0x47, 0xbe, 0x39, 0xca, 0x8d, 0x3c, 0x39, 0xca, 0x8d, 0x3c, 0x3f, 0xca, 0x8d, 0x7c, + 0x2c, 0x7b, 0x6e, 0xba, 0xaa, 0xae, 0x16, 0x04, 0x05, 0x2f, 0xd8, 0x17, 0x3d, 0x38, 0x71, 0xed, + 0x55, 0xcf, 0x89, 0xcf, 0xba, 0x6b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x21, 0xa5, 0xb8, 0x97, + 0x84, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/payment/types/query.pb.gw.go b/x/payment/types/query.pb.gw.go index 33e034524..dec06ac38 100644 --- a/x/payment/types/query.pb.gw.go +++ b/x/payment/types/query.pb.gw.go @@ -1259,13 +1259,13 @@ var ( pattern_Query_GetPaymentAccountsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"greenfield", "payment", "get_payment_accounts_by_owner", "owner"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AutoSettleRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"bnb-chain", "greenfield", "payment", "auto_settle_record", "timestamp", "addr"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AutoSettleRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"greenfield", "payment", "auto_settle_record", "timestamp", "addr"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AutoSettleRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bnb-chain", "greenfield", "payment", "auto_settle_record"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AutoSettleRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "payment", "auto_settle_record"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BnbPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"bnb-chain", "greenfield", "payment", "bnb_price", "time"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BnbPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"greenfield", "payment", "bnb_price", "time"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BnbPriceAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bnb-chain", "greenfield", "payment", "bnb_price"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BnbPriceAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "payment", "bnb_price"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/sp/types/query.pb.go b/x/sp/types/query.pb.go index e543b5ec1..84d6466d6 100644 --- a/x/sp/types/query.pb.go +++ b/x/sp/types/query.pb.go @@ -223,36 +223,36 @@ func init() { func init() { proto.RegisterFile("greenfield/sp/query.proto", fileDescriptor_48dd9c8aad3b7a6d) } var fileDescriptor_48dd9c8aad3b7a6d = []byte{ - // 452 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x3f, 0x6f, 0x13, 0x31, - 0x18, 0xc6, 0xcf, 0x29, 0x64, 0x70, 0x17, 0x64, 0x2a, 0x44, 0x4f, 0xe5, 0x0a, 0x37, 0x90, 0xea, - 0x00, 0x5b, 0x3d, 0x60, 0x43, 0x42, 0xaa, 0x10, 0xac, 0x21, 0xdd, 0x58, 0x90, 0x9d, 0xba, 0xce, - 0x49, 0x89, 0xed, 0x9c, 0x9d, 0x88, 0xac, 0x8c, 0x4c, 0x48, 0x7c, 0x0a, 0x66, 0xbe, 0x44, 0xc4, - 0x14, 0x89, 0x85, 0x09, 0xa1, 0x84, 0x0f, 0x82, 0xce, 0x76, 0xc8, 0x1f, 0x72, 0xfc, 0xd9, 0xce, - 0xf6, 0xfb, 0x7b, 0x9f, 0xe7, 0x7d, 0x7c, 0x86, 0x87, 0xa2, 0xe4, 0x5c, 0x5e, 0x16, 0xbc, 0x7f, - 0x41, 0x8c, 0x26, 0xc3, 0x11, 0x2f, 0x27, 0x58, 0x97, 0xca, 0x2a, 0x74, 0x83, 0x49, 0xd6, 0xed, - 0xd1, 0x42, 0xe2, 0x55, 0x0d, 0x36, 0x3a, 0xce, 0xba, 0xca, 0x0c, 0x94, 0x21, 0x8c, 0x1a, 0xee, - 0x01, 0x32, 0x3e, 0x65, 0xdc, 0xd2, 0x53, 0xa2, 0xa9, 0x28, 0x24, 0xb5, 0x85, 0x92, 0xbe, 0x47, - 0x7c, 0xe8, 0x6b, 0x5f, 0xbb, 0x15, 0xf1, 0x8b, 0x70, 0x74, 0x20, 0x94, 0x50, 0x7e, 0xbf, 0xfa, - 0x0a, 0xbb, 0x47, 0x42, 0x29, 0xd1, 0xe7, 0x84, 0xea, 0x82, 0x50, 0x29, 0x95, 0x75, 0xdd, 0x96, - 0x4c, 0xbc, 0xe9, 0x56, 0xd3, 0x92, 0x0e, 0x96, 0x67, 0x5b, 0x93,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x9d, 0x1e, 0x7a, 0xf4, 0x47, 0xa9, 0x9a, 0x5b, 0x8d, 0x1f, 0xff, 0x27, 0x15, 0xac, 0xe6, - 0xce, 0xea, 0x7d, 0x94, 0xd5, 0x5a, 0x35, 0x1e, 0xad, 0xde, 0x8f, 0x67, 0xcf, 0x9e, 0x4d, 0xe7, - 0x09, 0x98, 0xcd, 0x13, 0xf0, 0x7d, 0x9e, 0x80, 0xf7, 0x8b, 0x24, 0x9a, 0x2d, 0x92, 0xe8, 0xeb, - 0x22, 0x89, 0x5e, 0x65, 0xa2, 0xb0, 0xbd, 0x11, 0xc3, 0x5d, 0x35, 0xd8, 0xdd, 0xef, 0xcd, 0xaf, - 0x77, 0xc1, 0x9a, 0xee, 0x61, 0x3c, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x32, 0x28, 0xbe, 0xae, - 0xff, 0x03, 0x00, 0x00, + // 453 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6e, 0x13, 0x31, + 0x14, 0xc6, 0xc7, 0x29, 0x64, 0xe1, 0x6e, 0x90, 0x29, 0x7f, 0x3a, 0x6a, 0x87, 0x6a, 0x16, 0x34, + 0x0a, 0xc2, 0x56, 0x03, 0xec, 0x90, 0x90, 0x2a, 0x04, 0xdb, 0x90, 0xee, 0xd8, 0x20, 0x3b, 0x75, + 0x9d, 0x91, 0x12, 0xdb, 0x19, 0x3b, 0x11, 0xd9, 0x21, 0x4e, 0x80, 0xc4, 0x29, 0x72, 0x01, 0xce, + 0x90, 0x65, 0x24, 0x36, 0xac, 0x10, 0x4a, 0x38, 0x08, 0x1a, 0xdb, 0x21, 0xc9, 0x90, 0x01, 0xba, + 0x1b, 0xdb, 0xef, 0x7b, 0xdf, 0xef, 0x7d, 0x1e, 0xc3, 0x43, 0x91, 0x73, 0x2e, 0xaf, 0x32, 0xde, + 0xbf, 0x24, 0x46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0x43, 0x99, 0x4e, 0x01, 0x3c, 0xae, + 0x30, 0x0a, 0x73, 0xbc, 0x80, 0x7b, 0x46, 0x17, 0x43, 0xec, 0x35, 0xf6, 0x5b, 0xa7, 0x55, 0x43, + 0x94, 0xe4, 0x61, 0x9a, 0x42, 0x89, 0x5e, 0x6f, 0xa1, 0xd6, 0x1c, 0xea, 0xe9, 0x3f, 0x51, 0xbd, + 0xfb, 0x26, 0x6b, 0xeb, 0x4b, 0x0d, 0xde, 0x74, 0xac, 0xe8, 0x03, 0x80, 0x75, 0x1f, 0x1b, 0x6a, + 0x56, 0x11, 0xfd, 0x79, 0x53, 0xf1, 0xa3, 0xff, 0xaa, 0xf5, 0xce, 0xe9, 0xf1, 0xc7, 0xaf, 0x3f, + 0x3f, 0xd7, 0xee, 0xa1, 0x3b, 0x64, 0xd7, 0xcf, 0x82, 0xa6, 0x00, 0xde, 0x2a, 0x67, 0x86, 0x9e, + 0xfe, 0xd5, 0xa0, 0xe2, 0x2e, 0xe3, 0x67, 0xd7, 0x54, 0x05, 0xc0, 0x86, 0x03, 0x4c, 0xd1, 0x49, + 0x09, 0xd0, 0x78, 0x41, 0xf1, 0x56, 0xbc, 0xe2, 0xfc, 0xe5, 0x6c, 0x91, 0x80, 0xf9, 0x22, 0x01, + 0x3f, 0x16, 0x09, 0xf8, 0xb4, 0x4c, 0xa2, 0xf9, 0x32, 0x89, 0xbe, 0x2d, 0x93, 0xe8, 0x6d, 0x53, + 0x64, 0xb6, 0x37, 0x62, 0xb8, 0xab, 0x06, 0x84, 0x49, 0xf6, 0xd8, 0x51, 0x6c, 0xf6, 0x7b, 0xff, + 0xfb, 0x0d, 0xb0, 0xba, 0x7b, 0x04, 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x5e, 0xe8, + 0xac, 0xeb, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/sp/types/query.pb.gw.go b/x/sp/types/query.pb.gw.go index b9b960410..611d2d003 100644 --- a/x/sp/types/query.pb.gw.go +++ b/x/sp/types/query.pb.gw.go @@ -224,9 +224,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bnb-chain", "greenfield", "sp", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "sp", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_StorageProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bnb-chain", "greenfield", "sp", "storage_providers"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_StorageProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"greenfield", "sp", "storage_providers"}, "", runtime.AssumeColonVerbOpt(false))) ) var (