proposal-47/contracts/Proposal.sol

27 lines
970 B
Solidity
Raw Permalink Normal View History

2024-01-31 15:04:44 +03:00
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "./libraries/Types.sol";
import "./interfaces/IERC20.sol";
import { ISablierAirdrop } from "./interfaces/ISablierAirdrop.sol"; // copied from proposal 28
contract Proposal {
IERC20 public constant torn = IERC20(0x77777FeDdddFfC19Ff86DB637967013e6C6A116C);
ISablierAirdrop public immutable airdrop;
2024-02-10 21:43:54 +03:00
address public immutable airdropRecipientStorage;
2024-01-31 15:04:44 +03:00
uint256 public constant airdropDuration = 180 days;
2024-02-10 21:43:54 +03:00
constructor(address _airdropContract, address _airdropRecipientsStorage) {
2024-01-31 15:04:44 +03:00
airdrop = ISablierAirdrop(_airdropContract);
2024-02-10 21:43:54 +03:00
airdropRecipientStorage = _airdropRecipientsStorage;
2024-01-31 15:04:44 +03:00
}
2024-02-10 21:43:54 +03:00
function executeProposal() public {
2024-01-31 15:04:44 +03:00
torn.transfer(address(airdrop), 1000000 ether);
uint256 startTime = block.timestamp;
uint256 endTime = startTime + airdropDuration;
2024-02-10 21:43:54 +03:00
airdrop.createAirdrop(startTime, endTime, airdropRecipientStorage);
2024-01-31 15:04:44 +03:00
}
}