JBNFTRewardDelegate
Delegate that offers project contributors NFTs upon payment.
Also can be used as a data source.
Code
Addresses
Ethereum mainnet: Not yet deployed
Interfaces
| Name | Description | 
|---|---|
IJBNFTRewardDelegate | General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules. | 
IJBFundingCycleDataSource | Allows this contract to be attached to a funding cycle to have its methods called during regular protocol operations. | 
IJBPayDelegate | Allows this contract to receive callbacks when a project receives a payment. | 
Inheritance
| Contract | Description | 
|---|---|
JBOperatable | Includes convenience functionality for checking a message sender's permissions before executing certain transactions. | 
ERC721Votes | A checkpointable standard definition for non-fungible tokens (NFTs). | 
Ownable | Includes convenience functionality for specifying an address that owns the contract, with modifiers that only allow access by the owner. | 
Constructor
/**
  @param _projectId The ID of the project for which this NFT should be minted in response to payments made.
  @param _directory The directory of terminals and controllers for projects.
  @param _name The name of the token.
  @param _symbol The symbol that the token should be represented by.
  @param _tokenUriResolver A contract responsible for resolving the token URI for each token ID.
  @param _baseUri The token's base URI, to be used if a URI resolver is not provided.
  @param _contractUri A URI where contract metadata can be found.
  @param __expectedCaller The address that should be calling the data source.
  @param _owner The address that will own this contract.
*/
constructor(
  uint256 _projectId,
  IJBDirectory _directory,
  string memory _name,
  string memory _symbol,
  IJBTokenUriResolver _tokenUriResolver,
  string memory _baseUri,
  string memory _contractUri,
  address __expectedCaller,
  address _owner
) ERC721Rari(_name, _symbol) {
  projectId = _projectId;
  directory = _directory;
  baseUri = _baseUri;
  tokenUriResolver = _tokenUriResolver;
  contractUri = _contractUri;
  _expectedCaller = __expectedCaller;
  // Transfer the ownership to the specified address.
  if (_owner != address(0)) _transferOwnership(_owner);
}
_projectIdis the ID of the project for which this NFT should be minted in response to payments made._directoryis the directory of terminals and controllers for projects._nameis the name of the token._symbolis the symbol that the token should be represented by._tokenUriResolveris a contract responsible for resolving the token URI for each token ID._baseUriis the token's base URI, to be used if a URI resolver is not provided._contractUriis a URI where contract metadata can be found.__expectedCalleris the address that should be calling the data source._owneris the address that will own this contract.
Events
| Name | Data | 
|---|---|
SetContractUri | 
  | 
SetBaseUri | 
  | 
SetTokenUriResolver | 
  | 
Properties
| Function | Definition | 
|---|---|
projectId | Traits 
 Returns 
  | 
directory | Traits 
 Returns  | 
baseUri | Traits 
 Returns 
  | 
contractUri | Traits 
 Returns 
  | 
tokenUriResolver | Traits 
 Returns  | 
Read
| Function | Definition | 
|---|---|
payParams | Params 
 Returns 
  | 
redeemParams | Params 
 Returns 
  | 
supportsInterface | Params 
 Returns 
  | 
tokenURI | Params 
 Returns 
  | 
Write
| Function | Definition | 
|---|---|
didPay | Params 
  | 
setContractUri | Params 
  | 
setTokenUriResolver | Params 
  | 
setBaseUri | Params 
  |