|
|
@ -179,8 +179,8 @@ type TxReceipt struct { |
|
|
|
ShardID uint32 `json:"shardID"` |
|
|
|
ShardID uint32 `json:"shardID"` |
|
|
|
From string `json:"from"` |
|
|
|
From string `json:"from"` |
|
|
|
To string `json:"to"` |
|
|
|
To string `json:"to"` |
|
|
|
Root hexutil.Bytes `json:"root,omitempty"` |
|
|
|
Root hexutil.Bytes `json:"root"` |
|
|
|
Status hexutil.Uint `json:"status,omitempty"` |
|
|
|
Status hexutil.Uint `json:"status"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// StakingTxReceipt represents a staking transaction receipt that will serialize to the RPC representation.
|
|
|
|
// StakingTxReceipt represents a staking transaction receipt that will serialize to the RPC representation.
|
|
|
@ -196,8 +196,8 @@ type StakingTxReceipt struct { |
|
|
|
LogsBloom ethtypes.Bloom `json:"logsBloom"` |
|
|
|
LogsBloom ethtypes.Bloom `json:"logsBloom"` |
|
|
|
Sender string `json:"sender"` |
|
|
|
Sender string `json:"sender"` |
|
|
|
Type staking.Directive `json:"type"` |
|
|
|
Type staking.Directive `json:"type"` |
|
|
|
Root hexutil.Bytes `json:"root,omitempty"` |
|
|
|
Root hexutil.Bytes `json:"root"` |
|
|
|
Status hexutil.Uint `json:"status,omitempty"` |
|
|
|
Status hexutil.Uint `json:"status"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// CxReceipt represents a CxReceipt that will serialize to the RPC representation of a CxReceipt
|
|
|
|
// CxReceipt represents a CxReceipt that will serialize to the RPC representation of a CxReceipt
|
|
|
@ -349,13 +349,8 @@ func NewTxReceipt( |
|
|
|
ShardID: tx.ShardID(), |
|
|
|
ShardID: tx.ShardID(), |
|
|
|
From: sender, |
|
|
|
From: sender, |
|
|
|
To: receiver, |
|
|
|
To: receiver, |
|
|
|
} |
|
|
|
Root: receipt.PostState, |
|
|
|
|
|
|
|
Status: hexutil.Uint(receipt.Status), |
|
|
|
// Set optionals
|
|
|
|
|
|
|
|
if len(receipt.PostState) > 0 { |
|
|
|
|
|
|
|
txReceipt.Root = receipt.PostState |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
txReceipt.Status = hexutil.Uint(receipt.Status) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set empty array for empty logs
|
|
|
|
// Set empty array for empty logs
|
|
|
@ -396,13 +391,8 @@ func NewStakingTxReceipt( |
|
|
|
LogsBloom: receipt.Bloom, |
|
|
|
LogsBloom: receipt.Bloom, |
|
|
|
Sender: sender, |
|
|
|
Sender: sender, |
|
|
|
Type: tx.StakingType(), |
|
|
|
Type: tx.StakingType(), |
|
|
|
} |
|
|
|
Root: receipt.PostState, |
|
|
|
|
|
|
|
Status: hexutil.Uint(receipt.Status), |
|
|
|
// Set optionals
|
|
|
|
|
|
|
|
if len(receipt.PostState) > 0 { |
|
|
|
|
|
|
|
txReceipt.Root = receipt.PostState |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
txReceipt.Status = hexutil.Uint(receipt.Status) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set empty array for empty logs
|
|
|
|
// Set empty array for empty logs
|
|
|
|