/* 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, testMethod, callMethod, multicallMethods, fetchContractState, ContractInstance, } from "@alephium/web3";
import { default as TokenBridgeContractJson } from "../token_bridge/token_bridge.ral.json";
class Factory extends ContractFactory {
    constructor() {
        super(...arguments);
        this.tests = {
            parseAndVerifyGovernanceVAA: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "parseAndVerifyGovernanceVAA", params);
            }),
            createAttestTokenHandler: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "createAttestTokenHandler", params);
            }),
            createLocalAttestTokenHandler: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "createLocalAttestTokenHandler", params);
            }),
            parseAndVerifyRegisterChain: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "parseAndVerifyRegisterChain", params);
            }),
            registerChain: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "registerChain", params);
            }),
            upgradeContract: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "upgradeContract", params);
            }),
            destroyUnexecutedSequenceContracts: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "destroyUnexecutedSequenceContracts", params);
            }),
            updateMinimalConsistencyLevel: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "updateMinimalConsistencyLevel", params);
            }),
            getRefundAddress: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "getRefundAddress", params);
            }),
            updateRefundAddress: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "updateRefundAddress", params);
            }),
            getMessageFee: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "getMessageFee", params);
            }),
            attestToken: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "attestToken", params);
            }),
            nextSendSequence: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "nextSendSequence", params);
            }),
            createLocalTokenPool: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "createLocalTokenPool", params);
            }),
            createRemoteTokenPool: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "createRemoteTokenPool", params);
            }),
            updateRemoteTokenPool: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "updateRemoteTokenPool", params);
            }),
            transferToken: (params) => __awaiter(this, void 0, void 0, function* () {
                return testMethod(this, "transferToken", params);
            }),
        };
    }
    at(address) {
        return new TokenBridgeInstance(address);
    }
}
// Use this object to test and deploy the contract
export const TokenBridge = new Factory(Contract.fromJson(TokenBridgeContractJson, "", "03884f2efec6437111837123a502c119a7d02c4e79fa278f533d077c30288bfd"));
// Use this class to interact with the blockchain
export class TokenBridgeInstance extends ContractInstance {
    constructor(address) {
        super(address);
        this.methods = {
            getRefundAddress: (params) => __awaiter(this, void 0, void 0, function* () {
                return callMethod(TokenBridge, this, "getRefundAddress", params === undefined ? {} : params);
            }),
            getMessageFee: (params) => __awaiter(this, void 0, void 0, function* () {
                return callMethod(TokenBridge, this, "getMessageFee", params === undefined ? {} : params);
            }),
        };
    }
    fetchState() {
        return __awaiter(this, void 0, void 0, function* () {
            return fetchContractState(TokenBridge, this);
        });
    }
    multicall(calls) {
        return __awaiter(this, void 0, void 0, function* () {
            return (yield multicallMethods(TokenBridge, this, calls));
        });
    }
}
