Class

OpenerRealFvr

OpenerRealFvr(options)

Constructor

# new OpenerRealFvr(options)

OpenerRealFvr Object

Parameters:
Name Type Description
options OpenerRealFvr~Options

View Source models/custom/RealFvr/OpenerRealFvr.js, line 15

Methods

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

Asserts a new ERC20Contract on the current address

View Source models/custom/RealFvr/OpenerRealFvr.js, line 31

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 221

# buyPack(params) → {Promise.<Transaction>}

Buy Pack

Parameters:
Name Type Description
params Object

Parameters

packId number

Pack Id

View Source models/custom/RealFvr/OpenerRealFvr.js, line 64

Transaction

Promise.<Transaction>

# buyPacks(params) → {Transaction}

Buy Packs

Parameters:
Name Type Description
params Object

Parameters

packIds Array | Integer

Pack Id

View Source models/custom/RealFvr/OpenerRealFvr.js, line 77

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 135

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 197

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 465

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 175

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 391

wasMinted

Promise.<boolean>

# getAmountOfPacksCreated() → {Promise.<number>}

Get Amount of Packs Created

View Source models/custom/RealFvr/OpenerRealFvr.js, line 430

packsAmount

Promise.<number>

# getAmountOfPacksOpened() → {Promise.<number>}

Get Amount of Packs Opened

View Source models/custom/RealFvr/OpenerRealFvr.js, line 440

packsAmount

Promise.<number>

# getAmountOfTokensCreated() → {Promise.<number>}

Get Amount of Tokens/NFTs Created (Inherent to the Packs)

View Source models/custom/RealFvr/OpenerRealFvr.js, line 450

tokensAmount

Promise.<number>

# getERC20Contract()

View Source models/custom/RealFvr/OpenerRealFvr.js, line 481

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 373

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 329

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 421

Price in Real Fvr Tokens

Promise.<number>

# getPurchaseToken() → {Address}

Get Purchase Token Address

View Source models/custom/RealFvr/OpenerRealFvr.js, line 400

Token Address

Address

# getRegisteredTokens(params) → {Array|Integer}

Get Token IDs that were already bought via a pack

Parameters:
Name Type Description
params Object

Parameters

address Address

View Source models/custom/RealFvr/OpenerRealFvr.js, line 356

TokensRegistered

Array | Integer

# getTokenWorthof1USD() → {Integer}

Get Real Fvr Cost in USD

View Source models/custom/RealFvr/OpenerRealFvr.js, line 407

Price in Real Fvr Tokens

Integer

# isApprovedForAll(params)

Approve All Use

Parameters:
Name Type Description
params Object
from Address

Address to approve from

to Address

Address to approve to

View Source models/custom/RealFvr/OpenerRealFvr.js, line 245

# lock() → {Promise.<TransactionObject>}

Lock the Contract

View Source models/custom/RealFvr/OpenerRealFvr.js, line 267

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 209

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 114

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 89

Transaction

Transaction

# openPacks(params) → {Transaction}

Open Packs

Parameters:
Name Type Description
params Object

Parameters

packIds Array | Integer

Pack Id

View Source models/custom/RealFvr/OpenerRealFvr.js, line 101

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 233

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

Set Base Id URI

Parameters:
Name Type Description
params Object

Parameters

uri string

URI of the Token Id Metadata JSON

View Source models/custom/RealFvr/OpenerRealFvr.js, line 296

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 256

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 309

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

View Source models/custom/RealFvr/OpenerRealFvr.js, line 283

Success the Tx Object if operation was successful

Promise.<TransactionObject>

# unlock() → {Promise.<TransactionObject>}

Unlock the Contract

View Source models/custom/RealFvr/OpenerRealFvr.js, line 274

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>

View Source models/custom/RealFvr/OpenerRealFvr.js, line 6