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

Experiments with exporters (tokens exporter etc.) #44

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

andreibancioiu
Copy link
Contributor

No description provided.

@andreibancioiu andreibancioiu self-assigned this Dec 6, 2022
@mariusmihaic mariusmihaic self-requested a review July 20, 2023 13:23
@bogdan-rosianu bogdan-rosianu self-requested a review July 21, 2023 08:06
numAccountsOnMainTrie++

if numAccountsOnMainTrie%1000 == 0 {
fmt.Println(numAccountsOnMainTrie)
Copy link
Contributor

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 {
Copy link
Contributor

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{
Copy link
Contributor

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 {
Copy link
Contributor

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])
Copy link
Contributor

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(
Copy link
Contributor

Choose a reason for hiding this comment

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

missing comment

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.

2 participants