Add Base64 library to utils (#2884)
* Add Base64 library to utils * Fix typo on Base64 padding * Added documentation for Base64 and references from ERC1155 and ERC721 * Updated Changelog * Fix typo in utilities doc * use mstore8 to improve memory accesses * use shorter strings with encodePacked * do not use using-for syntax, for clarity Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
11
contracts/mocks/Base64Mock.sol
Normal file
11
contracts/mocks/Base64Mock.sol
Normal file
@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "../utils/Base64.sol";
|
||||
|
||||
contract Base64Mock {
|
||||
function encode(bytes memory value) external pure returns (string memory) {
|
||||
return Base64.encode(value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user