"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.GovernanceInstance = exports.Governance = void 0;
const web3_1 = require("@alephium/web3");
const governance_ral_json_1 = __importDefault(require("../governance.ral.json"));
class Factory extends web3_1.ContractFactory {
    constructor() {
        super(...arguments);
        this.tests = {
            parseConractUpgrade: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "parseConractUpgrade", params);
            }),
            getMessageFee: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "getMessageFee", params);
            }),
            publishWormholeMessage: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "publishWormholeMessage", params);
            }),
            parseAndVerifyVAA: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "parseAndVerifyVAA", params);
            }),
            parseAndVerifyGovernanceVAAGeneric: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "parseAndVerifyGovernanceVAAGeneric", params);
            }),
            parseAndVerifyGovernanceVAA: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "parseAndVerifyGovernanceVAA", params);
            }),
            getGuardiansInfo: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "getGuardiansInfo", params);
            }),
            submitContractUpgrade: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "submitContractUpgrade", params);
            }),
            updatePreviousGuardianSet: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "updatePreviousGuardianSet", params);
            }),
            submitNewGuardianSet: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "submitNewGuardianSet", params);
            }),
            submitSetMessageFee: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "submitSetMessageFee", params);
            }),
            submitTransferFees: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.testMethod(this, "submitTransferFees", params);
            }),
        };
    }
    at(address) {
        return new GovernanceInstance(address);
    }
}
// Use this object to test and deploy the contract
exports.Governance = new Factory(web3_1.Contract.fromJson(governance_ral_json_1.default, "", "d93cff88ce7197260f5a2fb6a3fbdcc8e210e7ce183d8ae4a42cb36c2da7d03b"));
// Use this class to interact with the blockchain
class GovernanceInstance extends web3_1.ContractInstance {
    constructor(address) {
        super(address);
        this.methods = {
            parseConractUpgrade: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.callMethod(exports.Governance, this, "parseConractUpgrade", params);
            }),
            getMessageFee: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.callMethod(exports.Governance, this, "getMessageFee", params === undefined ? {} : params);
            }),
            parseAndVerifyVAA: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.callMethod(exports.Governance, this, "parseAndVerifyVAA", params);
            }),
            parseAndVerifyGovernanceVAAGeneric: (params) => __awaiter(this, void 0, void 0, function* () {
                return web3_1.callMethod(exports.Governance, this, "parseAndVerifyGovernanceVAAGeneric", params);
            }),
        };
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.fetchContractState(exports.Governance, this);
        });
    }
    getContractEventsCurrentCount() {
        return __awaiter(this, void 0, void 0, function* () {
            return web3_1.getContractEventsCurrentCount(this.address);
        });
    }
    subscribeWormholeMessageEvent(options, fromCount) {
        return web3_1.subscribeContractEvent(exports.Governance.contract, this, options, "WormholeMessage", fromCount);
    }
    multicall(calls) {
        return __awaiter(this, void 0, void 0, function* () {
            return (yield web3_1.multicallMethods(exports.Governance, this, calls));
        });
    }
}
exports.GovernanceInstance = GovernanceInstance;
