Skip to content
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

feat(cmd/network): creates network campaign account list command #2089

Merged
merged 29 commits into from
Mar 11, 2022

Conversation

Pantani
Copy link
Collaborator

@Pantani Pantani commented Feb 15, 2022

close #2069

Description

Creates starport network campaign account list [campaign-id] command to list all accounts added to a campaign

How to test

  • Choose a campaign already launched and run
starport network --nightly campaign account list [champaign-id]

@Pantani Pantani requested a review from fadeev as a code owner February 15, 2022 03:56
@Pantani Pantani self-assigned this Feb 15, 2022
@Pantani Pantani changed the title creates network campaign account list [campaign-id] command feat(cmd/network): creates network campaign account list command Feb 15, 2022
@ilgooz ilgooz added this to the T1 milestone Feb 15, 2022
c.AddCommand(
newNetworkCampaignAccountList(),
)
c.PersistentFlags().AddFlagSet(flagNetworkFrom())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't this in query apis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't remove these flags now because the network command will not work. The network method requires both flags to use the helper methods. We can refactor it in another PR

newNetworkCampaignAccountList(),
)
c.PersistentFlags().AddFlagSet(flagNetworkFrom())
c.PersistentFlags().AddFlagSet(flagSetKeyringBackend())
Copy link
Member

@ilgooz ilgooz Feb 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need these in query apis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starport n --nightly chain init 2

Doesn't work in this branch, can you please check?

account "" does not exist

Also, there is no a --validator-account anymore in the init command. That would be the reason of error above.

Seems like error also presents in the develop branch.

@ilgooz
Copy link
Member

ilgooz commented Feb 24, 2022

@Pantani https://github.com/tendermint/starport/pull/2100/files#diff-2adeba3a75d1dac9ecba397f0e69999b490cc0b71df4373d3f962f5415d25461L38

@Pantani Pantani requested a review from ilgooz February 25, 2022 18:54
Copy link
Member

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Danilo, I'm receiving this error, can you please take a look?

gitpod /workspace/starport/.gitpod $ starport network --nightly campaign account list 1
make sure that this account exists, use 'starport account -h' to manage accounts: account "" does not exist

And my accounts are:

gitpod /workspace/starport/.gitpod $ starport a list
Name    Address                                         Public Key 
default cosmos15pddgx5cp723t43s2vcxzz0l8jhtwuz90lz9mh   PubKeySecp256k1{03EE64013AC34B6F1F815EE91A59334ECDA5C7E59D4089A57844D05657ED79ECDE} 

@Pantani Pantani requested a review from ilgooz March 3, 2022 21:36
@Pantani
Copy link
Collaborator Author

Pantani commented Mar 8, 2022

starport network --nightly campaign account list 1

The campaign account list will show all main campaign MainnetAccounts and MainnetVestingAccounts queried from the SPN. Don't have relation with the starport account command.

@Pantani
Copy link
Collaborator Author

Pantani commented Mar 8, 2022

we also need to test local or reset the nightly environment, because the starport network --nightly campaign list is not working

@ilgooz
Copy link
Member

ilgooz commented Mar 8, 2022

@Pantani it's been reset. We can first merge the campai so we can test this in nightly?

Pantani added 4 commits March 8, 2022 21:30
…unts-list

# Conflicts:
#	go.mod
#	go.sum
#	starport/pkg/events/events_test.go
…unts-list

