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>

# 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 58

Transaction

Promise.<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 91

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 151

Success the Tx Object if operation was successful

Promise.<TransactionObject>

# deploy(params) → {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

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

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 129

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 283

wasMinted

Promise.<boolean>

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

Get Amount of Packs Created

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

packsAmount

Promise.<number>

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

Get Amount of Packs Opened

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

packsAmount

Promise.<number>

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

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

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

tokensAmount

Promise.<number>

# getERC20Contract()

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

ERC20Contract|undefined

# 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 244

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 295

Price in Real Fvr Tokens

Promise.<number>

# getRegisteredTokens() → {Promise.<(Array.<number>|number)>}

Get Token IDs that were already bought via a pack

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

TokensRegistered

Promise.<(Array.<number>|number)>

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

Lock the Contract

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

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 162

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 70

Success the Tx Object if operation was successful

Promise.<TransactionObject>

# 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 213

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 173

Success the Tx Object if operation was successful

Promise.<TransactionObject>

# setTokenPriceInUSD(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 200

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 225

Success the Tx Object if operation was successful

Promise.<TransactionObject>

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

Unlock the Contract

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

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