Dagora Pay-Splitter NFT
DagoraPaymentSplitterNFT
PayeeShare
isPaused
Boolean to determine if the contract is isPaused.
default value is true, contract is isPaused on deployment.
baseURI
The base URI for all tokens.
baseExtension
The file extension of the metadata can be set to nothing.
default value is json
bulkBuyLimit
The maximum number of tokens that can be minted in a single transaction.
mintPrice
The cost to mint a token.
maxSupply
The maximum number of tokens that can be minted.
payeeCount
The number of payees.
payeeShares
Minted
BaseURIChanged
BaseExtensionChanged
MintCostChanged
BulkBuyLimitChanged
isPausedToggled
PayeeAdded
PaymentReleased
ERC20PaymentReleased
PaymentReceived
constructor
Constructor for the contract.
Parameters
name_
string
the name of the contract and token
symbol_
string
the symbol of the token
payees
address[]
the addresses of the payees
shares_
uint256[]
the amount of shares each payee has
_mintPrice
uint256
the cost to mint a token
_maxSupply
uint256
the maximum number of tokens that can be minted
_bulkBuyLimit
uint16
the maximum number of tokens that can be minted in a single transaction
_baseURI
string
the base URI for all tokens
_baseExtension
string
the file extension of the metadata can be set to nothing
newOwner
address
the address of the new owner
isNotPaused
Modifier to check if the contract is isPaused.
Throws if the contract is isPaused.
mintNFT
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
to
address
the address to mint the tokens to
amount
uint256
the number of tokens to mint
reserveTokens
onlyOwner function to mint one or more tokens.
Throws if the number of tokens to mint exceeds the max supply.
Parameters
amount
uint256
the number of tokens to mint
totalShares
getter function for the total shares.
Return Values
[0]
uint256
the total shares
totalReleased
getter function for the total released.
Return Values
[0]
uint256
the total released
totalReleased
getter function for the total released.
Parameters
token
contract IERC20
the token to check
shares
getter function for the shares.
Parameters
account
address
the address to check
Return Values
[0]
uint256
the shares for the address
released
getter function for the released.
Parameters
account
address
the address to check
Return Values
[0]
uint256
the released for the address
released
getter function for the released.
Parameters
token
contract IERC20
the token to check
account
address
the address to check
payee
getter function for the payees.
Parameters
index
uint256
the index of the payee
Return Values
[0]
address
the address of the payee
releasable
getter function for checking how much a payee is owed.
Parameters
account
address
the address to check
Return Values
[0]
uint256
the amount of ETH owed to the address
releasable
getter function for checking how much a payee is owed.
Parameters
token
contract IERC20
the token to check
account
address
the address to check
Return Values
[0]
uint256
the amount of tokens owed to the address
release
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
account
address payable
the address to release the payment to
tokenURI
returns the tokenURI for a given token.
this function is only callable when the token exists.
Parameters
tokenId
uint256
the tokenID to get the tokenURI for.
setBaseURI
Onlyowner function to set the base URI.
this function is only callable by the owner of the contract.
Parameters
__baseURI
string
the base URI to set.
setBaseExtension
Onlyowner function to set the base extension.
this function is only callable by the owner of the contract.
Parameters
_baseExtension
string
the base extension to set.
setMintPrice
Onlyowner function to set the mint price for the public sale.
this function is only callable by the owner of the contract.
Parameters
_mintPrice
uint256
the mint cost to set.
setBulkBuyLimit
Onlyowner function to set the bulk buy limit.
this function is only callable by the owner of the contract.
Parameters
_bulkBuyLimit
uint16
the bulk buy limit to set.
togglePaused
Onlyowner function to set the paused state of the contract.
this function is only callable by the owner of the contract.
_beforeTokenTransfers
internal override function that is called before any token transfer.
this function will revert if the contract is paused, pausing transfers of tokens.
Parameters
from
address
The address of the sender.
to
address
The address of the receiver.
tokenId
uint256
The token ID.
quantity
uint256
The quantity of tokens to transfer.
typeOf
function that returns the dagora contract type
Return Values
[0]
string
the dagora contract type
version
function that returns the dagora contract version
Return Values
[0]
string
the dagora contract version
_startTokenId
internal function that handles that starting tokenId of the collection
Return Values
[0]
uint256
the starting tokenId of the collection eg 1
receive
_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