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 179

Promise.<Transaction>

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

Verify what is the baseURI

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

URI

Promise.<string>

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

Verify what is the currentTokenId

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

Current Token Id

Promise.<number>

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

Parameters:
Name Type Description
params Object
name *
symbol *
limitedAmount number
erc20Purchase *
feeAddress string
otherAddress string
callback *

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

Please provide an erc20 address for purchases

Error

Please provide a name

Error

Please provide a symbol

Error
Promise.<(*|undefined)>

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

Verify if token ID exists

Parameters:
Name Type Description
params Object
tokenID string

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

Token Id

Promise.<number>

# getERC20Contract()

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

ERC20Contract|undefined

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

Get Price Per Pack

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

Promise.<number>

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

Get Ids

Parameters:
Name Type Description
params Object
address Address

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

ids

Array.<number>

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

Verify what is the getURITokenID

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

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 206

Promise.<boolean>

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

Verify if ID is registered

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

Promise.<boolean>

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

Verify if it is limited

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

Promise.<boolean>

# async mint(params)

Mint created TokenID

Parameters:
Name Type Description
params Object
tokenID number

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

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

Verify how much opened packs exist

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

packs

Promise.<number>

# async 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 218

Promise.<TransactionObject>

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

Verify what is the current price per Pack

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

Price per pack in tokens

Promise.<number>

# async 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 194

Promise.<TransactionObject>

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

Set Fee Address

Parameters:
Name Type Description
params Object
purchaseToken Address

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

Promise.<TransactionObject>

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

Set Price per Pack

Parameters:
Name Type Description
amount Object
newPrice number

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

Promise.<TransactionObject>

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

set Purchase Token Address

Parameters:
Name Type Description
params Object
purchaseToken Address

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

Promise.<TransactionObject>

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

Set Stake Address

Parameters:
Name Type Description
params Object
purchaseToken Address

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

Promise.<TransactionObject>

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

Set Fee Address

Parameters:
Name Type Description
params Object
purchaseToken Address

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

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