-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
200 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; | ||
import {JBPayDelegateAllocation3_2} from './../structs/JBPayDelegateAllocation3_2.sol'; | ||
import {JBPayParamsData} from './../structs/JBPayParamsData.sol'; | ||
import {JBRedeemParamsData} from './../structs/JBRedeemParamsData.sol'; | ||
import {JBRedemptionDelegateAllocation3_2} from './../structs/JBRedemptionDelegateAllocation3_2.sol'; | ||
|
||
/// @title Datasource | ||
/// @notice The datasource is called by JBPayoutRedemptionPaymentTerminals on pay and redemption, and provide an extra layer of logic to use a custom weight, a custom memo and/or a pay/redeem delegate | ||
interface IJBFundingCycleDataSource3_2 is IERC165 { | ||
/// @notice The datasource implementation for JBPaymentTerminal.pay(..) | ||
/// @param data the data passed to the data source in terminal.pay(..), as a JBPayParamsData struct: | ||
/// @return weight the weight to use to override the funding cycle weight | ||
/// @return memo the memo to override the pay(..) memo | ||
/// @return delegateAllocations The amount to send to delegates instead of adding to the local balance. | ||
function payParams( | ||
JBPayParamsData calldata data | ||
) | ||
external | ||
view | ||
returns ( | ||
uint256 weight, | ||
string memory memo, | ||
JBPayDelegateAllocation3_2[] memory delegateAllocations | ||
); | ||
|
||
/// @notice The datasource implementation for JBPaymentTerminal.redeemTokensOf(..) | ||
/// @param data the data passed to the data source in terminal.redeemTokensOf(..), as a JBRedeemParamsData struct: | ||
/// @return reclaimAmount The amount to claim, overriding the terminal logic. | ||
/// @return memo The memo to override the redeemTokensOf(..) memo. | ||
/// @return delegateAllocations The amount to send to delegates instead of adding to the beneficiary. | ||
function redeemParams( | ||
JBRedeemParamsData calldata data | ||
) | ||
external | ||
view | ||
returns ( | ||
uint256 reclaimAmount, | ||
string memory memo, | ||
JBRedemptionDelegateAllocation3_2[] memory delegateAllocations | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; | ||
import {JBDidPayData3_2} from './../structs/JBDidPayData3_2.sol'; | ||
|
||
/// @title Pay delegate | ||
/// @notice Delegate called after JBTerminal.pay(..) logic completion (if passed by the funding cycle datasource) | ||
interface IJBPayDelegate3_2 is IERC165 { | ||
/// @notice This function is called by JBPaymentTerminal.pay(..), after the execution of its logic | ||
/// @dev Critical business logic should be protected by an appropriate access control | ||
/// @param data the data passed by the terminal, as a JBDidPayData3_2 struct: | ||
function didPay(JBDidPayData3_2 calldata data) external payable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; | ||
import {JBDidRedeemData3_2} from './../structs/JBDidRedeemData3_2.sol'; | ||
|
||
/// @title Redemption delegate | ||
/// @notice Delegate called after JBTerminal.redeemTokensOf(..) logic completion (if passed by the funding cycle datasource) | ||
interface IJBRedemptionDelegate3_2 is IERC165 { | ||
/// @notice This function is called by JBPaymentTerminal.redeemTokensOf(..), after the execution of its logic | ||
/// @dev Critical business logic should be protected by an appropriate access control | ||
/// @param data the data passed by the terminal, as a JBDidRedeemData struct: | ||
function didRedeem(JBDidRedeemData3_2 calldata data) external payable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.