Update docs

This commit is contained in:
github-actions
2024-10-21 14:27:36 +00:00
parent 63bb51f17d
commit edf6031131
435 changed files with 42062 additions and 23945 deletions

View File

@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Base64} from "@openzeppelin/contracts/utils/Base64.sol";
contract Base64NFT is ERC721 {
using Strings for uint256;
constructor() ERC721("Base64NFT", "MTK") {}
// ...
function tokenURI(uint256 tokenId) public pure override returns (string memory) {
// Equivalent to:
// {
// "name": "Base64NFT #1",
// // Replace with extra ERC-721 Metadata properties
// }
// prettier-ignore
string memory dataURI = string.concat("{\"name\": \"Base64NFT #", tokenId.toString(), "\"}");
return string.concat("data:application/json;base64,", Base64.encode(bytes(dataURI)));
}
}

View File

@ -0,0 +1,15 @@
// contracts/Box.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Multicall} from "@openzeppelin/contracts/utils/Multicall.sol";
contract Box is Multicall {
function foo() public {
// ...
}
function bar() public {
// ...
}
}