All files / src/tokens ore.js

77.78% Statements 7/9
50% Branches 1/2
66.67% Functions 2/3
77.78% Lines 7/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 269x 9x 9x                   1x       1x 1x     9x          
const CONTRACT_NAME = 'eosio.token';
const ORE_ORE_ACCOUNT_NAME = 'eosio';
const TOKEN_SYMBOL = 'ORE';
let amount;
/* Public */
 
function issueOre(toAccountName, oreAmount, memo = '') {
  amount = this.getAmount(oreAmount, TOKEN_SYMBOL);
  return this.issueToken(toAccountName, amount, ORE_ORE_ACCOUNT_NAME, CONTRACT_NAME, memo);
}
 
function getOreBalance(oreAccountName) {
  return this.getBalance(oreAccountName, TOKEN_SYMBOL, CONTRACT_NAME);
}
 
function transferOre(fromAccountName, toAccountName, oreAmount, memo = '') {
  amount = this.getAmount(oreAmount, TOKEN_SYMBOL);
  return this.transferToken(fromAccountName, toAccountName, amount, CONTRACT_NAME, memo);
}
 
module.exports = {
  issueOre,
  getOreBalance,
  transferOre
};