| 1298 | } |
| 1299 | |
| 1300 | std::string YulUtilFunctions::erc7201() |
| 1301 | { |
| 1302 | std::string functionName = "erc7201"; |
| 1303 | return m_functionCollector.createFunction(functionName, [&]() { |
| 1304 | Whiskers templ(R"( |
| 1305 | function erc7201(namespaceIDDataPtr, namespaceIDLength) -> slot { |
| 1306 | let innerKeccak := keccak256(namespaceIDDataPtr, namespaceIDLength) |
| 1307 | mstore(0, sub(innerKeccak, 1)) |
| 1308 | // slot = keccak256(keccak256(id) - 1) & ~0xff |
| 1309 | slot := and(keccak256(0, 32), not(0xff)) |
| 1310 | } |
| 1311 | )"); |
| 1312 | |
| 1313 | return templ.render(); |
| 1314 | }); |
| 1315 | } |
| 1316 | |
| 1317 | std::string YulUtilFunctions::arrayLengthFunction(ArrayType const& _type) |
| 1318 | { |
no test coverage detected