2020-11-10 12:48:32 +00:00
|
|
|
{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":"<SOURCEMAP REMOVED>"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2697:1","statements":[{"body":{"nodeType":"YulBlock","src":"101:684:1","statements":[{"body":{"nodeType":"YulBlock","src":"150:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"159:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"162:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"152:6:1"},"nodeType":"YulFunctionCall","src":"152:12:1"},"nodeType":"YulExpressionStatement","src":"152:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"129:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"137:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"125:3:1"},"nodeType":"YulFunctionCall","src":"125:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"144:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"121:3:1"},"nodeType":"YulFunctionCall","src":"121:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"114:6:1"},"nodeType":"YulFunctionCall","src":"114:35:1"},"nodeType":"YulIf","src":"111:2:1"},{"nodeType":"YulVariableDeclaration","src":"175:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"202:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"189:12:1"},"nodeType":"YulFunctionCall","src":"189:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"179:6:1","type":""}]},{"nodeType":"YulAssignment","src":"218:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"299:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"242:56:1"},"nodeType":"YulFunctionCall","src":"242:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"227:14:1"},"nodeType":"YulFunctionCall","src":"227:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"218:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"316:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"327:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"320:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"348:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"341:6:1"},"nodeType":"YulFunctionCall","src":"341:21:1"},"nodeType":"YulExpressionStatement","src":"341:21:1"},{"nodeType":"YulAssignment","src":"363:27:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"377:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"385:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"373:3:1"},"nodeType":"YulFunctionCall","src":"373:17:1"},"variableNames":[{"name":"offset","nodeType":"YulIdentifier","src":"363:6:1"}]},{"nodeType":"YulAssignment","src":"391:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"402:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"407:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"391:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"452:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"463:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"456:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"518:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"527:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"530:1
|
2020-05-28 12:01:07 +00:00
|
|
|
|
|
|
|
// uint256[]
|
|
|
|
function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array {
|
|
|
|
if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }
|
|
|
|
let length := calldataload(offset)
|
|
|
|
array := allocateMemory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length))
|
|
|
|
let dst := array
|
|
|
|
mstore(array, length) offset := add(offset, 0x20) dst := add(dst, 0x20) // might update offset and dst
|
|
|
|
let src := offset
|
|
|
|
if gt(add(src, mul(length, 0x20)), end) { revert(0, 0) }
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function abi_decode_t_uint256(offset, end) -> value {
|
|
|
|
value := calldataload(offset)
|
|
|
|
validator_revert_t_uint256(value)
|
|
|
|
}
|
|
|
|
|
|
|
|
function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 {
|
|
|
|
if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }
|
|
|
|
|
|
|
|
{
|
|
|
|
let offset := calldataload(add(headStart, 0))
|
|
|
|
if gt(offset, 0xffffffffffffffff) { revert(0, 0) }
|
|
|
|
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))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function allocateMemory(size) -> memPtr {
|
|
|
|
memPtr := mload(64)
|
|
|
|
let newFreePtr := add(memPtr, size)
|
|
|
|
// protect against overflow
|
2020-10-13 11:28:39 +00:00
|
|
|
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
|
2020-05-28 12:01:07 +00:00
|
|
|
mstore(64, newFreePtr)
|
|
|
|
}
|
|
|
|
|
|
|
|
function array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length) -> size {
|
|
|
|
// Make sure we can allocate memory without overflow
|
2020-10-13 11:28:39 +00:00
|
|
|
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
|
2020-05-28 12:01:07 +00:00
|
|
|
|
|
|
|
size := mul(length, 0x20)
|
|
|
|
|
|
|
|
// add length slot
|
|
|
|
size := add(size, 0x20)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function cleanup_t_uint256(value) -> cleaned {
|
|
|
|
cleaned := value
|
|
|
|
}
|
|
|
|
|
2020-10-13 11:28:39 +00:00
|
|
|
function panic_error_0x41() {
|
|
|
|
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
|
|
|
|
mstore(4, 0x41)
|
|
|
|
revert(0, 0x24)
|
2020-09-24 13:45:45 +00:00
|
|
|
}
|
|
|
|
|
2020-05-28 12:01:07 +00:00
|
|
|
function validator_revert_t_uint256(value) {
|
|
|
|
if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-11-10 12:48:32 +00:00
|
|
|
","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;130:7;83:59;;;:::o;24:761:1:-;;144:3;137:4;129:6;125:17;121:27;111:2;;162:1;159;152:12;111:2;202:6;189:20;227:80;242:64;299:6;242:64;:::i;:::-;227:80;:::i;:::-;218:89;;327:5;355:6;348:5;341:21;385:4;377:6;373:17;363:27;;407:4;402:3;398:14;391:21;;463:6;513:3;505:4;497:6;493:17;488:3;484:27;481:36;478:2;;;530:1;527;520:12;478:2;558:1;543:236;568:6;565:1;562:13;543:236;;;635:3;663:37;696:3;684:10;663:37;:::i;:::-;658:3;651:50;730:4;725:3;721:14;714:21;;764:4;759:3;755:14;748:21;;603:176;590:1;587;583:9;578:14;;543:236;;;547:14;101:684;;;;;;;:::o;791:139::-;;875:6;862:20;853:29;;891:33;918:5;891:33;:::i;:::-;843:87;;;;:::o;936:403::-;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;1085:1;1082;1075:12;1037:2;1155:1;1144:9;1140:17;1127:31;1185:18;1177:6;1174:30;1171:2;;;1217:1;1214;1207:12;1171:2;1244:78;1314:7;1305:6;1294:9;1290:22;1244:78;:::i;:::-;1234:88;;1099:233;1027:312;;;;:::o;1345:118::-;1432:24;1450:5;1432:24;:::i;:::-;1427:3;1420:37;1410:53;;:::o;1469:222::-;;1600:2;1589:9;1585:18;1577:26;;1613:71;1681:1;1670:9;1666:17;1657:6;1613:71;:::i;:::-;1567:124;;;;:::o;1697:283::-;;1763:2;1757:9;1747:19;;1805:4;1797:6;1793:17;1912:6;1900:10;1897:22;1876:18;1864:10;1861:34;1858:62;1855:2;;;1923:18;;:::i;:::-;1855:2;1963:10;1959:2;1952:22;1737:243;;;;:::o;1986:311::-;;2153:18;2145:6;2142:30;2139:2;;;2175:18;;:::i;:::-;2139:2;2225:4;2217:6;2213:17;2205:25;;2285:4;2279;2275:15;2267:23;;2068:229;;;:::o;2303:77::-;;2369:5;2358:16;;2348:32;;;:::o;2386:180::-;2434:77;2431:1;2424:88;2531:4;2528:1;2521:15;2555:4;2552:1;2545:15;2572:122;2645:24;2663:5;2645:24;:::i;:::-;2638:5;2635:35;2625:2;;2684:1;2681;2674:12;2625:2;2615:79;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version!
|
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}}}
|