|
|
@ -22,6 +22,8 @@ type RPCTransaction struct { |
|
|
|
To *common.Address `json:"to"` |
|
|
|
To *common.Address `json:"to"` |
|
|
|
TransactionIndex hexutil.Uint `json:"transactionIndex"` |
|
|
|
TransactionIndex hexutil.Uint `json:"transactionIndex"` |
|
|
|
Value *hexutil.Big `json:"value"` |
|
|
|
Value *hexutil.Big `json:"value"` |
|
|
|
|
|
|
|
FromShardID uint32 `json:"fromShardID"` |
|
|
|
|
|
|
|
ToShardID uint32 `json:"toShardID"` |
|
|
|
V *hexutil.Big `json:"v"` |
|
|
|
V *hexutil.Big `json:"v"` |
|
|
|
R *hexutil.Big `json:"r"` |
|
|
|
R *hexutil.Big `json:"r"` |
|
|
|
S *hexutil.Big `json:"s"` |
|
|
|
S *hexutil.Big `json:"s"` |
|
|
@ -38,17 +40,19 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber |
|
|
|
v, r, s := tx.RawSignatureValues() |
|
|
|
v, r, s := tx.RawSignatureValues() |
|
|
|
|
|
|
|
|
|
|
|
result := &RPCTransaction{ |
|
|
|
result := &RPCTransaction{ |
|
|
|
From: from, |
|
|
|
From: from, |
|
|
|
Gas: hexutil.Uint64(tx.Gas()), |
|
|
|
Gas: hexutil.Uint64(tx.Gas()), |
|
|
|
GasPrice: (*hexutil.Big)(tx.GasPrice()), |
|
|
|
GasPrice: (*hexutil.Big)(tx.GasPrice()), |
|
|
|
Hash: tx.Hash(), |
|
|
|
Hash: tx.Hash(), |
|
|
|
Input: hexutil.Bytes(tx.Data()), |
|
|
|
Input: hexutil.Bytes(tx.Data()), |
|
|
|
Nonce: hexutil.Uint64(tx.Nonce()), |
|
|
|
Nonce: hexutil.Uint64(tx.Nonce()), |
|
|
|
To: tx.To(), |
|
|
|
To: tx.To(), |
|
|
|
Value: (*hexutil.Big)(tx.Value()), |
|
|
|
Value: (*hexutil.Big)(tx.Value()), |
|
|
|
V: (*hexutil.Big)(v), |
|
|
|
FromShardID: tx.ShardID(), |
|
|
|
R: (*hexutil.Big)(r), |
|
|
|
ToShardID: tx.ToShardID(), |
|
|
|
S: (*hexutil.Big)(s), |
|
|
|
V: (*hexutil.Big)(v), |
|
|
|
|
|
|
|
R: (*hexutil.Big)(r), |
|
|
|
|
|
|
|
S: (*hexutil.Big)(s), |
|
|
|
} |
|
|
|
} |
|
|
|
if blockHash != (common.Hash{}) { |
|
|
|
if blockHash != (common.Hash{}) { |
|
|
|
result.BlockHash = blockHash |
|
|
|
result.BlockHash = blockHash |
|
|
|