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