-
Notifications
You must be signed in to change notification settings - Fork 5
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
Experiments with exporters (tokens exporter etc.) #44
base: main
Are you sure you want to change the base?
Conversation
numAccountsOnMainTrie++ | ||
|
||
if numAccountsOnMainTrie%1000 == 0 { | ||
fmt.Println(numAccountsOnMainTrie) |
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.
extend the print? maybe parsed x accounts
@@ -0,0 +1,22 @@ | |||
package main | |||
|
|||
type exportedRoot struct { |
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.
might rename to exportedAccountsForRootHash
numAccountsOnMainTrie := 0 | ||
addressTokensMap := make(map[string]map[string]struct{}) | ||
root := exportedRoot{ |
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.
might rename root
to accountsForRootHash
return nil, false | ||
} | ||
|
||
return kv.Key(), true | ||
} | ||
|
||
func saveResult(addressTokensMap map[string]map[string]struct{}, outfile string) error { | ||
jsonBytes, err := json.MarshalIndent(addressTokensMap, "", " ") | ||
func saveResult(addressTokensMap interface{}, outfile string) error { |
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.
use concrete type instead of interface?
if nonce != 0 { | ||
tokens := bytes.Split(token, []byte("-")) | ||
|
||
rebuiltName = string(tokens[0]) + "-" + string(tokens[1]) |
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.
not sure of the intent of this. The token already was ABC-010101
and rebuiltName should still be ABC-010101
vmcommon "github.com/multiversx/mx-chain-vm-common-go" | ||
) | ||
|
||
func GetESDTNFTTokenOnDestination( |
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.
missing comment
No description provided.