@superfluid-finance/ethereum-contracts 1.5.2-dev.a97f248.0 → 1.5.2-dev.fe6f63e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/AccessControl.json +1 -1
- package/build/contracts/AccessControlEnumerable.json +1 -1
- package/build/contracts/Address.json +1 -1
- package/build/contracts/AgreementBase.json +1 -1
- package/build/contracts/AgreementLibrary.json +1 -1
- package/build/contracts/BaseRelayRecipient.json +1 -1
- package/build/contracts/BatchLiquidator.json +1 -1
- package/build/contracts/BatchOperation.json +1 -1
- package/build/contracts/CFAv1Forwarder.json +1 -1
- package/build/contracts/CFAv1Library.json +1 -1
- package/build/contracts/CallUtils.json +1 -1
- package/build/contracts/ClosingOnUpdateFlowTestApp.json +1 -1
- package/build/contracts/ConstantFlowAgreementV1.json +1 -1
- package/build/contracts/Context.json +1 -1
- package/build/contracts/ContextDefinitions.json +1 -1
- package/build/contracts/CustomSuperTokenBase.json +1 -1
- package/build/contracts/ERC165.json +1 -1
- package/build/contracts/ERC1820Implementer.json +1 -1
- package/build/contracts/ERC1820RegistryCompiled.json +1 -1
- package/build/contracts/ERC20.json +1 -1
- package/build/contracts/ERC20WithTokenInfo.json +1 -1
- package/build/contracts/ERC777Helper.json +1 -1
- package/build/contracts/ERC777RecipientDrainingGas.json +1 -1
- package/build/contracts/ERC777RecipientReverting.json +1 -1
- package/build/contracts/EnumerableSet.json +1 -1
- package/build/contracts/EventsEmitter.json +1 -1
- package/build/contracts/ExclusiveInflowTestApp.json +1 -1
- package/build/contracts/FixedSizeData.json +1 -1
- package/build/contracts/FlowExchangeTestApp.json +1 -1
- package/build/contracts/FlowOperatorDefinitions.json +1 -1
- package/build/contracts/FullUpgradableSuperTokenProxy.json +1 -1
- package/build/contracts/IAccessControl.json +1 -1
- package/build/contracts/IAccessControlEnumerable.json +1 -1
- package/build/contracts/IConstantFlowAgreementHook.json +1 -1
- package/build/contracts/IConstantFlowAgreementV1.json +1 -1
- package/build/contracts/IDAv1Library.json +1 -1
- package/build/contracts/IERC165.json +1 -1
- package/build/contracts/IERC1820Implementer.json +1 -1
- package/build/contracts/IERC1820Registry.json +1 -1
- package/build/contracts/IERC20.json +1 -1
- package/build/contracts/IERC20Metadata.json +1 -1
- package/build/contracts/IERC20Permit.json +1 -1
- package/build/contracts/IERC777.json +1 -1
- package/build/contracts/IERC777Recipient.json +1 -1
- package/build/contracts/IERC777Sender.json +1 -1
- package/build/contracts/IInstantDistributionAgreementV1.json +1 -1
- package/build/contracts/IMultiSigWallet.json +1 -1
- package/build/contracts/IPureSuperToken.json +1 -1
- package/build/contracts/IPureSuperTokenCustom.json +1 -1
- package/build/contracts/IRelayRecipient.json +1 -1
- package/build/contracts/IResolver.json +1 -1
- package/build/contracts/ISETH.json +1 -1
- package/build/contracts/ISETHCustom.json +1 -1
- package/build/contracts/ISuperAgreement.json +1 -1
- package/build/contracts/ISuperApp.json +1 -1
- package/build/contracts/ISuperToken.json +1 -1
- package/build/contracts/ISuperTokenFactory.json +1 -1
- package/build/contracts/ISuperfluid.json +1 -1
- package/build/contracts/ISuperfluidGovernance.json +1 -1
- package/build/contracts/ISuperfluidToken.json +1 -1
- package/build/contracts/ITOGAv1.json +1 -1
- package/build/contracts/ITOGAv2.json +1 -1
- package/build/contracts/ITOGAv3.json +1 -1
- package/build/contracts/Initializable.json +1 -1
- package/build/contracts/InstantDistributionAgreementV1.json +1 -1
- package/build/contracts/Math.json +1 -1
- package/build/contracts/NonClosableOutflowTestApp.json +1 -1
- package/build/contracts/Ownable.json +1 -1
- package/build/contracts/Proxy.json +1 -1
- package/build/contracts/PureSuperToken.json +1 -1
- package/build/contracts/Resolver.json +1 -1
- package/build/contracts/SETHProxy.json +1 -1
- package/build/contracts/SafeCast.json +1 -1
- package/build/contracts/SafeERC20.json +1 -1
- package/build/contracts/SafeMath.json +1 -1
- package/build/contracts/SelfDeletingFlowTestApp.json +1 -1
- package/build/contracts/SlotsBitmapLibrary.json +1 -1
- package/build/contracts/StreamRedirector.json +1 -1
- package/build/contracts/Strings.json +1 -1
- package/build/contracts/SuperAppBase.json +1 -1
- package/build/contracts/SuperAppDefinitions.json +1 -1
- package/build/contracts/SuperToken.json +1 -1
- package/build/contracts/SuperTokenDeployerLibrary.json +1 -1
- package/build/contracts/SuperTokenFactory.json +1 -1
- package/build/contracts/SuperTokenFactoryBase.json +1 -1
- package/build/contracts/SuperTokenV1Library.json +1 -1
- package/build/contracts/SuperUpgrader.json +1 -1
- package/build/contracts/Superfluid.json +1 -1
- package/build/contracts/SuperfluidCFAv1DeployerLibrary.json +1 -1
- package/build/contracts/SuperfluidFrameworkDeployer.json +1 -1
- package/build/contracts/SuperfluidGovDeployerLibrary.json +1 -1
- package/build/contracts/SuperfluidGovernanceBase.json +1 -1
- package/build/contracts/SuperfluidGovernanceConfigs.json +1 -1
- package/build/contracts/SuperfluidGovernanceII.json +1 -1
- package/build/contracts/SuperfluidGovernanceIIProxy.json +1 -1
- package/build/contracts/SuperfluidHostDeployerLibrary.json +1 -1
- package/build/contracts/SuperfluidIDAv1DeployerLibrary.json +1 -1
- package/build/contracts/SuperfluidLoader.json +1 -1
- package/build/contracts/SuperfluidPeripheryDeployerLibrary.json +1 -1
- package/build/contracts/SuperfluidToken.json +1 -1
- package/build/contracts/TOGA.json +1 -1
- package/build/contracts/TestGovernance.json +1 -1
- package/build/contracts/TestResolver.json +1 -1
- package/build/contracts/TestToken.json +1 -1
- package/build/contracts/TokenInfo.json +1 -1
- package/build/contracts/UUPSProxiable.json +1 -1
- package/build/contracts/UUPSProxy.json +1 -1
- package/build/contracts/UUPSUtils.json +1 -1
- package/build/contracts-sizes.txt +9 -9
- package/package.json +2 -2
- package/contracts/mocks/AgreementMock.sol +0 -375
- package/contracts/mocks/CFAAppMocks.sol +0 -361
- package/contracts/mocks/CFAHookMocks.sol +0 -148
- package/contracts/mocks/CFALibraryMock.sol +0 -213
- package/contracts/mocks/CallUtilsMock.sol +0 -79
- package/contracts/mocks/CallUtilsTester.sol +0 -14
- package/contracts/mocks/CustomSuperTokenMock.sol +0 -104
- package/contracts/mocks/ERC777SenderRecipientMock.sol +0 -238
- package/contracts/mocks/FakeSuperfluidMock.sol +0 -21
- package/contracts/mocks/ForwarderMock.sol +0 -39
- package/contracts/mocks/IDASuperAppTester.sol +0 -297
- package/contracts/mocks/IDAv1LibraryMock.sol +0 -400
- package/contracts/mocks/MockSmartWallet.sol +0 -15
- package/contracts/mocks/MultiFlowTesterApp.sol +0 -336
- package/contracts/mocks/StreamRedirector.sol +0 -179
- package/contracts/mocks/SuperAppMocks.sol +0 -622
- package/contracts/mocks/SuperTokenFactoryMock.sol +0 -98
- package/contracts/mocks/SuperTokenLibraryV1Mock.sol +0 -583
- package/contracts/mocks/SuperTokenMock.sol +0 -113
- package/contracts/mocks/SuperfluidDestructorMock.sol +0 -14
- package/contracts/mocks/SuperfluidGovernanceIIMock.sol +0 -22
- package/contracts/mocks/SuperfluidMock.sol +0 -177
- package/contracts/mocks/UUPSProxiableMock.sol +0 -29
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPLv3
|
|
2
|
-
pragma solidity 0.8.18;
|
|
3
|
-
|
|
4
|
-
import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
ISuperfluid,
|
|
8
|
-
ISuperToken,
|
|
9
|
-
ISuperfluidToken,
|
|
10
|
-
ISuperApp,
|
|
11
|
-
SuperAppDefinitions
|
|
12
|
-
} from "../interfaces/superfluid/ISuperfluid.sol";
|
|
13
|
-
import { AgreementBase } from "../agreements/AgreementBase.sol";
|
|
14
|
-
import { AgreementLibrary } from "../agreements/AgreementLibrary.sol";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
contract AgreementMock is AgreementBase {
|
|
18
|
-
|
|
19
|
-
using SafeCast for uint256;
|
|
20
|
-
|
|
21
|
-
uint256 constant private _REAL_TIME_BALANCE_SLOT_ID = 65552025;
|
|
22
|
-
|
|
23
|
-
// using immutable, otherweise the proxy contract would see zero instead
|
|
24
|
-
bytes32 immutable private _type;
|
|
25
|
-
uint immutable private _version;
|
|
26
|
-
|
|
27
|
-
constructor(address host, bytes32 t, uint v) AgreementBase(host) {
|
|
28
|
-
_type = t;
|
|
29
|
-
_version = v;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function version() external view returns (uint) { return _version; }
|
|
33
|
-
|
|
34
|
-
function agreementType() external override view returns (bytes32) {
|
|
35
|
-
return _type;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function realtimeBalanceOf(
|
|
39
|
-
ISuperfluidToken token,
|
|
40
|
-
address account,
|
|
41
|
-
uint256 /* time */
|
|
42
|
-
)
|
|
43
|
-
external view override
|
|
44
|
-
returns (
|
|
45
|
-
int256 dynamicBalance,
|
|
46
|
-
uint256 deposit,
|
|
47
|
-
uint256 owedDeposit
|
|
48
|
-
)
|
|
49
|
-
{
|
|
50
|
-
bytes32[] memory slotData = token.getAgreementStateSlot(
|
|
51
|
-
address(this), account, _REAL_TIME_BALANCE_SLOT_ID, 3);
|
|
52
|
-
return (
|
|
53
|
-
uint256(slotData[0]).toInt256(),
|
|
54
|
-
uint256(slotData[1]),
|
|
55
|
-
uint256(slotData[2])
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* SuperfluidToken Mockings
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
function setRealtimeBalanceFor(
|
|
64
|
-
ISuperfluidToken token,
|
|
65
|
-
address account,
|
|
66
|
-
int256 dynamicBalance,
|
|
67
|
-
uint256 deposit,
|
|
68
|
-
uint256 owedDeposit
|
|
69
|
-
) external {
|
|
70
|
-
bytes32[] memory slotData = new bytes32[](3);
|
|
71
|
-
slotData[0] = bytes32(uint256(dynamicBalance));
|
|
72
|
-
slotData[1] = bytes32(uint256(deposit));
|
|
73
|
-
slotData[2] = bytes32(uint256(owedDeposit));
|
|
74
|
-
token.updateAgreementStateSlot(account, _REAL_TIME_BALANCE_SLOT_ID, slotData);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function createAgreementFor(
|
|
78
|
-
ISuperfluidToken token,
|
|
79
|
-
bytes32 id,
|
|
80
|
-
bytes32[] calldata data
|
|
81
|
-
) external {
|
|
82
|
-
token.createAgreement(id, data);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function updateAgreementDataFor(
|
|
86
|
-
ISuperfluidToken token,
|
|
87
|
-
bytes32 id,
|
|
88
|
-
bytes32[] calldata data
|
|
89
|
-
) external {
|
|
90
|
-
token.updateAgreementData(id, data);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function terminateAgreementFor(
|
|
94
|
-
ISuperfluidToken token,
|
|
95
|
-
bytes32 id,
|
|
96
|
-
uint dataLength
|
|
97
|
-
) external {
|
|
98
|
-
token.terminateAgreement(id, dataLength);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function updateAgreementStateSlotFor(
|
|
102
|
-
ISuperfluidToken token,
|
|
103
|
-
address account,
|
|
104
|
-
uint256 slotId,
|
|
105
|
-
bytes32[] calldata slotData
|
|
106
|
-
) external {
|
|
107
|
-
token.updateAgreementStateSlot(account, slotId, slotData);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function settleBalanceFor(
|
|
111
|
-
ISuperfluidToken token,
|
|
112
|
-
address account,
|
|
113
|
-
int256 delta
|
|
114
|
-
) external {
|
|
115
|
-
token.settleBalance(account, delta);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function makeLiquidationPayoutsFor(
|
|
119
|
-
ISuperfluidToken token,
|
|
120
|
-
bytes32 id,
|
|
121
|
-
bool useDefaultRewardAccount,
|
|
122
|
-
address liquidator,
|
|
123
|
-
address targetAccount,
|
|
124
|
-
uint256 rewardAmount,
|
|
125
|
-
int256 targetAccountBalanceDelta
|
|
126
|
-
) external {
|
|
127
|
-
bytes memory liquidationTypeData = useDefaultRewardAccount
|
|
128
|
-
? abi.encode(1, 0)
|
|
129
|
-
: abi.encode(1, 2);
|
|
130
|
-
token.makeLiquidationPayoutsV2(
|
|
131
|
-
id,
|
|
132
|
-
liquidationTypeData,
|
|
133
|
-
liquidator,
|
|
134
|
-
useDefaultRewardAccount,
|
|
135
|
-
targetAccount,
|
|
136
|
-
rewardAmount,
|
|
137
|
-
targetAccountBalanceDelta
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Agreement Framework Mockings
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
function tryCallAppBeforeCallback(ISuperfluid host, ISuperApp appMock, bool hackCtx, bytes calldata ctx)
|
|
146
|
-
external returns (bytes memory newCtx)
|
|
147
|
-
{
|
|
148
|
-
return host.callAppBeforeCallback(
|
|
149
|
-
appMock,
|
|
150
|
-
abi.encodeCall(
|
|
151
|
-
appMock.beforeAgreementCreated,
|
|
152
|
-
(
|
|
153
|
-
ISuperToken(address(0)), /* ISuperToken */
|
|
154
|
-
address(this), /* agreementClass */
|
|
155
|
-
bytes32(uint256(0)), /* agreementId */
|
|
156
|
-
new bytes(0), /* agreementData */
|
|
157
|
-
new bytes(0) /* placeholder ctx */
|
|
158
|
-
)
|
|
159
|
-
),
|
|
160
|
-
true, /* isTermination */
|
|
161
|
-
hackCtx ? new bytes(0) : ctx);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function tryCallAppAfterCallback(ISuperfluid host, ISuperApp appMock, bool hackCtx, bytes calldata ctx)
|
|
165
|
-
external returns (bytes memory newCtx)
|
|
166
|
-
{
|
|
167
|
-
return host.callAppAfterCallback(
|
|
168
|
-
appMock,
|
|
169
|
-
abi.encodeCall(
|
|
170
|
-
appMock.afterAgreementCreated,
|
|
171
|
-
(
|
|
172
|
-
ISuperToken(address(0)), /* ISuperToken */
|
|
173
|
-
address(this), /* agreementClass */
|
|
174
|
-
bytes32(uint256(0)), /* agreementId */
|
|
175
|
-
new bytes(0), /* agreementData */
|
|
176
|
-
new bytes(0), /* cbData */
|
|
177
|
-
new bytes(0) /* placeholder ctx */
|
|
178
|
-
)
|
|
179
|
-
),
|
|
180
|
-
true, /* isTermination */
|
|
181
|
-
hackCtx ? new bytes(0) : ctx);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function tryAppCallbackPush(ISuperfluid host, ISuperApp appMock, bool hackCtx, bytes calldata ctx)
|
|
185
|
-
external returns (bytes memory newCtx)
|
|
186
|
-
{
|
|
187
|
-
return host.appCallbackPush(hackCtx ? new bytes(0) : ctx, appMock, 0, 0, ISuperfluidToken(address(0)));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function tryAppCallbackPop(ISuperfluid host, bytes calldata ctx)
|
|
191
|
-
external returns (bytes memory newCtx)
|
|
192
|
-
{
|
|
193
|
-
return host.appCallbackPop(ctx, 0);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function tryCtxUseCredit(ISuperfluid host, bool hackCtx, bytes calldata ctx)
|
|
197
|
-
external returns (bytes memory newCtx)
|
|
198
|
-
{
|
|
199
|
-
return host.ctxUseCredit(hackCtx ? new bytes(0) : ctx, 0);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function tryJailApp(ISuperfluid host, ISuperApp appMock, bool hackCtx, bytes calldata ctx)
|
|
203
|
-
external returns (bytes memory newCtx)
|
|
204
|
-
{
|
|
205
|
-
return host.jailApp(hackCtx ? new bytes(0) : ctx, appMock, 0);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Trivial Agreement Operations
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
modifier requireValidCtx(bytes memory ctx) {
|
|
213
|
-
require(ISuperfluid(msg.sender).isCtxValid(ctx), "AgreementMock: ctx not valid given by host?!");
|
|
214
|
-
_;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/// doRevert agreement operation
|
|
218
|
-
function doRevert(string calldata reason, bytes calldata ctx) external view requireValidCtx(ctx) {
|
|
219
|
-
revert(reason);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/// pingMe agreement operation, emits Pong event
|
|
223
|
-
event Pong(uint256 ping);
|
|
224
|
-
|
|
225
|
-
function pingMe(address expectedMsgSender, uint256 ping, bytes calldata ctx)
|
|
226
|
-
external
|
|
227
|
-
requireValidCtx(ctx)
|
|
228
|
-
returns (bytes memory newCtx)
|
|
229
|
-
{
|
|
230
|
-
ISuperfluid.Context memory context = ISuperfluid(msg.sender).decodeCtx(ctx);
|
|
231
|
-
assert(context.msgSender == expectedMsgSender);
|
|
232
|
-
emit Pong(ping);
|
|
233
|
-
return ctx;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* App Callback Mocking Agreement Operations
|
|
238
|
-
*/
|
|
239
|
-
|
|
240
|
-
/// _callAppBeforeCallback base agreement operation, emits AppBeforeCallbackResult event
|
|
241
|
-
event AppBeforeCallbackResult(
|
|
242
|
-
uint8 appLevel,
|
|
243
|
-
uint8 callType,
|
|
244
|
-
bytes4 agreementSelector,
|
|
245
|
-
bytes cbdata);
|
|
246
|
-
|
|
247
|
-
function _callAppBeforeCallback(
|
|
248
|
-
ISuperApp app,
|
|
249
|
-
uint256 noopBit,
|
|
250
|
-
bytes calldata ctx
|
|
251
|
-
)
|
|
252
|
-
private
|
|
253
|
-
{
|
|
254
|
-
ISuperfluid.Context memory context = ISuperfluid(msg.sender).decodeCtx(ctx);
|
|
255
|
-
AgreementLibrary.CallbackInputs memory cbStates = AgreementLibrary.createCallbackInputs(
|
|
256
|
-
ISuperfluidToken(address(0)) /* token */,
|
|
257
|
-
address(app) /* account */,
|
|
258
|
-
0 /* agreementId */,
|
|
259
|
-
"" /* agreementData */
|
|
260
|
-
);
|
|
261
|
-
cbStates.noopBit = noopBit;
|
|
262
|
-
bytes memory cbdata = AgreementLibrary.callAppBeforeCallback(cbStates, ctx);
|
|
263
|
-
emit AppBeforeCallbackResult(
|
|
264
|
-
context.appCallbackLevel,
|
|
265
|
-
context.callType,
|
|
266
|
-
context.agreementSelector,
|
|
267
|
-
cbdata);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/// _callAppAfterAgreementCallback base agreement operation, emits AppAfterCallbackResult event
|
|
271
|
-
event AppAfterCallbackResult(
|
|
272
|
-
uint8 appLevel,
|
|
273
|
-
uint8 callType,
|
|
274
|
-
bytes4 agreementSelector);
|
|
275
|
-
|
|
276
|
-
function _callAppAfterAgreementCallback(
|
|
277
|
-
ISuperApp app,
|
|
278
|
-
uint256 noopBit,
|
|
279
|
-
bytes calldata ctx
|
|
280
|
-
)
|
|
281
|
-
private returns (bytes memory newCtx)
|
|
282
|
-
{
|
|
283
|
-
bool isJailed = ISuperfluid(msg.sender).isAppJailed(app);
|
|
284
|
-
ISuperfluid.Context memory context = ISuperfluid(msg.sender).decodeCtx(ctx);
|
|
285
|
-
AgreementLibrary.CallbackInputs memory cbStates = AgreementLibrary.createCallbackInputs(
|
|
286
|
-
ISuperfluidToken(address(0)) /* token */,
|
|
287
|
-
address(app) /* account */,
|
|
288
|
-
0 /* agreementId */,
|
|
289
|
-
"" /* agreementData */
|
|
290
|
-
);
|
|
291
|
-
cbStates.noopBit = noopBit;
|
|
292
|
-
ISuperfluid.Context memory appContext;
|
|
293
|
-
(appContext, newCtx) = AgreementLibrary.callAppAfterCallback(cbStates, "", ctx);
|
|
294
|
-
if (isJailed) {
|
|
295
|
-
// appContext.callType is a sufficient check that the callback was not called at all
|
|
296
|
-
require(appContext.callType == 0, "AgreementMock: callback should not reach jailed app");
|
|
297
|
-
} else {
|
|
298
|
-
require(ISuperfluid(msg.sender).isCtxValid(newCtx), "AgreementMock: ctx not valid after callback");
|
|
299
|
-
}
|
|
300
|
-
emit AppAfterCallbackResult(
|
|
301
|
-
context.appCallbackLevel,
|
|
302
|
-
context.callType,
|
|
303
|
-
context.agreementSelector);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function callAppBeforeAgreementCreatedCallback(
|
|
307
|
-
ISuperApp app,
|
|
308
|
-
bytes calldata ctx
|
|
309
|
-
)
|
|
310
|
-
external
|
|
311
|
-
requireValidCtx(ctx)
|
|
312
|
-
returns (bytes memory newCtx)
|
|
313
|
-
{
|
|
314
|
-
_callAppBeforeCallback(app, SuperAppDefinitions.BEFORE_AGREEMENT_CREATED_NOOP, ctx);
|
|
315
|
-
return ctx;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function callAppAfterAgreementCreatedCallback(
|
|
319
|
-
ISuperApp app,
|
|
320
|
-
bytes calldata ctx
|
|
321
|
-
)
|
|
322
|
-
external
|
|
323
|
-
requireValidCtx(ctx)
|
|
324
|
-
returns (bytes memory newCtx)
|
|
325
|
-
{
|
|
326
|
-
return _callAppAfterAgreementCallback(app, SuperAppDefinitions.AFTER_AGREEMENT_CREATED_NOOP, ctx);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
function callAppBeforeAgreementUpdatedCallback(
|
|
330
|
-
ISuperApp app,
|
|
331
|
-
bytes calldata ctx
|
|
332
|
-
)
|
|
333
|
-
external
|
|
334
|
-
requireValidCtx(ctx)
|
|
335
|
-
returns (bytes memory newCtx)
|
|
336
|
-
{
|
|
337
|
-
_callAppBeforeCallback(app, SuperAppDefinitions.BEFORE_AGREEMENT_UPDATED_NOOP, ctx);
|
|
338
|
-
return ctx;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
function callAppAfterAgreementUpdatedCallback(
|
|
342
|
-
ISuperApp app,
|
|
343
|
-
bytes calldata ctx
|
|
344
|
-
)
|
|
345
|
-
external
|
|
346
|
-
requireValidCtx(ctx)
|
|
347
|
-
returns (bytes memory newCtx)
|
|
348
|
-
{
|
|
349
|
-
return _callAppAfterAgreementCallback(app, SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP, ctx);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function callAppBeforeAgreementTerminatedCallback(
|
|
353
|
-
ISuperApp app,
|
|
354
|
-
bytes calldata ctx
|
|
355
|
-
)
|
|
356
|
-
external
|
|
357
|
-
requireValidCtx(ctx)
|
|
358
|
-
returns (bytes memory newCtx)
|
|
359
|
-
{
|
|
360
|
-
_callAppBeforeCallback(app, SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP, ctx);
|
|
361
|
-
newCtx = ctx;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
function callAppAfterAgreementTerminatedCallback(
|
|
365
|
-
ISuperApp app,
|
|
366
|
-
bytes calldata ctx
|
|
367
|
-
)
|
|
368
|
-
external
|
|
369
|
-
requireValidCtx(ctx)
|
|
370
|
-
returns (bytes memory newCtx)
|
|
371
|
-
{
|
|
372
|
-
return _callAppAfterAgreementCallback(app, SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP, ctx);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
}
|