-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tasks: fix depositor for native tokens
- Loading branch information
1 parent
09ba939
commit 109522f
Showing
3 changed files
with
339 additions
and
91 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
packages/tasks/contracts/interfaces/primitives/IDepositor.sol
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,63 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
pragma solidity >=0.8.0; | ||
|
||
import '../ITask.sol'; | ||
|
||
/** | ||
* @dev Depositor task interface | ||
*/ | ||
interface IDepositor is ITask { | ||
/** | ||
* @dev The token is zero | ||
*/ | ||
error TaskTokenZero(); | ||
|
||
/** | ||
* @dev The amount is zero | ||
*/ | ||
error TaskAmountZero(); | ||
|
||
/** | ||
* @dev The msg value is zero | ||
*/ | ||
error TaskValueZero(); | ||
|
||
/** | ||
* @dev The previous balance connector is not zero | ||
*/ | ||
error TaskPreviousConnectorNotZero(bytes32 id); | ||
|
||
/** | ||
* @dev The tokens source to be set is not the contract itself | ||
*/ | ||
error TaskDepositorBadTokensSource(address tokensSource); | ||
|
||
/** | ||
* @dev Emitted every time the tokens source is set | ||
*/ | ||
event TokensSourceSet(address indexed tokensSource); | ||
|
||
/** | ||
* @dev Sets the tokens source address | ||
* @param tokensSource Address of the tokens source to be set | ||
*/ | ||
function setTokensSource(address tokensSource) external; | ||
|
||
/** | ||
* @dev Executes the withdrawer task | ||
*/ | ||
function call(address token, uint256 amount) external; | ||
} |
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
Oops, something went wrong.