ERC 1155: FTPOnChainLicense Contract - FatherTimeSDKP/CEN- GitHub Wiki
ERC1155: FTPOnChainLicense Contract
Overview
The FTPOnChainLicense1155 is a robust ERC-1155 smart contract deployed on the Polygon mainnet that manages the issuance, licensing, and royalty enforcement of NFT licenses tied to the SDKP physics framework and related principles.
It serves as the blockchain backbone for licensing Donald Paul Smith’s (FatherTime) intellectual property in the form of NFTs with embedded authorship proofs and physics metadata.
Contract Details
-
Contract Address:
0x8fcD2CaFD30333F967e1fDdF05AEfb12e8aFc221
(Polygon Mainnet) -
Token Standard: ERC-1155 (Multi-token standard supporting fungible and non-fungible tokens)
-
License Token IDs:
0
: Commercial License1
: Residential License2
: Individual/AI License
-
Royalty Enforcement:
Integrated royalty fees (17.5% commercial, 11.5% others) automatically routed to the creator’s wallet address (0x311540cD8761e15F0B01aaa6Fe0F7E8f583B4Bf7
)
Key Features
1. Multi-License Management
- Supports multiple license tiers under a single contract, enabling streamlined minting and management.
- Each token ID corresponds to a distinct license type with defined usage rights and royalties.
2. Chainlink TimeSeal Oracle Integration
- Upon minting, requests an off-chain timestamp via Chainlink oracle to anchor immutable proof of authorship and discovery.
- Emits
TimestampRequested
and related events to track timestamp oracle requests and responses.
3. On-Chain Metadata Linking
- Token URIs link to IPFS-hosted JSON metadata files containing:
- SDKP/EOS/SD&N/QCC physics principles
- License terms and usage conditions
- Author credentials
- Embedded SVG artwork dynamically rendering license info
4. Automated Royalty Enforcement
- Uses ERC-2981 standard to enforce royalty payments on secondary sales.
- Protects the original creator’s rights while facilitating broad, legitimate use.
Example Contract Snippet (Solidity)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
contract FTPOnChainLicense1155 is ERC1155, ERC2981 {
address public owner;
uint96 public constant COMMERCIAL_ROYALTY = 1750; // 17.5%
uint96 public constant RESIDENTIAL_ROYALTY = 1150; // 11.5%
constructor(string memory uri_) ERC1155(uri_) {
owner = msg.sender;
_setDefaultRoyalty(owner, RESIDENTIAL_ROYALTY);
}
function mint(address to, uint256 id, uint256 amount) external {
require(id <= 2, "Invalid token ID");
_mint(to, id, amount, "");
// Trigger Chainlink timestamp oracle request here (logic omitted)
}
// Override supportsInterface to include ERC2981
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) {
return super.supportsInterface(interfaceId);
}
// Additional contract logic omitted for brevity
}