Skip to content

Commit

Permalink
Revert "Pausing token transfers upon pausing the protocol" (#413)
Browse files Browse the repository at this point in the history
This reverts commit 2c94f79.

Reverts PR #388 We do not want to
pause already minted `stBTC` transfers upon pausing Acre protocol.
  • Loading branch information
nkuba authored May 10, 2024
2 parents 28ca212 + 7c056eb commit 6663456
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
15 changes: 0 additions & 15 deletions solidity/contracts/stBTC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -355,21 +355,6 @@ contract stBTC is ERC4626Fees, PausableOwnable {
return convertToAssets(balanceOf(account));
}

/// @dev Transfers a `value` amount of tokens from `from` to `to`, or
/// alternatively mints (or burns) if `from` (or `to`) is the zero
/// address. All customizations to transfers, mints, and burns should
/// be done by overriding this function.
/// @param from Sender of tokens.
/// @param to Receiver of tokens.
/// @param value Amount of tokens to transfer.
function _update(
address from,
address to,
uint256 value
) internal override whenNotPaused {
super._update(from, to, value);
}

/// @return Returns entry fee basis point used in deposits.
function _entryFeeBasisPoints() internal view override returns (uint256) {
return entryFeeBasisPoints;
Expand Down
19 changes: 0 additions & 19 deletions solidity/test/stBTC.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1868,25 +1868,6 @@ describe("stBTC", () => {
it("should return 0 when calling maxWithdraw", async () => {
expect(await stbtc.maxWithdraw(depositor1)).to.be.eq(0)
})

it("should pause transfers", async () => {
await expect(
stbtc.connect(depositor1).transfer(depositor2, amount),
).to.be.revertedWithCustomError(stbtc, "EnforcedPause")
})

it("should pause transfersFrom", async () => {
await expect(
stbtc
.connect(depositor1)
.approve(depositor2.address, amount)
.then(() =>
stbtc
.connect(depositor2)
.transferFrom(depositor1, depositor2, amount),
),
).to.be.revertedWithCustomError(stbtc, "EnforcedPause")
})
})
})

Expand Down

0 comments on commit 6663456

Please sign in to comment.