UNPKG

@lucoadam/zebec-wormhole-sdk

Version:

This sdk can be use to transfer assets across chains and to interact with the Zebec's xchain bridge smart contracts for passing message from EVM chain to solana specially to utilize the features of Zebec Streaming and Zebec Multisig Streaming protocol.

1,743 lines (1,741 loc) 80.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Messenger__factory = void 0; var _ethers = require("ethers"); /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ const _abi = [{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "CancelNativeStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "CancelTokenStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "depositor", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "DepositSol", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "depositor", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "DepositToken", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "sender", type: "bytes" }, { indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "DirectTransfer", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "InstantNativeTransfer", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "InstantTokenTransfer", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "sender", type: "bytes" }, { indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "NativeStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "sender", type: "bytes" }, { indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "NativeStreamUpdate", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "withdrawer", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "NativeWithdrawal", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "PauseNativeStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "PauseTokenStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "sender", type: "bytes" }, { indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "TokenStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "sender", type: "bytes" }, { indexed: false, internalType: "bytes", name: "receiver", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "TokenStreamUpdate", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "withdrawer", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint64", name: "amount", type: "uint64" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "TokenWithdrawal", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "withdrawer", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "WithdrawStream", type: "event" }, { anonymous: false, inputs: [{ indexed: false, internalType: "bytes", name: "withdrawer", type: "bytes" }, { indexed: false, internalType: "bytes", name: "tokenMint", type: "bytes" }, { indexed: false, internalType: "uint32", name: "nonce", type: "uint32" }], name: "WithdrawToken", type: "event" }, { inputs: [], name: "CANCEL_SOL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "CANCEL_TOKEN", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "CHAIN_ID", outputs: [{ internalType: "uint16", name: "", type: "uint16" }], stateMutability: "view", type: "function" }, { inputs: [], name: "CONSISTENCY_LEVEL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "DEPOSIT_SOL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "DEPOSIT_TOKEN", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "DIRECT_TRANSFER", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "INSTANT_SOL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "INSTANT_TOKEN", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "PAUSE_SOL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "PAUSE_TOKEN", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "SOL_STREAM", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "SOL_STREAM_UPDATE", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "SOL_WITHDRAW_STREAM", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "TOKEN_STREAM", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "TOKEN_STREAM_UPDATE", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "TOKEN_WITHDRAW_STREAM", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "WETH", outputs: [{ internalType: "contract IWETH", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "WITHDRAW_SOL", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "WITHDRAW_TOKEN", outputs: [{ internalType: "uint8", name: "", type: "uint8" }], stateMutability: "view", type: "function" }, { inputs: [], name: "_wormhole_fee", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "uint64", name: "can_cancel", type: "uint64" }, { internalType: "uint64", name: "can_update", type: "uint64" }], internalType: "struct Messages.ProcessStream", name: "processStream", type: "tuple" }], name: "encode_native_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "receiver", type: "bytes" }], internalType: "struct Messages.UpdateStream", name: "processStream", type: "tuple" }], name: "encode_native_stream_update", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }], internalType: "struct Messages.ProcessWithdrawStream", name: "processWithdrawStream", type: "tuple" }], name: "encode_native_withdraw_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }], internalType: "struct Messages.CancelStream", name: "cancelStream", type: "tuple" }], name: "encode_process_cancel_native_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "reciever_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }], internalType: "struct Messages.CancelStreamToken", name: "cancelStream", type: "tuple" }], name: "encode_process_cancel_token_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "depositor", type: "bytes" }], internalType: "struct Messages.ProcessDeposit", name: "processDeposit", type: "tuple" }], name: "encode_process_deposit_sol", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "depositor", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }], internalType: "struct Messages.ProcessDepositToken", name: "processDeposit", type: "tuple" }], name: "encode_process_deposit_token", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }], internalType: "struct Messages.ProcessTransferToken", name: "processTransfer", type: "tuple" }], name: "encode_process_direct_transfer", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }], internalType: "struct Messages.ProcessTransfer", name: "processTransfer", type: "tuple" }], name: "encode_process_instant_native_transfer", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }], internalType: "struct Messages.ProcessTransferToken", name: "processTransfer", type: "tuple" }], name: "encode_process_instant_token_transfer", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }], internalType: "struct Messages.ProcessWithdraw", name: "processWithdraw", type: "tuple" }], name: "encode_process_native_withdrawal", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }], internalType: "struct Messages.PauseStream", name: "pauseStream", type: "tuple" }], name: "encode_process_pause_native_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "reciever_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }], internalType: "struct Messages.PauseStreamToken", name: "pauseStream", type: "tuple" }], name: "encode_process_pause_token_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }], internalType: "struct Messages.ProcessWithdrawToken", name: "processWithdraw", type: "tuple" }], name: "encode_process_token_withdrawal", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "uint64", name: "can_cancel", type: "uint64" }, { internalType: "uint64", name: "can_update", type: "uint64" }, { internalType: "bytes", name: "token_mint", type: "bytes" }], internalType: "struct Messages.ProcessStreamToken", name: "processStream", type: "tuple" }], name: "encode_token_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }], internalType: "struct Messages.UpdateStreamToken", name: "processStream", type: "tuple" }], name: "encode_token_stream_update", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [{ components: [{ internalType: "uint16", name: "toChain", type: "uint16" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "sender_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }], internalType: "struct Messages.ProcessWithdrawStreamToken", name: "processWithdrawStream", type: "tuple" }], name: "encode_token_withdraw_stream", outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], stateMutability: "pure", type: "function" }, { inputs: [], name: "getCurrentMsg", outputs: [{ internalType: "bytes", name: "", type: "bytes" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_cancel_native_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "reciever_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_cancel_token_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "depositor", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_deposit_sol", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "depositor", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_deposit_token", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_direct_transfer", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_instant_native_transfer", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_instant_token_transfer", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint64", name: "can_cancel", type: "uint64" }, { internalType: "uint64", name: "can_update", type: "uint64" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_native_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_native_stream_update", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_native_withdraw_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_native_withdrawal", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_pause_native_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "reciever_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_pause_token_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "uint64", name: "can_cancel", type: "uint64" }, { internalType: "uint64", name: "can_update", type: "uint64" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_token_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "start_time", type: "uint64" }, { internalType: "uint64", name: "end_time", type: "uint64" }, { internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "receiver", type: "bytes" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_token_stream_update", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "withdrawer", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "bytes", name: "sender_address", type: "bytes" }, { internalType: "bytes", name: "data_account_address", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_token_withdraw_stream", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint64", name: "amount", type: "uint64" }, { internalType: "bytes", name: "sender", type: "bytes" }, { internalType: "bytes", name: "token_mint", type: "bytes" }, { internalType: "uint256", name: "arbiter_fee", type: "uint256" }], name: "process_token_withdrawal", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "encodedMsg", type: "bytes" }], name: "receiveEncodedMsg", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint16", name: "chainId", type: "uint16" }, { internalType: "bytes32", name: "applicationAddr", type: "bytes32" }], name: "registerApplicationContracts", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "bytes", name: "str", type: "bytes" }], name: "sendMsg", outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "wormhole", outputs: [{ internalType: "contract IWormhole", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "wormhole_fee", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { stateMutability: "payable", type: "receive" }]; const _bytecode = "0x608060405260008060006101000a81548163ffffffff021916908363ffffffff16021790555034801561003157600080fd5b507368605ad7b15c732a30b1bbc62be8f2a509d74b4d600060046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073ae13d989dac2f0debff460ac112a837c89baa7cd600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550662386f26fc100006002819055506158d380620000fa6000396000f3fe6080604052600436106103a65760003560e01c80637175bad0116101e7578063bbdcf3aa1161010d578063e5965e2d116100a0578063f4b90cce1161006f578063f4b90cce14610ec3578063f92b86d614610eee578063f9b24a0d14610f2b578063ff206cf814610f5b576103ad565b8063e5965e2d14610dee578063e6f21eb614610e19578063eef2f41414610e49578063f1ff32b714610e86576103ad565b8063d47c3c31116100dc578063d47c3c3114610d42578063db5691c914610d6d578063dcb202a614610d98578063e410f3b714610dc3576103ad565b8063bbdcf3aa14610c84578063c30a774114610caf578063c66d248114610cda578063ce9dd1bc14610d17576103ad565b806384acd1bb11610185578063ad5c464811610154578063ad5c464814610bc1578063af8ed66814610bec578063af9b532b14610c1c578063b8e4b12514610c59576103ad565b806384acd1bb14610b10578063856fae4814610b3b57806385e1f4d014610b6b57806399b84aa714610b96576103ad565b806374bf6738116101c157806374bf673814610a365780637acd987614610a665780637cfe8d6d14610aa357806383c0022914610ad3576103ad565b80637175bad01461098c578063737a3ca4146109bc57806373d2b3e1146109f9576103ad565b80633dcd8717116102cc5780634e6b5cfa1161026a5780635f161d63116102395780635f161d63146108cb5780635f327e1c146109085780636035b9521461093157806368afb6f91461095c576103ad565b80634e6b5cfa146108085780634fd686c814610845578063546b582a146108705780635e2d15ed146108a0576103ad565b806341a4eb8c116102a657806341a4eb8c1461074757806342555f3d14610777578063479e627a146107a2578063496d76ff146107df576103ad565b80633dcd8717146106af5780633ed3a054146106ec578063417cdd9114610717576103ad565b80632ae6c7bb11610344578063313861a711610313578063313861a7146105ec57806332eb44a5146106175780633bb84858146106475780633bcf819214610684576103ad565b80632ae6c7bb1461051f5780632d88e3ec1461055c5780632ec72d4f1461058c5780632f886a32146105bc576103ad565b80630fa0b850116103805780630fa0b8501461044f57806313f665871461047a578063140aa36c146104a55780632a349077146104e2576103ad565b8063050cbcc3146103b25780630ee9e1ac146103e25780630f962ece14610412576103ad565b366103ad57005b600080fd5b6103cc60048036038101906103c79190613d14565b610f86565b6040516103d9919061509f565b60405180910390f35b6103fc60048036038101906103f79190614344565b611055565b604051610409919061509f565b60405180910390f35b34801561041e57600080fd5b5061043960048036038101906104349190613e2b565b61113e565b6040516104469190614dc3565b60405180910390f35b34801561045b57600080fd5b50610464611174565b60405161047191906150ba565b60405180910390f35b34801561048657600080fd5b5061048f611179565b60405161049c91906150ba565b60405180910390f35b3480156104b157600080fd5b506104cc60048036038101906104c79190614074565b61117e565b6040516104d99190614dc3565b60405180910390f35b3480156104ee57600080fd5b5061050960048036038101906105049190613f70565b6111c0565b6040516105169190614dc3565b60405180910390f35b34801561052b57600080fd5b5061054660048036038101906105419190613ff2565b611208565b6040516105539190614dc3565b60405180910390f35b61057660048036038101906105719190613c3d565b611250565b604051610583919061509f565b60405180910390f35b6105a660048036038101906105a19190613d14565b611336565b6040516105b3919061509f565b60405180910390f35b6105d660048036038101906105d19190614717565b611405565b6040516105e3919061509f565b60405180910390f35b3480156105f857600080fd5b50610601611535565b60405161060e91906150ba565b60405180910390f35b610631600480360381019061062c9190614344565b61153a565b60405161063e919061509f565b60405180910390f35b34801561065357600080fd5b5061066e60048036038101906106699190613f2f565b611625565b60405161067b9190614dc3565b60405180910390f35b34801561069057600080fd5b5061069961167f565b6040516106a69190615046565b60405180910390f35b3480156106bb57600080fd5b506106d660048036038101906106d19190613da9565b611689565b6040516106e39190614dc3565b60405180910390f35b3480156106f857600080fd5b506107016116bf565b60405161070e91906150ba565b60405180910390f35b610731600480360381019061072c91906143d7565b6116c4565b60405161073e919061509f565b60405180910390f35b610761600480360381019061075c9190614285565b6117a6565b60405161076e919061509f565b60405180910390f35b34801561078357600080fd5b5061078c611898565b60405161079991906150ba565b60405180910390f35b3480156107ae57600080fd5b506107c960048036038101906107c49190613e6c565b61189d565b6040516107d69190614dc3565b60405180910390f35b3480156107eb57600080fd5b5061080660048036038101906108019190613bfc565b6118df565b005b34801561081457600080fd5b5061082f600480360381019061082a91906140b5565b611ae0565b60405161083c9190614dc3565b60405180910390f35b34801561085157600080fd5b5061085a611b1c565b60405161086791906150ba565b60405180910390f35b61088a60048036038101906108859190614609565b611b21565b604051610897919061509f565b60405180910390f35b3480156108ac57600080fd5b506108b5611c5a565b6040516108c291906150ba565b60405180910390f35b3480156108d757600080fd5b506108f260048036038101906108ed9190614033565b611c5f565b6040516108ff9190614dc3565b60405180910390f35b34801561091457600080fd5b5061092f600480360381019061092a91906141f7565b611c95565b005b34801561093d57600080fd5b50610946611cb9565b60405161095391906150ba565b60405180910390f35b6109766004803603810190610971919061443e565b611cbe565b604051610983919061509f565b60405180910390f35b6109a660048036038101906109a19190613c3d565b611ddc565b6040516109b3919061509f565b60405180910390f35b3480156109c857600080fd5b506109e360048036038101906109de9190613bfc565b611ec2565b6040516109f0919061509f565b60405180910390f35b348015610a0557600080fd5b50610a206004803603810190610a1b91906140f6565b611f22565b604051610a2d9190614dc3565b60405180910390f35b610a506004803603810190610a4b9190614344565b611f7c565b604051610a5d919061509f565b60405180910390f35b348015610a7257600080fd5b50610a8d6004803603810190610a889190613d68565b612067565b604051610a9a9190614dc3565b60405180910390f35b610abd6004803603810190610ab89190613c3d565b6120af565b604051610aca919061509f565b60405180910390f35b348015610adf57600080fd5b50610afa6004803603810190610af59190613fb1565b612195565b604051610b079190614dc3565b60405180910390f35b348015610b1c57600080fd5b50610b256121d1565b604051610b329190614f6e565b60405180910390f35b610b556004803603810190610b5091906143d7565b6121fa565b604051610b62919061509f565b60405180910390f35b348015610b7757600080fd5b50610b806122dc565b604051610b8d919061502b565b60405180910390f35b348015610ba257600080fd5b50610bab6122e1565b604051610bb891906150ba565b60405180910390f35b348015610bcd57600080fd5b50610bd66122e6565b604051610be39190614f53565b60405180910390f35b610c066004803603810190610c019190614285565b612310565b604051610c13919061509f565b60405180910390f35b348015610c2857600080fd5b50610c436004803603810190610c3e9190613dea565b612404565b604051610c509190614dc3565b60405180910390f35b348015610c6557600080fd5b50610c6e61244c565b604051610c7b9190615046565b60405180910390f35b348015610c9057600080fd5b50610c99612452565b604051610ca691906150ba565b60405180910390f35b348015610cbb57600080fd5b50610cc4612457565b604051610cd191906150ba565b60405180910390f35b348015610ce657600080fd5b50610d016004803603810190610cfc9190613f70565b61245c565b604051610d0e9190614dc3565b60405180910390f35b348015610d2357600080fd5b50610d2c6124a4565b604051610d3991906150ba565b60405180910390f35b348015610d4e57600080fd5b50610d576124a9565b604051610d6491906150ba565b60405180910390f35b348015610d7957600080fd5b50610d826124ae565b604051610d8f91906150ba565b60405180910390f35b348015610da457600080fd5b50610dad6124b3565b604051610dba91906150ba565b60405180910390f35b348015610dcf57600080fd5b50610dd86124b8565b604051610de591906150ba565b60405180910390f35b348015610dfa57600080fd5b50610e036124bd565b604051610e1091906150ba565b60405180910390f35b610e336004803603810190610e2e9190614550565b6124c2565b604051610e40919061509f565b60405180910390f35b348015610e5557600080fd5b50610e706004803603810190610e6b9190613ead565b6125cf565b604051610e7d9190614dc3565b60405180910390f35b348015610e9257600080fd5b50610ead6004803603810190610ea89190614137565b61260b565b604051610eba9190614dc3565b60405180910390f35b348015610ecf57600080fd5b50610ed8612659565b604051610ee591906150ba565b60405180910390f35b348015610efa57600080fd5b50610f156004803603810190610f109190613eee565b61265e565b604051610f229190614dc3565b60405180910390f35b610f456004803603810190610f409190613d14565b6126bf565b604051610f52919061509f565b60405180910390f35b348015610f6757600080fd5b50610f7061278e565b604051610f7d9190614dc3565b60405180910390f35b600080610fab6040518060400160405280600161ffff16815260200186815250611c5f565b9050610fc860008054906101000a900463ffffffff168285612820565b507f9544e9966f92ee11fd196cb2ecf88815e6fc97999cd4d9440bb9d738aa3f75028460008054906101000a900463ffffffff1660405161100a929190614ee5565b60405180910390a1600160008054906101000a900463ffffffff1661102f91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505092915050565b60008061109060405180608001604052808867ffffffffffffffff168152602001600161ffff16815260200186815260200187815250612195565b90506110ad60008054906101000a900463ffffffff168285612820565b507f8028f1c34ec43c15454748a7756f9393b6b5ce7bcee0cb2a6e83707ed1a8c1e3858760008054906101000a900463ffffffff166040516110f193929190614f15565b60405180910390a1600160008054906101000a900463ffffffff1661111691906151cb565b6000806101000a81548163ffffffff021916908363ffffffff16021790555050949350505050565b606060078260000151836020015160405160200161115e939291906149d6565b6040516020818303038152906040529050919050565b600381565b600681565b6060600a82600001518360200151846040015185606001516040516020016111aa959493929190614ab9565b6040516020818303038152906040529050919050565b6060600c826000015183602001518460800151856060015186604001516040516020016111f296959493929190614b10565b6040516020818303038152906040529050919050565b606060048260000151836020015184604001518560600151866080015160405160200161123a96959493929190614a0f565b6040516020818303038152906040529050919050565b6000806112876040518060a00160405280600161ffff16815260200189815260200188815260200187815260200186815250611208565b90506112a460008054906101000a900463ffffffff168285612820565b507fbfe17eacb8b88e73140237f9ff5f52edde2116f6e1531a4363938510d9aad18b878760008054906101000a900463ffffffff166040516112e893929190614e4d565b60405180910390a1600160008054906101000a900463ffffffff1661130d91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505095945050505050565b60008061135b6040518060400160405280600161ffff16815260200186815250611689565b905061137860008054906101000a900463ffffffff168285612820565b507f0a9cebfa1e7948aa3615437988853308f40db4042bde1002b3e6aba2edb5439a8460008054906101000a900463ffffffff166040516113ba929190614ee5565b60405180910390a1600160008054906101000a900463ffffffff166113df91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505092915050565b6000806114816040518061010001604052808c67ffffffffffffffff1681526020018b67ffffffffffffffff1681526020018a67ffffffffffffffff168152602001600161ffff1681526020018881526020018981526020018767ffffffffffffffff1681526020018667ffffffffffffffff16815250611625565b905061149e60008054906101000a900463ffffffff168285612820565b507f72e41bccce5b79077be9b167a0b83ac459e42102dcea0120c64ec0a109bc78a186888a60008054906101000a900463ffffffff166040516114e49493929190614e92565b60405180910390a1600160008054906101000a900463ffffffff1661150991906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505098975050505050505050565b600e81565b60008061157560405180608001604052808867ffffffffffffffff168152602001600161ffff1681526020018781526020018681525061117e565b905061159260008054906101000a900463ffffffff168285612820565b507f50ca08ca506277828f8b3fcb06709647df9008cbad7f8c6c982d31a4df990ab685858860008054906101000a900463ffffffff166040516115d89493929190614e92565b60405180910390a1600160008054906101000a900463ffffffff166115fd91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff16021790555050949350505050565b60606001826000015183602001518460400151856060015186608001518760a001518860c001518960e0015160405160200161166999989796959493929190614c80565b6040516020818303038152906040529050919050565b6000600254905090565b6060600f826000015183602001516040516020016116a9939291906149d6565b6040516020818303038152906040529050919050565b600a81565b6000806116f960405180606001604052808767ffffffffffffffff168152602001600161ffff168152602001868152506125cf565b905061171660008054906101000a900463ffffffff168285612820565b507f8ff9b7efeff79891cd32889904c21a5a20990c74def44d8e1634e1816a915de6848660008054906101000a900463ffffffff1660405161175a93929190614f15565b60405180910390a1600160008054906101000a900463ffffffff1661177f91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff160217905550509392505050565b6000806117e76040518060a001604052808967ffffffffffffffff168152602001600161ffff168152602001878152602001868152602001888152506111c0565b905061180460008054906101000a900463ffffffff168285612820565b507f4786a83693db947935f5cd397a747f3a699b9d07d3629ace94021d071d31137b86858960008054906101000a900463ffffffff1660405161184a9493929190614e92565b60405180910390a1600160008054906101000a900463ffffffff1661186f91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505095945050505050565b600881565b6060600682600001518360200151846040015185606001516040516020016118c9959493929190614ab9565b6040516020818303038152906040529050919050565b60008060006118ec6121d1565b73ffffffffffffffffffffffffffffffffffffffff1663c0fd8bde856040518263ffffffff1660e01b81526004016119249190614dc3565b60006040518083038186803b15801561193c57600080fd5b505afa158015611950573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906119799190614178565b9250925092508181906119c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b99190614f89565b60405180910390fd5b50826080015160056000856060015161ffff1661ffff1681526020019081526020016000205414611a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1f9061500b565b60405180910390fd5b60036000846101400151815260200190815260200160002060009054906101000a900460ff1615611a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8590614feb565b60405180910390fd5b600160036000856101400151815260200190815260200160002060006101000a81548160ff0219169083151502179055508260e0015160049080519060200190611ad9929190612b5c565b5050505050565b60606009826000015183602001518460400151604051602001611b069493929190614a6f565b6040516020818303038152906040529050919050565b600181565b600080611ba36040518061012001604052808d67ffffffffffffffff1681526020018c67ffffffffffffffff1681526020018b67ffffffffffffffff168152602001600161ffff1681526020018981526020018a81526020018867ffffffffffffffff1681526020018767ffffffffffffffff1681526020018681525061265e565b9050611bc060008054906101000a900463ffffffff168285612820565b507fb990e0180c72d777b68e8d4a548d338f30d34dc396ce80ec59ac8c7ca2fd84cf8789868c60008054906101000a900463ffffffff16604051611c08959493929190614de5565b60405180910390a1600160008054906101000a900463ffffffff16611c2d91906151cb565b6000806101000a81548163ffffffff021916908363ffffffff160217905550509998505050505050505050565b600481565b6060600382600001518360200151604051602001611c7f939291906149d6565b6040516020818303038152906040529050919050565b80600560008461ffff1661ffff168152602001908152602001600020819055505050565b601181565b600080611d266040518061010001604052808c67ffffffffffffffff1681526020018b67ffffffffffffffff1681526020018a67ffffffffffffffff168152602001600161ffff16815260200188815260200189815260200187815260200186815250611f22565b9050611d4360008054906101000a900463ffffffff168285612820565b507f0f7c1e0ede20c46f43588d855dd35b9727a4878f40366a7096d0d0600fc6bebd8688878b60008054906101000a900463ffffffff16604051611d8b959493929190614de5565b60405180910390a1600160008054906101000a900463ffffffff16611db091906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505098975050505050505050565b600080611e136040518060a00160405280600161ffff16815260200189815260200188815260200187815260200186815250612404565b9050611e3060008054906101000a900463ffffffff168285612820565b507f65d46d0d756daa12e9317aa8d965accbb9e858754607e55b91e04da2346b05f0878760008054906101000a900463ffffffff16604051611e7493929190614e4d565b60405180910390a1600160008054906101000a900463ffffffff16611e9991906151cb565b6000806101000a81548163ffffffff021916908363ffffffff1602179055505095945050505050565b6000611ee060008054906101000a900463ffffffff16836001612820565b50600160008054906101000a900463ffffffff16611efe91906151cb565b6000