vasku-tip3
Version:
TIP-3 Broxus contract
191 lines (190 loc) • 6.65 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.TokenWalletUpgradeable = void 0;
const vasku_1 = require("vasku");
const TokenWalletUpgradeableContent_1 = __importDefault(require("./TokenWalletUpgradeableContent"));
class TokenWalletUpgradeable extends vasku_1.Contract {
_call;
_run;
_payload;
constructor(config = {}, options = {}) {
if (config.address === undefined)
super({
abi: TokenWalletUpgradeableContent_1.default.abi,
initial: config.initial ?? {},
keys: config.keys,
tvc: TokenWalletUpgradeableContent_1.default.tvc
}, options);
else
super({
address: config.address,
abi: TokenWalletUpgradeableContent_1.default.abi
}, options);
this._call = new TokenWalletUpgradeableCalls(this);
this._run = new TokenWalletUpgradeableRuns(this);
this._payload = new TokenWalletUpgradeablePayload(this);
}
async deploy(value, useGiver = true, timeout = 60000) {
return await this._deploy(value, {}, useGiver, timeout);
}
get call() {
return this._call;
}
get run() {
return this._run;
}
get payload() {
return this._payload;
}
}
exports.TokenWalletUpgradeable = TokenWalletUpgradeable;
class TokenWalletUpgradeableCalls {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input, keys) {
return await this.contract.callMethod('supportsInterface', input, keys);
}
async platformCode(input, keys) {
return await this.contract.callMethod('platformCode', input, keys);
}
async onDeployRetry(input, keys) {
return await this.contract.callMethod('onDeployRetry', input, keys);
}
async version(input, keys) {
return await this.contract.callMethod('version', input, keys);
}
async upgrade(input, keys) {
return await this.contract.callMethod('upgrade', input, keys);
}
async acceptUpgrade(input, keys) {
return await this.contract.callMethod('acceptUpgrade', input, keys);
}
async burnByRoot(input, keys) {
return await this.contract.callMethod('burnByRoot', input, keys);
}
async destroy(input, keys) {
return await this.contract.callMethod('destroy', input, keys);
}
async burn(input, keys) {
return await this.contract.callMethod('burn', input, keys);
}
async balance(input, keys) {
return await this.contract.callMethod('balance', input, keys);
}
async owner(input, keys) {
return await this.contract.callMethod('owner', input, keys);
}
async root(input, keys) {
return await this.contract.callMethod('root', input, keys);
}
async walletCode(input, keys) {
return await this.contract.callMethod('walletCode', input, keys);
}
async transfer(input, keys) {
return await this.contract.callMethod('transfer', input, keys);
}
async transferToWallet(input, keys) {
return await this.contract.callMethod('transferToWallet', input, keys);
}
async acceptTransfer(input, keys) {
return await this.contract.callMethod('acceptTransfer', input, keys);
}
async acceptMint(input, keys) {
return await this.contract.callMethod('acceptMint', input, keys);
}
async sendSurplusGas(input, keys) {
return await this.contract.callMethod('sendSurplusGas', input, keys);
}
}
class TokenWalletUpgradeableRuns {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input) {
return (await this.contract.runMethod('supportsInterface', input)).value;
}
async platformCode(input) {
return (await this.contract.runMethod('platformCode', input)).value;
}
async version(input) {
return (await this.contract.runMethod('version', input)).value;
}
async balance(input) {
return (await this.contract.runMethod('balance', input)).value;
}
async owner(input) {
return (await this.contract.runMethod('owner', input)).value;
}
async root(input) {
return (await this.contract.runMethod('root', input)).value;
}
async walletCode(input) {
return (await this.contract.runMethod('walletCode', input)).value;
}
}
class TokenWalletUpgradeablePayload {
contract;
constructor(contract) {
this.contract = contract;
}
async supportsInterface(input) {
return await this.contract.createPayload('supportsInterface', input);
}
async platformCode(input) {
return await this.contract.createPayload('platformCode', input);
}
async onDeployRetry(input) {
return await this.contract.createPayload('onDeployRetry', input);
}
async version(input) {
return await this.contract.createPayload('version', input);
}
async upgrade(input) {
return await this.contract.createPayload('upgrade', input);
}
async acceptUpgrade(input) {
return await this.contract.createPayload('acceptUpgrade', input);
}
async burnByRoot(input) {
return await this.contract.createPayload('burnByRoot', input);
}
async destroy(input) {
return await this.contract.createPayload('destroy', input);
}
async burn(input) {
return await this.contract.createPayload('burn', input);
}
async balance(input) {
return await this.contract.createPayload('balance', input);
}
async owner(input) {
return await this.contract.createPayload('owner', input);
}
async root(input) {
return await this.contract.createPayload('root', input);
}
async walletCode(input) {
return await this.contract.createPayload('walletCode', input);
}
async transfer(input) {
return await this.contract.createPayload('transfer', input);
}
async transferToWallet(input) {
return await this.contract.createPayload('transferToWallet', input);
}
async acceptTransfer(input) {
return await this.contract.createPayload('acceptTransfer', input);
}
async acceptMint(input) {
return await this.contract.createPayload('acceptMint', input);
}
async sendSurplusGas(input) {
return await this.contract.createPayload('sendSurplusGas', input);
}
}