Test blockTimestamp

This commit is contained in:
Sina Mahmoodi 2025-10-06 16:30:25 +02:00
parent 189e24fd95
commit d8a1cd3e47

View file

@ -1331,6 +1331,7 @@ func TestSimulateV1(t *testing.T) {
Topics []common.Hash `json:"topics"` Topics []common.Hash `json:"topics"`
Data hexutil.Bytes `json:"data"` Data hexutil.Bytes `json:"data"`
BlockNumber hexutil.Uint64 `json:"blockNumber"` BlockNumber hexutil.Uint64 `json:"blockNumber"`
BlockTimestamp hexutil.Uint64 `json:"blockTimestamp"`
// Skip txHash // Skip txHash
//TxHash common.Hash `json:"transactionHash" gencodec:"required"` //TxHash common.Hash `json:"transactionHash" gencodec:"required"`
TxIndex hexutil.Uint `json:"transactionIndex"` TxIndex hexutil.Uint `json:"transactionIndex"`
@ -1680,6 +1681,7 @@ func TestSimulateV1(t *testing.T) {
Address: randomAccounts[2].addr, Address: randomAccounts[2].addr,
Topics: []common.Hash{common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")}, Topics: []common.Hash{common.HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},
BlockNumber: hexutil.Uint64(11), BlockNumber: hexutil.Uint64(11),
BlockTimestamp: hexutil.Uint64(0x70),
Data: hexutil.Bytes{}, Data: hexutil.Bytes{},
}}, }},
GasUsed: "0x5508", GasUsed: "0x5508",
@ -1855,6 +1857,7 @@ func TestSimulateV1(t *testing.T) {
}, },
Data: hexutil.Bytes(common.BigToHash(big.NewInt(50)).Bytes()), Data: hexutil.Bytes(common.BigToHash(big.NewInt(50)).Bytes()),
BlockNumber: hexutil.Uint64(11), BlockNumber: hexutil.Uint64(11),
BlockTimestamp: hexutil.Uint64(0x70),
}, { }, {
Address: transferAddress, Address: transferAddress,
Topics: []common.Hash{ Topics: []common.Hash{
@ -1864,6 +1867,7 @@ func TestSimulateV1(t *testing.T) {
}, },
Data: hexutil.Bytes(common.BigToHash(big.NewInt(100)).Bytes()), Data: hexutil.Bytes(common.BigToHash(big.NewInt(100)).Bytes()),
BlockNumber: hexutil.Uint64(11), BlockNumber: hexutil.Uint64(11),
BlockTimestamp: hexutil.Uint64(0x70),
Index: hexutil.Uint(1), Index: hexutil.Uint(1),
}}, }},
Status: "0x1", Status: "0x1",