Class

ERC721Collectibles

ERC721Collectibles(options)

Constructor

# new ERC721Collectibles(options)

ERC721Collectibles Object

Parameters:
Name Type Description
options ERC721Collectibles~Options

View Source models/ERC721/ERC721Collectibles.js, line 16

Methods

# __assert() → {Promise.<void>}

Uses erc721collectibles on the current address and assigns a new ERC20Contract with ERC721Collectibles#purchaseToken as its contract address

View Source models/ERC721/ERC721Collectibles.js, line 33

Contract is not deployed, first deploy it and provide a contract address

Error
Promise.<void>

# approveERC20() → {Promise.<Transaction>}

Approve ERC20 Allowance

View Source models/ERC721/ERC721Collectibles.js, line 187

Promise.<Transaction>

# balanceOf(params) → {Promise.<TransactionObject>}

show balance of address

Parameters:
Name Type Description
params Object
address Address

View Source models/ERC721/ERC721Collectibles.js, line 92

Promise.<TransactionObject>

# baseURI() → {Promise.<string>}

Verify what is the baseURI

View Source models/ERC721/ERC721Collectibles.js, line 132

URI

Promise.<string>

# async currentTokenId() → {Promise.<number>}

Verify what is the currentTokenId

View Source models/ERC721/ERC721Collectibles.js, line 111

Current Token Id

Promise.<number>

# deploy(params, options) → {Promise.<(*|undefined)>}

Parameters:
Name Type Description
params Object
name *
symbol *
limitedAmount number
erc20Purchase *
feeAddress string
otherAddress string
options IContract~TxOptions

View Source models/ERC721/ERC721Collectibles.js, line 331

Please provide an erc20 address for purchases

Error

Please provide a name

Error

Please provide a symbol

Error
Promise.<(*|undefined)>

# exists(params) → {Promise.<number>}

Verify if token ID exists

Parameters:
Name Type Description
params Object
tokenID string

View Source models/ERC721/ERC721Collectibles.js, line 80

Token Id

Promise.<number>

# getERC20Contract()

View Source models/ERC721/ERC721Collectibles.js, line 373

ERC20Contract|undefined

# async getPricePerPack() → {Promise.<number>}

Get Price Per Pack

View Source models/ERC721/ERC721Collectibles.js, line 67

Promise.<number>

# async getRegisteredIDs(params) → {Array.<number>}

Get Ids

Parameters:
Name Type Description
params Object
address Address

View Source models/ERC721/ERC721Collectibles.js, line 142

ids

Array.<number>

# getURITokenID() → {Promise.<string>}

Verify what is the getURITokenID

View Source models/ERC721/ERC721Collectibles.js, line 122

URI

Promise.<string>

# isApproved(params) → {Promise.<boolean>}

Approve ERC20 Allowance

Parameters:
Name Type Description
params Object
address Address
amount number

View Source models/ERC721/ERC721Collectibles.js, line 215

Promise.<boolean>

# isIDRegistered() → {Promise.<boolean>}

Verify if ID is registered

View Source models/ERC721/ERC721Collectibles.js, line 154

Promise.<boolean>

# isLimited() → {Promise.<boolean>}

Verify if it is limited

View Source models/ERC721/ERC721Collectibles.js, line 103

Promise.<boolean>

# mint(params)

Mint created TokenID

Parameters:
Name Type Description
params Object
tokenID number

View Source models/ERC721/ERC721Collectibles.js, line 239

# async openedPacks() → {Promise.<number>}

Verify how much opened packs exist

View Source models/ERC721/ERC721Collectibles.js, line 175

packs

Promise.<number>

# openPack(params) → {Promise.<TransactionObject>}

open Pack of tokens

Parameters:
Name Type Description
params Object
amount number

Amount of packs to open

View Source models/ERC721/ERC721Collectibles.js, line 227

Promise.<TransactionObject>

# async pricePerPack() → {Promise.<number>}

Verify what is the current price per Pack

View Source models/ERC721/ERC721Collectibles.js, line 164

Price per pack in tokens

Promise.<number>

# purchaseToken() → {Promise.<Address>}

Get ERC20 Address of the Contract

View Source models/ERC721/ERC721Collectibles.js, line 57

Promise.<Address>

# setBaseTokenURI(params) → {Promise.<TransactionObject>}

Set Base Token URI

Parameters:
Name Type Description
params Object
URI string

View Source models/ERC721/ERC721Collectibles.js, line 202

Promise.<TransactionObject>

# setFeeAddress(params) → {Promise.<TransactionObject>}

Set Fee Address

Parameters:
Name Type Description
params Object
purchaseToken Address

View Source models/ERC721/ERC721Collectibles.js, line 293

Promise.<TransactionObject>

# setPricePerPack(amount) → {Promise.<TransactionObject>}

Set Price per Pack

Parameters:
Name Type Description
amount Object
newPrice number

View Source models/ERC721/ERC721Collectibles.js, line 306

Promise.<TransactionObject>

# setPurchaseTokenAddress(params) → {Promise.<TransactionObject>}

set Purchase Token Address

Parameters:
Name Type Description
params Object
purchaseToken Address

View Source models/ERC721/ERC721Collectibles.js, line 252

Promise.<TransactionObject>

# setStakeAddress(params) → {Promise.<TransactionObject>}

Set Stake Address

Parameters:
Name Type Description
params Object
purchaseToken Address

View Source models/ERC721/ERC721Collectibles.js, line 266

Promise.<TransactionObject>

# setSwapBackAddress(params) → {Promise.<TransactionObject>}

Set Fee Address

Parameters:
Name Type Description
params Object
purchaseToken Address

View Source models/ERC721/ERC721Collectibles.js, line 279

Promise.<TransactionObject>

Type Definitions

Object

# Options

Properties:
Name Type Attributes Default Description
test Boolean
localtest Boolean

ganache local blockchain

web3Connection Web3Connection <optional>
Web3Connection

created from params: 'test', 'localtest' and optional 'web3Connection' string and 'privateKey'

contractAddress string <optional>

View Source models/ERC721/ERC721Collectibles.js, line 8