Getter-View-Functions
This page includes all Getter View Functions
getTokenIdsFromEventId: This view function retrieves an array of token IDs associated with a specific event. It takes one parameter:
_eventId
: The unique identifier for the event.
getAccessLevelsFromEventId: This view function retrieves an array of access levels associated with a specific event. It also takes one parameter:
_eventId
: The unique identifier for the event.
getTicketPriceFromTokenId: This view function retrieves the ticket price associated with a specific token ID. It takes one parameter:
_tokenId
: The token ID for which to retrieve the ticket price.
getWhitelistBooleanFromTokenId: This view function retrieves the whitelist status associated with a specific token ID. It takes one parameter:
_tokenId
: The token ID for which to retrieve the whitelist status.
getMintingApproval: This view function retrieves the minting approval amount granted to a user for a specific token ID. It takes two parameters:
_userAddress
: The address of the user for whom to retrieve the minting approval._tokenId
: The token ID for which to retrieve the minting approval.
getCollectedAmountForEventId: This view function retrieves the total collected amount for a specific event. It takes one parameter:
_eventId
: The unique identifier for the event.
// Some code
```remix-solidity
/**
GetTokenIdsFromEventId: Retrieve an array of token IDs associated with a specific event.
@param _eventId: The unique identifier for the event.
@return uint256[] memory: An array containing the token IDs associated with the event.
*/
function getTokenIdsFromEventId(string calldata _eventId)
public
view
returns (uint256[] memory)
{
return s_eventIdToTokenIds[_eventId];
}
/**
GetAccessLevelsFromEventId: Retrieve an array of access levels associated with a specific event.
@param _eventId: The unique identifier for the event.
@return string[] memory: An array containing the access levels associated with the event.
*/
function getAccessLevelsFromEventId(string calldata _eventId)
public
view
returns (string[] memory)
{
return s_eventIdToAccessLevels[_eventId];
}
/**
GetTicketPriceFromTokenId: Retrieve the ticket price associated with a specific token ID.
@param _tokenId: The token ID for which to retrieve the ticket price.
@return uint256: The ticket price associated with the token ID.
*/
function getTicketPriceFromTokenId(uint256 _tokenId)
public
view
returns (uint256)
{
return s_tokenIdToTicketPrice[_tokenId];
}
/**
GetWhitelistBooleanFromTokenId: Retrieve the whitelist status associated with a specific token ID.
@param _tokenId: The token ID for which to retrieve the whitelist status.
@return bool: The whitelist status associated with the token ID.
*/
function getWhitelistBooleanFromTokenId(uint256 _tokenId)
public
view
returns (bool)
{
return s_tokenIdToWhitelist[_tokenId];
}
/**
GetMintingApproval: Retrieve the minting approval amount granted to a user for a specific token ID.
@param _userAddress: The address of the user for whom to retrieve the minting approval.
@param _tokenId: The token ID for which to retrieve the minting approval.
@return uint256: The minting approval amount granted to the user for the token ID.
*/
function getMintingApproval(address _userAddress, uint256 _tokenId)
public
view
returns (uint256)
{
return s_tokenIdApprovals[_tokenId][_userAddress];
}
/**
GetCollectedAmountForEventId: Retrieve the total collected amount for a specific event.
@param _eventId: The unique identifier for the event.
@return uint256: The total collected amount for the event.
*/
function getCollectedAmountForEventId(string calldata _eventId)
public
view
returns (uint256)
{
return s_collectedAmountForEventId[_eventId];
}
```
Last updated