@catalabs/catalyst-sdk
Version:
Catalyst AMM SDK
838 lines • 20.3 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CrosschainInterface__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
{
inputs: [
{
internalType: 'address',
name: 'GARP_',
type: 'address',
},
{
internalType: 'address',
name: 'defaultOwner',
type: 'address',
},
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [],
name: 'ChainAlreadySetup',
type: 'error',
},
{
inputs: [],
name: 'InvalidAddress',
type: 'error',
},
{
inputs: [],
name: 'InvalidBytes65Address',
type: 'error',
},
{
inputs: [],
name: 'InvalidCaller',
type: 'error',
},
{
inputs: [
{
internalType: 'bytes1',
name: 'context',
type: 'bytes1',
},
],
name: 'InvalidContext',
type: 'error',
},
{
inputs: [],
name: 'InvalidSourceApplication',
type: 'error',
},
{
inputs: [],
name: 'MaliciousVault',
type: 'error',
},
{
inputs: [],
name: 'MaxUnderwriteDurationTooLong',
type: 'error',
},
{
inputs: [],
name: 'MaxUnderwriteDurationTooShort',
type: 'error',
},
{
inputs: [],
name: 'NoVaultConnection',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'expected',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'actual',
type: 'uint256',
},
],
name: 'NotEnoughIncentives',
type: 'error',
},
{
inputs: [],
name: 'SubcallOutOfGas',
type: 'error',
},
{
inputs: [],
name: 'SwapAlreadyUnderwritten',
type: 'error',
},
{
inputs: [],
name: 'SwapRecentlyUnderwritten',
type: 'error',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
],
name: 'UnderwriteDoesNotExist',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'blocksUnitilExpiry',
type: 'uint256',
},
],
name: 'UnderwriteNotExpired',
type: 'error',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
{
indexed: false,
internalType: 'address',
name: 'expirer',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'reward',
type: 'uint256',
},
],
name: 'ExpireUnderwrite',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
],
name: 'FulfillUnderwrite',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'newMaxUnderwriteDuration',
type: 'uint256',
},
],
name: 'MaxUnderwriteDuration',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
{
indexed: false,
internalType: 'uint48',
name: 'minGas',
type: 'uint48',
},
],
name: 'MinGasFor',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes32',
name: 'chainIdentifier',
type: 'bytes32',
},
{
indexed: false,
internalType: 'bytes',
name: 'remoteCCI',
type: 'bytes',
},
{
indexed: false,
internalType: 'bytes',
name: 'remoteGARP',
type: 'bytes',
},
],
name: 'RemoteImplementationSet',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes1',
name: 'error',
type: 'bytes1',
},
],
name: 'SwapFailed',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
{
indexed: true,
internalType: 'address',
name: 'underwriter',
type: 'address',
},
{
indexed: false,
internalType: 'uint96',
name: 'expiry',
type: 'uint96',
},
{
indexed: false,
internalType: 'address',
name: 'targetVault',
type: 'address',
},
{
indexed: false,
internalType: 'address',
name: 'toAsset',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'U',
type: 'uint256',
},
{
indexed: false,
internalType: 'address',
name: 'toAccount',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'outAmount',
type: 'uint256',
},
],
name: 'SwapUnderwritten',
type: 'event',
},
{
inputs: [],
name: 'EXPIRE_CALLER_REWARD',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'EXPIRE_CALLER_REWARD_DENOMINATOR',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'GARP',
outputs: [
{
internalType: 'contract IIncentivizedMessageEscrow',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'UNDERWRITING_COLLATORAL',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'UNDERWRITING_COLLATORAL_DENOMINATOR',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
name: 'chainIdentifierToDestinationAddress',
outputs: [
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'chainIdentifier',
type: 'bytes32',
},
{
internalType: 'bytes',
name: 'remoteCCI',
type: 'bytes',
},
{
internalType: 'bytes',
name: 'remoteGARP',
type: 'bytes',
},
],
name: 'connectNewChain',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'evmAddress',
type: 'address',
},
],
name: 'convertEVMTo65',
outputs: [
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
stateMutability: 'pure',
type: 'function',
},
{
inputs: [],
name: 'estimateAdditionalCost',
outputs: [
{
internalType: 'address',
name: 'asset',
type: 'address',
},
{
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'targetVault',
type: 'address',
},
{
internalType: 'address',
name: 'toAsset',
type: 'address',
},
{
internalType: 'uint256',
name: 'U',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'minOut',
type: 'uint256',
},
{
internalType: 'address',
name: 'toAccount',
type: 'address',
},
{
internalType: 'uint16',
name: 'underwriteIncentiveX16',
type: 'uint16',
},
{
internalType: 'bytes',
name: 'cdata',
type: 'bytes',
},
],
name: 'expireUnderwrite',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'targetVault',
type: 'address',
},
{
internalType: 'address',
name: 'toAsset',
type: 'address',
},
{
internalType: 'uint256',
name: 'U',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'minOut',
type: 'uint256',
},
{
internalType: 'address',
name: 'toAccount',
type: 'address',
},
{
internalType: 'uint16',
name: 'underwriteIncentiveX16',
type: 'uint16',
},
{
internalType: 'bytes',
name: 'cdata',
type: 'bytes',
},
],
name: 'getUnderwriteIdentifier',
outputs: [
{
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
],
stateMutability: 'pure',
type: 'function',
},
{
inputs: [],
name: 'maxUnderwritingDuration',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
name: 'minGasFor',
outputs: [
{
internalType: 'uint48',
name: '',
type: 'uint48',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'destinationIdentifier',
type: 'bytes32',
},
{
internalType: 'bytes32',
name: 'messageIdentifier',
type: 'bytes32',
},
{
internalType: 'bytes',
name: 'acknowledgement',
type: 'bytes',
},
],
name: 'receiveAck',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'sourceIdentifier',
type: 'bytes32',
},
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
{
internalType: 'bytes',
name: 'fromApplication',
type: 'bytes',
},
{
internalType: 'bytes',
name: 'message',
type: 'bytes',
},
],
name: 'receiveMessage',
outputs: [
{
internalType: 'bytes',
name: 'acknowledgement',
type: 'bytes',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: 'newMaxUnderwriteDuration',
type: 'uint256',
},
],
name: 'setMaxUnderwritingDuration',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'chainIdentifier',
type: 'bytes32',
},
{
internalType: 'uint48',
name: 'minGas',
type: 'uint48',
},
],
name: 'setMinGasFor',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'thisBytes65',
outputs: [
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: 'targetVault',
type: 'address',
},
{
internalType: 'address',
name: 'toAsset',
type: 'address',
},
{
internalType: 'uint256',
name: 'U',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'minOut',
type: 'uint256',
},
{
internalType: 'address',
name: 'toAccount',
type: 'address',
},
{
internalType: 'uint16',
name: 'underwriteIncentiveX16',
type: 'uint16',
},
{
internalType: 'bytes',
name: 'cdata',
type: 'bytes',
},
],
name: 'underwrite',
outputs: [
{
internalType: 'bytes32',
name: 'identifier',
type: 'bytes32',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: 'sourceIdentifier',
type: 'bytes32',
},
{
internalType: 'bytes',
name: 'fromVault',
type: 'bytes',
},
{
internalType: 'address',
name: 'targetVault',
type: 'address',
},
{
internalType: 'address',
name: 'toAsset',
type: 'address',
},
{
internalType: 'uint256',
name: 'U',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'minOut',
type: 'uint256',
},
{
internalType: 'address',
name: 'toAccount',
type: 'address',
},
{
internalType: 'uint16',
name: 'underwriteIncentiveX16',
type: 'uint16',
},
{
internalType: 'bytes',
name: 'cdata',
type: 'bytes',
},
],
name: 'underwriteAndCheckConnection',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes32',
name: '',
type: 'bytes32',
},
],
name: 'underwritingStorage',
outputs: [
{
internalType: 'uint256',
name: 'tokens',
type: 'uint256',
},
{
internalType: 'address',
name: 'refundTo',
type: 'address',
},
{
internalType: 'uint96',
name: 'expiry',
type: 'uint96',
},
],
stateMutability: 'view',
type: 'function',
},
];
class CrosschainInterface__factory {
static abi = _abi;
static createInterface() {
return new ethers_1.Interface(_abi);
}
static connect(address, runner) {
return new ethers_1.Contract(address, _abi, runner);
}
}
exports.CrosschainInterface__factory = CrosschainInterface__factory;
//# sourceMappingURL=CrosschainInterface__factory.js.map