Git Product home page Git Product logo

stargate's Introduction

stargate

banner

Netlify Status

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out Nuxt.js docs.

stargate's People

Contributors

fadeev avatar lovincyrus avatar nassdonald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stargate's Issues

Build error

Environment

go version go1.16.2 linux/amd64
starport version v0.15.0 linux/amd64 -build date: 2021-03-16T06:22:49Z

Steps to reproduce

$ starport app github.com/testapp/testapp
$ cd testapp
$ starport type whois value
$ starport serve

Error details

$ starport serve
Cosmos SDK's version is: Stargate v0.40.0 (or above)

๐Ÿ› ๏ธ  Building proto...
๐Ÿ“ฆ Installing dependencies...
๐Ÿ› ๏ธ  Building the app...
cannot build app:

	# github.com/testapp/testapp/x/testapp/keeper
../../x/testapp/keeper/whois.go:55:8: no new variables on left side of :=
../../x/testapp/keeper/whois.go:55:8: cannot use k.cdc.MustMarshalBinaryBare(&whois) (type []byte) as type string in assignment
../../x/testapp/keeper/whois.go:56:27: cannot use value (type string) as type []byte in argument to store.Set

Waiting for a fix before retrying...

Relevant code snippet

Screenshot from 2021-03-22 21-51-15

move simulate method out of SigningStargateClient class to make sure knowing private key is not a mandatory requirement to simulate

async simulate(signerAddress, messages, memo) { const anyMsgs = messages.map((m) => this.registry.encodeAsAny(m)); const accountFromSigner = (await this.signer.getAccounts()).find((account) => account.address === signerAddress); if (!accountFromSigner) { throw new Error("Failed to retrieve account from signer"); } const pubkey = (0, amino_1.encodeSecp256k1Pubkey)(accountFromSigner.pubkey); const { sequence } = await this.getSequence(signerAddress); const { gasInfo } = await this.forceGetQueryClient().tx.simulate(anyMsgs, memo, pubkey, sequence); (0, utils_1.assertDefined)(gasInfo); return math_1.Uint53.fromString(gasInfo.gasUsed.toString()).toNumber(); }

The above function simulate can be invoked by SigningStargateClient which is a client created with an RPC connection URL and a key pair. Simulate transactions should not need the use of a key pair but only the use of a signer address should suffice. Note that in the function definition of the simulate, only the signer's public address is used which is how it should be. So please remove the requirement that the invoking object should need a private key.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.