UNPKG

meta-contract-debug

Version:

Meta Contract SDK

20 lines (19 loc) 583 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DustCalculator = void 0; class DustCalculator { constructor(dustLimitFactor, dustAmount) { this.dustAmount = null; this.dustLimitFactor = dustLimitFactor; this.dustAmount = dustAmount; } getDustThreshold(s) { if (this.dustAmount) { return this.dustAmount; } else { return Math.ceil((Math.ceil((250 * (s + 9 + 148)) / 1000) * this.dustLimitFactor) / 100); } } } exports.DustCalculator = DustCalculator;