diff --git a/data/indexer/dtos.go b/data/indexer/dtos.go index a9337fc60..3699edc5b 100644 --- a/data/indexer/dtos.go +++ b/data/indexer/dtos.go @@ -4,8 +4,26 @@ import ( "time" "github.com/ElrondNetwork/elrond-go-core/data" + "github.com/ElrondNetwork/elrond-go-core/data/esdt" ) +// AccountTokenData holds the data needed for indexing a token of an altered account +type AccountTokenData struct { + Identifier string `json:"identifier"` + Balance string `json:"balance"` + Nonce uint64 `json:"nonce"` + Properties string `json:"properties"` + MetaData *esdt.MetaData `json:"metadata"` +} + +// AlteredAccount holds the data needed of an altered account in a block +type AlteredAccount struct { + Address string `json:"address"` + Balance string `json:"balance,omitempty"` + Nonce uint64 `json:"nonce"` + Tokens []*AccountTokenData `json:"tokens"` +} + // ArgsSaveBlockData will contains all information that are needed to save block data type ArgsSaveBlockData struct { HeaderHash []byte @@ -15,6 +33,7 @@ type ArgsSaveBlockData struct { NotarizedHeadersHashes []string HeaderGasConsumption HeaderGasConsumption TransactionsPool *Pool + AlteredAccounts map[string]*AlteredAccount } // HeaderGasConsumption holds the data needed to save the gas consumption of a header