EveToken

EveToken

Main class to deal with the owned smart contract interface and related operations, you can use it to check the current contract owner and list to ownership change related events

Constructor

new EveToken(options)

Creates a new instance of EveToken.

// creates an eveTokenClient with the default params
let eveTokenClient = new EveToken();

// creates an eveTokenClient pointing to a custom address
let eveTokenClient = new EveToken({address:'0xf17f52151EbEF6C7334FAD080c5704DAAA16b732'});
Parameters:
Name Type Description
options ClientOptions

network connection options

Version:
  • 2
Source:

Extends

Methods

(async) totalSupply() → {Promise.<BigNumber>}

Checks the total existing EVE supply.

Source:

(async) balanceOf(account) → {Promise.<*>}

Checks the EVE balance of a given account.

Parameters:
Name Type Description
account

account whose balance is being inquired

Source:

(async) allowance(tokenOwner, spender, overrideOptions) → {Promise.<*>}

Checks how many tokens a 3rd party can use to facilitate a transaction with the owners token. Please note that allowance will not transfer tokens to the 3rd party, but instead give him permission to facilitate transactions on your behalf.

Parameters:
Name Type Description
tokenOwner

token owner

spender

ethereum address

overrideOptions TransactionOptions
Source:

(async) approve(spender, quantity, overrideOptions) → {Promise.<*>}

Gives the 3rd party the right to facilitate a transaction with the owners token. Please note that approve will not transfer tokens to the 3rd party, but instead give him permission to facilitate transactions on your behalf.

Parameters:
Name Type Description
spender

ethereum address, that has right to spend the approved tokens, this can be a contract address or any other address

quantity

that the 3rd party is allowed to spend

overrideOptions TransactionOptions
Source:

(async) transfer(toAddress, total, overrideOptions) → {Promise.<*>}

Transfer EVE tokens from the current account to any other account

Parameters:
Name Type Description
toAddress

address, that will receive the tokens

total

quantity of tokens being sent

overrideOptions TransactionOptions
Source:

(async) transferFrom(from, to, tokens, overrideOptions) → {Promise.<*>}

Transfer EVE tokens from a specific account to any other account. You need to have an allowance permission to be able to do this transaction.

Parameters:
Name Type Description
from

the address, that EVE tokens will be sent from

to

the address, that will receive the tokens

tokens

quantity of tokens being sent

overrideOptions TransactionOptions
Source:

setApprovalListener(callback)

Listener to the Approval events, this event triggers whenever a new devery app is created in the blockchain. Please note, that ApprovalEventListeners do not stack, this means that whenever you set one - you are removing the last one. If you want to remove an ApprovalEventListener, just call this function passing undefined as param.

// first you need to get a EveToken instance
let eveTokenClient = new EveToken();
// now you can use it



eveTokenClient.setApprovalListener((appAccount,appName,feeAccount,fee,active) => {
     // whenever an app created we will log it to the console
     console.log(`new app created ${appAccount} - ${appName} ...`);
})

// if you want to remove the listener you can simply pass undefined as parameter

eveTokenClient.setApprovalListener(undefined)

// or that is equivalent to the above call

eveTokenClient.setApprovalListener()


for more info about how to get a EveToken instance click here.

Parameters:
Name Type Description
callback AprovalEventCallback

the callback that will be executed whenever the Transfer event is triggered

Source:

setTransferListener(callback)

Listener to the Transfer events, this event triggers whenever a new devery app is created in the blockchain. Please note that TransferEventListeners do not stack, this means that whenever you set one you are removing the last one. If you want to remove a TransferEventListener, just call this function passing undefined as param.

// first you need to get a EveToken instance
let eveTokenClient = new EveToken();
// now you can use it



eveTokenClient.setTransferListener((appAccount,appName,feeAccount,fee,active) => {
     // whenever an app created we will log it to the console
     console.log(`new app created ${appAccount} - ${appName} ...`);
})

// if you want to remove the listener you can simply pass undefined as parameter

eveTokenClient.setTransferListener(undefined)

// or that is equivalent to the above call

eveTokenClient.setTransferListener()


for more info about how to get a EveToken instance click here.

Parameters:
Name Type Description
callback TransferEventCallback

the callback that will be executed whenever the OwnershipTransferred event is triggered

Source:

getSignerAddress() → {*}

You can use this method to check the current signer wallet address.

Inherited From:
Source:

getProvider() → {*}

Returns the internal signer or provider, this method needs to be used with caution as it exposes internals. So unless you know what you are doing it's better to avoid using it.

Inherited From:
Source: