2021-09-15 10:28:20 +00:00
|
|
|
{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:3989:1","statements":[{"body":{"nodeType":"YulBlock","src":"47:35:1","statements":[{"nodeType":"YulAssignment","src":"57:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"73:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"67:5:1"},"nodeType":"YulFunctionCall","src":"67:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"57:6:1"}]}]},"name":"allocate_unbounded","nodeType":"YulFunctionDefinition","returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"40:6:1","type":""}],"src":"7:75:1"},{"body":{"nodeType":"YulBlock","src":"177:28:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"194:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"197:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"187:6:1"},"nodeType":"YulFunctionCall","src":"187:12:1"},"nodeType":"YulExpressionStatement","src":"187:12:1"}]},"name":"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b","nodeType":"YulFunctionDefinition","src":"88:117:1"},{"body":{"nodeType":"YulBlock","src":"300:28:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"317:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"320:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"310:6:1"},"nodeType":"YulFunctionCall","src":"310:12:1"},"nodeType":"YulExpressionStatement","src":"310:12:1"}]},"name":"revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db","nodeType":"YulFunctionDefinition","src":"211:117:1"},{"body":{"nodeType":"YulBlock","src":"423:28:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"440:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"443:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"433:6:1"},"nodeType":"YulFunctionCall","src":"433:12:1"},"nodeType":"YulExpressionStatement","src":"433:12:1"}]},"name":"revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d","nodeType":"YulFunctionDefinition","src":"334:117:1"},{"body":{"nodeType":"YulBlock","src":"505:54:1","statements":[{"nodeType":"YulAssignment","src":"515:38:1","value":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"533:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"540:2:1","type":"","value":"31"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"529:3:1"},"nodeType":"YulFunctionCall","src":"529:14:1"},{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"549:2:1","type":"","value":"31"}],"functionName":{"name":"not","nodeType":"YulIdentifier","src":"545:3:1"},"nodeType":"YulFunctionCall","src":"545:7:1"}],"functionName":{"name":"and","nodeType":"YulIdentifier","src":"525:3:1"},"nodeType":"YulFunctionCall","src":"525:28:1"},"variableNames":[{"name":"result","nodeType":"YulIdentifier","src":"515:6:1"}]}]},"name":"round_up_to_mul_of_32","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"488:5:1","type":""}],"returnVariables":[{"name":"result","nodeType":"YulTypedName","src":"498:6:1","type":""}],"src":"457:102:1"},{"body":{"nodeType":"YulBlock","src":"593:152:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"610:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"613:77:1","type":"","value":"35408467139433450592217433187231851964531694900788300625387963629091585785856"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"603:6:1"},"nodeType":"YulFunctionCall","src":"603:88:1"},"nodeType":"YulExpressionStatement","src":"603:88:1"},{"expression":{"ar
|
2021-09-07 16:00:20 +00:00
|
|
|
|
|
|
|
function allocate_unbounded() -> memPtr {
|
|
|
|
memPtr := mload(64)
|
|
|
|
}
|
|
|
|
|
|
|
|
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
function revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
function revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
function round_up_to_mul_of_32(value) -> result {
|
|
|
|
result := and(add(value, 31), not(31))
|
|
|
|
}
|
|
|
|
|
|
|
|
function panic_error_0x41() {
|
|
|
|
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
|
|
|
|
mstore(4, 0x41)
|
|
|
|
revert(0, 0x24)
|
|
|
|
}
|
|
|
|
|
|
|
|
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_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 revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef() {
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
2020-05-28 12:01:07 +00:00
|
|
|
|
|
|
|
// uint256[]
|
2020-11-06 11:43:11 +00:00
|
|
|
function abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(offset, length, end) -> array {
|
2021-01-14 16:27:55 +00:00
|
|
|
array := allocate_memory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length))
|
2020-05-28 12:01:07 +00:00
|
|
|
let dst := array
|
2021-04-07 14:47:55 +00:00
|
|
|
|
|
|
|
mstore(array, length)
|
|
|
|
dst := add(array, 0x20)
|
|
|
|
|
2021-09-15 10:28:20 +00:00
|
|
|
let srcEnd := add(offset, mul(length, 0x20))
|
|
|
|
if gt(srcEnd, end) {
|
2021-04-29 14:26:21 +00:00
|
|
|
revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef()
|
2021-04-07 14:47:55 +00:00
|
|
|
}
|
2021-09-15 10:28:20 +00:00
|
|
|
for { let src := offset } lt(src, srcEnd) { src := add(src, 0x20) }
|
2020-05-28 12:01:07 +00:00
|
|
|
{
|
2021-04-07 14:47:55 +00:00
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
let elementPos := src
|
2021-04-07 14:47:55 +00:00
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
mstore(dst, abi_decode_t_uint256(elementPos, end))
|
|
|
|
dst := add(dst, 0x20)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-06 11:43:11 +00:00
|
|
|
// uint256[]
|
|
|
|
function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array {
|
2021-04-29 14:26:21 +00:00
|
|
|
if iszero(slt(add(offset, 0x1f), end)) { revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d() }
|
2020-11-06 11:43:11 +00:00
|
|
|
let length := calldataload(offset)
|
|
|
|
array := abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(add(offset, 0x20), length, end)
|
|
|
|
}
|
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 {
|
2021-04-29 14:26:21 +00:00
|
|
|
if slt(sub(dataEnd, headStart), 32) { revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b() }
|
2020-05-28 12:01:07 +00:00
|
|
|
|
|
|
|
{
|
2020-12-07 13:14:19 +00:00
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
let offset := calldataload(add(headStart, 0))
|
2021-04-29 14:26:21 +00:00
|
|
|
if gt(offset, 0xffffffffffffffff) { revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db() }
|
2020-12-07 13:14:19 +00:00
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
value0 := abi_decode_t_array$_t_uint256_$dyn_memory_ptr(add(headStart, offset), dataEnd)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {
|
|
|
|
mstore(pos, cleanup_t_uint256(value))
|
|
|
|
}
|
|
|
|
|
|
|
|
function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {
|
|
|
|
tail := add(headStart, 32)
|
|
|
|
|
|
|
|
abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-12-08 16:42:31 +00:00
|
|
|
","id":1,"language":"Yul","name":"#utility.yul"}]}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"Warning: Source file does not specify required compiler version!
|
2020-12-01 13:46:26 +00:00
|
|
|
--> a.sol
|
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}}
|