becrypto/build/contracts/Base64.json

1602 lines
76 KiB
JSON

{
"contractName": "Base64",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"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\":\"london\",\"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": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220495a4fe1e26fe2e9215b227bf73de186872510eb6ff1f20ce8de92b03ebe1a4464736f6c634300080a0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220495a4fe1e26fe2e9215b227bf73de186872510eb6ff1f20ce8de92b03ebe1a4464736f6c634300080a0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "231:3302:29:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "231:3302:29:-: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": [
6448
]
},
"id": 6449,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6403,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "100:23:29"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Base64",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 6404,
"nodeType": "StructuredDocumentation",
"src": "125:105:29",
"text": " @dev Provides a set of functions to operate with Base64 strings.\n _Available since v4.5._"
},
"fullyImplemented": true,
"id": 6448,
"linearizedBaseContracts": [
6448
],
"name": "Base64",
"nameLocation": "239:6:29",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"documentation": {
"id": 6405,
"nodeType": "StructuredDocumentation",
"src": "252:54:29",
"text": " @dev Base64 Encoding/Decoding Table"
},
"id": 6408,
"mutability": "constant",
"name": "_TABLE",
"nameLocation": "336:6:29",
"nodeType": "VariableDeclaration",
"scope": 6448,
"src": "311:100:29",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6406,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "311:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"hexValue": "4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f",
"id": 6407,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "345:66:29",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_84d8a590de33e00cbdc16e1f28c3506f5ec15c599fab9a6a4bcd575cc2f110ce",
"typeString": "literal_string \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\""
},
"value": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
},
"visibility": "internal"
},
{
"body": {
"id": 6446,
"nodeType": "Block",
"src": "578:2953:29",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6419,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 6416,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6411,
"src": "795:4:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 6417,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "795:11:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 6418,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "810:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "795:16:29",
"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": 6422,
"nodeType": "IfStatement",
"src": "791:31:29",
"trueBody": {
"expression": {
"hexValue": "",
"id": 6420,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "820:2:29",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeString": "literal_string \"\""
},
"value": ""
},
"functionReturnParameters": 6415,
"id": 6421,
"nodeType": "Return",
"src": "813:9:29"
}
},
{
"assignments": [
6424
],
"declarations": [
{
"constant": false,
"id": 6424,
"mutability": "mutable",
"name": "table",
"nameLocation": "886:5:29",
"nodeType": "VariableDeclaration",
"scope": 6446,
"src": "872:19:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6423,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "872:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 6426,
"initialValue": {
"id": 6425,
"name": "_TABLE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6408,
"src": "894:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "872:28:29"
},
{
"assignments": [
6428
],
"declarations": [
{
"constant": false,
"id": 6428,
"mutability": "mutable",
"name": "result",
"nameLocation": "1317:6:29",
"nodeType": "VariableDeclaration",
"scope": 6446,
"src": "1303:20:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6427,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1303:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 6442,
"initialValue": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6440,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "34",
"id": 6431,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1337:1:29",
"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": 6438,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 6435,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 6432,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6411,
"src": "1343:4:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 6433,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1343:11:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression": {
"hexValue": "32",
"id": 6434,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1357:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1343:15:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6436,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1342:17:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "33",
"id": 6437,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1362:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "1342:21:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"id": 6439,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1341:23:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1337:27:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 6430,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "1326:10:29",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
"typeString": "function (uint256) pure returns (string memory)"
},
"typeName": {
"id": 6429,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1330:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
}
},
"id": 6441,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1326:39:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1303:62:29"
},
{
"AST": {
"nodeType": "YulBlock",
"src": "1428:2073:29",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1513:29:29",
"value": {
"arguments": [
{
"name": "table",
"nodeType": "YulIdentifier",
"src": "1533:5:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1540:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1529:3:29"
},
"nodeType": "YulFunctionCall",
"src": "1529:13:29"
},
"variables": [
{
"name": "tablePtr",
"nodeType": "YulTypedName",
"src": "1517:8:29",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "1612:32:29",
"value": {
"arguments": [
{
"name": "result",
"nodeType": "YulIdentifier",
"src": "1633:6:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1641:2:29",
"type": "",
"value": "32"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1629:3:29"
},
"nodeType": "YulFunctionCall",
"src": "1629:15:29"
},
"variables": [
{
"name": "resultPtr",
"nodeType": "YulTypedName",
"src": "1616:9:29",
"type": ""
}
]
},
{
"body": {
"nodeType": "YulBlock",
"src": "1857:1257:29",
"statements": [
{
"nodeType": "YulAssignment",
"src": "1910:26:29",
"value": {
"arguments": [
{
"name": "dataPtr",
"nodeType": "YulIdentifier",
"src": "1925:7:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "1934:1:29",
"type": "",
"value": "3"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1921:3:29"
},
"nodeType": "YulFunctionCall",
"src": "1921:15:29"
},
"variableNames": [
{
"name": "dataPtr",
"nodeType": "YulIdentifier",
"src": "1910:7:29"
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "1953:27:29",
"value": {
"arguments": [
{
"name": "dataPtr",
"nodeType": "YulIdentifier",
"src": "1972:7:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1966:5:29"
},
"nodeType": "YulFunctionCall",
"src": "1966:14:29"
},
"variables": [
{
"name": "input",
"nodeType": "YulTypedName",
"src": "1957:5:29",
"type": ""
}
]
},
{
"expression": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2564:9:29"
},
{
"arguments": [
{
"arguments": [
{
"name": "tablePtr",
"nodeType": "YulIdentifier",
"src": "2585:8:29"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2603:2:29",
"type": "",
"value": "18"
},
{
"name": "input",
"nodeType": "YulIdentifier",
"src": "2607:5:29"
}
],
"functionName": {
"name": "shr",
"nodeType": "YulIdentifier",
"src": "2599:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2599:14:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2615:4:29",
"type": "",
"value": "0x3F"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2595:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2595:25:29"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2581:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2581:40:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2575:5:29"
},
"nodeType": "YulFunctionCall",
"src": "2575:47:29"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "2556:7:29"
},
"nodeType": "YulFunctionCall",
"src": "2556:67:29"
},
"nodeType": "YulExpressionStatement",
"src": "2556:67:29"
},
{
"nodeType": "YulAssignment",
"src": "2640:30:29",
"value": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2657:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2668:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2653:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2653:17:29"
},
"variableNames": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2640:9:29"
}
]
},
{
"expression": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2707:9:29"
},
{
"arguments": [
{
"arguments": [
{
"name": "tablePtr",
"nodeType": "YulIdentifier",
"src": "2728:8:29"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2746:2:29",
"type": "",
"value": "12"
},
{
"name": "input",
"nodeType": "YulIdentifier",
"src": "2750:5:29"
}
],
"functionName": {
"name": "shr",
"nodeType": "YulIdentifier",
"src": "2742:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2742:14:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2758:4:29",
"type": "",
"value": "0x3F"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2738:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2738:25:29"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2724:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2724:40:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2718:5:29"
},
"nodeType": "YulFunctionCall",
"src": "2718:47:29"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "2699:7:29"
},
"nodeType": "YulFunctionCall",
"src": "2699:67:29"
},
"nodeType": "YulExpressionStatement",
"src": "2699:67:29"
},
{
"nodeType": "YulAssignment",
"src": "2783:30:29",
"value": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2800:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2811:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2796:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2796:17:29"
},
"variableNames": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2783:9:29"
}
]
},
{
"expression": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2850:9:29"
},
{
"arguments": [
{
"arguments": [
{
"name": "tablePtr",
"nodeType": "YulIdentifier",
"src": "2871:8:29"
},
{
"arguments": [
{
"arguments": [
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2889:1:29",
"type": "",
"value": "6"
},
{
"name": "input",
"nodeType": "YulIdentifier",
"src": "2892:5:29"
}
],
"functionName": {
"name": "shr",
"nodeType": "YulIdentifier",
"src": "2885:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2885:13:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2900:4:29",
"type": "",
"value": "0x3F"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "2881:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2881:24:29"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2867:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2867:39:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "2861:5:29"
},
"nodeType": "YulFunctionCall",
"src": "2861:46:29"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "2842:7:29"
},
"nodeType": "YulFunctionCall",
"src": "2842:66:29"
},
"nodeType": "YulExpressionStatement",
"src": "2842:66:29"
},
{
"nodeType": "YulAssignment",
"src": "2925:30:29",
"value": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2942:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "2953:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "2938:3:29"
},
"nodeType": "YulFunctionCall",
"src": "2938:17:29"
},
"variableNames": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2925:9:29"
}
]
},
{
"expression": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "2992:9:29"
},
{
"arguments": [
{
"arguments": [
{
"name": "tablePtr",
"nodeType": "YulIdentifier",
"src": "3013:8:29"
},
{
"arguments": [
{
"name": "input",
"nodeType": "YulIdentifier",
"src": "3027:5:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3034:4:29",
"type": "",
"value": "0x3F"
}
],
"functionName": {
"name": "and",
"nodeType": "YulIdentifier",
"src": "3023:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3023:16:29"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3009:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3009:31:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3003:5:29"
},
"nodeType": "YulFunctionCall",
"src": "3003:38:29"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "2984:7:29"
},
"nodeType": "YulFunctionCall",
"src": "2984:58:29"
},
"nodeType": "YulExpressionStatement",
"src": "2984:58:29"
},
{
"nodeType": "YulAssignment",
"src": "3059:30:29",
"value": {
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "3076:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3087:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "3072:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3072:17:29"
},
"variableNames": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "3059:9:29"
}
]
}
]
},
"condition": {
"arguments": [
{
"name": "dataPtr",
"nodeType": "YulIdentifier",
"src": "1823:7:29"
},
{
"name": "endPtr",
"nodeType": "YulIdentifier",
"src": "1832:6:29"
}
],
"functionName": {
"name": "lt",
"nodeType": "YulIdentifier",
"src": "1820:2:29"
},
"nodeType": "YulFunctionCall",
"src": "1820:19:29"
},
"nodeType": "YulForLoop",
"post": {
"nodeType": "YulBlock",
"src": "1840:16:29",
"statements": []
},
"pre": {
"nodeType": "YulBlock",
"src": "1715:104:29",
"statements": [
{
"nodeType": "YulVariableDeclaration",
"src": "1733:19:29",
"value": {
"name": "data",
"nodeType": "YulIdentifier",
"src": "1748:4:29"
},
"variables": [
{
"name": "dataPtr",
"nodeType": "YulTypedName",
"src": "1737:7:29",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "1769:36:29",
"value": {
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "1787:4:29"
},
{
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "1799:4:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "1793:5:29"
},
"nodeType": "YulFunctionCall",
"src": "1793:11:29"
}
],
"functionName": {
"name": "add",
"nodeType": "YulIdentifier",
"src": "1783:3:29"
},
"nodeType": "YulFunctionCall",
"src": "1783:22:29"
},
"variables": [
{
"name": "endPtr",
"nodeType": "YulTypedName",
"src": "1773:6:29",
"type": ""
}
]
}
]
},
"src": "1711:1403:29"
},
{
"cases": [
{
"body": {
"nodeType": "YulBlock",
"src": "3294:113:29",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "3324:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3335:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "3320:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3320:17:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3339:4:29",
"type": "",
"value": "0x3d"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "3312:7:29"
},
"nodeType": "YulFunctionCall",
"src": "3312:32:29"
},
"nodeType": "YulExpressionStatement",
"src": "3312:32:29"
},
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "3373:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3384:1:29",
"type": "",
"value": "2"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "3369:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3369:17:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3388:4:29",
"type": "",
"value": "0x3d"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "3361:7:29"
},
"nodeType": "YulFunctionCall",
"src": "3361:32:29"
},
"nodeType": "YulExpressionStatement",
"src": "3361:32:29"
}
]
},
"nodeType": "YulCase",
"src": "3287:120:29",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "3292:1:29",
"type": "",
"value": "1"
}
},
{
"body": {
"nodeType": "YulBlock",
"src": "3427:64:29",
"statements": [
{
"expression": {
"arguments": [
{
"arguments": [
{
"name": "resultPtr",
"nodeType": "YulIdentifier",
"src": "3457:9:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3468:1:29",
"type": "",
"value": "1"
}
],
"functionName": {
"name": "sub",
"nodeType": "YulIdentifier",
"src": "3453:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3453:17:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3472:4:29",
"type": "",
"value": "0x3d"
}
],
"functionName": {
"name": "mstore8",
"nodeType": "YulIdentifier",
"src": "3445:7:29"
},
"nodeType": "YulFunctionCall",
"src": "3445:32:29"
},
"nodeType": "YulExpressionStatement",
"src": "3445:32:29"
}
]
},
"nodeType": "YulCase",
"src": "3420:71:29",
"value": {
"kind": "number",
"nodeType": "YulLiteral",
"src": "3425:1:29",
"type": "",
"value": "2"
}
}
],
"expression": {
"arguments": [
{
"arguments": [
{
"name": "data",
"nodeType": "YulIdentifier",
"src": "3265:4:29"
}
],
"functionName": {
"name": "mload",
"nodeType": "YulIdentifier",
"src": "3259:5:29"
},
"nodeType": "YulFunctionCall",
"src": "3259:11:29"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "3272:1:29",
"type": "",
"value": "3"
}
],
"functionName": {
"name": "mod",
"nodeType": "YulIdentifier",
"src": "3255:3:29"
},
"nodeType": "YulFunctionCall",
"src": "3255:19:29"
},
"nodeType": "YulSwitch",
"src": "3248:243:29"
}
]
},
"documentation": "@solidity memory-safe-assembly",
"evmVersion": "london",
"externalReferences": [
{
"declaration": 6411,
"isOffset": false,
"isSlot": false,
"src": "1748:4:29",
"valueSize": 1
},
{
"declaration": 6411,
"isOffset": false,
"isSlot": false,
"src": "1787:4:29",
"valueSize": 1
},
{
"declaration": 6411,
"isOffset": false,
"isSlot": false,
"src": "1799:4:29",
"valueSize": 1
},
{
"declaration": 6411,
"isOffset": false,
"isSlot": false,
"src": "3265:4:29",
"valueSize": 1
},
{
"declaration": 6428,
"isOffset": false,
"isSlot": false,
"src": "1633:6:29",
"valueSize": 1
},
{
"declaration": 6424,
"isOffset": false,
"isSlot": false,
"src": "1533:5:29",
"valueSize": 1
}
],
"id": 6443,
"nodeType": "InlineAssembly",
"src": "1419:2082:29"
},
{
"expression": {
"id": 6444,
"name": "result",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6428,
"src": "3518:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 6415,
"id": 6445,
"nodeType": "Return",
"src": "3511:13:29"
}
]
},
"documentation": {
"id": 6409,
"nodeType": "StructuredDocumentation",
"src": "418:82:29",
"text": " @dev Converts a `bytes` to its Bytes64 `string` representation."
},
"id": 6447,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "encode",
"nameLocation": "514:6:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6412,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6411,
"mutability": "mutable",
"name": "data",
"nameLocation": "534:4:29",
"nodeType": "VariableDeclaration",
"scope": 6447,
"src": "521:17:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 6410,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "521:5:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "520:19:29"
},
"returnParameters": {
"id": 6415,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6414,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6447,
"src": "563:13:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 6413,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "563:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "562:15:29"
},
"scope": 6448,
"src": "505:3026:29",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6449,
"src": "231:3302:29",
"usedErrors": []
}
],
"src": "100:3434:29"
},
"compiler": {
"name": "solc",
"version": "0.8.10+commit.fc410830.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.14",
"updatedAt": "2023-07-12T06:52:15.338Z",
"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
}
}