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