Skip to content

Commit

Permalink
Merge pull request #114 from ElrondNetwork/additional-data-altered-ac…
Browse files Browse the repository at this point in the history
…counts

Change `outport altered account` DTOs
  • Loading branch information
miiu96 authored Oct 31, 2022
2 parents f54fb81 + 2127de8 commit 17488c3
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions data/outport/dtos.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,32 @@ import (

// AccountTokenData holds the data needed for indexing a token of an altered account
type AccountTokenData struct {
IsNFTCreate bool `json:"isNFTCreate"`
Nonce uint64 `json:"nonce"`
Identifier string `json:"identifier"`
Balance string `json:"balance"`
Properties string `json:"properties"`
MetaData *esdt.MetaData `json:"metadata"`
Nonce uint64 `json:"nonce"`
Identifier string `json:"identifier"`
Balance string `json:"balance"`
Properties string `json:"properties"`
MetaData *esdt.MetaData `json:"metadata"`
AdditionalData *AdditionalAccountTokenData `json:"additionalData,omitempty"`
}

// AlteredAccount holds the data needed of an altered account in a block
type AlteredAccount struct {
IsSender bool `json:"isSender"`
BalanceChanged bool `json:"balanceChanged"`
Nonce uint64 `json:"nonce"`
Address string `json:"address"`
Balance string `json:"balance,omitempty"`
Tokens []*AccountTokenData `json:"tokens"`
Nonce uint64 `json:"nonce"`
Address string `json:"address"`
Balance string `json:"balance,omitempty"`
Tokens []*AccountTokenData `json:"tokens"`
AdditionalData *AdditionalAccountData `json:"additionalData,omitempty"`
}

// AdditionalAccountData holds the additional data for an altered account
type AdditionalAccountData struct {
IsSender bool `json:"isSender,omitempty"`
BalanceChanged bool `json:"balanceChanged,omitempty"`
}

// AdditionalAccountTokenData holds the additional data for indexing a token of an altered account
type AdditionalAccountTokenData struct {
IsNFTCreate bool `json:"isNFTCreate,omitempty"`
}

// ArgsSaveBlockData will contain all information that are needed to save block data
Expand Down

0 comments on commit 17488c3

Please sign in to comment.