vasku-tip3
Version:
TIP-3 Broxus contract
227 lines (226 loc) • 7.94 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenRoot = void 0;
const vasku_1 = require("vasku");
const TokenRootContent_1 = __importDefault(require("./TokenRootContent"));
class TokenRoot extends vasku_1.Contract {
_call;
_run;
_payload;
constructor(config = {}, options = {}) {
if (config.address === undefined)
super({
abi: TokenRootContent_1.default.abi,
initial: config.initial ?? {},
keys: config.keys,
tvc: TokenRootContent_1.default.tvc
}, options);
else
super({
address: config.address,
abi: TokenRootContent_1.default.abi
}, options);
this._call = new TokenRootCalls(this);
this._run = new TokenRootRuns(this);
this._payload = new TokenRootPayload(this);
}
async deploy(value, input, useGiver = true, timeout = 60000) {
return await this._deploy(value, input, useGiver, timeout);
}
get call() {
return this._call;
}
get run() {
return this._run;
}
get payload() {
return this._payload;
}
}
exports.TokenRoot = TokenRoot;
class TokenRootCalls {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input, keys) {
return await this.contract.callMethod('supportsInterface', input, keys);
}
async disableMint(input, keys) {
return await this.contract.callMethod('disableMint', input, keys);
}
async mintDisabled(input, keys) {
return await this.contract.callMethod('mintDisabled', input, keys);
}
async burnTokens(input, keys) {
return await this.contract.callMethod('burnTokens', input, keys);
}
async disableBurnByRoot(input, keys) {
return await this.contract.callMethod('disableBurnByRoot', input, keys);
}
async burnByRootDisabled(input, keys) {
return await this.contract.callMethod('burnByRootDisabled', input, keys);
}
async burnPaused(input, keys) {
return await this.contract.callMethod('burnPaused', input, keys);
}
async setBurnPaused(input, keys) {
return await this.contract.callMethod('setBurnPaused', input, keys);
}
async transferOwnership(input, keys) {
return await this.contract.callMethod('transferOwnership', input, keys);
}
async name(input, keys) {
return await this.contract.callMethod('name', input, keys);
}
async symbol(input, keys) {
return await this.contract.callMethod('symbol', input, keys);
}
async decimals(input, keys) {
return await this.contract.callMethod('decimals', input, keys);
}
async totalSupply(input, keys) {
return await this.contract.callMethod('totalSupply', input, keys);
}
async walletCode(input, keys) {
return await this.contract.callMethod('walletCode', input, keys);
}
async rootOwner(input, keys) {
return await this.contract.callMethod('rootOwner', input, keys);
}
async walletOf(input, keys) {
return await this.contract.callMethod('walletOf', input, keys);
}
async deployWallet(input, keys) {
return await this.contract.callMethod('deployWallet', input, keys);
}
async mint(input, keys) {
return await this.contract.callMethod('mint', input, keys);
}
async acceptBurn(input, keys) {
return await this.contract.callMethod('acceptBurn', input, keys);
}
async sendSurplusGas(input, keys) {
return await this.contract.callMethod('sendSurplusGas', input, keys);
}
}
class TokenRootRuns {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input) {
return (await this.contract.runMethod('supportsInterface', input)).value;
}
async disableMint(input) {
return (await this.contract.runMethod('disableMint', input)).value;
}
async mintDisabled(input) {
return (await this.contract.runMethod('mintDisabled', input)).value;
}
async disableBurnByRoot(input) {
return (await this.contract.runMethod('disableBurnByRoot', input)).value;
}
async burnByRootDisabled(input) {
return (await this.contract.runMethod('burnByRootDisabled', input)).value;
}
async burnPaused(input) {
return (await this.contract.runMethod('burnPaused', input)).value;
}
async setBurnPaused(input) {
return (await this.contract.runMethod('setBurnPaused', input)).value;
}
async name(input) {
return (await this.contract.runMethod('name', input)).value;
}
async symbol(input) {
return (await this.contract.runMethod('symbol', input)).value;
}
async decimals(input) {
return (await this.contract.runMethod('decimals', input)).value;
}
async totalSupply(input) {
return (await this.contract.runMethod('totalSupply', input)).value;
}
async walletCode(input) {
return (await this.contract.runMethod('walletCode', input)).value;
}
async rootOwner(input) {
return (await this.contract.runMethod('rootOwner', input)).value;
}
async walletOf(input) {
return (await this.contract.runMethod('walletOf', input)).value;
}
async deployWallet(input) {
return (await this.contract.runMethod('deployWallet', input)).value;
}
}
class TokenRootPayload {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input) {
return await this.contract.createPayload('supportsInterface', input);
}
async disableMint(input) {
return await this.contract.createPayload('disableMint', input);
}
async mintDisabled(input) {
return await this.contract.createPayload('mintDisabled', input);
}
async burnTokens(input) {
return await this.contract.createPayload('burnTokens', input);
}
async disableBurnByRoot(input) {
return await this.contract.createPayload('disableBurnByRoot', input);
}
async burnByRootDisabled(input) {
return await this.contract.createPayload('burnByRootDisabled', input);
}
async burnPaused(input) {
return await this.contract.createPayload('burnPaused', input);
}
async setBurnPaused(input) {
return await this.contract.createPayload('setBurnPaused', input);
}
async transferOwnership(input) {
return await this.contract.createPayload('transferOwnership', input);
}
async name(input) {
return await this.contract.createPayload('name', input);
}
async symbol(input) {
return await this.contract.createPayload('symbol', input);
}
async decimals(input) {
return await this.contract.createPayload('decimals', input);
}
async totalSupply(input) {
return await this.contract.createPayload('totalSupply', input);
}
async walletCode(input) {
return await this.contract.createPayload('walletCode', input);
}
async rootOwner(input) {
return await this.contract.createPayload('rootOwner', input);
}
async walletOf(input) {
return await this.contract.createPayload('walletOf', input);
}
async deployWallet(input) {
return await this.contract.createPayload('deployWallet', input);
}
async mint(input) {
return await this.contract.createPayload('mint', input);
}
async acceptBurn(input) {
return await this.contract.createPayload('acceptBurn', input);
}
async sendSurplusGas(input) {
return await this.contract.createPayload('sendSurplusGas', input);
}
}