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

shed: get balances of evm accounts #10489

Merged
merged 9 commits into from
Mar 31, 2023
Merged

shed: get balances of evm accounts #10489

merged 9 commits into from
Mar 31, 2023

Conversation

jennijuju
Copy link
Member

./lotus-shed evm-balance gets total balances of existing eth account actors, evm actors and placeholder actors.

thanks @ZenGround0, for figuring out the datastore reads!

@jennijuju jennijuju requested a review from a team as a code owner March 16, 2023 00:02
fmt.Println("balances in Eth contracts: ", tvlEvm)
fmt.Println("balances in Eth accounts: ", tvlEthAccount)
fmt.Println("balances in placeholder: ", tvlPlaceholder)
fmt.Println("Total balanace: ", big.Add(big.Add(tvlEthAccount, tvlPlaceholder), tvlEvm))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fmt.Println("Total balanace: ", big.Add(big.Add(tvlEthAccount, tvlPlaceholder), tvlEvm))
fmt.Println("Total balance: ", big.Add(big.Add(tvlEthAccount, tvlPlaceholder), tvlEvm))


err = st.ForEach(func(addr address.Address, act *types.Actor) error {
if count%200000 == 0 {
fmt.Println("processed ", count, " actors building maps")
Copy link
Contributor

Choose a reason for hiding this comment

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

what maps? you're not building any maps?

)

var evmBalanceCmd = &cli.Command{
Name: "evm-balance",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Name: "evm-balance",
Name: "fevm-balance",

seems more accurate cause it includes ethaccounts etc.

Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Gets the job done!

@jennijuju jennijuju merged commit 3b0d4f2 into master Mar 31, 2023
@jennijuju jennijuju deleted the jen/tvl2 branch March 31, 2023 19:35
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.

3 participants