Skip to content

Commit 4b19c16

Browse files
Update Solidity docgen for prc-3
1 parent 7929811 commit 4b19c16

File tree

8 files changed

+12
-3
lines changed

8 files changed

+12
-3
lines changed

packages/contracts/evm-contracts/contracts/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Facilitating monetization
5050

5151
{{ERC1967}}
5252

53+
{{ITokenUri}}
54+
5355
{{NativeNftSaleProxy}}
5456

5557
{{GenericPaymentProxy}}

packages/contracts/evm-contracts/contracts/token/IInverseAppProjectedNft.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ pragma solidity ^0.8.13;
44
import {IInverseProjectedNft} from "./IInverseProjectedNft.sol";
55

66
/// @dev A Paima Inverse Projection NFT where initialization is handled by the app-layer.
7-
/// A standard ERC721 that can be freely minted and stores an unique <minter, userTokenId> pair (used in tokenURI) when minted.
7+
/// A standard ERC721 that can be freely minted and stores an unique `<minter, userTokenId>` pair (used in tokenURI) when minted.
8+
/// See PRC3 for more.
89
interface IInverseAppProjectedNft is IInverseProjectedNft {
9-
/// @dev Emitted when the globally-enforced tokenId in combination with an unique <minter, userTokenId> pair is minted.
10+
/// @dev Emitted when the globally-enforced tokenId in combination with an unique `<minter, userTokenId>` pair is minted.
1011
event Minted(uint256 indexed tokenId, address indexed minter, uint256 indexed userTokenId);
1112

1213
/// @dev Mints a new token to address `_to`

packages/contracts/evm-contracts/contracts/token/IInverseBaseProjectedNft.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {IInverseProjectedNft} from "./IInverseProjectedNft.sol";
55

66
/// @dev A Paima Inverse Projection NFT where initialization is handled by the base-layer.
77
/// A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
8+
/// See PRC3 for more.
89
interface IInverseBaseProjectedNft is IInverseProjectedNft {
910
/// @dev Emitted when the globally-enforced tokenId is minted, with `initialData` provided in the `mint` function parameters.
1011
event Minted(uint256 indexed tokenId, string initialData);

packages/contracts/evm-contracts/contracts/token/IInverseProjectedNft.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {IERC4906} from "@openzeppelin/contracts/interfaces/IERC4906.sol";
66
import {ITokenUri} from "./ITokenUri.sol";
77

88
/// @dev A standard ERC721 that can be burned and has a special tokenURI function accepting a custom base URI.
9+
/// See PRC3 for more.
910
interface IInverseProjectedNft is IERC4906, IERC721Metadata {
1011
/// @dev Emitted when `baseExtension` is updated from `oldBaseExtension` to `newBaseExtension`.
1112
event SetBaseExtension(string oldBaseExtension, string newBaseExtension);

packages/contracts/evm-contracts/contracts/token/InverseAppProjectedNft.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct MintEntry {
1616
}
1717

1818
/// @dev A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
19+
/// See PRC3 for more.
1920
contract InverseAppProjectedNft is IInverseAppProjectedNft, ERC721, Ownable {
2021
using Strings for uint256;
2122

packages/contracts/evm-contracts/contracts/token/InverseBaseProjectedNft.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {IInverseBaseProjectedNft} from "./IInverseBaseProjectedNft.sol";
1111
import {ITokenUri} from "./ITokenUri.sol";
1212

1313
/// @dev A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
14+
/// See PRC3 for more.
1415
contract InverseBaseProjectedNft is IInverseBaseProjectedNft, ERC721, Ownable {
1516
using Strings for uint256;
1617

packages/contracts/evm-contracts/docs/templates/contract.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ContractHeader githubLink="https://github.com/PaimaStudios/paima-engine/tree/master/packages/evm-contracts/{{__item_context.file.absolutePath}}" anchor="{{~anchor~}}">
1+
<ContractHeader githubLink="https://github.com/PaimaStudios/paima-engine/tree/master/packages/contracts/evm-contracts/{{__item_context.file.absolutePath}}" anchor="{{~anchor~}}">
22
### {{name}}
33
</ContractHeader>
44

packages/contracts/evm-contracts/docs/templates/helpers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const { version } = require('../../package.json');
22

33
module.exports['escapeChars'] = input => {
44
if (input == null) return 'No description given';
5+
// escape the curly braces (replace them with \{ )
6+
// useful to escape cases like {IERC721Receiver-onERC721Received}
57
return input.replace(/\{([a-zA-Z0-9-]+)\}/g, '\\{$1\\}');
68
};
79

0 commit comments

Comments
 (0)