# new OpenerRealFvr(options)
OpenerRealFvr Object
Parameters:
Name | Type | Description |
---|---|---|
options |
OpenerRealFvr~Options
|
Methods
# __assert() → {Promise.<void>}
Asserts a new ERC20Contract on the current address
Contract is not deployed, first deploy it and provide a contract address
Error
Promise.<void>
# approve(params)
Approve All Use
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
to |
Address
|
Address to approve to |
tokenId |
number
|
Token ID |
# buyPack(params) → {Promise.<Transaction>}
Buy Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
Pack Id |
Transaction
Promise.<Transaction>
# buyPacks(params) → {Transaction}
Buy Packs
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packIds |
Array
|
Integer
|
Pack Id |
Transaction
Transaction
# createPack(params) → {Promise.<TransactionObject>}
Create Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packNumber |
number
|
Pack Number |
nftAmount |
number
|
Amount of NFTs/Tokens |
price |
number
|
Price of Pack |
serie |
string
|
Serie of Pack |
packType |
string
|
Pack Type |
drop |
string
|
Pack Drop |
saleStart |
Date
|
Start Date |
saleDistributionAddresses |
Address
|
Array.<Address>
|
Revenue Addresses of the First Purchase |
saleDistributionAmounts |
number
|
Array.<number>
|
Revenue Amounts of the First Purchase |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# deletePackById(params) → {Promise.<TransactionObject>}
Delete Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
Pack Id number |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# deploy(params, options) → {Promise.<boolean>}
User deploys the contract
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
name |
string
|
Name of the Contract |
symbol |
string
|
Symbol of the Contract |
tokenAddress |
Address
|
token Address of the purchase Token in use |
options |
IContract~TxOptions
|
Success the Tx Object if operation was successful
Promise.<boolean>
# editPackInfo(params) → {Promise.<TransactionObject>}
Edit Pack Info
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
Pack Number |
saleStart |
Date
|
Time of Start of the Sale |
serie |
string
|
Serie of Pack |
packType |
string
|
Pack Type |
drop |
string
|
Pack Drop |
price |
number
|
Pack Price |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# exists(params) → {Promise.<boolean>}
Verify if a Token was already minted
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
tokenId |
number
|
wasMinted
Promise.<boolean>
# getAmountOfPacksCreated() → {Promise.<number>}
Get Amount of Packs Created
packsAmount
Promise.<number>
# getAmountOfPacksOpened() → {Promise.<number>}
Get Amount of Packs Opened
packsAmount
Promise.<number>
# getAmountOfTokensCreated() → {Promise.<number>}
Get Amount of Tokens/NFTs Created (Inherent to the Packs)
tokensAmount
Promise.<number>
# getERC20Contract()
ERC20Contract|undefined
# getMarketplaceDistributionForERC721(params) → {Array|Integer|Array|Address}
Get Distribution Sales Description for ERC721 Marketplace Sales
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
tokenid |
Integer
|
Token Id |
Distribution Amounts
Array
|
Integer
Distribution Addresses
Array
|
Address
# getPackbyId(params) → {number|number|number|string|string|string|Address|Array.<Address>|Address|Promise.<(Array.<number>|number)>}
Get Pack If Information
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
packId
number
packNumber
number
price
number
serie
string
drop
string
packType
string
buyer
Address
saleDistributionAddresses
Array.<Address>
|
Address
saleDistributionAmounts
Promise.<(Array.<number>|number)>
# getPackPriceInFVR(params) → {Promise.<number>}
Get Cost in Fvr Tokens of the Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
Price in Real Fvr Tokens
Promise.<number>
# getRegisteredTokens(params) → {Array|Integer}
Get Token IDs that were already bought via a pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
address |
Address
|
TokensRegistered
Array
|
Integer
# isApprovedForAll(params)
Approve All Use
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
from |
Address
|
Address to approve from |
to |
Address
|
Address to approve to |
# lock() → {Promise.<TransactionObject>}
Lock the Contract
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# mint(params) → {Promise.<TransactionObject>}
Mint Token Id (After buying a pack)
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
tokenId |
number
|
Token ID |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# offerPack(params) → {Promise.<TransactionObject>}
Offer Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
number
|
Pack Id |
receivingAddress |
Address
|
Pack Id number |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# openPack(params) → {Transaction}
Open Pack
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packId |
Integer
|
Pack Id |
Transaction
Transaction
# openPacks(params) → {Transaction}
Open Packs
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
packIds |
Array
|
Integer
|
Pack Id |
Transaction
Transaction
# setApprovalForAll(params)
Approve All Use
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
to |
Address
|
Address to approve to |
approve |
Bool
|
If to approve or disapprove |
# setBaseURI(params) → {Promise.<TransactionObject>}
Set Base Id URI
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
uri |
string
|
URI of the Token Id Metadata JSON |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# setPurchaseTokenAddress(params) → {Promise.<TransactionObject>}
Set Purchase Token
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
address |
Address
|
Token Address |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# setTokenURI(params) → {Promise.<TransactionObject>}
Set Specific Token Id URI
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
tokenId |
number
|
Token ID |
uri |
string
|
URI of the Token Id Metadata JSON |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# setTokenWorthof1USD(params) → {Promise.<TransactionObject>}
Set Token Price of Real Fvr in USD --> 1*10**18 as input means 1 Real Fvr = $0.000001
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
Parameters |
price |
Price
|
Token Price |
Success the Tx Object if operation was successful
Promise.<TransactionObject>
# unlock() → {Promise.<TransactionObject>}
Unlock the Contract
Success the Tx Object if operation was successful
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> |
||
tokenAddress |
string
|
<optional> |