Skip to content

Commit

Permalink
docs(flash-swap): roll v1.5.0
Browse files Browse the repository at this point in the history
build(flash-swap): upgrade to "@hifi/protocol" v1.6.0
test(flash-swap): set collateral ceiling in the "uniswapV2Call" tests
  • Loading branch information
PaulRBerg committed Sep 24, 2021
1 parent d895c2e commit 0fcec79
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
12 changes: 12 additions & 0 deletions packages/flash-swap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.0] - 2021-09-24

### Changed

- Declutter README and add usage guides.
- Polish the NatSpec comments.
- Sync peer dependencies.
- Update year in LICENSE.
- Upgrade to `@hifi/protocol` v1.6.0.
- Upgrade to `@paulrberg/contracts` v3.6.0.

## [1.4.0] - 2021-09-16

### Added
Expand Down Expand Up @@ -82,6 +93,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- First release of the package.

[1.5.0]: https://github.com/hifi-finance/hifi/compare/@hifi/[email protected]...@hifi/[email protected]
[1.4.0]: https://github.com/hifi-finance/hifi/compare/@hifi/[email protected]...@hifi/[email protected]
[1.3.1]: https://github.com/hifi-finance/hifi/compare/@hifi/[email protected]...@hifi/[email protected]
[1.3.0]: https://github.com/hifi-finance/hifi/compare/@hifi/[email protected]...@hifi/[email protected]
Expand Down
8 changes: 4 additions & 4 deletions packages/flash-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hifi/flash-swap",
"description": "Flash swap implementations for liquidating underwater accounts",
"version": "1.4.0",
"version": "1.5.0",
"author": {
"name": "Hifi",
"email": "[email protected]",
Expand All @@ -11,7 +11,7 @@
"url": "https://github.com/hifi-finance/hifi/issues"
},
"dependencies": {
"@hifi/protocol": "1.5.0",
"@hifi/protocol": "1.6.0",
"@paulrberg/contracts": "3.6.0",
"@uniswap/v2-core": "1.0.1",
"ethers": "^5.4.7"
Expand Down Expand Up @@ -81,10 +81,10 @@
],
"license": "LGPL-3.0-or-later",
"peerDependencies": {
"@hifi/protocol": "1.5.0",
"@hifi/protocol": "1.6.0",
"@paulrberg/contracts": "3.6.0",
"@uniswap/v2-core": "1.0.1",
"ethers": "^5.4.6"
"ethers": "^5.4.7"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,12 @@ export default function shouldBehaveLikeUniswapV2Call(): void {
context("when underlying is flash borrowed", function () {
const borrowAmount: BigNumber = hUSDC("10000");
const collateralAmount: BigNumber = Zero;
const collateralCeiling: BigNumber = WBTC("100");
const debtCeiling: BigNumber = hUSDC("1e6");
const liquidationIncentive: BigNumber = fp("1.10");
const underlyingAmount: BigNumber = USDC("10000");
const wbtcDepositAmount: BigNumber = WBTC("1");

let token0Amount: BigNumber;
let token1Amount: BigNumber;

Expand All @@ -178,6 +180,11 @@ export default function shouldBehaveLikeUniswapV2Call(): void {
.connect(this.signers.admin)
.setLiquidationIncentive(this.contracts.wbtc.address, liquidationIncentive);

// Set the collateral ceiling.
await this.contracts.fintroller
.connect(this.signers.admin)
.setCollateralCeiling(this.contracts.wbtc.address, collateralCeiling);

// Set the debt ceiling.
await this.contracts.fintroller
.connect(this.signers.admin)
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ __metadata:
"@ethersproject/keccak256": ^5.4.0
"@ethersproject/providers": ^5.4.5
"@hifi/helpers": "workspace:*"
"@hifi/protocol": 1.5.0
"@hifi/protocol": 1.6.0
"@nomiclabs/hardhat-ethers": ^2.0.2
"@nomiclabs/hardhat-etherscan": ^2.1.6
"@nomiclabs/hardhat-waffle": ^2.0.1
Expand Down Expand Up @@ -1112,10 +1112,10 @@ __metadata:
typechain: ^5.1.2
typescript: ^4.4.3
peerDependencies:
"@hifi/protocol": 1.5.0
"@hifi/protocol": 1.6.0
"@paulrberg/contracts": 3.6.0
"@uniswap/v2-core": 1.0.1
ethers: ^5.4.6
ethers: ^5.4.7
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 0fcec79

Please sign in to comment.