mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
fix: include L1MessageTx fields in transaction RPC result (#375)
* fix: include L1MessageTx fields in tx RPC result * bump version
This commit is contained in:
parent
8c141eb90f
commit
38a6a1e964
6 changed files with 67 additions and 77 deletions
|
|
@ -273,6 +273,7 @@ func (t *Transaction) UnmarshalJSON(input []byte) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
|
||||
case L1MessageTxType:
|
||||
var itx L1MessageTx
|
||||
inner = &itx
|
||||
|
|
|
|||
|
|
@ -1331,6 +1331,10 @@ type RPCTransaction struct {
|
|||
V *hexutil.Big `json:"v"`
|
||||
R *hexutil.Big `json:"r"`
|
||||
S *hexutil.Big `json:"s"`
|
||||
|
||||
// L1 message transaction fields:
|
||||
Sender common.Address `json:"sender,omitempty"`
|
||||
QueueIndex *hexutil.Uint64 `json:"queueIndex,omitempty"`
|
||||
}
|
||||
|
||||
// newRPCTransaction returns a transaction that will serialize to the RPC
|
||||
|
|
@ -1377,6 +1381,10 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
|||
} else {
|
||||
result.GasPrice = (*hexutil.Big)(tx.GasFeeCap())
|
||||
}
|
||||
case types.L1MessageTxType:
|
||||
msg := tx.AsL1MessageTx()
|
||||
result.Sender = msg.Sender
|
||||
result.QueueIndex = (*hexutil.Uint64)(&msg.QueueIndex)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -3790,6 +3790,9 @@ var outputTransactionFormatter = function (tx){
|
|||
tx.maxPriorityFeePerGas = utils.toBigNumber(tx.maxPriorityFeePerGas);
|
||||
}
|
||||
tx.value = utils.toBigNumber(tx.value);
|
||||
if(tx.queueIndex !== undefined) {
|
||||
tx.queueIndex = utils.toBigNumber(tx.queueIndex);
|
||||
}
|
||||
return tx;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -855,7 +855,13 @@ web3._extend({
|
|||
property: 'scroll',
|
||||
methods: [
|
||||
new web3._extend.Method({
|
||||
name: 'getBlockTraceByNumberOrHash',
|
||||
name: 'getBlockTraceByNumber',
|
||||
call: 'scroll_getBlockTraceByNumberOrHash',
|
||||
params: 1,
|
||||
inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter]
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'getBlockTraceByHash',
|
||||
call: 'scroll_getBlockTraceByNumberOrHash',
|
||||
params: 1
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 4 // Major version component of the current release
|
||||
VersionMinor = 2 // Minor version component of the current release
|
||||
VersionPatch = 4 // Patch version component of the current release
|
||||
VersionPatch = 5 // Patch version component of the current release
|
||||
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue