{ "contractName": "Base64", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides a set of functions to operate with Base64 strings. _Available since v4.5._\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"_TABLE\":{\"details\":\"Base64 Encoding/Decoding Table\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Base64.sol\":\"Base64\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Base64.sol\":{\"keccak256\":\"0x5f3461639fe20794cfb4db4a6d8477388a15b2e70a018043084b7c4bedfa8136\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://77e5309e2cc4cdc3395214edb0ff43ff5a5f7373f5a425383e540f6fab530f96\",\"dweb:/ipfs/QmTV8DZ9knJDa3b5NPBFQqjvTzodyZVjRUg5mx5A99JPLJ\"]}},\"version\":1}", "bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207744a584dd8fe9d31aad2a217a1ff38234c3b1ab25144e315c6ce19377a893a764736f6c63430008130033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207744a584dd8fe9d31aad2a217a1ff38234c3b1ab25144e315c6ce19377a893a764736f6c63430008130033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "231:3302:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "231:3302:5:-:0;;;;;;;;", "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides a set of functions to operate with Base64 strings.\n *\n * _Available since v4.5._\n */\nlibrary Base64 {\n /**\n * @dev Base64 Encoding/Decoding Table\n */\n string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n /**\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\n */\n function encode(bytes memory data) internal pure returns (string memory) {\n /**\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n */\n if (data.length == 0) return \"\";\n\n // Loads the table into memory\n string memory table = _TABLE;\n\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n // and split into 4 numbers of 6 bits.\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n // - `data.length + 2` -> Round up\n // - `/ 3` -> Number of 3-bytes chunks\n // - `4 *` -> 4 characters for each chunk\n string memory result = new string(4 * ((data.length + 2) / 3));\n\n /// @solidity memory-safe-assembly\n assembly {\n // Prepare the lookup table (skip the first \"length\" byte)\n let tablePtr := add(table, 1)\n\n // Prepare result pointer, jump over length\n let resultPtr := add(result, 32)\n\n // Run over the input, 3 bytes at a time\n for {\n let dataPtr := data\n let endPtr := add(data, mload(data))\n } lt(dataPtr, endPtr) {\n\n } {\n // Advance 3 bytes\n dataPtr := add(dataPtr, 3)\n let input := mload(dataPtr)\n\n // To write each character, shift the 3 bytes (18 bits) chunk\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n // and apply logical AND with 0x3F which is the number of\n // the previous character in the ASCII table prior to the Base64 Table\n // The result is then added to the table to get the character to write,\n // and finally write it in the result pointer but with a left shift\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n resultPtr := add(resultPtr, 1) // Advance\n }\n\n // When data `bytes` is not exactly 3 bytes long\n // it is padded with `=` characters at the end\n switch mod(mload(data), 3)\n case 1 {\n mstore8(sub(resultPtr, 1), 0x3d)\n mstore8(sub(resultPtr, 2), 0x3d)\n }\n case 2 {\n mstore8(sub(resultPtr, 1), 0x3d)\n }\n }\n\n return result;\n }\n}\n", "sourcePath": "@openzeppelin/contracts/utils/Base64.sol", "ast": { "absolutePath": "@openzeppelin/contracts/utils/Base64.sol", "exportedSymbols": { "Base64": [ 1464 ] }, "id": 1465, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 1419, "literals": [ "solidity", "^", "0.8", ".0" ], "nodeType": "PragmaDirective", "src": "100:23:5" }, { "abstract": false, "baseContracts": [], "canonicalName": "Base64", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 1420, "nodeType": "StructuredDocumentation", "src": "125:105:5", "text": " @dev Provides a set of functions to operate with Base64 strings.\n _Available since v4.5._" }, "fullyImplemented": true, "id": 1464, "linearizedBaseContracts": [ 1464 ], "name": "Base64", "nameLocation": "239:6:5", "nodeType": "ContractDefinition", "nodes": [ { "constant": true, "documentation": { "id": 1421, "nodeType": "StructuredDocumentation", "src": "252:54:5", "text": " @dev Base64 Encoding/Decoding Table" }, "id": 1424, "mutability": "constant", "name": "_TABLE", "nameLocation": "336:6:5", "nodeType": "VariableDeclaration", "scope": 1464, "src": "311:100:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1422, "name": "string", "nodeType": "ElementaryTypeName", "src": "311:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "hexValue": "4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f", "id": 1423, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "345:66:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_84d8a590de33e00cbdc16e1f28c3506f5ec15c599fab9a6a4bcd575cc2f110ce", "typeString": "literal_string \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"" }, "value": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" }, "visibility": "internal" }, { "body": { "id": 1462, "nodeType": "Block", "src": "578:2953:5", "statements": [ { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1435, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 1432, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1427, "src": "795:4:5", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 1433, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "800:6:5", "memberName": "length", "nodeType": "MemberAccess", "src": "795:11:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 1434, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "810:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "795:16:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "documentation": " Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol", "id": 1438, "nodeType": "IfStatement", "src": "791:31:5", "trueBody": { "expression": { "hexValue": "", "id": 1436, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "820:2:5", "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "typeString": "literal_string \"\"" }, "value": "" }, "functionReturnParameters": 1431, "id": 1437, "nodeType": "Return", "src": "813:9:5" } }, { "assignments": [ 1440 ], "declarations": [ { "constant": false, "id": 1440, "mutability": "mutable", "name": "table", "nameLocation": "886:5:5", "nodeType": "VariableDeclaration", "scope": 1462, "src": "872:19:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1439, "name": "string", "nodeType": "ElementaryTypeName", "src": "872:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "id": 1442, "initialValue": { "id": 1441, "name": "_TABLE", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1424, "src": "894:6:5", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "nodeType": "VariableDeclarationStatement", "src": "872:28:5" }, { "assignments": [ 1444 ], "declarations": [ { "constant": false, "id": 1444, "mutability": "mutable", "name": "result", "nameLocation": "1317:6:5", "nodeType": "VariableDeclaration", "scope": 1462, "src": "1303:20:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1443, "name": "string", "nodeType": "ElementaryTypeName", "src": "1303:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "id": 1458, "initialValue": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1456, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "34", "id": 1447, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1337:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" }, "value": "4" }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1451, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "expression": { "id": 1448, "name": "data", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1427, "src": "1343:4:5", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 1449, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberLocation": "1348:6:5", "memberName": "length", "nodeType": "MemberAccess", "src": "1343:11:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "hexValue": "32", "id": 1450, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1357:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "1343:15:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 1452, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1342:17:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "/", "rightExpression": { "hexValue": "33", "id": 1453, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1362:1:5", "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", "typeString": "int_const 3" }, "value": "3" }, "src": "1342:21:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 1455, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "1341:23:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1337:27:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1446, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "1326:10:5", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$", "typeString": "function (uint256) pure returns (string memory)" }, "typeName": { "id": 1445, "name": "string", "nodeType": "ElementaryTypeName", "src": "1330:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } } }, "id": 1457, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1326:39:5", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "nodeType": "VariableDeclarationStatement", "src": "1303:62:5" }, { "AST": { "nodeType": "YulBlock", "src": "1428:2073:5", "statements": [ { "nodeType": "YulVariableDeclaration", "src": "1513:29:5", "value": { "arguments": [ { "name": "table", "nodeType": "YulIdentifier", "src": "1533:5:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1540:1:5", "type": "", "value": "1" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "1529:3:5" }, "nodeType": "YulFunctionCall", "src": "1529:13:5" }, "variables": [ { "name": "tablePtr", "nodeType": "YulTypedName", "src": "1517:8:5", "type": "" } ] }, { "nodeType": "YulVariableDeclaration", "src": "1612:32:5", "value": { "arguments": [ { "name": "result", "nodeType": "YulIdentifier", "src": "1633:6:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1641:2:5", "type": "", "value": "32" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "1629:3:5" }, "nodeType": "YulFunctionCall", "src": "1629:15:5" }, "variables": [ { "name": "resultPtr", "nodeType": "YulTypedName", "src": "1616:9:5", "type": "" } ] }, { "body": { "nodeType": "YulBlock", "src": "1857:1257:5", "statements": [ { "nodeType": "YulAssignment", "src": "1910:26:5", "value": { "arguments": [ { "name": "dataPtr", "nodeType": "YulIdentifier", "src": "1925:7:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "1934:1:5", "type": "", "value": "3" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "1921:3:5" }, "nodeType": "YulFunctionCall", "src": "1921:15:5" }, "variableNames": [ { "name": "dataPtr", "nodeType": "YulIdentifier", "src": "1910:7:5" } ] }, { "nodeType": "YulVariableDeclaration", "src": "1953:27:5", "value": { "arguments": [ { "name": "dataPtr", "nodeType": "YulIdentifier", "src": "1972:7:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "1966:5:5" }, "nodeType": "YulFunctionCall", "src": "1966:14:5" }, "variables": [ { "name": "input", "nodeType": "YulTypedName", "src": "1957:5:5", "type": "" } ] }, { "expression": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2564:9:5" }, { "arguments": [ { "arguments": [ { "name": "tablePtr", "nodeType": "YulIdentifier", "src": "2585:8:5" }, { "arguments": [ { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2603:2:5", "type": "", "value": "18" }, { "name": "input", "nodeType": "YulIdentifier", "src": "2607:5:5" } ], "functionName": { "name": "shr", "nodeType": "YulIdentifier", "src": "2599:3:5" }, "nodeType": "YulFunctionCall", "src": "2599:14:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2615:4:5", "type": "", "value": "0x3F" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2595:3:5" }, "nodeType": "YulFunctionCall", "src": "2595:25:5" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2581:3:5" }, "nodeType": "YulFunctionCall", "src": "2581:40:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "2575:5:5" }, "nodeType": "YulFunctionCall", "src": "2575:47:5" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "2556:7:5" }, "nodeType": "YulFunctionCall", "src": "2556:67:5" }, "nodeType": "YulExpressionStatement", "src": "2556:67:5" }, { "nodeType": "YulAssignment", "src": "2640:30:5", "value": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2657:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2668:1:5", "type": "", "value": "1" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2653:3:5" }, "nodeType": "YulFunctionCall", "src": "2653:17:5" }, "variableNames": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2640:9:5" } ] }, { "expression": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2707:9:5" }, { "arguments": [ { "arguments": [ { "name": "tablePtr", "nodeType": "YulIdentifier", "src": "2728:8:5" }, { "arguments": [ { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2746:2:5", "type": "", "value": "12" }, { "name": "input", "nodeType": "YulIdentifier", "src": "2750:5:5" } ], "functionName": { "name": "shr", "nodeType": "YulIdentifier", "src": "2742:3:5" }, "nodeType": "YulFunctionCall", "src": "2742:14:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2758:4:5", "type": "", "value": "0x3F" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2738:3:5" }, "nodeType": "YulFunctionCall", "src": "2738:25:5" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2724:3:5" }, "nodeType": "YulFunctionCall", "src": "2724:40:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "2718:5:5" }, "nodeType": "YulFunctionCall", "src": "2718:47:5" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "2699:7:5" }, "nodeType": "YulFunctionCall", "src": "2699:67:5" }, "nodeType": "YulExpressionStatement", "src": "2699:67:5" }, { "nodeType": "YulAssignment", "src": "2783:30:5", "value": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2800:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2811:1:5", "type": "", "value": "1" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2796:3:5" }, "nodeType": "YulFunctionCall", "src": "2796:17:5" }, "variableNames": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2783:9:5" } ] }, { "expression": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2850:9:5" }, { "arguments": [ { "arguments": [ { "name": "tablePtr", "nodeType": "YulIdentifier", "src": "2871:8:5" }, { "arguments": [ { "arguments": [ { "kind": "number", "nodeType": "YulLiteral", "src": "2889:1:5", "type": "", "value": "6" }, { "name": "input", "nodeType": "YulIdentifier", "src": "2892:5:5" } ], "functionName": { "name": "shr", "nodeType": "YulIdentifier", "src": "2885:3:5" }, "nodeType": "YulFunctionCall", "src": "2885:13:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2900:4:5", "type": "", "value": "0x3F" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "2881:3:5" }, "nodeType": "YulFunctionCall", "src": "2881:24:5" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2867:3:5" }, "nodeType": "YulFunctionCall", "src": "2867:39:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "2861:5:5" }, "nodeType": "YulFunctionCall", "src": "2861:46:5" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "2842:7:5" }, "nodeType": "YulFunctionCall", "src": "2842:66:5" }, "nodeType": "YulExpressionStatement", "src": "2842:66:5" }, { "nodeType": "YulAssignment", "src": "2925:30:5", "value": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2942:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "2953:1:5", "type": "", "value": "1" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "2938:3:5" }, "nodeType": "YulFunctionCall", "src": "2938:17:5" }, "variableNames": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2925:9:5" } ] }, { "expression": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "2992:9:5" }, { "arguments": [ { "arguments": [ { "name": "tablePtr", "nodeType": "YulIdentifier", "src": "3013:8:5" }, { "arguments": [ { "name": "input", "nodeType": "YulIdentifier", "src": "3027:5:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3034:4:5", "type": "", "value": "0x3F" } ], "functionName": { "name": "and", "nodeType": "YulIdentifier", "src": "3023:3:5" }, "nodeType": "YulFunctionCall", "src": "3023:16:5" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "3009:3:5" }, "nodeType": "YulFunctionCall", "src": "3009:31:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "3003:5:5" }, "nodeType": "YulFunctionCall", "src": "3003:38:5" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "2984:7:5" }, "nodeType": "YulFunctionCall", "src": "2984:58:5" }, "nodeType": "YulExpressionStatement", "src": "2984:58:5" }, { "nodeType": "YulAssignment", "src": "3059:30:5", "value": { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "3076:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3087:1:5", "type": "", "value": "1" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "3072:3:5" }, "nodeType": "YulFunctionCall", "src": "3072:17:5" }, "variableNames": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "3059:9:5" } ] } ] }, "condition": { "arguments": [ { "name": "dataPtr", "nodeType": "YulIdentifier", "src": "1823:7:5" }, { "name": "endPtr", "nodeType": "YulIdentifier", "src": "1832:6:5" } ], "functionName": { "name": "lt", "nodeType": "YulIdentifier", "src": "1820:2:5" }, "nodeType": "YulFunctionCall", "src": "1820:19:5" }, "nodeType": "YulForLoop", "post": { "nodeType": "YulBlock", "src": "1840:16:5", "statements": [] }, "pre": { "nodeType": "YulBlock", "src": "1715:104:5", "statements": [ { "nodeType": "YulVariableDeclaration", "src": "1733:19:5", "value": { "name": "data", "nodeType": "YulIdentifier", "src": "1748:4:5" }, "variables": [ { "name": "dataPtr", "nodeType": "YulTypedName", "src": "1737:7:5", "type": "" } ] }, { "nodeType": "YulVariableDeclaration", "src": "1769:36:5", "value": { "arguments": [ { "name": "data", "nodeType": "YulIdentifier", "src": "1787:4:5" }, { "arguments": [ { "name": "data", "nodeType": "YulIdentifier", "src": "1799:4:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "1793:5:5" }, "nodeType": "YulFunctionCall", "src": "1793:11:5" } ], "functionName": { "name": "add", "nodeType": "YulIdentifier", "src": "1783:3:5" }, "nodeType": "YulFunctionCall", "src": "1783:22:5" }, "variables": [ { "name": "endPtr", "nodeType": "YulTypedName", "src": "1773:6:5", "type": "" } ] } ] }, "src": "1711:1403:5" }, { "cases": [ { "body": { "nodeType": "YulBlock", "src": "3294:113:5", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "3324:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3335:1:5", "type": "", "value": "1" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "3320:3:5" }, "nodeType": "YulFunctionCall", "src": "3320:17:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3339:4:5", "type": "", "value": "0x3d" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "3312:7:5" }, "nodeType": "YulFunctionCall", "src": "3312:32:5" }, "nodeType": "YulExpressionStatement", "src": "3312:32:5" }, { "expression": { "arguments": [ { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "3373:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3384:1:5", "type": "", "value": "2" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "3369:3:5" }, "nodeType": "YulFunctionCall", "src": "3369:17:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3388:4:5", "type": "", "value": "0x3d" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "3361:7:5" }, "nodeType": "YulFunctionCall", "src": "3361:32:5" }, "nodeType": "YulExpressionStatement", "src": "3361:32:5" } ] }, "nodeType": "YulCase", "src": "3287:120:5", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "3292:1:5", "type": "", "value": "1" } }, { "body": { "nodeType": "YulBlock", "src": "3427:64:5", "statements": [ { "expression": { "arguments": [ { "arguments": [ { "name": "resultPtr", "nodeType": "YulIdentifier", "src": "3457:9:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3468:1:5", "type": "", "value": "1" } ], "functionName": { "name": "sub", "nodeType": "YulIdentifier", "src": "3453:3:5" }, "nodeType": "YulFunctionCall", "src": "3453:17:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3472:4:5", "type": "", "value": "0x3d" } ], "functionName": { "name": "mstore8", "nodeType": "YulIdentifier", "src": "3445:7:5" }, "nodeType": "YulFunctionCall", "src": "3445:32:5" }, "nodeType": "YulExpressionStatement", "src": "3445:32:5" } ] }, "nodeType": "YulCase", "src": "3420:71:5", "value": { "kind": "number", "nodeType": "YulLiteral", "src": "3425:1:5", "type": "", "value": "2" } } ], "expression": { "arguments": [ { "arguments": [ { "name": "data", "nodeType": "YulIdentifier", "src": "3265:4:5" } ], "functionName": { "name": "mload", "nodeType": "YulIdentifier", "src": "3259:5:5" }, "nodeType": "YulFunctionCall", "src": "3259:11:5" }, { "kind": "number", "nodeType": "YulLiteral", "src": "3272:1:5", "type": "", "value": "3" } ], "functionName": { "name": "mod", "nodeType": "YulIdentifier", "src": "3255:3:5" }, "nodeType": "YulFunctionCall", "src": "3255:19:5" }, "nodeType": "YulSwitch", "src": "3248:243:5" } ] }, "documentation": "@solidity memory-safe-assembly", "evmVersion": "paris", "externalReferences": [ { "declaration": 1427, "isOffset": false, "isSlot": false, "src": "1748:4:5", "valueSize": 1 }, { "declaration": 1427, "isOffset": false, "isSlot": false, "src": "1787:4:5", "valueSize": 1 }, { "declaration": 1427, "isOffset": false, "isSlot": false, "src": "1799:4:5", "valueSize": 1 }, { "declaration": 1427, "isOffset": false, "isSlot": false, "src": "3265:4:5", "valueSize": 1 }, { "declaration": 1444, "isOffset": false, "isSlot": false, "src": "1633:6:5", "valueSize": 1 }, { "declaration": 1440, "isOffset": false, "isSlot": false, "src": "1533:5:5", "valueSize": 1 } ], "id": 1459, "nodeType": "InlineAssembly", "src": "1419:2082:5" }, { "expression": { "id": 1460, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1444, "src": "3518:6:5", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "functionReturnParameters": 1431, "id": 1461, "nodeType": "Return", "src": "3511:13:5" } ] }, "documentation": { "id": 1425, "nodeType": "StructuredDocumentation", "src": "418:82:5", "text": " @dev Converts a `bytes` to its Bytes64 `string` representation." }, "id": 1463, "implemented": true, "kind": "function", "modifiers": [], "name": "encode", "nameLocation": "514:6:5", "nodeType": "FunctionDefinition", "parameters": { "id": 1428, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1427, "mutability": "mutable", "name": "data", "nameLocation": "534:4:5", "nodeType": "VariableDeclaration", "scope": 1463, "src": "521:17:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 1426, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "521:5:5", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "visibility": "internal" } ], "src": "520:19:5" }, "returnParameters": { "id": 1431, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1430, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 1463, "src": "563:13:5", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 1429, "name": "string", "nodeType": "ElementaryTypeName", "src": "563:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "visibility": "internal" } ], "src": "562:15:5" }, "scope": 1464, "src": "505:3026:5", "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "scope": 1465, "src": "231:3302:5", "usedErrors": [] } ], "src": "100:3434:5" }, "compiler": { "name": "solc", "version": "0.8.19+commit.7dd6d404.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.4.13", "updatedAt": "2023-06-04T09:28:33.985Z", "devdoc": { "details": "Provides a set of functions to operate with Base64 strings. _Available since v4.5._", "kind": "dev", "methods": {}, "stateVariables": { "_TABLE": { "details": "Base64 Encoding/Decoding Table" } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }