"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const contractWrapperBase_1 = require("../contractWrapperBase");
const contractWrapperFactory_1 = require("../contractWrapperFactory");
class TokenCapGCWrapper extends contractWrapperBase_1.ContractWrapperBase {
    constructor() {
        super(...arguments);
        this.name = "TokenCapGC";
        this.friendlyName = "Token Cap Global Constraint";
        this.factory = exports.TokenCapGCFactory;
    }
    setParameters(params) {
        const _super = name => super[name];
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            if (!params.token) {
                throw new Error("token must be set");
            }
            if (((typeof params.cap !== "number") &&
                ((typeof params.cap !== "string") ||
                    (isNaN(parseInt(params.cap, undefined)))))) {
                throw new Error("cap must be set and represent a number");
            }
            return _super("_setParameters").call(this, "TokenCapGC.setParameters", params.token, params.cap);
        });
    }
}
exports.TokenCapGCWrapper = TokenCapGCWrapper;
exports.TokenCapGCFactory = new contractWrapperFactory_1.ContractWrapperFactory("TokenCapGC", TokenCapGCWrapper);
//# sourceMappingURL=tokenCapGC.js.map