-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Difficulty: mediumcairoenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
Description
Implement an emergency exit mechanism for owner to withdraw all funds if contract is paused.
Tasks
Function emergency_withdraw(token: ContractAddress, to: ContractAddress):
Ensure contract is paused.
Use ERC20 balanceOf to get full balance of this contract.
Transfer full balance to to.
Emit EmergencyWithdrawal event.
Acceptance Criteria
Only callable by owner.
Only works when contract is paused.
Transfers full balance of given token to destination.
Event emitted with correct values.
Unit test verifying normal users cannot call this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Difficulty: mediumcairoenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week