Skip to content

Experiments with exporters (tokens exporter etc.)#44

Draft
andreibancioiu wants to merge 4 commits intomainfrom
experimental-exporters
Draft

Experiments with exporters (tokens exporter etc.)#44
andreibancioiu wants to merge 4 commits intomainfrom
experimental-exporters

Conversation

@andreibancioiu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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


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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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