@catalabs/catalyst-sdk
Version:
Catalyst AMM SDK
816 lines • 21.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Garp__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
{
type: 'function',
name: 'bounty',
inputs: [
{
name: 'fromApplication',
type: 'address',
internalType: 'address',
},
{
name: 'destinationIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
],
outputs: [
{
name: 'incentive',
type: 'tuple',
internalType: 'struct IMessageEscrowStructs.IncentiveDescription',
components: [
{
name: 'maxGasDelivery',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'maxGasAck',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'refundGasTo',
type: 'address',
internalType: 'address',
},
{
name: 'priceOfDeliveryGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'priceOfAckGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'targetDelta',
type: 'uint64',
internalType: 'uint64',
},
],
},
],
stateMutability: 'view',
},
{
type: 'function',
name: 'estimateAdditionalCost',
inputs: [
{
name: 'destinationChainIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
],
outputs: [
{
name: 'asset',
type: 'address',
internalType: 'address',
},
{
name: 'amount',
type: 'uint256',
internalType: 'uint256',
},
],
stateMutability: 'view',
},
{
type: 'function',
name: 'estimateAdditionalCost',
inputs: [],
outputs: [
{
name: 'asset',
type: 'address',
internalType: 'address',
},
{
name: 'amount',
type: 'uint256',
internalType: 'uint256',
},
],
stateMutability: 'view',
},
{
type: 'function',
name: 'increaseBounty',
inputs: [
{
name: 'fromApplication',
type: 'address',
internalType: 'address',
},
{
name: 'destinationIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'priceOfDeliveryGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'priceOfAckGas',
type: 'uint96',
internalType: 'uint96',
},
],
outputs: [],
stateMutability: 'payable',
},
{
type: 'function',
name: 'messageDelivered',
inputs: [
{
name: 'sourceIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'sourceImplementationIdentifier',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'messageIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
],
outputs: [
{
name: 'hasMessageBeenExecuted',
type: 'bytes32',
internalType: 'bytes32',
},
],
stateMutability: 'view',
},
{
type: 'function',
name: 'processPacket',
inputs: [
{
name: 'messagingProtocolContext',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'message',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'feeRecipient',
type: 'bytes32',
internalType: 'bytes32',
},
],
outputs: [],
stateMutability: 'payable',
},
{
type: 'function',
name: 'reemitAckMessage',
inputs: [
{
name: 'sourceIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'implementationIdentifier',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'receiveAckWithContext',
type: 'bytes',
internalType: 'bytes',
},
],
outputs: [],
stateMutability: 'payable',
},
{
type: 'function',
name: 'setRemoteImplementation',
inputs: [
{
name: 'chainIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'implementation',
type: 'bytes',
internalType: 'bytes',
},
],
outputs: [],
stateMutability: 'nonpayable',
},
{
type: 'function',
name: 'submitMessage',
inputs: [
{
name: 'destinationIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'destinationAddress',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'message',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'incentive',
type: 'tuple',
internalType: 'struct IMessageEscrowStructs.IncentiveDescription',
components: [
{
name: 'maxGasDelivery',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'maxGasAck',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'refundGasTo',
type: 'address',
internalType: 'address',
},
{
name: 'priceOfDeliveryGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'priceOfAckGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'targetDelta',
type: 'uint64',
internalType: 'uint64',
},
],
},
{
name: 'deadline',
type: 'uint64',
internalType: 'uint64',
},
],
outputs: [
{
name: 'gasRefund',
type: 'uint256',
internalType: 'uint256',
},
{
name: 'messageIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
],
stateMutability: 'payable',
},
{
type: 'function',
name: 'timeoutMessage',
inputs: [
{
name: 'sourceIdentifier',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'implementationIdentifier',
type: 'bytes',
internalType: 'bytes',
},
{
name: 'originBlockNumber',
type: 'uint256',
internalType: 'uint256',
},
{
name: 'message',
type: 'bytes',
internalType: 'bytes',
},
],
outputs: [],
stateMutability: 'payable',
},
{
type: 'event',
name: 'BountyClaimed',
inputs: [
{
name: 'destinationImplementation',
type: 'bytes',
indexed: true,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: true,
internalType: 'bytes32',
},
{
name: 'gasSpentOnDestination',
type: 'uint64',
indexed: false,
internalType: 'uint64',
},
{
name: 'gasSpentOnSource',
type: 'uint64',
indexed: false,
internalType: 'uint64',
},
{
name: 'destinationRelayerReward',
type: 'uint128',
indexed: false,
internalType: 'uint128',
},
{
name: 'sourceRelayerReward',
type: 'uint128',
indexed: false,
internalType: 'uint128',
},
],
anonymous: false,
},
{
type: 'event',
name: 'BountyIncreased',
inputs: [
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: true,
internalType: 'bytes32',
},
{
name: 'newDeliveryGasPrice',
type: 'uint96',
indexed: false,
internalType: 'uint96',
},
{
name: 'newAckGasPrice',
type: 'uint96',
indexed: false,
internalType: 'uint96',
},
],
anonymous: false,
},
{
type: 'event',
name: 'BountyPlaced',
inputs: [
{
name: 'destinationImplementation',
type: 'bytes',
indexed: true,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: true,
internalType: 'bytes32',
},
{
name: 'incentive',
type: 'tuple',
indexed: false,
internalType: 'struct IMessageEscrowStructs.IncentiveDescription',
components: [
{
name: 'maxGasDelivery',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'maxGasAck',
type: 'uint48',
internalType: 'uint48',
},
{
name: 'refundGasTo',
type: 'address',
internalType: 'address',
},
{
name: 'priceOfDeliveryGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'priceOfAckGas',
type: 'uint96',
internalType: 'uint96',
},
{
name: 'targetDelta',
type: 'uint64',
internalType: 'uint64',
},
],
},
],
anonymous: false,
},
{
type: 'event',
name: 'MessageAcked',
inputs: [
{
name: 'destinationImplementation',
type: 'bytes',
indexed: false,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
],
anonymous: false,
},
{
type: 'event',
name: 'MessageDelivered',
inputs: [
{
name: 'sourceImplementation',
type: 'bytes',
indexed: true,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: true,
internalType: 'bytes32',
},
],
anonymous: false,
},
{
type: 'event',
name: 'MessageTimedOut',
inputs: [
{
name: 'destinationImplementation',
type: 'bytes',
indexed: false,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
],
anonymous: false,
},
{
type: 'event',
name: 'RemoteImplementationSet',
inputs: [
{
name: 'application',
type: 'address',
indexed: false,
internalType: 'address',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'implementationAddressHash',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'implementationAddress',
type: 'bytes',
indexed: false,
internalType: 'bytes',
},
],
anonymous: false,
},
{
type: 'event',
name: 'TimeoutInitiated',
inputs: [
{
name: 'sourceImplementation',
type: 'bytes',
indexed: false,
internalType: 'bytes',
},
{
name: 'chainIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
{
name: 'messageIdentifier',
type: 'bytes32',
indexed: false,
internalType: 'bytes32',
},
],
anonymous: false,
},
{
type: 'error',
name: 'AckHasNotBeenExecuted',
inputs: [],
},
{
type: 'error',
name: 'CannotRetryWrongMessage',
inputs: [
{
name: '',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: '',
type: 'bytes32',
internalType: 'bytes32',
},
],
},
{
type: 'error',
name: 'DeadlineInPast',
inputs: [
{
name: 'blocktimestamp',
type: 'uint64',
internalType: 'uint64',
},
{
name: 'actual',
type: 'uint64',
internalType: 'uint64',
},
],
},
{
type: 'error',
name: 'DeadlineNotPassed',
inputs: [
{
name: 'expected',
type: 'uint64',
internalType: 'uint64',
},
{
name: 'actual',
type: 'uint64',
internalType: 'uint64',
},
],
},
{
type: 'error',
name: 'DeadlineTooLong',
inputs: [
{
name: 'maxAllowed',
type: 'uint64',
internalType: 'uint64',
},
{
name: 'actual',
type: 'uint64',
internalType: 'uint64',
},
],
},
{
type: 'error',
name: 'FeeRecipientIsZero',
inputs: [],
},
{
type: 'error',
name: 'ImplementationAddressAlreadySet',
inputs: [
{
name: 'currentImplementation',
type: 'bytes',
internalType: 'bytes',
},
],
},
{
type: 'error',
name: 'IncorrectValueProvided',
inputs: [
{
name: 'expected',
type: 'uint128',
internalType: 'uint128',
},
{
name: 'actual',
type: 'uint128',
internalType: 'uint128',
},
],
},
{
type: 'error',
name: 'InvalidImplementationAddress',
inputs: [],
},
{
type: 'error',
name: 'InvalidTimeoutPackage',
inputs: [
{
name: 'expected',
type: 'bytes32',
internalType: 'bytes32',
},
{
name: 'actual',
type: 'bytes32',
internalType: 'bytes32',
},
],
},
{
type: 'error',
name: 'MessageAlreadyAcked',
inputs: [],
},
{
type: 'error',
name: 'MessageAlreadyBountied',
inputs: [],
},
{
type: 'error',
name: 'MessageAlreadyProcessed',
inputs: [],
},
{
type: 'error',
name: 'MessageAlreadySpent',
inputs: [],
},
{
type: 'error',
name: 'MessageDoesNotExist',
inputs: [],
},
{
type: 'error',
name: 'MessageHasInvalidContext',
inputs: [],
},
{
type: 'error',
name: 'NoImplementationAddressSet',
inputs: [],
},
{
type: 'error',
name: 'NotEnoughGasExecution',
inputs: [],
},
{
type: 'error',
name: 'NotEnoughGasProvided',
inputs: [
{
name: 'expected',
type: 'uint128',
internalType: 'uint128',
},
{
name: 'actual',
type: 'uint128',
internalType: 'uint128',
},
],
},
{
type: 'error',
name: 'NotImplementedError',
inputs: [],
},
{
type: 'error',
name: 'RefundGasToIsZero',
inputs: [],
},
{
type: 'error',
name: 'RouteDisabled',
inputs: [],
},
{
type: 'error',
name: 'SendLostGasToIsZero',
inputs: [],
},
];
class Garp__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.Garp__factory = Garp__factory;
//# sourceMappingURL=Garp__factory.js.map