proposal-47/contracts/interfaces/ISablierAirdrop.sol

57 lines
1.6 KiB
Solidity
Raw Normal View History

2024-01-31 15:04:44 +03:00
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.17;
pragma experimental ABIEncoderV2;
import "../libraries/Types.sol";
interface ISablierAirdrop {
/**
* @notice Emits when a stream is successfully created.
*/
event CreateStream(
uint256 indexed streamId,
address indexed recipient,
uint256 deposit,
uint256 initialLockedBalance,
uint256 startTime,
uint256 stopTime
);
/**
* @notice Emits when the recipient of a stream withdraws a portion or all their pro rata share of the stream.
*/
event WithdrawFromStream(uint256 indexed streamId, address indexed recipient, uint256 amount);
/**
* @notice Emits when a stream is successfully cancelled and tokens are transferred back on a pro rata basis.
*/
event CancelStream(uint256 indexed streamId, address indexed recipient, uint256 remainingBalance);
function balanceOf(uint256 streamId, address who) external view returns (uint256 balance);
function getStream(
uint256 streamId
)
external
view
returns (
address recipient,
uint256 deposit,
uint256 startTime,
uint256 stopTime,
uint256 remainingBalance,
uint256 ratePerSecond
);
function createAirdrop(
Types.Recipient[] calldata recipients,
uint256 startTime,
uint256 stopTime
) external returns (bool);
function withdrawFromStream(uint256 streamId, uint256 funds) external returns (bool);
function cancelStream(uint256 streamId) external returns (bool);
}