/* 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, callMethod, fetchContractState, ContractInstance, } from "@alephium/web3";
import { default as TokenBridgeContractJson } from "../token_bridge/token_bridge.ral.json";
class Factory extends ContractFactory {
    at(address) {
        return new TokenBridgeInstance(address);
    }
    testParseAndVerifyGovernanceVAAMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseAndVerifyGovernanceVAA", params);
        });
    }
    testCreateAttestTokenHandlerMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "createAttestTokenHandler", params);
        });
    }
    testCreateLocalAttestTokenHandlerMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "createLocalAttestTokenHandler", params);
        });
    }
    testParseAndVerifyRegisterChainMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "parseAndVerifyRegisterChain", params);
        });
    }
    testRegisterChainMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "registerChain", params);
        });
    }
    testUpgradeContractMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "upgradeContract", params);
        });
    }
    testDestroyUnexecutedSequenceContractsMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "destroyUnexecutedSequenceContracts", params);
        });
    }
    testUpdateMinimalConsistencyLevelMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "updateMinimalConsistencyLevel", params);
        });
    }
    testGetRefundAddressMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "getRefundAddress", params);
        });
    }
    testUpdateRefundAddressMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "updateRefundAddress", params);
        });
    }
    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);
        });
    }
    testAttestTokenMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "attestToken", params);
        });
    }
    testNextSendSequenceMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "nextSendSequence", params);
        });
    }
    testCreateLocalTokenPoolMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "createLocalTokenPool", params);
        });
    }
    testCreateRemoteTokenPoolMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "createRemoteTokenPool", params);
        });
    }
    testUpdateRemoteTokenPoolMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "updateRemoteTokenPool", params);
        });
    }
    testTransferTokenMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return testMethod(this, "transferToken", params);
        });
    }
}
// Use this object to test and deploy the contract
export const TokenBridge = new Factory(Contract.fromJson(TokenBridgeContractJson, "", "e883edaac26437b449407bfec831e89c98b8139e59235f3f49246f2ef593ec08"));
// Use this class to interact with the blockchain
export class TokenBridgeInstance extends ContractInstance {
    constructor(address) {
        super(address);
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return fetchContractState(TokenBridge, this);
        });
    }
    subscribeContractCreatedEvent(options, fromCount) {
        return subscribeContractCreatedEvent(this, options, fromCount);
    }
    subscribeContractDestroyedEvent(options, fromCount) {
        return subscribeContractDestroyedEvent(this, options, fromCount);
    }
    subscribeAllEvents(options, fromCount) {
        return subscribeAllEvents(TokenBridge.contract, this, options, fromCount);
    }
    callGetRefundAddressMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return callMethod(TokenBridge, this, "getRefundAddress", params === undefined ? {} : params);
        });
    }
    callGetMessageFeeMethod(params) {
        return __awaiter(this, void 0, void 0, function* () {
            return callMethod(TokenBridge, this, "getMessageFee", params === undefined ? {} : params);
        });
    }
}
