Skip to content

Latest commit

 

History

History
102 lines (83 loc) · 3.01 KB

PawnContract.md

File metadata and controls

102 lines (83 loc) · 3.01 KB

PawnContract

/** Pawn ERC721 NTF, player must have one.

Functions

constructor

  function constructor(
    string _name,
    string _symbol,
    string _baseTokenURI
  ) public

Constructor ADMIN_ROLE, MINTER_ROLE are given to deployer*/ c

Parameters:

Name Type Description
_name string ChainLink VRFCoordinator contract address
_symbol string LINK token address
_baseTokenURI string ChainLink keyHash parameter for VRF

tokenURI

  function tokenURI(
    uint256 _id
  ) public returns (string)

get token URI relative to a Pawn

Parameters:

Name Type Description
_id uint256 Pawn ID

Return Values:

Name Type Description
string uint256 value*/
f

mint

  function mint(
    address _to
  ) external returns (uint256 id_)

Mint NFT token

requirements :

- user must have MINTER role
- Property must be valid

Parameters:

Name Type Description
_to address buyer address

Return Values:

Name Type Description
id_ address Pawn ID*/
f

supportsInterface

  function supportsInterface(
    bytes4 _interfaceId
  ) public returns (bool)

is contract support interface

Parameters:

Name Type Description
_interfaceId bytes4 interface ID

get

  function get(
    uint256 _id
  ) public returns (struct PawnContract.PawnInfo p_)

get information for a Pawn

Parameters:

Name Type Description
_id uint256 Pawn ID

Return Values:

Name Type Description
p_ uint256 Pawn information struct*/
f