All files / abi/base base.js

0% Statements 0/10
0% Branches 0/4
0% Functions 0/1
0% Lines 0/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                                             
import tron from "tronweb";
import { EventEmitter } from "eventemitter3";
export default class BaseContract extends EventEmitter {
    decodeValues(params) {
        let results = [];
        if (tron.utils.isArray(params)) {
            const l = params.length;
            for (let h = 0; h < l; h++) {
                if (tron.utils.isBigNumber(params[h])) {
                    results.push(params[h].toString());
                }
                else {
                    console.log("parse outside :: ", params[h]);
                }
            }
        }
        else {
            results = [];
        }
        return results;
    }
}