# Conflicts:
#	starport/cmd/network_campaign.go
#	starport/services/network/networktypes/campaign.go
@ilgooz ilgooz merged commit 721f4bb into develop Mar 11, 2022
@ilgooz ilgooz deleted the feat/campaign-accounts-list branch March 11, 2022 09:59
ilgooz added a commit that referenced this pull request Mar 16, 2022
* feat(changelog): reset `Unreleased` section (#1946)

* fix(docs): change lazy ledger to celestia (#1952)

* (docs): fix typo in hello.md (#1951)

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* Minor grammar fix (#1950)

Grammar fix at line 7.

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* Minor grammar fix (#1949)

Grammar fix at line 55.

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* docs: add v0.19 to the readme (#1956)

* docs(tutorials): blog-index-update (#1961)

* feat(template): add `--no-simulation` flag (#1938)

* add no simulation flag

* add no simulation flag to scaffold message command

* move the simulation modifier function to inside the no simulation condition

Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>

* docs: Remove the link to non existing prerequisite (#1916)

* feat(docs): Remove the link to non existing prerequisite

* Update docs/guide/install.md

Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>

* feat(ci): release the starport binary only on releases (#1980)

* docs: fix Discord link (#1981)

* feat(`network`): simulate requests (#1930)

* init

* Implement apply request

* fix prepare

* initialize apply test

* Apply remove tests

* refactor request

* command verify

* fix chain home

* Add comment

* simulate and refactor

* Lint

* refacotr

* refactor error

* changes in log

* lint

* Update starport/cmd/network_request_verify.go

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* Update starport/services/network/request.go

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* Danilo suggest

* lint

* Ilker comment

* comment

* ilker comment

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* feat(network): set a gas price for the gentx (#1891)

* set gas price from gentx

* merge conflicts

* use zero stake coin

* use gas price and self delegation as a flag

* use errors.wrap instead errors.new

* docs: changelog and migration doc edits for consistency and style (#2004)

* edits for consistency and migration doc for style

* Update docs/migration/index.md

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* typo and add testutil/sample change to cosmostestutil/sample

* add import paths

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs: minor edits and change all headings to use Sentence case (#2013)

* simple edits for heading style to use sentence case

* remove tick mark for headings and fix typo and add punctuation throughout

* update to 0.19.2 in examples and change case

* add preventing regen and change case

* minor genesis edits and change case of headings

* sentence case and minor edits for all KB articles

* docs: rm wasm (#2010)

* docs: Update docs guide v0.19.2 (#2015)

* Update Hello World tutorial to v0.19.2

* Update Blog to v0.19.2

* Update connect blockchain to v0.19.2

* Update IBC relayer tutorial to v0.19.2

* chore: bump flutter's starport_template to v2.0.2 (#2014)

* feat(network): update SPN version with the new peer structure (#2020)

* docs: Hello and Developer Tutoritials index.md, simple change case (#2019)

* Hello and index change case

* simple case change, typo fix, some minor edits

* feat(ci): add workflow to deploy `nightly` releases (#2028)

* fix(ci): add build hash for the `version` command (#2029)

* feat(network/request): don't sort and rm support for reverse ordering ranges (#2031)

* remove sort side effect in numbers.ParseList

* Apply suggestions from code review

Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* fix(pkg/numbers): fix tests (#2033)

* fix(codegen): adjust Go's camelCasing for templates to match JS'  (#2036)

* fix: Adjust camelCasing to match JS

* fix: Only use for queryclient

* docs: update v0.19.2 migration doc to reveal long GitHub paths (#2009)

* add long GitHub paths

* Apply suggestions from code review

thanks Ilker

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* remove https: so import path is literal

* Apply suggestions from code review

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs: update relayer KB to add a remove existing relayer section (#2022)

* add a remove existing relayer section

* Update docs/kb/relayer.md

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

Co-authored-by: Danilo Pantani <danpantani@gmail.com>

* docs: upgrade build a blog to v0.19.2 and make edits (#1987)

* verify v0.19 and make edits

* 0.19 and final edits

* 0.19.2 and series of blog tutos

* docs(migration): improve v0.19.2 upgrade guideline  (#2032)

* Update index.md

* Update index.md

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs(hello): editorial improvements (#1979)

* Update hello.md

* Update docs/guide/hello.md

* Update docs/guide/hello.md

* add steps for query handler

* 0.19 and final edits

* teensy edit

* Update docs/guide/hello.md

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* chore: upgrade SPN version (#2048)

* fix(network): do not hide underlying err msg (#2050)

* fix(cmd/network): printing chain spinner bug (#2049)

* call shutdown

* remove useless print

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* feat(codegen/templates): export registry for all Msgs to use w/ CosmJS (#2037)

* fix(revert): #2037 (#2052)

This reverts commit a8db3cf.

* docs: add dev-env-setup.md (#1817)

* new technical-setup.md file

* Apply suggestions from Ilker code review

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* change filename per Ilker

* add link backs

* too many ensures

* dusting cobwebs off stale suggested changes, so sorry Ilker

Co-authored-by: Danilo Pantani <danpantani@gmail.com>
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs: add enhancements to the nameservice tutorial (#1861)

* docs: fix v0.19.2 migration Github import paths (#2056)

* feat(build): set internal version of relased binary (#1967)

* add ld flags to the build command

* add ld flags to the serve command

* add the ldflags flag to the serve command

* use ldflags as a build config

* add docs for ldflags

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs: tighten up network command help text (#2041)

* tighten up the command text

* add a comma

* clarify not both in error message

* add seconds unit of time

* already exists, fix subject verb agreement

* minor edits

* docs(install): remove TOC,  minor install doc improvements (#2079)

* install doc improvements

* Update docs/guide/install.md

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* chore(CI/Makefile): update the `golint` and add `go import` to the make command (#2087)

* update the golint and add go import to the gofmt make command

* fix goimport into the make command

* feat(network): Add chisel proxy support for gitpod nodes (#2055)

* recognize gitpod peer in join command

* write http tunnels into config on prepare command

* hook into start command and launch chisel proxy

* change chisel info log level

* apply review fixes 1st iteration

* apply review fixes 2nd iteration

* tweak chisel settings

* fix linter

* apply review fixes 3rd iteration

* apply review fixes 4th iteration

* apply review fixes 5th iteration

* apply review fixes 6th iteration

* apply review fixes 7th iteration

Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>

* chore(linters): fix revive linter checks (#2093)

Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>

* docs: contributing update for milestones (#2054)

* contributing update for milestones

* tidy up Markdown and minor edits

* added the missing Git Flow

* Apply suggestions from code review

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* chore: run `goimports` (#2094)

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* fix(network): genesis account ordering (#2095)

* fix genesis account ordering

* fix tests

* fix tests again

* apply review fixes

* Update starport/services/network/networktypes/genesisinformation.go

* make format

Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* fix(cmd/network): fix the spn network peer object printing (#2096)

* fix the spn network peer object printing

* add unit tests

* add explicit import name for spn module

* fix: go.sum (#2106)

* fix(pkg/cosmosclient): add the missing set fee granter (#2101)

* feat(cmd/network): the `chain prepare [id]` should fail if not-launched yet (#2107)

* not run preapre command if the chain is not launched

* fix unit tests

* improve the log messages for the CLI

* docs: fix genesis.html url (#2114)

* feat(network): add network campaign `list` and `show` commands (#2100)

* add campaign info command

* add campaign show command

* apply pr review discussions

* remove unused method call

* fix: use new Discord invite link discord.gg/ignt (#2117)

* use new Discord invite link discord.gg/ignt

* use new Discord invite link discord.gg/ignt

* fix(pkg/cmdrunner): log full command on error (#2078)

Co-authored-by: Petr Ivanov <krest2005@yandex.ru>

* fix(network/cmd): add the validator account flag back (#2121)

* docs: update readme to change Tendermint to Ignite (#2120)

* docs: Create CODE_OF_CONDUCT.md (#2132)

* docs: fixing a typo under blog tutorial (#2133)

* feat(pkg/cosmosclient): request more tokens from faucet as needed (#2125)

* ask token from faucet if don't have enough balance

* fix import sort

* docs(tutorial): remove unused import (#2123)

* docs: remove homebrew from install  (#2135)

* remove homebrew

* add intro to build from source

* refactor: improve tests to use `T.TempDir` (#2139)

The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* docs: scavenge tuto improve language and apply styles (#2134)

* improve language and apply styles

* edits and style

* Update docs/guide/scavenge/02-game.md

Co-authored-by: Sonia Singla <soniasingla.1812@gmail.com>

Co-authored-by: Sonia Singla <soniasingla.1812@gmail.com>

* test(pkg/events): increase unit test coverage (#2138)

* Add unit tests to pkg/events

- Increases the coverage of pkg/events to 100%
- My Cosmos address: cosmos1rzz5sr7f6742gjy3ydqs5d02p3q967fqdfugng

* Add suggestions

* docs: code_of_conduct.md lower case name and simple edits for link style (#2140)

* lower case name and simple edits for link style'

* use git mv to change filename case

* feat(network): update spn version (#2141)

* feat: print start command (#2109)

* print start command

* fix lint check

* review fixes

* ux

* remove named return from Init

* fix mistype

Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>
Co-authored-by: Danilo Pantani <danpantani@gmail.com>
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* include all registered modules in vuex codegen

Bounty address: cosmos1jkhsg47ce3jthg77p75nkve82tf2t7vv0j7rdx

* Fix lints

* feat(network): campaign update (#2099)

* add campaign update command

* fix the logic and response

* add total shares updates flag to the publish command

* vroadcast only one tx msg

* fetch and print the campaing

* update the method name

* update campaign

* update spn version

* fix xtime unit tests

* remove unused method CampaignUpdateTotalShares

* add campaign flag to the publish command

* remove unused flag

* ci: increate test timeout (#2148)

* feat(cmd/network): add `--mainnet` and `--total-supply` flags to the `publish` command (#2122)

* add mainnet and total-supply flags to the pusblish command

* create campaign publish command

* update stmt

* update spn version

* Update starport/cmd/network_chain_publish.go

* Update starport/services/network/campaign.go

* update spn version

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* move FindImportedPackages into goanalysis + CR fixes

* feat(cmd/network): creates `network campaign account list` command (#2089)

* creates `network campaign account list [campaign-id]` command

* run make format

* use goroutine to fetch the campaign accounts

* use Coin and Share type instead string

* add the validator account flag back

* add event options

* print a msg if the summary is empty

* remove unused flags

* put back the keyring flags

* add the keyring flags to the right cmd method

* update spn version

* fix events unit tests

* feat(cmd/network): add `network reward set` cmd (#2086)

* add `n chain reward-set` command

* fix comments for reward-set cmd

* improve the log messages

* fix block indentation

* add reward flags to the publish command

* run make format

* fix the spn upgrade version

* improve the log message

* add validator account flag

* improve the reward log with the new message response

* improve the events messages and logs

* improve the event message options adding the icon

* fix method names and text color

* fix events struct comment

* fix lint

* move chain reward to reward

* improve the error return message

* update spn version

* fix events unit tests

* fix duplicated log message

* fix reward height flag

* update spn version

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* ignore non app.go files in search for registered modules + CR fixes

* feat(cmd/network): implement `network chain revert-launch` command (#2144)

* rever launch

* rename revert launch cmd file

* create a method to reset the genesis time

* improve the cmd logic

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* fix(network): remove unused flags from query commands (#2155)

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* fix(template): simulation `opWeight` name for an op was always the same (#2154)

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>

* docs(scavenge): remove scavenge creator (#2153)

* Find app file through implementation

Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
Co-authored-by: 0xkrane <89357497+0xkrane@users.noreply.github.com>
Co-authored-by: Danilo Pantani <danpantani@gmail.com>
Co-authored-by: sgmoore <git-sgmoore@users.noreply.github.com>
Co-authored-by: Denis Fadeev <denis@fadeev.org>
Co-authored-by: Aliasgar Merchant <44069404+alijnmerchant21@users.noreply.github.com>
Co-authored-by: Lucas Bertrand <lucas.bertrand.22@gmail.com>
Co-authored-by: championshuttler <shivams2799@gmail.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Sonia Singla <soniasingla.1812@gmail.com>
Co-authored-by: Tobias Schwarz <tobias@tendermint.com>
Co-authored-by: Andrzej Chmielewski <andrzejchm@users.noreply.github.com>
Co-authored-by: Petr Ivanov <krest2005@yandex.ru>
Co-authored-by: Petr Ivanov <petr.ivanov@tendermint.com>
Co-authored-by: Alex Megalokonomos <alex@clockwork.gr>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Co-authored-by: Hariom Verma <hariom18599@gmail.com>
Co-authored-by: Giancarlos Salas <giansalex@gmail.com>
Co-authored-by: Barrie Byron <barriebyron@gmail.com>
Co-authored-by: Giuseppe Valente <7AC@users.noreply.github.com>
Co-authored-by: Harish Bhawnani <harishmmp@gmail.com>
Co-authored-by: Zach Alam <poweredbyzach@gmail.com>
Co-authored-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: Theodore <a@xsq.pw>
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
…gnite#2089)

* creates `network campaign account list [campaign-id]` command

* run make format

* use goroutine to fetch the campaign accounts

* use Coin and Share type instead string

* add the validator account flag back

* add event options

* print a msg if the summary is empty

* remove unused flags

* put back the keyring flags

* add the keyring flags to the right cmd method

* update spn version

* fix events unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd/network: implement campaign accounts list
2 participants