-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fixed price liquidation contracts to liquidator bot
- Loading branch information
1 parent
b9ed173
commit 1cd1da9
Showing
3 changed files
with
277 additions
and
33 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
packages/library/src/abis/FixedPriceLiquidationPairFactoryAbi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
export const FixedPriceLiquidationPairFactoryAbi = [ | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: 'contract FixedPriceLiquidationPair', | ||
name: 'pair', | ||
type: 'address', | ||
}, | ||
{ | ||
indexed: false, | ||
internalType: 'contract ILiquidationSource', | ||
name: 'source', | ||
type: 'address', | ||
}, | ||
{ indexed: true, internalType: 'address', name: 'tokenIn', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'tokenOut', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'targetAuctionPrice', type: 'uint256' }, | ||
{ indexed: false, internalType: 'uint256', name: 'smoothingFactor', type: 'uint256' }, | ||
], | ||
name: 'PairCreated', | ||
type: 'event', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
name: 'allPairs', | ||
outputs: [{ internalType: 'contract FixedPriceLiquidationPair', name: '', type: 'address' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'contract ILiquidationSource', name: '_source', type: 'address' }, | ||
{ internalType: 'address', name: '_tokenIn', type: 'address' }, | ||
{ internalType: 'address', name: '_tokenOut', type: 'address' }, | ||
{ internalType: 'uint256', name: '_targetAuctionPrice', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '_smoothingFactor', type: 'uint256' }, | ||
], | ||
name: 'createPair', | ||
outputs: [{ internalType: 'contract FixedPriceLiquidationPair', name: '', type: 'address' }], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'address', name: 'pair', type: 'address' }], | ||
name: 'deployedPairs', | ||
outputs: [{ internalType: 'bool', name: 'wasDeployed', type: 'bool' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'totalPairs', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
]; |
109 changes: 109 additions & 0 deletions
109
packages/library/src/abis/FixedPriceLiquidationRouterAbi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
export const FixedPriceLiquidationRouterAbi = [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: 'contract FixedPriceLiquidationPairFactory', | ||
name: 'liquidationPairFactory_', | ||
type: 'address', | ||
}, | ||
], | ||
stateMutability: 'nonpayable', | ||
type: 'constructor', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'address', name: 'target', type: 'address' }], | ||
name: 'AddressEmptyCode', | ||
type: 'error', | ||
}, | ||
{ inputs: [], name: 'FailedCall', type: 'error' }, | ||
{ | ||
inputs: [ | ||
{ internalType: 'uint256', name: 'balance', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'needed', type: 'uint256' }, | ||
], | ||
name: 'InsufficientBalance', | ||
type: 'error', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'address', name: 'sender', type: 'address' }], | ||
name: 'InvalidSender', | ||
type: 'error', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'address', name: 'token', type: 'address' }], | ||
name: 'SafeERC20FailedOperation', | ||
type: 'error', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'uint256', name: 'deadline', type: 'uint256' }], | ||
name: 'SwapExpired', | ||
type: 'error', | ||
}, | ||
{ inputs: [], name: 'UndefinedFixedPriceLiquidationPairFactory', type: 'error' }, | ||
{ | ||
inputs: [{ internalType: 'address', name: 'liquidationPair', type: 'address' }], | ||
name: 'UnknownFixedPriceLiquidationPair', | ||
type: 'error', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: 'contract FixedPriceLiquidationPairFactory', | ||
name: 'liquidationPairFactory', | ||
type: 'address', | ||
}, | ||
], | ||
name: 'LiquidationRouterCreated', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: 'contract FixedPriceLiquidationPair', | ||
name: 'liquidationPair', | ||
type: 'address', | ||
}, | ||
{ indexed: true, internalType: 'address', name: 'sender', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'receiver', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountOut', type: 'uint256' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountInMax', type: 'uint256' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountIn', type: 'uint256' }, | ||
{ indexed: false, internalType: 'uint256', name: 'deadline', type: 'uint256' }, | ||
], | ||
name: 'SwappedExactAmountOut', | ||
type: 'event', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: '_sender', type: 'address' }, | ||
{ internalType: 'uint256', name: '_amountIn', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '', type: 'uint256' }, | ||
{ internalType: 'bytes', name: '_flashSwapData', type: 'bytes' }, | ||
], | ||
name: 'flashSwapCallback', | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: 'contract FixedPriceLiquidationPair', | ||
name: '_liquidationPair', | ||
type: 'address', | ||
}, | ||
{ internalType: 'address', name: '_receiver', type: 'address' }, | ||
{ internalType: 'uint256', name: '_amountOut', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '_amountInMax', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '_deadline', type: 'uint256' }, | ||
], | ||
name: 'swapExactAmountOut', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters