-
Notifications
You must be signed in to change notification settings - Fork 19
/
TradeTrustToken.sol
56 lines (50 loc) · 1.46 KB
/
TradeTrustToken.sol
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import "./base/TradeTrustTokenBase.sol";
/**
* @title TradeTrustToken
*/
contract TradeTrustToken is TradeTrustTokenBase {
address internal immutable _titleEscrowFactory;
uint256 internal immutable _genesis;
/**
* @notice Creates a new TradeTrustToken contract.
* @param name The name of the token.
* @param symbol The symbol of the token.
* @param titleEscrowFactory_ The address of the TitleEscrowFactory contract.
*/
constructor(
string memory name,
string memory symbol,
address titleEscrowFactory_
) {
_genesis = block.number;
_titleEscrowFactory = titleEscrowFactory_;
initialize(name, symbol, _msgSender());
}
/**
* @notice Initializes the TradeTrustToken with the provided name, symbol, and admin address.
* @param name The name of the token.
* @param symbol The symbol of the token.
* @param admin The address of the admin.
*/
function initialize(
string memory name,
string memory symbol,
address admin
) internal initializer {
__TradeTrustTokenBase_init(name, symbol, admin);
}
/**
* @dev See {ITradeTrustSBT-titleEscrowFactory}.
*/
function titleEscrowFactory() public view override returns (ITitleEscrowFactory) {
return ITitleEscrowFactory(_titleEscrowFactory);
}
/**
* @dev See {ITradeTrustSBT-genesis}.
*/
function genesis() public view override returns (uint256) {
return _genesis;
}
}