/* 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, subscribeAllEvents, testMethod, fetchContractState, ContractInstance, } from "@alephium/web3";
import { default as GovernanceV1ContractJson } from "../tests/governance_v1.ral.json";
class Factory extends ContractFactory {
    at(address) {
        return new GovernanceV1Instance(address);
    }
    testFooMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "foo", params);
        });
    }
}
// Use this object to test and deploy the contract
export const GovernanceV1 = new Factory(Contract.fromJson(GovernanceV1ContractJson, "", "351ea4360d2b31bf059c790536801450128a88d1ed1ce5c0d6c0f0eee8d313ac"));
// Use this class to interact with the blockchain
export class GovernanceV1Instance extends ContractInstance {
    constructor(address) {
        super(address);
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return fetchContractState(GovernanceV1, this);
        });
    }
    subscribeContractCreatedEvent(options, fromCount) {
        return subscribeContractCreatedEvent(this, options, fromCount);
    }
    subscribeContractDestroyedEvent(options, fromCount) {
        return subscribeContractDestroyedEvent(this, options, fromCount);
    }
    subscribeAllEvents(options, fromCount) {
        return subscribeAllEvents(GovernanceV1.contract, this, options, fromCount);
    }
}
