Update commandline tests.

This commit is contained in:
chriseth
2021-09-08 12:25:56 +02:00
parent c63b768fff
commit 1304080a77
19 changed files with 2008 additions and 2006 deletions
+232 -232
View File
@@ -25,14 +25,6 @@ object "C_15" {
memPtr := mload(64)
}
/// @src 0:59:147
function constructor_C_15() {
/// @src 0:59:147
}
/// @src 0:59:147
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
let start := allocate_unbounded()
@@ -52,6 +44,14 @@ object "C_15" {
}
/// @src 0:59:147
function constructor_C_15() {
/// @src 0:59:147
}
/// @src 0:59:147
}
/// @use-src 0:"revert_strings/input.sol"
object "C_15_deployed" {
@@ -81,233 +81,17 @@ object "C_15" {
if iszero(calldatasize()) { }
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
// uint256[][]
function abi_decode_available_length_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(offset, length, end) -> array {
array := allocate_memory(array_allocation_size_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(length))
let dst := array
function shift_right_224_unsigned(value) -> newValue {
newValue :=
mstore(array, length)
dst := add(array, 0x20)
shr(224, value)
let src := offset
if gt(add(src, mul(length, 0x20)), end) {
revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef()
}
for { let i := 0 } lt(i, length) { i := add(i, 1) }
{
let innerOffset := calldataload(src)
if gt(innerOffset, 0xffffffffffffffff) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let elementPos := add(offset, innerOffset)
mstore(dst, abi_decode_t_array$_t_uint256_$dyn_memory_ptr(elementPos, end))
dst := add(dst, 0x20)
src := add(src, 0x20)
}
}
// uint256[]
function abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(offset, length, end) -> array {
array := allocate_memory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length))
let dst := array
mstore(array, length)
dst := add(array, 0x20)
let src := offset
if gt(add(src, mul(length, 0x20)), end) {
revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef()
}
for { let i := 0 } lt(i, length) { i := add(i, 1) }
{
let elementPos := src
mstore(dst, abi_decode_t_uint256(elementPos, end))
dst := add(dst, 0x20)
src := add(src, 0x20)
}
}
// uint256[][]
function abi_decode_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(offset, end) -> array {
if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let length := calldataload(offset)
array := abi_decode_available_length_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(add(offset, 0x20), length, end)
}
// uint256[]
function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array {
if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let length := calldataload(offset)
array := abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(add(offset, 0x20), length, end)
}
function abi_decode_t_enum$_E_$3(offset, end) -> value {
value := calldataload(offset)
validator_revert_t_enum$_E_$3(value)
}
function abi_decode_t_uint256(offset, end) -> value {
value := calldataload(offset)
validator_revert_t_uint256(value)
}
function abi_decode_tuple_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptrt_enum$_E_$3(headStart, dataEnd) -> value0, value1 {
if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := calldataload(add(headStart, 0))
if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }
value0 := abi_decode_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(add(headStart, offset), dataEnd)
}
{
let offset := 32
value1 := abi_decode_t_enum$_E_$3(add(headStart, offset), dataEnd)
}
}
function abi_encode_tuple__to__fromStack(headStart ) -> tail {
tail := add(headStart, 0)
}
function allocate_memory(size) -> memPtr {
memPtr := allocate_unbounded()
finalize_allocation(memPtr, size)
}
function allocate_unbounded() -> memPtr {
memPtr := mload(64)
}
function array_allocation_size_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(length) -> size {
// Make sure we can allocate memory without overflow
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
size := mul(length, 0x20)
// add length slot
size := add(size, 0x20)
}
function array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length) -> size {
// Make sure we can allocate memory without overflow
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
size := mul(length, 0x20)
// add length slot
size := add(size, 0x20)
}
function cleanup_t_uint256(value) -> cleaned {
cleaned := value
}
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
/// @src 0:93:145
function fun_f_14(var__7_mpos, var_e_10) {
}
/// @src 0:59:147
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 43)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid calldata a")
mstore(add(pos, 32), "rray offset")
revert(start, 132)
}
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 53)
pos := add(pos, 0x20)
mstore(add(pos, 0), "Contract does not have fallback ")
mstore(add(pos, 32), "nor receive functions")
revert(start, 132)
}
function revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 43)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid calldata a")
mstore(add(pos, 32), "rray stride")
revert(start, 132)
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 34)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid tuple offs")
mstore(add(pos, 32), "et")
revert(start, 132)
}
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() {
let start := allocate_unbounded()
@@ -346,25 +130,241 @@ object "C_15" {
}
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 34)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid tuple offs")
mstore(add(pos, 32), "et")
revert(start, 132)
}
function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 43)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid calldata a")
mstore(add(pos, 32), "rray offset")
revert(start, 132)
}
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
function shift_right_224_unsigned(value) -> newValue {
newValue :=
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
}
shr(224, value)
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
function allocate_memory(size) -> memPtr {
memPtr := allocate_unbounded()
finalize_allocation(memPtr, size)
}
function array_allocation_size_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(length) -> size {
// Make sure we can allocate memory without overflow
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
size := mul(length, 0x20)
// add length slot
size := add(size, 0x20)
}
function revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 43)
pos := add(pos, 0x20)
mstore(add(pos, 0), "ABI decoding: invalid calldata a")
mstore(add(pos, 32), "rray stride")
revert(start, 132)
}
function array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length) -> size {
// Make sure we can allocate memory without overflow
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
size := mul(length, 0x20)
// add length slot
size := add(size, 0x20)
}
function cleanup_t_uint256(value) -> cleaned {
cleaned := value
}
function validator_revert_t_uint256(value) {
if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }
}
function abi_decode_t_uint256(offset, end) -> value {
value := calldataload(offset)
validator_revert_t_uint256(value)
}
// uint256[]
function abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(offset, length, end) -> array {
array := allocate_memory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length))
let dst := array
mstore(array, length)
dst := add(array, 0x20)
let src := offset
if gt(add(src, mul(length, 0x20)), end) {
revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef()
}
for { let i := 0 } lt(i, length) { i := add(i, 1) }
{
let elementPos := src
mstore(dst, abi_decode_t_uint256(elementPos, end))
dst := add(dst, 0x20)
src := add(src, 0x20)
}
}
// uint256[]
function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array {
if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let length := calldataload(offset)
array := abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(add(offset, 0x20), length, end)
}
// uint256[][]
function abi_decode_available_length_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(offset, length, end) -> array {
array := allocate_memory(array_allocation_size_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(length))
let dst := array
mstore(array, length)
dst := add(array, 0x20)
let src := offset
if gt(add(src, mul(length, 0x20)), end) {
revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef()
}
for { let i := 0 } lt(i, length) { i := add(i, 1) }
{
let innerOffset := calldataload(src)
if gt(innerOffset, 0xffffffffffffffff) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let elementPos := add(offset, innerOffset)
mstore(dst, abi_decode_t_array$_t_uint256_$dyn_memory_ptr(elementPos, end))
dst := add(dst, 0x20)
src := add(src, 0x20)
}
}
// uint256[][]
function abi_decode_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(offset, end) -> array {
if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
let length := calldataload(offset)
array := abi_decode_available_length_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(add(offset, 0x20), length, end)
}
function validator_revert_t_enum$_E_$3(value) {
if iszero(lt(value, 1)) { revert(0, 0) }
}
function validator_revert_t_uint256(value) {
if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }
function abi_decode_t_enum$_E_$3(offset, end) -> value {
value := calldataload(offset)
validator_revert_t_enum$_E_$3(value)
}
function abi_decode_tuple_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptrt_enum$_E_$3(headStart, dataEnd) -> value0, value1 {
if slt(sub(dataEnd, headStart), 64) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
{
let offset := calldataload(add(headStart, 0))
if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }
value0 := abi_decode_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr(add(headStart, offset), dataEnd)
}
{
let offset := 32
value1 := abi_decode_t_enum$_E_$3(add(headStart, offset), dataEnd)
}
}
function abi_encode_tuple__to__fromStack(headStart ) -> tail {
tail := add(headStart, 0)
}
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
let start := allocate_unbounded()
let pos := start
mstore(pos, 3963877391197344453575983046348115674221700746820753546331534351508065746944)
pos := add(pos, 4)
mstore(pos, 0x20)
pos := add(pos, 0x20)
mstore(pos, 53)
pos := add(pos, 0x20)
mstore(add(pos, 0), "Contract does not have fallback ")
mstore(add(pos, 32), "nor receive functions")
revert(start, 132)
}
/// @src 0:93:145
function fun_f_14(var__7_mpos, var_e_10) {
}
/// @src 0:59:147
}
data ".metadata" hex"<BYTECODE REMOVED>"