Skip to content

Commit

Permalink
Refactor on RMRKCore to improve docs generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
steven2308 committed Nov 21, 2023
1 parent f3e1e59 commit 773a75d
Show file tree
Hide file tree
Showing 43 changed files with 205 additions and 193 deletions.
2 changes: 1 addition & 1 deletion contracts/RMRK/access/Ownable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "../library/RMRKErrors.sol";
/**
* @title Ownable
* @author RMRK team
* @notice A minimal ownable smart contractf or owner and contributors.
* @notice A minimal ownable smart contract or owner and contributors.
* @dev This smart contract is based on "openzeppelin's access/Ownable.sol".
*/
contract Ownable is Context {
Expand Down
18 changes: 15 additions & 3 deletions contracts/RMRK/core/RMRKCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ pragma solidity ^0.8.21;
* @dev This is currently just a passthrough contract which allows for granular editing of base-level ERC721 functions.
*/
contract RMRKCore {
string private constant _VERSION = "2.3.0";
bytes4 private constant _RMRK_INTERFACE = 0x524D524B; // "RMRK" in ASCII hex

/**
* @notice Version of the @rmrk-team/evm-contracts package
* @return Version identifier of the smart contract
* @return version Version identifier for implementations of the @rmrk-team/evm-contracts package
*/
function VERSION() public pure returns (string memory version) {
version = _VERSION;
}

/**
* @notice Interface identifier of the @rmrk-team/evm-contracts package
* @return rmrkInterface Interface identifier for implementations of the @rmrk-team/evm-contracts package
*/
string public constant VERSION = "2.3.0";
bytes4 public constant RMRK_INTERFACE = 0x524D524B; // "RMRK" in ASCII hex
function RMRK_INTERFACE() public pure returns (bytes4 rmrkInterface) {
rmrkInterface = _RMRK_INTERFACE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ abstract contract RMRKAbstractEquippable is
super.supportsInterface(interfaceId) ||
interfaceId == type(IERC2981).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == RMRK_INTERFACE;
interfaceId == RMRK_INTERFACE();
}

function _beforeTokenTransfer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract contract RMRKAbstractMultiAsset is
super.supportsInterface(interfaceId) ||
interfaceId == type(IERC2981).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == RMRK_INTERFACE;
interfaceId == RMRK_INTERFACE();
}

function _beforeTokenTransfer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract contract RMRKAbstractNestable is RMRKImplementationBase, RMRKNestable {
super.supportsInterface(interfaceId) ||
interfaceId == type(IERC2981).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == RMRK_INTERFACE;
interfaceId == RMRK_INTERFACE();
}

function _beforeTokenTransfer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract contract RMRKAbstractNestableMultiAsset is
super.supportsInterface(interfaceId) ||
interfaceId == type(IERC2981).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == RMRK_INTERFACE;
interfaceId == RMRK_INTERFACE();
}

function _beforeTokenTransfer(
Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/core/RMRKCore.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK core module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | Version identifier of the smart contract |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |



Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/equippable/RMRKEquippable.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Equippable module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptAsset

Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/equippable/RMRKMinifiedEquippable.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Equippable module, without utility internal functions
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptAsset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK MultiAsset AutoIndex module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptAsset

Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/extension/nestableAutoIndex/RMRKNestableAutoIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Nestable AutoIndex module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptChild

Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/extension/reclaimableChild/RMRKReclaimableChild.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Reclaimable child module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptChild

Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/multiasset/RMRKMultiAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Multi asset module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptAsset

Expand Down
10 changes: 5 additions & 5 deletions docs/RMRK/nestable/RMRKNestable.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Smart contract of the RMRK Nestable module.
### RMRK_INTERFACE

```solidity
function RMRK_INTERFACE() external view returns (bytes4)
function RMRK_INTERFACE() external pure returns (bytes4 rmrkInterface)
```


Interface identifier of the @rmrk-team/evm-contracts package



Expand All @@ -25,12 +25,12 @@ function RMRK_INTERFACE() external view returns (bytes4)

| Name | Type | Description |
|---|---|---|
| _0 | bytes4 | undefined |
| rmrkInterface | bytes4 | Interface identifier for implementations of the @rmrk-team/evm-contracts package |

### VERSION

```solidity
function VERSION() external view returns (string)
function VERSION() external pure returns (string version)
```

Version of the @rmrk-team/evm-contracts package
Expand All @@ -42,7 +42,7 @@ Version of the @rmrk-team/evm-contracts package

| Name | Type | Description |
|---|---|---|
| _0 | string | undefined |
| version | string | Version identifier for implementations of the @rmrk-team/evm-contracts package |

### acceptChild

Expand Down
Loading

0 comments on commit 773a75d

Please sign in to comment.