A modular NFT infrastructure
This protocol is based on a modular architecture comprising multiple interconnected smart contracts, thereby eliminating the need for upgradable proxies. Each smart contract is tailored to fulfill a specific function and can be removed or substituted with a new contract if required. The level of security is attained through a system of roles that establishes the rules governing the interactions between contracts.
- Sur1155Impl
- Sur1155Proxy
- SurAuthority
- SurFactory
- SurMinter
- SurTreasury
- SurGateway
The implementation of ERC-1155, representing an NFT collection.
- Enriched with a
setupfunction to operate under the proxy (Sur1155Proxy.sol). - The
tokenIdfor tokens in the collection will always be a sequential value (ERC1155Sequential.sol). - Supports
contractURI, which serves as the default metadata URI for tokens, and allows setting a custom URI for a specifictokenId(ERC1155Uri.sol). - Supports ownership through OpenZeppelin's
Ownable2Step. - Introduces the following roles (Roles.sol / Sur1155Roles):
- SUR_1155_TOKEN_CREATOR
- SUR_1155_MINTER
- SUR_1155_BURNER
- Relies on the authority provided during
setupto verify the roles ofmsg.sender(RoleChecker.sol). - Supports the creation of new tokens, minting, and burning based on the mentioned roles.
- Includes a
burnfunction that allows any holder to burn their owned NFTs.
A straightforward, non-upgradable ERC-1967 proxy that reduces the cost of NFT deployments and points to the implementation.
The contract responsible for managing roles. The role system is the fundamental concept of the protocol that prevents contracts from executing actions requested by unvalidated senders. Implements OpenZeppelin's AccessControlDefaultAdminRules. The owner of the Admin role for SurAuthority is the Sur multisig address.
A minimalistic smart contract that streamlines the creation of NFTs within SurProtocol. It creates a new Sur1155Proxy instance pointing to the specified Sur1155Impl and sets the default SurAuthority for managing the collection's roles.
A contract representing minting rules and performing minting. There might be multiple active SurMinter instances in the protocol. Each minter can have any number of Minting Campaigns. A Minting Campaign is described by MintCampaignConfig and linked to a token (collection / tokenId). Each campaign is assigned a campaignId, which is a sequential uint256 mapped to collection / tokenId. One collection / tokenId pair can have multiple campaigns. These campaigns can even be active simultaneously.
- Supports referral during minting and/or campaign creation.
- Allows setting
mintsPerWallet,supply,startDate, andendDatefor each campaign. - Adds the ability to leave a comment during minting (emits ISurMinter.MintComment).
- Introduces the following roles (Roles.sol / SurMinterRoles):
- SUR_MINTER_COMMENTER
- SUR_MINTER_CAMPAIGN_CREATOR
- SUR_MINTER_FREE_MINT
- Relies on the authority of the collection to verify the roles of
msg.sender(RoleChecker.sol).
A contract made for the distribution of creators' royalties and protocol commissions.
A smart contract implementing the business requirements of Sur App. Allows for:
- Creating a collection
- Creating a minting campaign
- Minting tokens