-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSHTModule.sol
More file actions
26 lines (22 loc) · 944 Bytes
/
Copy pathSHTModule.sol
File metadata and controls
26 lines (22 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "../../lib/TokenPayments.sol";
import "./SHT.sol";
/// @title SHTModule
/// @dev This contract manages the Smart Housing Token (SHT) within the platform.
/// It includes functionalities for making payments in SHT and querying the SHT token ID.
abstract contract SHTModule is ERC20, ERC20Burnable {
function decimals() public pure override returns (uint8) {
return uint8(SHT.DECIMALS);
}
/// @dev Makes an ERC20TokenPayment struct in SHT for and amount.
/// @param shtAmount Amount of SHT to be sent.
/// @return payment ERC20TokenPayment struct representing the payment.
function _makeSHTPayment(
uint256 shtAmount
) internal view returns (ERC20TokenPayment memory) {
return ERC20TokenPayment(IERC20(address(this)), shtAmount);
}
}