diff --git a/data/api/apiBlock.go b/data/api/apiBlock.go index c8bc13821..9f5670933 100644 --- a/data/api/apiBlock.go +++ b/data/api/apiBlock.go @@ -59,6 +59,8 @@ type NotarizedBlock struct { Nonce uint64 `json:"nonce"` Round uint64 `json:"round"` Shard uint32 `json:"shard"` + RootHash string `json:"rootHash"` + MiniBlockHashes []string `json:"miniBlockHashes,omitempty"` AlteredAccounts []*outport.AlteredAccount `json:"alteredAccounts,omitempty"` } diff --git a/data/api/apiHyperBlock.go b/data/api/apiHyperBlock.go new file mode 100644 index 000000000..01575df45 --- /dev/null +++ b/data/api/apiHyperBlock.go @@ -0,0 +1,28 @@ +package api + +import ( + "time" + + "github.com/ElrondNetwork/elrond-go-core/data/transaction" +) + +// Hyperblock contains all fully executed (both in source and in destination shards) transactions notarized in a given metablock +type Hyperblock struct { + Hash string `json:"hash"` + PrevBlockHash string `json:"prevBlockHash"` + StateRootHash string `json:"stateRootHash"` + Nonce uint64 `json:"nonce"` + Round uint64 `json:"round"` + Epoch uint32 `json:"epoch"` + NumTxs uint32 `json:"numTxs"` + AccumulatedFees string `json:"accumulatedFees,omitempty"` + DeveloperFees string `json:"developerFees,omitempty"` + AccumulatedFeesInEpoch string `json:"accumulatedFeesInEpoch,omitempty"` + DeveloperFeesInEpoch string `json:"developerFeesInEpoch,omitempty"` + Timestamp time.Duration `json:"timestamp,omitempty"` + EpochStartInfo *EpochStartInfo `json:"epochStartInfo,omitempty"` + EpochStartShardsData []*EpochStartShardData `json:"epochStartShardsData,omitempty"` + ShardBlocks []*NotarizedBlock `json:"shardBlocks"` + Transactions []*transaction.ApiTransactionResult `json:"transactions"` + Status string `json:"status,omitempty"` +} diff --git a/data/transaction/apiTransactionResult.go b/data/transaction/apiTransactionResult.go index c56a7bb39..eda0349c0 100644 --- a/data/transaction/apiTransactionResult.go +++ b/data/transaction/apiTransactionResult.go @@ -62,7 +62,7 @@ type ApiTransactionResult struct { CallType string `json:"callType,omitempty"` RelayerAddress string `json:"relayerAddress,omitempty"` RelayedValue string `json:"relayedValue,omitempty"` - ChainID string `json:"chainID"` + ChainID string `json:"chainID,omitempty"` Version uint32 `json:"version,omitempty"` Options uint32 `json:"options"` }