UNPKG

@q-dev/gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

35 lines 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QRC20Instance = void 0; const SystemContractInstance_1 = require("../../SystemContractInstance"); class QRC20Instance extends SystemContractInstance_1.SystemContractInstance { constructor(signer, address) { super(signer, "QRC20.json", address); } async setContractMetadata(contractURI, txOptions) { return this.submitTransaction("setContractMetadata", [contractURI], txOptions); } async approve(spender, amount, txOptions) { return this.submitTransaction("approve", [spender, amount], txOptions); } async mintTo(receiver, amount, txOptions) { return this.submitTransaction("mintTo", [receiver, amount], txOptions); } async burnFrom(account, amount, txOptions) { return this.submitTransaction("burnFrom", [account, amount], txOptions); } async transfer(to, amount, txOptions) { return this.submitTransaction("transfer", [to, amount], txOptions); } async transferFrom(from, to, amount, txOptions) { return this.submitTransaction("transferFrom", [from, to, amount], txOptions); } async increaseAllowance(spender, addedValue, txOptions) { return this.submitTransaction("increaseAllowance", [spender, addedValue], txOptions); } async decreaseAllowance(spender, subtractedValue, txOptions) { return this.submitTransaction("decreaseAllowance", [spender, subtractedValue], txOptions); } } exports.QRC20Instance = QRC20Instance; //# sourceMappingURL=QRC20Instance.js.map