mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 07:53:47 +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
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case L1MessageTxType:
|
case L1MessageTxType:
|
||||||
var itx L1MessageTx
|
var itx L1MessageTx
|
||||||
inner = &itx
|
inner = &itx
|
||||||
|
|
|
||||||
|
|
@ -1331,6 +1331,10 @@ type RPCTransaction struct {
|
||||||
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"`
|
||||||
|
|
||||||
|
// 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
|
// newRPCTransaction returns a transaction that will serialize to the RPC
|
||||||
|
|
@ -1377,6 +1381,10 @@ func newRPCTransaction(tx *types.Transaction, blockHash common.Hash, blockNumber
|
||||||
} else {
|
} else {
|
||||||
result.GasPrice = (*hexutil.Big)(tx.GasFeeCap())
|
result.GasPrice = (*hexutil.Big)(tx.GasFeeCap())
|
||||||
}
|
}
|
||||||
|
case types.L1MessageTxType:
|
||||||
|
msg := tx.AsL1MessageTx()
|
||||||
|
result.Sender = msg.Sender
|
||||||
|
result.QueueIndex = (*hexutil.Uint64)(&msg.QueueIndex)
|
||||||
}
|
}
|
||||||
return result
|
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.maxPriorityFeePerGas = utils.toBigNumber(tx.maxPriorityFeePerGas);
|
||||||
}
|
}
|
||||||
tx.value = utils.toBigNumber(tx.value);
|
tx.value = utils.toBigNumber(tx.value);
|
||||||
|
if(tx.queueIndex !== undefined) {
|
||||||
|
tx.queueIndex = utils.toBigNumber(tx.queueIndex);
|
||||||
|
}
|
||||||
return tx;
|
return tx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,13 @@ web3._extend({
|
||||||
property: 'scroll',
|
property: 'scroll',
|
||||||
methods: [
|
methods: [
|
||||||
new web3._extend.Method({
|
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',
|
call: 'scroll_getBlockTraceByNumberOrHash',
|
||||||
params: 1
|
params: 1
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 4 // Major version component of the current release
|
VersionMajor = 4 // Major version component of the current release
|
||||||
VersionMinor = 2 // Minor 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
|
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue