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(launch): automatically fetch mainnet account balances for query GenesisAccounts with mainnet #805

Merged
merged 11 commits into from
Jun 3, 2022

Conversation

lumtis
Copy link
Contributor

@lumtis lumtis commented May 18, 2022

The same query GenesisAccount GenesisAccountAll can be used to get the genesis account with final balances for mainent.

This simplify launching mainnet from the client perspective

The feature can be tested with Ignite CLI:

ignite network chain publish https://github.com/lubtd/orbit.git --chain-id orbit-1 --local --mainnet --total-supply 1000000orbit

ignite network chain init 2 --local
? Staking amount 9000orbit
? Commission rate 0.10
? Commission max rate 0.20
? Commission max change rate 0.01

ignite network chain join 2 --local

// need to add manually shares to the account with spnd from the coordinato
spnd tx campaign add-shares 1 spn165wt8n7n9280vqrgkjz85d4ew90fe3vt6cg8v6 50000orbit --from def -y

ignite network chain show accounts 2 --local

ignite network chain launch 2 --local

ignite network chain prepare 2 --local

The genesis contains the account balance calculated from their shares

@lumtis lumtis linked an issue May 18, 2022 that may be closed by this pull request
@lumtis lumtis marked this pull request as ready for review May 19, 2022 08:43
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #805 (62dd65b) into develop (53277e4) will increase coverage by 0.04%.
The diff coverage is 81.53%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #805      +/-   ##
===========================================
+ Coverage    10.50%   10.54%   +0.04%     
===========================================
  Files          332      332              
  Lines        77711    77755      +44     
===========================================
+ Hits          8164     8202      +38     
- Misses       69342    69346       +4     
- Partials       205      207       +2     
Impacted Files Coverage Δ
x/launch/keeper/grpc_genesis_account.go 85.00% <81.53%> (+1.66%) ⬆️

@lumtis
Copy link
Contributor Author

lumtis commented Jun 1, 2022

@Pantani @giunatale @aljo242 please review this one when you can

@lumtis lumtis merged commit 832b702 into develop Jun 3, 2022
@lumtis lumtis deleted the launch-genesis-accounts-mainnet branch June 3, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: move MainnetAccountBalanceAll into launch module
2 participants