dgf-prototype/ethereum/contracts/DAO.sol

34 lines
1.0 KiB
Solidity

// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.24;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./core/Reputation.sol";
import "./core/ValidationPools.sol";
import "./core/Forum.sol";
import "./interfaces/IAcceptAvailability.sol";
import "hardhat/console.sol";
// TODO: consider dynamically constructing contract instances rather than merging at build time
contract DAO is Reputation, Forum, ValidationPools {
/// Transfer REP to a contract, and call that contract's receiveTransfer method
function stakeAvailability(
address to,
uint256 value,
uint duration
) external returns (bool) {
_approve(msg.sender, to, value);
IAcceptAvailability(to).acceptAvailability(msg.sender, value, duration);
return true;
}
}
/// Convenience contract to extend for other contracts that will be initialized to
/// interact with a DAO contract.
contract DAOContract {
DAO immutable dao;
constructor(DAO dao_) {
dao = dao_;
}
}