# new ERC721Collectibles(options)
ERC721Collectibles Object
Parameters:
Name | Type | Description |
---|---|---|
options |
ERC721Collectibles~Options
|
Methods
# __assert() → {Promise.<void>}
Uses erc721collectibles on the current address and assigns a new ERC20Contract with ERC721Collectibles#purchaseToken as its contract address
Contract is not deployed, first deploy it and provide a contract address
Error
Promise.<void>
# balanceOf(params) → {Promise.<TransactionObject>}
show balance of address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
address |
Address
|
Promise.<TransactionObject>
# async currentTokenId() → {Promise.<number>}
Verify what is the currentTokenId
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
|
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
|
Token Id
Promise.<number>
# getERC20Contract()
ERC20Contract|undefined
# async getRegisteredIDs(params) → {Array.<number>}
Get Ids
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
address |
Address
|
ids
Array.<number>
# isApproved(params) → {Promise.<boolean>}
Approve ERC20 Allowance
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
address |
Address
|
|
amount |
number
|
Promise.<boolean>
# async openedPacks() → {Promise.<number>}
Verify how much opened packs exist
packs
Promise.<number>
# openPack(params) → {Promise.<TransactionObject>}
open Pack of tokens
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
amount |
number
|
Amount of packs to open |
Promise.<TransactionObject>
# async pricePerPack() → {Promise.<number>}
Verify what is the current price per Pack
Price per pack in tokens
Promise.<number>
# setBaseTokenURI(params) → {Promise.<TransactionObject>}
Set Base Token URI
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
URI |
string
|
Promise.<TransactionObject>
# setFeeAddress(params) → {Promise.<TransactionObject>}
Set Fee Address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
purchaseToken |
Address
|
Promise.<TransactionObject>
# setPricePerPack(amount) → {Promise.<TransactionObject>}
Set Price per Pack
Parameters:
Name | Type | Description |
---|---|---|
amount |
Object
|
|
newPrice |
number
|
Promise.<TransactionObject>
# setPurchaseTokenAddress(params) → {Promise.<TransactionObject>}
set Purchase Token Address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
purchaseToken |
Address
|
Promise.<TransactionObject>
# setStakeAddress(params) → {Promise.<TransactionObject>}
Set Stake Address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
purchaseToken |
Address
|
Promise.<TransactionObject>
# setSwapBackAddress(params) → {Promise.<TransactionObject>}
Set Fee Address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
purchaseToken |
Address
|
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> |