/* 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, subscribeContractCreatedEvent, subscribeContractDestroyedEvent, subscribeContractEvent, subscribeAllEvents, testMethod, callMethod, fetchContractState, ContractInstance, } from "@alephium/web3";
import { default as GovernanceContractJson } from "../governance.ral.json";
class Factory extends ContractFactory {
    at(address) {
        return new GovernanceInstance(address);
    }
    testParseConractUpgradeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseConractUpgrade", params);
        });
    }
    testGetMessageFeeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "getMessageFee", params);
        });
    }
    testPublishWormholeMessageMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "publishWormholeMessage", params);
        });
    }
    testParseAndVerifyVAAMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseAndVerifyVAA", params);
        });
    }
    testParseAndVerifyGovernanceVAAGenericMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseAndVerifyGovernanceVAAGeneric", params);
        });
    }
    testParseAndVerifyGovernanceVAAMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseAndVerifyGovernanceVAA", params);
        });
    }
    testGetGuardiansInfoMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "getGuardiansInfo", params);
        });
    }
    testSubmitContractUpgradeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "submitContractUpgrade", params);
        });
    }
    testUpdatePreviousGuardianSetMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "updatePreviousGuardianSet", params);
        });
    }
    testSubmitNewGuardianSetMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "submitNewGuardianSet", params);
        });
    }
    testSubmitSetMessageFeeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "submitSetMessageFee", params);
        });
    }
    testSubmitTransferFeesMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "submitTransferFees", params);
        });
    }
}
// Use this object to test and deploy the contract
export const Governance = new Factory(Contract.fromJson(GovernanceContractJson, "", "59e000edbf5739884298899e54a4d2e34c6ebf30ac8273b7b1b00740248cf4cb"));
// Use this class to interact with the blockchain
export class GovernanceInstance extends ContractInstance {
    constructor(address) {
        super(address);
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return fetchContractState(Governance, this);
        });
    }
    subscribeContractCreatedEvent(options, fromCount) {
        return subscribeContractCreatedEvent(this, options, fromCount);
    }
    subscribeContractDestroyedEvent(options, fromCount) {
        return subscribeContractDestroyedEvent(this, options, fromCount);
    }
    subscribeWormholeMessageEvent(options, fromCount) {
        return subscribeContractEvent(Governance.contract, this, options, "WormholeMessage", fromCount);
    }
    subscribeAllEvents(options, fromCount) {
        return subscribeAllEvents(Governance.contract, this, options, fromCount);
    }
    callGetMessageFeeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return callMethod(Governance, this, "getMessageFee", params === undefined ? {} : params);
        });
    }
    callParseAndVerifyVAAMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return callMethod(Governance, this, "parseAndVerifyVAA", params);
        });
    }
    callParseAndVerifyGovernanceVAAGenericMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return callMethod(Governance, this, "parseAndVerifyGovernanceVAAGeneric", params);
        });
    }
}
