@rev-net/core-v6 0.0.62 → 0.0.63
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/package.json +3 -3
- package/src/REVLoans.sol +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rev-net/core-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.63",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@bananapus/721-hook-v6": "^0.0.54",
|
|
30
30
|
"@bananapus/buyback-hook-v6": "^0.0.49",
|
|
31
|
-
"@bananapus/core-v6": "^0.0.
|
|
31
|
+
"@bananapus/core-v6": "^0.0.59",
|
|
32
32
|
"@bananapus/ownable-v6": "^0.0.27",
|
|
33
33
|
"@bananapus/permission-ids-v6": "^0.0.26",
|
|
34
34
|
"@bananapus/router-terminal-v6": "^0.0.46",
|
|
35
|
-
"@bananapus/suckers-v6": "^0.0.
|
|
35
|
+
"@bananapus/suckers-v6": "^0.0.50",
|
|
36
36
|
"@croptop/core-v6": "^0.0.52",
|
|
37
37
|
"@openzeppelin/contracts": "5.6.1",
|
|
38
38
|
"@uniswap/permit2": "github:Uniswap/permit2#cc56ad0f3439c502c246fc5cfcc3db92bb8b7219"
|
package/src/REVLoans.sol
CHANGED
|
@@ -1055,7 +1055,16 @@ contract REVLoans is ERC721, ERC2771Context, JBPermissioned, Ownable, IREVLoans
|
|
|
1055
1055
|
JBAccountingContext memory context =
|
|
1056
1056
|
TERMINAL.accountingContextForTokenOf({projectId: revnetId, token: sourceToken});
|
|
1057
1057
|
|
|
1058
|
-
// Pull the amount to be loaned out of the revnet. This will incure the protocol fee.
|
|
1058
|
+
// Pull the amount to be loaned out of the revnet. This will incure the protocol fee. Crediting `REV_ID`
|
|
1059
|
+
// as the referrer attributes the protocol fee volume from every Revnet loan back to the REV revnet
|
|
1060
|
+
// itself — REV is the project that facilitated the activity, regardless of which revnet is borrowing.
|
|
1061
|
+
//
|
|
1062
|
+
// The referrer reference is encoded as `(referralChainId << 48) | referralProjectId` per
|
|
1063
|
+
// `JBMultiTerminal`'s `currentReferralProjectId` packing. REV lives on Ethereum mainnet, so we hard-code
|
|
1064
|
+
// `referralChainId = 1`
|
|
1065
|
+
// here: this ensures the protocol fee volume credit accrues to REV on mainnet regardless of which chain
|
|
1066
|
+
// the loan originates from. (Auto-resolving to `block.chainid` would scatter credit across L2s where REV
|
|
1067
|
+
// has no canonical project ID, so we pin mainnet explicitly.)
|
|
1059
1068
|
netAmountPaidOut = TERMINAL.useAllowanceOf({
|
|
1060
1069
|
projectId: revnetId,
|
|
1061
1070
|
token: sourceToken,
|
|
@@ -1064,7 +1073,8 @@ contract REVLoans is ERC721, ERC2771Context, JBPermissioned, Ownable, IREVLoans
|
|
|
1064
1073
|
minTokensPaidOut: 0,
|
|
1065
1074
|
beneficiary: payable(address(this)),
|
|
1066
1075
|
feeBeneficiary: beneficiary,
|
|
1067
|
-
memo: ""
|
|
1076
|
+
memo: "",
|
|
1077
|
+
referralProjectId: (uint256(1) << 48) | REV_ID
|
|
1068
1078
|
});
|
|
1069
1079
|
}
|
|
1070
1080
|
|