@@ -2,61 +2,58 @@ package data
2
2
3
3
import (
4
4
"time"
5
-
6
- "github.com/multiversx/mx-chain-core-go/data/transaction"
7
5
)
8
6
9
7
// Transaction is a structure containing all the fields that need
10
8
// to be saved for a transaction. It has all the default fields
11
9
// plus some extra information for ease of search and filter
12
10
type Transaction struct {
13
- MBHash string `json:"miniBlockHash"`
14
- Nonce uint64 `json:"nonce"`
15
- Round uint64 `json:"round"`
16
- Value string `json:"value"`
17
- ValueNum float64 `json:"valueNum"`
18
- Receiver string `json:"receiver"`
19
- Sender string `json:"sender"`
20
- ReceiverShard uint32 `json:"receiverShard"`
21
- SenderShard uint32 `json:"senderShard"`
22
- GasPrice uint64 `json:"gasPrice"`
23
- GasLimit uint64 `json:"gasLimit"`
24
- GasUsed uint64 `json:"gasUsed"`
25
- Fee string `json:"fee"`
26
- FeeNum float64 `json:"feeNum"`
27
- InitialPaidFee string `json:"initialPaidFee,omitempty"`
28
- Data []byte `json:"data"`
29
- Signature string `json:"signature"`
30
- Timestamp time.Duration `json:"timestamp"`
31
- Status string `json:"status"`
32
- SearchOrder uint32 `json:"searchOrder"`
33
- SenderUserName []byte `json:"senderUserName,omitempty"`
34
- ReceiverUserName []byte `json:"receiverUserName,omitempty"`
35
- HasSCR bool `json:"hasScResults,omitempty"`
36
- IsScCall bool `json:"isScCall,omitempty"`
37
- HasOperations bool `json:"hasOperations,omitempty"`
38
- HasLogs bool `json:"hasLogs,omitempty"`
39
- Tokens []string `json:"tokens,omitempty"`
40
- ESDTValues []string `json:"esdtValues,omitempty"`
41
- ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"`
42
- Receivers []string `json:"receivers,omitempty"`
43
- ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"`
44
- Type string `json:"type,omitempty"`
45
- Operation string `json:"operation,omitempty"`
46
- Function string `json:"function,omitempty"`
47
- IsRelayed bool `json:"isRelayed,omitempty"`
48
- Version uint32 `json:"version,omitempty"`
49
- GuardianAddress string `json:"guardian,omitempty"`
50
- GuardianSignature string `json:"guardianSignature,omitempty"`
51
- ErrorEvent bool `json:"errorEvent,omitempty"`
52
- CompletedEvent bool `json:"completedEvent,omitempty"`
53
- RelayedAddr string `json:"relayed,omitempty"`
54
- InnerTransactions []* transaction.FrontendTransaction `json:"innerTransactions,omitempty"`
55
- ExecutionOrder int `json:"-"`
56
- SmartContractResults []* ScResult `json:"-"`
57
- Hash string `json:"-"`
58
- BlockHash string `json:"-"`
59
- HadRefund bool `json:"-"`
11
+ MBHash string `json:"miniBlockHash"`
12
+ Nonce uint64 `json:"nonce"`
13
+ Round uint64 `json:"round"`
14
+ Value string `json:"value"`
15
+ ValueNum float64 `json:"valueNum"`
16
+ Receiver string `json:"receiver"`
17
+ Sender string `json:"sender"`
18
+ ReceiverShard uint32 `json:"receiverShard"`
19
+ SenderShard uint32 `json:"senderShard"`
20
+ GasPrice uint64 `json:"gasPrice"`
21
+ GasLimit uint64 `json:"gasLimit"`
22
+ GasUsed uint64 `json:"gasUsed"`
23
+ Fee string `json:"fee"`
24
+ FeeNum float64 `json:"feeNum"`
25
+ InitialPaidFee string `json:"initialPaidFee,omitempty"`
26
+ Data []byte `json:"data"`
27
+ Signature string `json:"signature"`
28
+ Timestamp time.Duration `json:"timestamp"`
29
+ Status string `json:"status"`
30
+ SearchOrder uint32 `json:"searchOrder"`
31
+ SenderUserName []byte `json:"senderUserName,omitempty"`
32
+ ReceiverUserName []byte `json:"receiverUserName,omitempty"`
33
+ HasSCR bool `json:"hasScResults,omitempty"`
34
+ IsScCall bool `json:"isScCall,omitempty"`
35
+ HasOperations bool `json:"hasOperations,omitempty"`
36
+ HasLogs bool `json:"hasLogs,omitempty"`
37
+ Tokens []string `json:"tokens,omitempty"`
38
+ ESDTValues []string `json:"esdtValues,omitempty"`
39
+ ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"`
40
+ Receivers []string `json:"receivers,omitempty"`
41
+ ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"`
42
+ Type string `json:"type,omitempty"`
43
+ Operation string `json:"operation,omitempty"`
44
+ Function string `json:"function,omitempty"`
45
+ IsRelayed bool `json:"isRelayed,omitempty"`
46
+ Version uint32 `json:"version,omitempty"`
47
+ GuardianAddress string `json:"guardian,omitempty"`
48
+ GuardianSignature string `json:"guardianSignature,omitempty"`
49
+ ErrorEvent bool `json:"errorEvent,omitempty"`
50
+ CompletedEvent bool `json:"completedEvent,omitempty"`
51
+ RelayedAddr string `json:"relayed,omitempty"`
52
+ ExecutionOrder int `json:"-"`
53
+ SmartContractResults []* ScResult `json:"-"`
54
+ Hash string `json:"-"`
55
+ BlockHash string `json:"-"`
56
+ HadRefund bool `json:"-"`
60
57
}
61
58
62
59
// Receipt is a structure containing all the fields that need to be safe for a Receipt
0 commit comments