/
ITerminalV1_1.sol
182 lines (147 loc) · 4.41 KB
/
ITerminalV1_1.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import './ITicketBooth.sol';
import './IFundingCycles.sol';
import './IYielder.sol';
import './IProjects.sol';
import './IModStore.sol';
import './ITerminal.sol';
import './IOperatorStore.sol';
import './ITreasuryExtension.sol';
struct FundingCycleMetadata2 {
uint256 reservedRate;
uint256 bondingCurveRate;
uint256 reconfigurationBondingCurveRate;
bool payIsPaused;
bool ticketPrintingIsAllowed;
ITreasuryExtension treasuryExtension;
}
interface ITerminalV1_1 {
event Pay(
uint256 indexed fundingCycleId,
uint256 indexed projectId,
address indexed beneficiary,
uint256 amount,
uint256 beneficiaryTokens,
uint256 totalTokens,
string note,
address caller
);
event AddToBalance(uint256 indexed projectId, uint256 value, address caller);
event AllowMigration(ITerminal allowed);
event Migrate(uint256 indexed projectId, ITerminal indexed to, uint256 _amount, address caller);
event Configure(uint256 indexed fundingCycleId, uint256 indexed projectId, address caller);
event Tap(
uint256 indexed fundingCycleId,
uint256 indexed projectId,
address indexed beneficiary,
uint256 amount,
uint256 currency,
uint256 netTransferAmount,
uint256 beneficiaryTransferAmount,
uint256 govFeeAmount,
address caller
);
event Redeem(
address indexed holder,
address indexed beneficiary,
uint256 indexed _projectId,
uint256 amount,
uint256 returnAmount,
address caller
);
event PrintReserveTickets(
uint256 indexed fundingCycleId,
uint256 indexed projectId,
address indexed beneficiary,
uint256 count,
uint256 beneficiaryTicketAmount,
address caller
);
event DistributeToPayoutMod(
uint256 indexed fundingCycleId,
uint256 indexed projectId,
PayoutMod mod,
uint256 modCut,
address caller
);
event DistributeToTicketMod(
uint256 indexed fundingCycleId,
uint256 indexed projectId,
TicketMod mod,
uint256 modCut,
address caller
);
event PrintTickets(
uint256 indexed projectId,
address indexed beneficiary,
uint256 amount,
string memo,
address caller
);
event Deposit(uint256 amount);
event EnsureTargetLocalWei(uint256 target);
event SetYielder(IYielder newYielder);
event SetFee(uint256 _amount);
event SetTargetLocalWei(uint256 amount);
function projects() external view returns (IProjects);
function fundingCycles() external view returns (IFundingCycles);
function ticketBooth() external view returns (ITicketBooth);
function prices() external view returns (IPrices);
function modStore() external view returns (IModStore);
function reservedTicketBalanceOf(uint256 _projectId, uint256 _reservedRate)
external
view
returns (uint256);
function balanceOf(uint256 _projectId) external view returns (uint256);
function currentOverflowOf(uint256 _projectId) external view returns (uint256);
function claimableOverflowOf(
address _account,
uint256 _amount,
uint256 _projectId
) external view returns (uint256);
function fee() external view returns (uint256);
function deploy(
address _owner,
bytes32 _handle,
string calldata _uri,
FundingCycleProperties calldata _properties,
FundingCycleMetadata2 calldata _metadata,
PayoutMod[] memory _payoutMods,
TicketMod[] memory _ticketMods
) external;
function configure(
uint256 _projectId,
FundingCycleProperties calldata _properties,
FundingCycleMetadata2 calldata _metadata,
PayoutMod[] memory _payoutMods,
TicketMod[] memory _ticketMods
) external returns (uint256);
function printTickets(
uint256 _projectId,
uint256 _amount,
address _beneficiary,
string memory _memo,
bool _preferUnstakedTickets
) external;
function tap(
uint256 _projectId,
uint256 _amount,
uint256 _currency,
uint256 _minReturnedWei
) external returns (uint256);
function redeem(
address _account,
uint256 _projectId,
uint256 _amount,
uint256 _minReturnedWei,
address payable _beneficiary,
bool _preferUnstaked
) external returns (uint256 returnAmount);
function printReservedTickets(uint256 _projectId)
external
returns (uint256 reservedTicketsToPrint);
function setFee(uint256 _fee) external;
function burnFromDeadAddress(uint256 _projectId) external;
}