-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
cmd/lotus-shed/evmbalance.go
Outdated
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Println("Total balanace: ", big.Add(big.Add(tvlEthAccount, tvlPlaceholder), tvlEvm)) | |
fmt.Println("Total balance: ", big.Add(big.Add(tvlEthAccount, tvlPlaceholder), tvlEvm)) |
cmd/lotus-shed/evmbalance.go
Outdated
|
||
err = st.ForEach(func(addr address.Address, act *types.Actor) error { | ||
if count%200000 == 0 { | ||
fmt.Println("processed ", count, " actors building maps") |
There was a problem hiding this comment.
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?
cmd/lotus-shed/evmbalance.go
Outdated
) | ||
|
||
var evmBalanceCmd = &cli.Command{ | ||
Name: "evm-balance", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name: "evm-balance", | |
Name: "fevm-balance", |
seems more accurate cause it includes ethaccounts etc.
There was a problem hiding this 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!
Please enter the commit message for your changes. Lines starting
./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!