Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Pausing token transfers upon pausing the protocol" #413

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading