Dagora Pay-Splitter NFT

DagoraPaymentSplitterNFT

PayeeShare

struct PayeeShare {
  address payee;
  uint256 shareAmount;
}

isPaused

bool isPaused

Boolean to determine if the contract is isPaused.

default value is true, contract is isPaused on deployment.

baseURI

string baseURI

The base URI for all tokens.

baseExtension

string baseExtension

The file extension of the metadata can be set to nothing.

default value is json

bulkBuyLimit

uint16 bulkBuyLimit

The maximum number of tokens that can be minted in a single transaction.

mintPrice

uint256 mintPrice

The cost to mint a token.

maxSupply

uint256 maxSupply

The maximum number of tokens that can be minted.

payeeCount

uint256 payeeCount

The number of payees.

payeeShares

mapping(uint256 => struct DagoraPaymentSplitterNFT.PayeeShare) payeeShares

Minted

event Minted(address to, uint256 tokenId)

BaseURIChanged

event BaseURIChanged(string baseURI)

BaseExtensionChanged

event BaseExtensionChanged(string baseExtension)

MintCostChanged

event MintCostChanged(uint256 mintPrice)

BulkBuyLimitChanged

event BulkBuyLimitChanged(uint16 bulkBuyLimit)

isPausedToggled

event isPausedToggled(bool isPaused)

PayeeAdded

event PayeeAdded(address account, uint256 shares)

PaymentReleased

event PaymentReleased(address to, uint256 amount)

ERC20PaymentReleased

event ERC20PaymentReleased(contract IERC20 token, address to, uint256 amount)

PaymentReceived

event PaymentReceived(address from, uint256 amount)

constructor

constructor(string name_, string symbol_, address[] payees, uint256[] shares_, uint256 _mintPrice, uint256 _maxSupply, uint16 _bulkBuyLimit, string _baseURI, string _baseExtension, address newOwner) public

Constructor for the contract.

Parameters

isNotPaused

modifier isNotPaused()

Modifier to check if the contract is isPaused.

Throws if the contract is isPaused.

mintNFT

function mintNFT(address to, uint256 amount) public payable

Funtion to mint one or more tokens.

Throws if the number of tokens to mint exceeds the bulk buy limit. Throws if the number of tokens to mint exceeds the max supply. Throws if the amount of ETH sent is less than the cost to mint a token.

Parameters

reserveTokens

function reserveTokens(uint256 amount) public

onlyOwner function to mint one or more tokens.

Throws if the number of tokens to mint exceeds the max supply.

Parameters

totalShares

function totalShares() public view returns (uint256)

getter function for the total shares.

Return Values

totalReleased

function totalReleased() public view returns (uint256)

getter function for the total released.

Return Values

totalReleased

function totalReleased(contract IERC20 token) public view returns (uint256)

getter function for the total released.

Parameters

shares

function shares(address account) public view returns (uint256)

getter function for the shares.

Parameters

Return Values

released

function released(address account) public view returns (uint256)

getter function for the released.

Parameters

Return Values

released

function released(contract IERC20 token, address account) public view returns (uint256)

getter function for the released.

Parameters

payee

function payee(uint256 index) public view returns (address)

getter function for the payees.

Parameters

Return Values

releasable

function releasable(address account) public view returns (uint256)

getter function for checking how much a payee is owed.

Parameters

Return Values

releasable

function releasable(contract IERC20 token, address account) public view returns (uint256)

getter function for checking how much a payee is owed.

Parameters

Return Values

release

function release(address payable account) public

function to release the amount owed to a payee.

Throws if the address has no shares. Throws if the address is not due payment.

Parameters

tokenURI

function tokenURI(uint256 tokenId) public view returns (string)

returns the tokenURI for a given token.

this function is only callable when the token exists.

Parameters

setBaseURI

function setBaseURI(string __baseURI) external

Onlyowner function to set the base URI.

this function is only callable by the owner of the contract.

Parameters

setBaseExtension

function setBaseExtension(string _baseExtension) external

Onlyowner function to set the base extension.

this function is only callable by the owner of the contract.

Parameters

setMintPrice

function setMintPrice(uint256 _mintPrice) external

Onlyowner function to set the mint price for the public sale.

this function is only callable by the owner of the contract.

Parameters

setBulkBuyLimit

function setBulkBuyLimit(uint16 _bulkBuyLimit) external

Onlyowner function to set the bulk buy limit.

this function is only callable by the owner of the contract.

Parameters

togglePaused

function togglePaused() external

Onlyowner function to set the paused state of the contract.

this function is only callable by the owner of the contract.

_beforeTokenTransfers

function _beforeTokenTransfers(address from, address to, uint256 tokenId, uint256 quantity) internal

internal override function that is called before any token transfer.

this function will revert if the contract is paused, pausing transfers of tokens.

Parameters

typeOf

function typeOf() public pure returns (string)

function that returns the dagora contract type

Return Values

version

function version() public pure returns (string)

function that returns the dagora contract version

Return Values

_startTokenId

function _startTokenId() internal view virtual returns (uint256)

internal function that handles that starting tokenId of the collection

Return Values

receive

receive() external payable virtual

_The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the reliability of the events, and not the actual splitting of Ether.

To learn more about this see the Solidity documentation for https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback functions]._

Last updated

Logo