mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add basic test cases for most of EVM->Ewasm translator
This commit is contained in:
parent
c03a2c0fe2
commit
d8cf8e98bd
9
test/libyul/ewasmTranslationTests/address.yul
Normal file
9
test/libyul/ewasmTranslationTests/address.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, address())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000011111111000000000000000000000000
|
9
test/libyul/ewasmTranslationTests/balance.yul
Normal file
9
test/libyul/ewasmTranslationTests/balance.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, balance(address()))
|
||||||
|
sstore(1, balance(0))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/blockhash.yul
Normal file
7
test/libyul/ewasmTranslationTests/blockhash.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
sstore(0, blockhash(1))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
8
test/libyul/ewasmTranslationTests/calldatacopy.yul
Normal file
8
test/libyul/ewasmTranslationTests/calldatacopy.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
calldatacopy(0, 0, 32)
|
||||||
|
sstore(0, mload(0))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/calldataload.yul
Normal file
7
test/libyul/ewasmTranslationTests/calldataload.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
sstore(0, calldataload(0))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/calldatasize.yul
Normal file
7
test/libyul/ewasmTranslationTests/calldatasize.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
sstore(0, calldatasize())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/caller.yul
Normal file
9
test/libyul/ewasmTranslationTests/caller.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, caller())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000044444444000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000044444444000000000000000000000000
|
9
test/libyul/ewasmTranslationTests/callvalue.yul
Normal file
9
test/libyul/ewasmTranslationTests/callvalue.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, callvalue())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000005555555500000000000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000005555555500000000000000000000000000000000
|
11
test/libyul/ewasmTranslationTests/codecopy.yul
Normal file
11
test/libyul/ewasmTranslationTests/codecopy.yul
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
codecopy(0x100, 0, codesize())
|
||||||
|
sstore(0, mload(0x100))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
||||||
|
// 140: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
9
test/libyul/ewasmTranslationTests/codesize.yul
Normal file
9
test/libyul/ewasmTranslationTests/codesize.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, codesize())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000000000014
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000014
|
7
test/libyul/ewasmTranslationTests/coinbase.yul
Normal file
7
test/libyul/ewasmTranslationTests/coinbase.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
sstore(0, coinbase())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/difficulty.yul
Normal file
9
test/libyul/ewasmTranslationTests/difficulty.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, difficulty())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000009999999
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000009999999
|
9
test/libyul/ewasmTranslationTests/extcodecopy.yul
Normal file
9
test/libyul/ewasmTranslationTests/extcodecopy.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
extcodecopy(address(), 0x100, 0, extcodesize(address()))
|
||||||
|
sstore(0, mload(0x100))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
8
test/libyul/ewasmTranslationTests/extcodesize.yul
Normal file
8
test/libyul/ewasmTranslationTests/extcodesize.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
sstore(0, extcodesize(address()))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/gas.yul
Normal file
9
test/libyul/ewasmTranslationTests/gas.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, gas())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000000000099
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000099
|
9
test/libyul/ewasmTranslationTests/gaslimit.yul
Normal file
9
test/libyul/ewasmTranslationTests/gaslimit.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, gaslimit())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 00000000000000000000000000000000000000000000000000000000003d0900
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 00000000000000000000000000000000000000000000000000000000003d0900
|
9
test/libyul/ewasmTranslationTests/gasprice.yul
Normal file
9
test/libyul/ewasmTranslationTests/gasprice.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, gasprice())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000006666666600000000000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000006666666600000000000000000000000000000000
|
13
test/libyul/ewasmTranslationTests/invalid.yul
Normal file
13
test/libyul/ewasmTranslationTests/invalid.yul
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
sstore(0, 0x1234)
|
||||||
|
mstore(1, 0)
|
||||||
|
invalid()
|
||||||
|
sstore(0, 0x5678)
|
||||||
|
mstore(1, 0xff)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000000001234
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000001234
|
14
test/libyul/ewasmTranslationTests/iszero.yul
Normal file
14
test/libyul/ewasmTranslationTests/iszero.yul
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
let x := 0
|
||||||
|
let y := 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20
|
||||||
|
let z := 0x0000000000000000000111111111111111111111100000000000000000000000
|
||||||
|
sstore(0, iszero(x))
|
||||||
|
sstore(1, iszero(y))
|
||||||
|
sstore(2, iszero(z))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000000000000000000000000000000000002
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001
|
8
test/libyul/ewasmTranslationTests/keccak256.yul
Normal file
8
test/libyul/ewasmTranslationTests/keccak256.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
sstore(0, keccak256(0, 0))
|
||||||
|
sstore(0, keccak256(0, 0x20))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/log0.yul
Normal file
7
test/libyul/ewasmTranslationTests/log0.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
log0(0x20, 0x40)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/log1.yul
Normal file
7
test/libyul/ewasmTranslationTests/log1.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
log1(0x20, 0x40, 0x60)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/log2.yul
Normal file
7
test/libyul/ewasmTranslationTests/log2.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
log2(0x20, 0x40, 0x60, 0x80)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/log3.yul
Normal file
7
test/libyul/ewasmTranslationTests/log3.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
log3(0x20, 0x40, 0x60, 0x80, 0xa0)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
7
test/libyul/ewasmTranslationTests/log4.yul
Normal file
7
test/libyul/ewasmTranslationTests/log4.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
log4(0x20, 0x40, 0x60, 0x80, 0xa0, 0xb0)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
11
test/libyul/ewasmTranslationTests/msize.yul
Normal file
11
test/libyul/ewasmTranslationTests/msize.yul
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
sstore(0, msize())
|
||||||
|
mstore(0x20, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20)
|
||||||
|
mstore(0x40, mload(0x20))
|
||||||
|
sstore(1, mload(0x40))
|
||||||
|
sstore(2, msize())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
14
test/libyul/ewasmTranslationTests/mstore8.yul
Normal file
14
test/libyul/ewasmTranslationTests/mstore8.yul
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
mstore(0x30, not(0))
|
||||||
|
mstore8(0x20, 0xaa)
|
||||||
|
mstore8(0x25, 0xbbbb)
|
||||||
|
mstore8(0x26, 0xcc)
|
||||||
|
mstore8(0x3b, 0x11)
|
||||||
|
sstore(0, mload(0x20))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 60: 00000000000000000000000000000000ffffffffffffffffffffffffffffffff
|
||||||
|
// 80: ffffffffffffffffffffffffffffffff00000000000000000000000000000000
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/number.yul
Normal file
9
test/libyul/ewasmTranslationTests/number.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, number())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000000000400
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000400
|
9
test/libyul/ewasmTranslationTests/origin.yul
Normal file
9
test/libyul/ewasmTranslationTests/origin.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, origin())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000033333333000000000000000000000000
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000033333333000000000000000000000000
|
7
test/libyul/ewasmTranslationTests/pc.yul
Normal file
7
test/libyul/ewasmTranslationTests/pc.yul
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
sstore(0, pc())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
11
test/libyul/ewasmTranslationTests/return.yul
Normal file
11
test/libyul/ewasmTranslationTests/return.yul
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
mstore(0x20, 0x1234556677889900aa)
|
||||||
|
return(0x20, 30)
|
||||||
|
invalid()
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// RETURN() [000000000000000000000000000000000000000000000012345566778899]
|
||||||
|
// Memory dump:
|
||||||
|
// 60: 00000000000000000000000000000000000000000000001234556677889900aa
|
||||||
|
// Storage dump:
|
10
test/libyul/ewasmTranslationTests/returndatacopy.yul
Normal file
10
test/libyul/ewasmTranslationTests/returndatacopy.yul
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
returndatacopy(0x100, 0, returndatasize())
|
||||||
|
sstore(0, mload(0x100))
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// EVMVersion: >=byzantium
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/returndatasize.yul
Normal file
9
test/libyul/ewasmTranslationTests/returndatasize.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, returndatasize())
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// EVMVersion: >=byzantium
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// Storage dump:
|
13
test/libyul/ewasmTranslationTests/revert.yul
Normal file
13
test/libyul/ewasmTranslationTests/revert.yul
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
mstore(0x20, 0x1234556677889900aa)
|
||||||
|
revert(0x20, 30)
|
||||||
|
invalid()
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// EVMVersion: >=byzantium
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// REVERT() [000000000000000000000000000000000000000000000012345566778899]
|
||||||
|
// Memory dump:
|
||||||
|
// 60: 00000000000000000000000000000000000000000000001234556677889900aa
|
||||||
|
// Storage dump:
|
10
test/libyul/ewasmTranslationTests/selfdestruct.yul
Normal file
10
test/libyul/ewasmTranslationTests/selfdestruct.yul
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
selfdestruct(not(0))
|
||||||
|
invalid()
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// SELFDESTRUCT()
|
||||||
|
// Memory dump:
|
||||||
|
// 40: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
// Storage dump:
|
16
test/libyul/ewasmTranslationTests/simple_sload.yul
Normal file
16
test/libyul/ewasmTranslationTests/simple_sload.yul
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
sstore(1, 7)
|
||||||
|
sstore(2, sub(0, 1))
|
||||||
|
sstore(3, sload(1))
|
||||||
|
sstore(4, sload(2))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000000000000000000000000000000000004
|
||||||
|
// 20: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000007
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000007
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000004: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
8
test/libyul/ewasmTranslationTests/smoke_call.yul
Normal file
8
test/libyul/ewasmTranslationTests/smoke_call.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
sstore(0, call(gas(), address(), 42, 0, 0x20, 0x20, 0x20))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
8
test/libyul/ewasmTranslationTests/smoke_callcode.yul
Normal file
8
test/libyul/ewasmTranslationTests/smoke_callcode.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
sstore(0, callcode(gas(), address(), 42, 0, 0x20, 0x20, 0x20))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
11
test/libyul/ewasmTranslationTests/smoke_create.yul
Normal file
11
test/libyul/ewasmTranslationTests/smoke_create.yul
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
let size := codesize()
|
||||||
|
codecopy(0, 0, size)
|
||||||
|
sstore(0, create(42, 0, size))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000000000000000000000000000000000014
|
||||||
|
// 40: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000
|
||||||
|
// Storage dump:
|
8
test/libyul/ewasmTranslationTests/smoke_delegatecall.yul
Normal file
8
test/libyul/ewasmTranslationTests/smoke_delegatecall.yul
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
sstore(0, delegatecall(gas(), address(), 0, 0x20, 0x20, 0x20))
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
10
test/libyul/ewasmTranslationTests/smoke_staticcall.yul
Normal file
10
test/libyul/ewasmTranslationTests/smoke_staticcall.yul
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
sstore(0, staticcall(gas(), address(), 0, 0x20, 0x20, 0x20))
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// EVMVersion: >=byzantium
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 0: 0000000000000000000000000000000011111111000000000000000000000000
|
||||||
|
// Storage dump:
|
9
test/libyul/ewasmTranslationTests/timestamp.yul
Normal file
9
test/libyul/ewasmTranslationTests/timestamp.yul
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
sstore(0, timestamp())
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// Trace:
|
||||||
|
// Memory dump:
|
||||||
|
// 20: 0000000000000000000000000000000000000000000000000000000088888888
|
||||||
|
// Storage dump:
|
||||||
|
// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000088888888
|
Loading…
Reference in New Issue
Block a user