"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestTokenInstance = exports.TestToken = void 0;
const web3_1 = require("@alephium/web3");
const test_token_ral_json_1 = __importDefault(require("../tests/test_token.ral.json"));
class Factory extends web3_1.ContractFactory {
    at(address) {
        return new TestTokenInstance(address);
    }
    testGetSymbolMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.testMethod(this, "getSymbol", params);
        });
    }
    testGetNameMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.testMethod(this, "getName", params);
        });
    }
    testGetDecimalsMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.testMethod(this, "getDecimals", params);
        });
    }
    testGetTotalSupplyMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.testMethod(this, "getTotalSupply", params);
        });
    }
    testBuyMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.testMethod(this, "buy", params);
        });
    }
}
// Use this object to test and deploy the contract
exports.TestToken = new Factory(web3_1.Contract.fromJson(test_token_ral_json_1.default, "", "36000f2a170887bb3ee079c1a565120623a6f24a8d75e22210e3f0dcdaa8fc30"));
// Use this class to interact with the blockchain
class TestTokenInstance extends web3_1.ContractInstance {
    constructor(address) {
        super(address);
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.fetchContractState(exports.TestToken, this);
        });
    }
    subscribeContractCreatedEvent(options, fromCount) {
        return web3_1.subscribeContractCreatedEvent(this, options, fromCount);
    }
    subscribeContractDestroyedEvent(options, fromCount) {
        return web3_1.subscribeContractDestroyedEvent(this, options, fromCount);
    }
    subscribeAllEvents(options, fromCount) {
        return web3_1.subscribeAllEvents(exports.TestToken.contract, this, options, fromCount);
    }
    callGetSymbolMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.callMethod(exports.TestToken, this, "getSymbol", params === undefined ? {} : params);
        });
    }
    callGetNameMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.callMethod(exports.TestToken, this, "getName", params === undefined ? {} : params);
        });
    }
    callGetDecimalsMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.callMethod(exports.TestToken, this, "getDecimals", params === undefined ? {} : params);
        });
    }
    callGetTotalSupplyMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.callMethod(exports.TestToken, this, "getTotalSupply", params === undefined ? {} : params);
        });
    }
}
exports.TestTokenInstance = TestTokenInstance;
