UNPKG

@materia-dex/materia-contracts-proxy

Version:

Proxy contract for the Materia protocol

1,828 lines 256 kB
{ "deploy": { "VM:-": { "linkReferences": {}, "autoDeployLib": true }, "main:1": { "linkReferences": {}, "autoDeployLib": true }, "ropsten:3": { "linkReferences": {}, "autoDeployLib": true }, "rinkeby:4": { "linkReferences": {}, "autoDeployLib": true }, "kovan:42": { "linkReferences": {}, "autoDeployLib": true }, "görli:5": { "linkReferences": {}, "autoDeployLib": true }, "Custom": { "linkReferences": {}, "autoDeployLib": true } }, "data": { "bytecode": { "generatedSources": [ { "ast": { "nodeType": "YulBlock", "src": "0:3911:1", "statements": [ { "body": { "nodeType": "YulBlock", "src": "72:53:1", "statements": [ { "expression": { "arguments": [ { "name": "pos", "nodeType": "YulIdentifier", "src": "89:3:1" }, { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "112:5:1" } ], "functionName": { "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", "src": "94:17:1" }, "nodeType": "YulFunctionCall", "src": "94:24:1" } ], "functionName": { "name": "mstore", "nodeType": "YulIdentifier", "src": "82:6:1" }, "nodeType": "YulFunctionCall", "src": "82:37:1" }, "nodeType": "YulExpressionStatement", "src": "82:37:1" } ] }, "name": "abi_encode_t_uint256_to_t_uint256_fromStack", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "60:5:1", "type": "" }, { "name": "pos", "nodeType": "YulTypedName", "src": "67:3:1", "type": "" } ], "src": "7:118:1" }, { "body": { "nodeType": "YulBlock", "src": "229:124:1", "statements": [ { "nodeType": "YulAssignment", "src": "239:26:1", "value": { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "251:9:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "262:2:1", "type": "", "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "247:3:1" }, "nodeType": "YulFunctionCall", "src": "247:18:1" }, "variableNames": [ { "name": "tail", "nodeType": "YulIdentifier", "src": "239:4:1" } ] }, { "expression": { "arguments": [ { "name": "value0", "nodeType": "YulIdentifier", "src": "319:6:1" }, { "arguments": [ { "name": "headStart", "nodeType": "YulIdentifier", "src": "332:9:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "343:1:1", "type": "", "value": "0" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "328:3:1" }, "nodeType": "YulFunctionCall", "src": "328:17:1" } ], "functionName": { "name": "abi_encode_t_uint256_to_t_uint256_fromStack", "nodeType": "YulIdentifier", "src": "275:43:1" }, "nodeType": "YulFunctionCall", "src": "275:71:1" }, "nodeType": "YulExpressionStatement", "src": "275:71:1" } ] }, "name": "abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "headStart", "nodeType": "YulTypedName", "src": "201:9:1", "type": "" }, { "name": "value0", "nodeType": "YulTypedName", "src": "213:6:1", "type": "" } ], "returnVariables": [ { "name": "tail", "nodeType": "YulTypedName", "src": "224:4:1", "type": "" } ], "src": "131:222:1" }, { "body": { "nodeType": "YulBlock", "src": "432:775:1", "statements": [ { "nodeType": "YulAssignment", "src": "442:15:1", "value": { "name": "_power", "nodeType": "YulIdentifier", "src": "451:6:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "442:5:1" } ] }, { "nodeType": "YulAssignment", "src": "466:14:1", "value": { "name": "_base", "nodeType": "YulIdentifier", "src": "475:5:1" }, "variableNames": [ { "name": "base", "nodeType": "YulIdentifier", "src": "466:4:1" } ] }, { "body": { "nodeType": "YulBlock", "src": "524:677:1", "statements": [ { "body": { "nodeType": "YulBlock", "src": "612:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "614:16:1" }, "nodeType": "YulFunctionCall", "src": "614:18:1" }, "nodeType": "YulExpressionStatement", "src": "614:18:1" } ] }, "condition": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "590:4:1" }, { "arguments": [ { "name": "max", "nodeType": "YulIdentifier", "src": "600:3:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "605:4:1" } ], "functionName": { "name": "div", "nodeType": "YulIdentifier", "src": "596:3:1" }, "nodeType": "YulFunctionCall", "src": "596:14:1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "587:2:1" }, "nodeType": "YulFunctionCall", "src": "587:24:1" }, "nodeType": "YulIf", "src": "584:2:1" }, { "body": { "nodeType": "YulBlock", "src": "679:419:1", "statements": [ { "nodeType": "YulAssignment", "src": "1059:25:1", "value": { "arguments": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1072:5:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "1079:4:1" } ], "functionName": { "name": "mul", "nodeType": "YulIdentifier", "src": "1068:3:1" }, "nodeType": "YulFunctionCall", "src": "1068:16:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1059:5:1" } ] } ] }, "condition": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "654:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "664:1:1", "type": "", "value": "1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "650:3:1" }, "nodeType": "YulFunctionCall", "src": "650:16:1" }, "nodeType": "YulIf", "src": "647:2:1" }, { "nodeType": "YulAssignment", "src": "1111:23:1", "value": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1123:4:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "1129:4:1" } ], "functionName": { "name": "mul", "nodeType": "YulIdentifier", "src": "1119:3:1" }, "nodeType": "YulFunctionCall", "src": "1119:15:1" }, "variableNames": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1111:4:1" } ] }, { "nodeType": "YulAssignment", "src": "1147:44:1", "value": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1182:8:1" } ], "functionName": { "name": "shift_right_1_unsigned", "nodeType": "YulIdentifier", "src": "1159:22:1" }, "nodeType": "YulFunctionCall", "src": "1159:32:1" }, "variableNames": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1147:8:1" } ] } ] }, "condition": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "500:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "510:1:1", "type": "", "value": "1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "497:2:1" }, "nodeType": "YulFunctionCall", "src": "497:15:1" }, "nodeType": "YulForLoop", "post": { "nodeType": "YulBlock", "src": "513:2:1", "statements": [] }, "pre": { "nodeType": "YulBlock", "src": "493:3:1", "statements": [] }, "src": "489:712:1" } ] }, "name": "checked_exp_helper", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "_power", "nodeType": "YulTypedName", "src": "387:6:1", "type": "" }, { "name": "_base", "nodeType": "YulTypedName", "src": "395:5:1", "type": "" }, { "name": "exponent", "nodeType": "YulTypedName", "src": "402:8:1", "type": "" }, { "name": "max", "nodeType": "YulTypedName", "src": "412:3:1", "type": "" } ], "returnVariables": [ { "name": "power", "nodeType": "YulTypedName", "src": "420:5:1", "type": "" }, { "name": "base", "nodeType": "YulTypedName", "src": "427:4:1", "type": "" } ], "src": "359:848:1" }, { "body": { "nodeType": "YulBlock", "src": "1277:217:1", "statements": [ { "nodeType": "YulAssignment", "src": "1287:31:1", "value": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1313:4:1" } ], "functionName": { "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", "src": "1295:17:1" }, "nodeType": "YulFunctionCall", "src": "1295:23:1" }, "variableNames": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1287:4:1" } ] }, { "nodeType": "YulAssignment", "src": "1327:37:1", "value": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1355:8:1" } ], "functionName": { "name": "cleanup_t_uint8", "nodeType": "YulIdentifier", "src": "1339:15:1" }, "nodeType": "YulFunctionCall", "src": "1339:25:1" }, "variableNames": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1327:8:1" } ] }, { "nodeType": "YulAssignment", "src": "1374:113:1", "value": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1404:4:1" }, { "name": "exponent", "nodeType": "YulIdentifier", "src": "1410:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1420:66:1", "type": "", "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" } ], "functionName": { "name": "checked_exp_unsigned", "nodeType": "YulIdentifier", "src": "1383:20:1" }, "nodeType": "YulFunctionCall", "src": "1383:104:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1374:5:1" } ] } ] }, "name": "checked_exp_t_uint256_t_uint8", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "base", "nodeType": "YulTypedName", "src": "1252:4:1", "type": "" }, { "name": "exponent", "nodeType": "YulTypedName", "src": "1258:8:1", "type": "" } ], "returnVariables": [ { "name": "power", "nodeType": "YulTypedName", "src": "1271:5:1", "type": "" } ], "src": "1213:281:1" }, { "body": { "nodeType": "YulBlock", "src": "1560:1013:1", "statements": [ { "body": { "nodeType": "YulBlock", "src": "1755:20:1", "statements": [ { "nodeType": "YulAssignment", "src": "1757:10:1", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1766:1:1", "type": "", "value": "1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1757:5:1" } ] }, { "nodeType": "YulLeave", "src": "1768:5:1" } ] }, "condition": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1745:8:1" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "1738:6:1" }, "nodeType": "YulFunctionCall", "src": "1738:16:1" }, "nodeType": "YulIf", "src": "1735:2:1" }, { "body": { "nodeType": "YulBlock", "src": "1800:20:1", "statements": [ { "nodeType": "YulAssignment", "src": "1802:10:1", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1811:1:1", "type": "", "value": "0" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1802:5:1" } ] }, { "nodeType": "YulLeave", "src": "1813:5:1" } ] }, "condition": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "1794:4:1" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "1787:6:1" }, "nodeType": "YulFunctionCall", "src": "1787:12:1" }, "nodeType": "YulIf", "src": "1784:2:1" }, { "cases": [ { "body": { "nodeType": "YulBlock", "src": "1930:20:1", "statements": [ { "nodeType": "YulAssignment", "src": "1932:10:1", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1941:1:1", "type": "", "value": "1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "1932:5:1" } ] }, { "nodeType": "YulLeave", "src": "1943:5:1" } ] }, "nodeType": "YulCase", "src": "1923:27:1", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1928:1:1", "type": "", "value": "1" } }, { "body": { "nodeType": "YulBlock", "src": "1974:176:1", "statements": [ { "body": { "nodeType": "YulBlock", "src": "2009:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "2011:16:1" }, "nodeType": "YulFunctionCall", "src": "2011:18:1" }, "nodeType": "YulExpressionStatement", "src": "2011:18:1" } ] }, "condition": { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "1994:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2004:3:1", "type": "", "value": "255" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "1991:2:1" }, "nodeType": "YulFunctionCall", "src": "1991:17:1" }, "nodeType": "YulIf", "src": "1988:2:1" }, { "nodeType": "YulAssignment", "src": "2044:25:1", "value": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2057:1:1", "type": "", "value": "2" }, { "name": "exponent", "nodeType": "YulIdentifier", "src": "2060:8:1" } ], "functionName": { "name": "exp", "nodeType": "YulIdentifier", "src": "2053:3:1" }, "nodeType": "YulFunctionCall", "src": "2053:16:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2044:5:1" } ] }, { "body": { "nodeType": "YulBlock", "src": "2100:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "2102:16:1" }, "nodeType": "YulFunctionCall", "src": "2102:18:1" }, "nodeType": "YulExpressionStatement", "src": "2102:18:1" } ] }, "condition": { "arguments": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2088:5:1" }, { "name": "max", "nodeType": "YulIdentifier", "src": "2095:3:1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "2085:2:1" }, "nodeType": "YulFunctionCall", "src": "2085:14:1" }, "nodeType": "YulIf", "src": "2082:2:1" }, { "nodeType": "YulLeave", "src": "2135:5:1" } ] }, "nodeType": "YulCase", "src": "1959:191:1", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "1964:1:1", "type": "", "value": "2" } } ], "expression": { "name": "base", "nodeType": "YulIdentifier", "src": "1880:4:1" }, "nodeType": "YulSwitch", "src": "1873:277:1" }, { "body": { "nodeType": "YulBlock", "src": "2282:123:1", "statements": [ { "nodeType": "YulAssignment", "src": "2296:28:1", "value": { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "2309:4:1" }, { "name": "exponent", "nodeType": "YulIdentifier", "src": "2315:8:1" } ], "functionName": { "name": "exp", "nodeType": "YulIdentifier", "src": "2305:3:1" }, "nodeType": "YulFunctionCall", "src": "2305:19:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2296:5:1" } ] }, { "body": { "nodeType": "YulBlock", "src": "2355:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "2357:16:1" }, "nodeType": "YulFunctionCall", "src": "2357:18:1" }, "nodeType": "YulExpressionStatement", "src": "2357:18:1" } ] }, "condition": { "arguments": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2343:5:1" }, { "name": "max", "nodeType": "YulIdentifier", "src": "2350:3:1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "2340:2:1" }, "nodeType": "YulFunctionCall", "src": "2340:14:1" }, "nodeType": "YulIf", "src": "2337:2:1" }, { "nodeType": "YulLeave", "src": "2390:5:1" } ] }, "condition": { "arguments": [ { "arguments": [ { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "2185:4:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2191:2:1", "type": "", "value": "11" } ], "functionName": { "name": "lt", "nodeType": "YulIdentifier", "src": "2182:2:1" }, "nodeType": "YulFunctionCall", "src": "2182:12:1" }, { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "2199:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2209:2:1", "type": "", "value": "78" } ], "functionName": { "name": "lt", "nodeType": "YulIdentifier", "src": "2196:2:1" }, "nodeType": "YulFunctionCall", "src": "2196:16:1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2178:3:1" }, "nodeType": "YulFunctionCall", "src": "2178:35:1" }, { "arguments": [ { "arguments": [ { "name": "base", "nodeType": "YulIdentifier", "src": "2234:4:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2240:3:1", "type": "", "value": "307" } ], "functionName": { "name": "lt", "nodeType": "YulIdentifier", "src": "2231:2:1" }, "nodeType": "YulFunctionCall", "src": "2231:13:1" }, { "arguments": [ { "name": "exponent", "nodeType": "YulIdentifier", "src": "2249:8:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2259:2:1", "type": "", "value": "32" } ], "functionName": { "name": "lt", "nodeType": "YulIdentifier", "src": "2246:2:1" }, "nodeType": "YulFunctionCall", "src": "2246:16:1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2227:3:1" }, "nodeType": "YulFunctionCall", "src": "2227:36:1" } ], "functionName": { "name": "or", "nodeType": "YulIdentifier", "src": "2162:2:1" }, "nodeType": "YulFunctionCall", "src": "2162:111:1" }, "nodeType": "YulIf", "src": "2159:2:1" }, { "nodeType": "YulAssignment", "src": "2415:57:1", "value": { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2449:1:1", "type": "", "value": "1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "2452:4:1" }, { "name": "exponent", "nodeType": "YulIdentifier", "src": "2458:8:1" }, { "name": "max", "nodeType": "YulIdentifier", "src": "2468:3:1" } ], "functionName": { "name": "checked_exp_helper", "nodeType": "YulIdentifier", "src": "2430:18:1" }, "nodeType": "YulFunctionCall", "src": "2430:42:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2415:5:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "2422:4:1" } ] }, { "body": { "nodeType": "YulBlock", "src": "2511:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "2513:16:1" }, "nodeType": "YulFunctionCall", "src": "2513:18:1" }, "nodeType": "YulExpressionStatement", "src": "2513:18:1" } ] }, "condition": { "arguments": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2488:5:1" }, { "arguments": [ { "name": "max", "nodeType": "YulIdentifier", "src": "2499:3:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "2504:4:1" } ], "functionName": { "name": "div", "nodeType": "YulIdentifier", "src": "2495:3:1" }, "nodeType": "YulFunctionCall", "src": "2495:14:1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "2485:2:1" }, "nodeType": "YulFunctionCall", "src": "2485:25:1" }, "nodeType": "YulIf", "src": "2482:2:1" }, { "nodeType": "YulAssignment", "src": "2542:25:1", "value": { "arguments": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2555:5:1" }, { "name": "base", "nodeType": "YulIdentifier", "src": "2562:4:1" } ], "functionName": { "name": "mul", "nodeType": "YulIdentifier", "src": "2551:3:1" }, "nodeType": "YulFunctionCall", "src": "2551:16:1" }, "variableNames": [ { "name": "power", "nodeType": "YulIdentifier", "src": "2542:5:1" } ] } ] }, "name": "checked_exp_unsigned", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "base", "nodeType": "YulTypedName", "src": "1530:4:1", "type": "" }, { "name": "exponent", "nodeType": "YulTypedName", "src": "1536:8:1", "type": "" }, { "name": "max", "nodeType": "YulTypedName", "src": "1546:3:1", "type": "" } ], "returnVariables": [ { "name": "power", "nodeType": "YulTypedName", "src": "1554:5:1", "type": "" } ], "src": "1500:1073:1" }, { "body": { "nodeType": "YulBlock", "src": "2627:300:1", "statements": [ { "nodeType": "YulAssignment", "src": "2637:25:1", "value": { "arguments": [ { "name": "x", "nodeType": "YulIdentifier", "src": "2660:1:1" } ], "functionName": { "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", "src": "2642:17:1" }, "nodeType": "YulFunctionCall", "src": "2642:20:1" }, "variableNames": [ { "name": "x", "nodeType": "YulIdentifier", "src": "2637:1:1" } ] }, { "nodeType": "YulAssignment", "src": "2671:25:1", "value": { "arguments": [ { "name": "y", "nodeType": "YulIdentifier", "src": "2694:1:1" } ], "functionName": { "name": "cleanup_t_uint256", "nodeType": "YulIdentifier", "src": "2676:17:1" }, "nodeType": "YulFunctionCall", "src": "2676:20:1" }, "variableNames": [ { "name": "y", "nodeType": "YulIdentifier", "src": "2671:1:1" } ] }, { "body": { "nodeType": "YulBlock", "src": "2869:22:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x11", "nodeType": "YulIdentifier", "src": "2871:16:1" }, "nodeType": "YulFunctionCall", "src": "2871:18:1" }, "nodeType": "YulExpressionStatement", "src": "2871:18:1" } ] }, "condition": { "arguments": [ { "arguments": [ { "arguments": [ { "name": "x", "nodeType": "YulIdentifier", "src": "2781:1:1" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "2774:6:1" }, "nodeType": "YulFunctionCall", "src": "2774:9:1" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "2767:6:1" }, "nodeType": "YulFunctionCall", "src": "2767:17:1" }, { "arguments": [ { "name": "y", "nodeType": "YulIdentifier", "src": "2789:1:1" }, { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2796:66:1", "type": "", "value": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" }, { "name": "x", "nodeType": "YulIdentifier", "src": "2864:1:1" } ], "functionName": { "name": "div", "nodeType": "YulIdentifier", "src": "2792:3:1" }, "nodeType": "YulFunctionCall", "src": "2792:74:1" } ], "functionName": { "name": "gt", "nodeType": "YulIdentifier", "src": "2786:2:1" }, "nodeType": "YulFunctionCall", "src": "2786:81:1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2763:3:1" }, "nodeType": "YulFunctionCall", "src": "2763:105:1" }, "nodeType": "YulIf", "src": "2760:2:1" }, { "nodeType": "YulAssignment", "src": "2901:20:1", "value": { "arguments": [ { "name": "x", "nodeType": "YulIdentifier", "src": "2916:1:1" }, { "name": "y", "nodeType": "YulIdentifier", "src": "2919:1:1" } ], "functionName": { "name": "mul", "nodeType": "YulIdentifier", "src": "2912:3:1" }, "nodeType": "YulFunctionCall", "src": "2912:9:1" }, "variableNames": [ { "name": "product", "nodeType": "YulIdentifier", "src": "2901:7:1" } ] } ] }, "name": "checked_mul_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "x", "nodeType": "YulTypedName", "src": "2610:1:1", "type": "" }, { "name": "y", "nodeType": "YulTypedName", "src": "2613:1:1", "type": "" } ], "returnVariables": [ { "name": "product", "nodeType": "YulTypedName", "src": "2619:7:1", "type": "" } ], "src": "2579:348:1" }, { "body": { "nodeType": "YulBlock", "src": "2978:32:1", "statements": [ { "nodeType": "YulAssignment", "src": "2988:16:1", "value": { "name": "value", "nodeType": "YulIdentifier", "src": "2999:5:1" }, "variableNames": [ { "name": "cleaned", "nodeType": "YulIdentifier", "src": "2988:7:1" } ] } ] }, "name": "cleanup_t_uint256", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "2960:5:1", "type": "" } ], "returnVariables": [ { "name": "cleaned", "nodeType": "YulTypedName", "src": "2970:7:1", "type": "" } ], "src": "2933:77:1" }, { "body": { "nodeType": "YulBlock", "src": "3059:43:1", "statements": [ { "nodeType": "YulAssignment", "src": "3069:27:1", "value": { "arguments": [ { "name": "value", "nodeType": "YulIdentifier", "src": "3084:5:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3091:4:1", "type": "", "value": "0xff" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "3080:3:1" }, "nodeType": "YulFunctionCall", "src": "3080:16:1" }, "variableNames": [ { "name": "cleaned", "nodeType": "YulIdentifier", "src": "3069:7:1" } ] } ] }, "name": "cleanup_t_uint8", "nodeType": "YulFunctionDefinition", "parameters": [ { "name": "value", "nodeType": "YulTypedName", "src": "3041:5:1", "type": "" } ], "returnVariables": [ { "name": "cleaned", "nodeType": "YulTypedName", "src": "3051:7:1", "type": "" } ], "src": "3016:86:1" }, { "body": { "nodeType": "YulBlock", "src": "3159:269:1", "statements": [ { "nodeType": "YulAssignment", "src": "3169:22:1", "value": { "arguments": [ { "name": "data", "nodeType": "YulIdentifier", "src": "3183:4:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3189:1:1", "type": "", "value": "2" } ], "functionName": { "name": "div", "nodeType": "YulIdentifier", "src": "3179:3:1" }, "nodeType": "YulFunctionCall", "src": "3179:12:1" }, "variableNames": [ { "name": "length", "nodeType": "YulIdentifier", "src": "3169:6:1" } ] }, { "nodeType": "YulVariableDeclaration", "src": "3200:38:1", "value": { "arguments": [ { "name": "data", "nodeType": "YulIdentifier", "src": "3230:4:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3236:1:1", "type": "", "value": "1" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "3226:3:1" }, "nodeType": "YulFunctionCall", "src": "3226:12:1" }, "variables": [ { "name": "outOfPlaceEncoding", "nodeType": "YulTypedName", "src": "3204:18:1", "type": "" } ] }, { "body": { "nodeType": "YulBlock", "src": "3277:51:1", "statements": [ { "nodeType": "YulAssignment", "src": "3291:27:1", "value": { "arguments": [ { "name": "length", "nodeType": "YulIdentifier", "src": "3305:6:1" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3313:4:1", "type": "", "value": "0x7f" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "3301:3:1" }, "nodeType": "YulFunctionCall", "src": "3301:17:1" }, "variableNames": [ { "name": "length", "nodeType": "YulIdentifier", "src": "3291:6:1" } ] } ] }, "condition": { "arguments": [ { "name": "outOfPlaceEncoding", "nodeType": "YulIdentifier", "src": "3257:18:1" } ], "functionName": { "name": "iszero", "nodeType": "YulIdentifier", "src": "3250:6:1" }, "nodeType": "YulFunctionCall", "src": "3250:26:1" }, "nodeType": "YulIf", "src": "3247:2:1" }, { "body": { "nodeType": "YulBlock", "src": "3380:42:1", "statements": [ { "expression": { "arguments": [], "functionName": { "name": "panic_error_0x22", "nodeType": "YulIdentifier", "src": "3394:16:1" }, "nodeType": "YulFunctionCall", "src": "3394:18:1" }, "nodeType": "YulExpressionStatement", "src": "3394:18:1" } ] }, "condition": { "arguments": [ { "name": "outOfPlaceEncoding", "nodeType": "YulIdentifier", "src": "3344:18:1" }, { "arguments": [ { "name": "length", "nodeType": "YulIden