/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
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 __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
import { web3, Contract, binToHex, contractIdFromAddress, fromApiArray, } from "@alephium/web3";
var TokenBridgeForChain = /** @class */ (function () {
    function TokenBridgeForChain(address, contractId, groupIndex, deployResult) {
        this.address = address;
        this.contractId = contractId;
        this.groupIndex = groupIndex;
        this.deployResult = deployResult;
    }
    TokenBridgeForChain.deploy = function (signer, governance, localChainId, localTokenBridgeId, remoteChainId, remoteTokenBridgeId, start, firstNext256, secondNext256, unexecutedSequenceTemplateId, sendSequence, _extraParams) {
        return __awaiter(this, void 0, void 0, function () {
            var _deployResult;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, TokenBridgeForChain.contract.deploy(signer, {
                            initialFields: {
                                governance: governance,
                                localChainId: localChainId,
                                localTokenBridgeId: localTokenBridgeId,
                                remoteChainId: remoteChainId,
                                remoteTokenBridgeId: remoteTokenBridgeId,
                                start: start,
                                firstNext256: firstNext256,
                                secondNext256: secondNext256,
                                unexecutedSequenceTemplateId: unexecutedSequenceTemplateId,
                                sendSequence: sendSequence,
                            },
                            initialAttoAlphAmount: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAttoAlphAmount,
                            initialTokenAmounts: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialTokenAmounts,
                            issueTokenAmount: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.issueTokenAmount,
                            gasAmount: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.gasAmount,
                            gasPrice: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.gasPrice,
                        })];
                    case 1:
                        _deployResult = _a.sent();
                        return [2 /*return*/, new TokenBridgeForChain(_deployResult.contractAddress, _deployResult.contractId, _deployResult.fromGroup, _deployResult)];
                }
            });
        });
    };
    TokenBridgeForChain.connect = function (address, deployResult) {
        var contractId = binToHex(contractIdFromAddress(address));
        var groupIndex = parseInt(contractId.slice(-2));
        return new TokenBridgeForChain(address, contractId, groupIndex, deployResult);
    };
    TokenBridgeForChain.prototype.fetchState = function () {
        return __awaiter(this, void 0, void 0, function () {
            var state;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, TokenBridgeForChain.contract.fetchState(this.address, this.groupIndex)];
                    case 1:
                        state = _a.sent();
                        return [2 /*return*/, __assign(__assign({}, state), { governance: state.fields["governance"], localChainId: state.fields["localChainId"], localTokenBridgeId: state.fields["localTokenBridgeId"], remoteChainId: state.fields["remoteChainId"], remoteTokenBridgeId: state.fields["remoteTokenBridgeId"], start: state.fields["start"], firstNext256: state.fields["firstNext256"], secondNext256: state.fields["secondNext256"], unexecutedSequenceTemplateId: state.fields["unexecutedSequenceTemplateId"], sendSequence: state.fields["sendSequence"] })];
                }
            });
        });
    };
    // This is used for testing contract functions
    TokenBridgeForChain.stateForTest = function (governance, localChainId, localTokenBridgeId, remoteChainId, remoteTokenBridgeId, start, firstNext256, secondNext256, unexecutedSequenceTemplateId, sendSequence, asset, address) {
        var _a;
        var newAsset = {
            alphAmount: (_a = asset === null || asset === void 0 ? void 0 : asset.alphAmount) !== null && _a !== void 0 ? _a : BigInt("1000000000000000000"),
            tokens: asset === null || asset === void 0 ? void 0 : asset.tokens,
        };
        return TokenBridgeForChain.contract.toState({
            governance: governance,
            localChainId: localChainId,
            localTokenBridgeId: localTokenBridgeId,
            remoteChainId: remoteChainId,
            remoteTokenBridgeId: remoteTokenBridgeId,
            start: start,
            firstNext256: firstNext256,
            secondNext256: secondNext256,
            unexecutedSequenceTemplateId: unexecutedSequenceTemplateId,
            sendSequence: sendSequence,
        }, newAsset, address);
    };
    TokenBridgeForChain.testSetExecuted = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 0, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("setExecuted", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testCompact = function (_initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 1, testArgs: {}, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("compact", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testCheckSequenceInSubContract = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 2, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("checkSequenceInSubContract", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testCheckSequence = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 3, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("checkSequence", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testNextSendSequence = function (_initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 4, testArgs: {}, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPublicMethod("nextSendSequence", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testCheckCompleteTransfer = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 5, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("checkCompleteTransfer", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testParseCompleteTransfer = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 6, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPrivateMethod("parseCompleteTransfer", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testCompleteTransfer = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 7, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPublicMethod("completeTransfer", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testDestroyUnexecutedSequenceContracts = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 8, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPublicMethod("destroyUnexecutedSequenceContracts", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testDeposit = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 9, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPublicMethod("deposit", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.testWithdraw = function (args, _initFields, _extraParams) {
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function () {
            var _initialAsset, _testParams, _testResult;
            return __generator(this, function (_d) {
                switch (_d.label) {
                    case 0:
                        _initialAsset = {
                            alphAmount: (_b = (_a = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _a === void 0 ? void 0 : _a.alphAmount) !== null && _b !== void 0 ? _b : BigInt("1000000000000000000"),
                            tokens: (_c = _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.initialAsset) === null || _c === void 0 ? void 0 : _c.tokens,
                        };
                        _testParams = __assign(__assign({}, _extraParams), { testMethodIndex: 10, testArgs: args, initialFields: _initFields, initialAsset: _initialAsset });
                        return [4 /*yield*/, TokenBridgeForChain.contract.testPublicMethod("withdraw", _testParams)];
                    case 1:
                        _testResult = _d.sent();
                        return [2 /*return*/, __assign(__assign({}, _testResult), { returns: _testResult.returns })];
                }
            });
        });
    };
    TokenBridgeForChain.prototype.nextSendSequenceCall = function (_extraParams) {
        return __awaiter(this, void 0, void 0, function () {
            var _callResult;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, web3
                            .getCurrentNodeProvider()
                            .contracts.postContractsCallContract({
                            group: this.groupIndex,
                            worldStateBlockHash: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.worldStateBlockHash,
                            txId: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.txId,
                            address: this.address,
                            methodIndex: 4,
                            args: [],
                            existingContracts: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.existingContracts,
                            inputAssets: _extraParams === null || _extraParams === void 0 ? void 0 : _extraParams.inputAssets,
                        })];
                    case 1:
                        _callResult = _a.sent();
                        return [2 /*return*/, fromApiArray(_callResult.returns, ["U256"])[0]];
                }
            });
        });
    };
    TokenBridgeForChain.contract = Contract.fromJson(JSON.parse("{\n  \"version\": \"v1.7.0\",\n  \"name\": \"TokenBridgeForChain\",\n  \"bytecode\": \"0a0b1b4082409b40fd4117414d41c64220425a4265427f00000203010f0d16003b170216011602380c2f0f7b16011602390200020002004021a00113dcffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff304c15b1a0001302641700a0011301641701b213c40de0b6b3a7640000a2a0001341002d69ce0516001601c118a0001341002aa100a002a1010ca10200020102000c16001341002d69cb17011600b20e0c16010100000001040140341600a000314c041600000203021600a0001343002a344c03000104021600a0001342002a344c0100011600a0001342002a310f7b1600a0002b17011601134100314c051601a0010000a1014a0616011341002ba0020000a102030201000001010db3ce024113157ba0031700a0030d2aa10316000200000106021e1600040e11ce000103170517041703170217011601ce032f0c7b1603ce04410d7b1602ce012f130d7b160400031605020000010a05404116000c0d621401014113187b16000d132162711701160013211340416217021600134041134043626d17031600134043134045626d170413404516042a170516001340451605621706160513202a17071600160516076271170816004316072f0e7b160663170916011602160316091608020103020c004029160000051703170216024b01021603000617081707170617051704140102160667441605441709ce021609cc170a160a170b160113c3038d7ea4c68000a2ce0316041605160616071608160113070c160b010001020104004020b3ce024113157b16004317010c170216021601314c1216001602160213082a62cb1703b20d0c16030101160213082a17024a2a01010202000316001601a901020102000d0c0dce0201081701b416014513157b16011600a8\",\n  \"codeHash\": \"fcd44a6e122c9a1ee56af7ee1aa76fd73db741818b30a3df997b01a4e9d0e126\",\n  \"fieldsSig\": {\n    \"names\": [\n      \"governance\",\n      \"localChainId\",\n      \"localTokenBridgeId\",\n      \"remoteChainId\",\n      \"remoteTokenBridgeId\",\n      \"start\",\n      \"firstNext256\",\n      \"secondNext256\",\n      \"unexecutedSequenceTemplateId\",\n      \"sendSequence\"\n    ],\n    \"types\": [\n      \"ByteVec\",\n      \"U256\",\n      \"ByteVec\",\n      \"U256\",\n      \"ByteVec\",\n      \"U256\",\n      \"U256\",\n      \"U256\",\n      \"ByteVec\",\n      \"U256\"\n    ],\n    \"isMutable\": [\n      false,\n      false,\n      false,\n      false,\n      false,\n      true,\n      true,\n      true,\n      false,\n      true\n    ]\n  },\n  \"eventsSig\": [],\n  \"functions\": [\n    {\n      \"name\": \"setExecuted\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": false,\n      \"isPublic\": false,\n      \"paramNames\": [\n        \"offset\",\n        \"current\"\n      ],\n      \"paramTypes\": [\n        \"U256\",\n        \"U256\"\n      ],\n      \"paramIsMutable\": [\n        false,\n        false\n      ],\n      \"returnTypes\": [\n        \"U256\"\n      ]\n    },\n    {\n      \"name\": \"compact\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": true,\n      \"isPublic\": false,\n      \"paramNames\": [],\n      \"paramTypes\": [],\n      \"paramIsMutable\": [],\n      \"returnTypes\": []\n    },\n    {\n      \"name\": \"checkSequenceInSubContract\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": true,\n      \"isPublic\": false,\n      \"paramNames\": [\n        \"seq\"\n      ],\n      \"paramTypes\": [\n        \"U256\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": []\n    },\n    {\n      \"name\": \"checkSequence\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": false,\n      \"isPublic\": false,\n      \"paramNames\": [\n        \"seq\"\n      ],\n      \"paramTypes\": [\n        \"U256\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": [\n        \"Bool\"\n      ]\n    },\n    {\n      \"name\": \"nextSendSequence\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": false,\n      \"isPublic\": true,\n      \"paramNames\": [],\n      \"paramTypes\": [],\n      \"paramIsMutable\": [],\n      \"returnTypes\": [\n        \"U256\"\n      ]\n    },\n    {\n      \"name\": \"checkCompleteTransfer\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": false,\n      \"isPublic\": false,\n      \"paramNames\": [\n        \"vaa\"\n      ],\n      \"paramTypes\": [\n        \"ByteVec\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": [\n        \"Bool\",\n        \"ByteVec\"\n      ]\n    },\n    {\n      \"name\": \"parseCompleteTransfer\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": false,\n      \"isPublic\": false,\n      \"paramNames\": [\n        \"payload\"\n      ],\n      \"paramTypes\": [\n        \"ByteVec\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": [\n        \"U256\",\n        \"ByteVec\",\n        \"U256\",\n        \"Address\",\n        \"U256\"\n      ]\n    },\n    {\n      \"name\": \"completeTransfer\",\n      \"usePreapprovedAssets\": true,\n      \"useAssetsInContract\": false,\n      \"isPublic\": true,\n      \"paramNames\": [\n        \"vaa\",\n        \"caller\"\n      ],\n      \"paramTypes\": [\n        \"ByteVec\",\n        \"Address\"\n      ],\n      \"paramIsMutable\": [\n        false,\n        false\n      ],\n      \"returnTypes\": []\n    },\n    {\n      \"name\": \"destroyUnexecutedSequenceContracts\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": true,\n      \"isPublic\": true,\n      \"paramNames\": [\n        \"paths\"\n      ],\n      \"paramTypes\": [\n        \"ByteVec\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": []\n    },\n    {\n      \"name\": \"deposit\",\n      \"usePreapprovedAssets\": true,\n      \"useAssetsInContract\": true,\n      \"isPublic\": true,\n      \"paramNames\": [\n        \"from\",\n        \"alphAmount\"\n      ],\n      \"paramTypes\": [\n        \"Address\",\n        \"U256\"\n      ],\n      \"paramIsMutable\": [\n        false,\n        false\n      ],\n      \"returnTypes\": []\n    },\n    {\n      \"name\": \"withdraw\",\n      \"usePreapprovedAssets\": false,\n      \"useAssetsInContract\": true,\n      \"isPublic\": true,\n      \"paramNames\": [\n        \"alphAmount\"\n      ],\n      \"paramTypes\": [\n        \"U256\"\n      ],\n      \"paramIsMutable\": [\n        false\n      ],\n      \"returnTypes\": []\n    }\n  ]\n}"));
    return TokenBridgeForChain;
}());
export { TokenBridgeForChain };
