mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
add test comments
This commit is contained in:
parent
edf9e376ed
commit
e7bac205a7
1 changed files with 34 additions and 0 deletions
|
|
@ -2007,6 +2007,23 @@ func TestSimulateV1(t *testing.T) {
|
||||||
blocks: []simBlock{{
|
blocks: []simBlock{{
|
||||||
StateOverrides: &StateOverride{
|
StateOverrides: &StateOverride{
|
||||||
randomAccounts[2].addr: {
|
randomAccounts[2].addr: {
|
||||||
|
// Yul code:
|
||||||
|
// object "Test" {
|
||||||
|
// code {
|
||||||
|
// // Get the gas price from the transaction
|
||||||
|
// let gasPrice := gasprice()
|
||||||
|
//
|
||||||
|
// // Get the base fee from the block
|
||||||
|
// let baseFee := basefee()
|
||||||
|
//
|
||||||
|
// // Store gasPrice and baseFee in memory
|
||||||
|
// mstore(0x0, gasPrice)
|
||||||
|
// mstore(0x20, baseFee)
|
||||||
|
//
|
||||||
|
// // Return the data
|
||||||
|
// return(0x0, 0x40)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
Code: hex2Bytes("3a489060005260205260406000f3"),
|
Code: hex2Bytes("3a489060005260205260406000f3"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -2098,6 +2115,23 @@ func TestSimulateV1(t *testing.T) {
|
||||||
blocks: []simBlock{{
|
blocks: []simBlock{{
|
||||||
StateOverrides: &StateOverride{
|
StateOverrides: &StateOverride{
|
||||||
randomAccounts[2].addr: {
|
randomAccounts[2].addr: {
|
||||||
|
// Yul code:
|
||||||
|
// object "Test" {
|
||||||
|
// code {
|
||||||
|
// // Get the gas price from the transaction
|
||||||
|
// let gasPrice := gasprice()
|
||||||
|
//
|
||||||
|
// // Get the base fee from the block
|
||||||
|
// let baseFee := basefee()
|
||||||
|
//
|
||||||
|
// // Store gasPrice and baseFee in memory
|
||||||
|
// mstore(0x0, gasPrice)
|
||||||
|
// mstore(0x20, baseFee)
|
||||||
|
//
|
||||||
|
// // Return the data
|
||||||
|
// return(0x0, 0x40)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
Code: hex2Bytes("3a489060005260205260406000f3"),
|
Code: hex2Bytes("3a489060005260205260406000f3"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue