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