@rev-net/core-v6 0.0.13 → 0.0.15
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/CHANGE_LOG.md +8 -3
- package/SKILLS.md +1 -1
- package/foundry.toml +7 -0
- package/package.json +8 -9
- package/src/REVDeployer.sol +34 -12
- package/src/REVLoans.sol +1 -5
- package/test/REVDeployerRegressions.t.sol +6 -3
- package/test/REVInvincibility.t.sol +6 -18
- package/test/REVLoansAttacks.t.sol +19 -11
- package/test/REVLoansFeeRecovery.t.sol +19 -11
- package/test/REVLoansFindings.t.sol +19 -11
- package/test/REVLoansRegressions.t.sol +19 -11
- package/test/REVLoansSourced.t.sol +0 -8
- package/test/TestCashOutCallerValidation.t.sol +74 -0
- package/test/TestLowFindings.t.sol +3 -1
- package/test/TestMixedFixes.t.sol +6 -4
- package/test/TestSplitWeightAdjustment.t.sol +10 -5
- package/test/fork/TestAutoIssuanceFork.t.sol +148 -0
- package/test/fork/TestCashOutFork.t.sol +22 -21
- package/test/fork/TestIssuanceDecayFork.t.sol +158 -0
- package/test/fork/TestLoanERC20Fork.t.sol +463 -0
- package/test/fork/TestLoanRepayFork.t.sol +2 -2
- package/test/fork/TestPermit2PaymentFork.t.sol +299 -0
- package/test/helpers/MaliciousContracts.sol +36 -22
- package/test/mock/MockBuybackDataHook.sol +50 -6
- package/deployments/revnet-core-v5/arbitrum/REVDeployer.json +0 -2821
- package/deployments/revnet-core-v5/arbitrum/REVLoans.json +0 -2260
- package/deployments/revnet-core-v5/arbitrum_sepolia/REVDeployer.json +0 -2821
- package/deployments/revnet-core-v5/arbitrum_sepolia/REVLoans.json +0 -2260
- package/deployments/revnet-core-v5/base/REVDeployer.json +0 -2825
- package/deployments/revnet-core-v5/base/REVLoans.json +0 -2264
- package/deployments/revnet-core-v5/base_sepolia/REVDeployer.json +0 -2825
- package/deployments/revnet-core-v5/base_sepolia/REVLoans.json +0 -2264
- package/deployments/revnet-core-v5/ethereum/REVDeployer.json +0 -2825
- package/deployments/revnet-core-v5/ethereum/REVLoans.json +0 -2264
- package/deployments/revnet-core-v5/optimism/REVDeployer.json +0 -2821
- package/deployments/revnet-core-v5/optimism/REVLoans.json +0 -2260
- package/deployments/revnet-core-v5/optimism_sepolia/REVDeployer.json +0 -2825
- package/deployments/revnet-core-v5/optimism_sepolia/REVLoans.json +0 -2264
- package/deployments/revnet-core-v5/sepolia/REVDeployer.json +0 -2825
- package/deployments/revnet-core-v5/sepolia/REVLoans.json +0 -2264
- package/docs/book.css +0 -13
- package/docs/book.toml +0 -13
- package/docs/solidity.min.js +0 -74
- package/docs/src/README.md +0 -185
- package/docs/src/SUMMARY.md +0 -18
- package/docs/src/src/README.md +0 -7
- package/docs/src/src/REVDeployer.sol/contract.REVDeployer.md +0 -999
- package/docs/src/src/REVLoans.sol/contract.REVLoans.md +0 -1108
- package/docs/src/src/interfaces/IREVDeployer.sol/interface.IREVDeployer.md +0 -525
- package/docs/src/src/interfaces/IREVLoans.sol/interface.IREVLoans.md +0 -598
- package/docs/src/src/interfaces/README.md +0 -5
- package/docs/src/src/structs/README.md +0 -12
- package/docs/src/src/structs/REVAutoIssuance.sol/struct.REVAutoIssuance.md +0 -19
- package/docs/src/src/structs/REVBuybackHookConfig.sol/struct.REVBuybackHookConfig.md +0 -19
- package/docs/src/src/structs/REVBuybackPoolConfig.sol/struct.REVBuybackPoolConfig.md +0 -21
- package/docs/src/src/structs/REVConfig.sol/struct.REVConfig.md +0 -23
- package/docs/src/src/structs/REVCroptopAllowedPost.sol/struct.REVCroptopAllowedPost.md +0 -32
- package/docs/src/src/structs/REVDeploy721TiersHookConfig.sol/struct.REVDeploy721TiersHookConfig.md +0 -34
- package/docs/src/src/structs/REVDescription.sol/struct.REVDescription.md +0 -23
- package/docs/src/src/structs/REVLoan.sol/struct.REVLoan.md +0 -28
- package/docs/src/src/structs/REVLoanSource.sol/struct.REVLoanSource.md +0 -16
- package/docs/src/src/structs/REVStageConfig.sol/struct.REVStageConfig.md +0 -44
- package/docs/src/src/structs/REVSuckerDeploymentConfig.sol/struct.REVSuckerDeploymentConfig.md +0 -16
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# REVCroptopAllowedPost
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVCroptopAllowedPost.sol)
|
|
3
|
-
|
|
4
|
-
Criteria for allowed posts.
|
|
5
|
-
|
|
6
|
-
**Notes:**
|
|
7
|
-
- member: category A category that should allow posts.
|
|
8
|
-
|
|
9
|
-
- member: minimumPrice The minimum price that a post to the specified category should cost.
|
|
10
|
-
|
|
11
|
-
- member: minimumTotalSupply The minimum total supply of NFTs that can be made available when minting.
|
|
12
|
-
|
|
13
|
-
- member: maxTotalSupply The max total supply of NFTs that can be made available when minting. Leave as 0 for
|
|
14
|
-
max.
|
|
15
|
-
|
|
16
|
-
- member: maximumSplitPercent The maximum split percent (out of JBConstants.SPLITS_TOTAL_PERCENT) that a
|
|
17
|
-
poster can set. 0 means splits are not allowed.
|
|
18
|
-
|
|
19
|
-
- member: allowedAddresses A list of addresses that are allowed to post on the category through Croptop.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```solidity
|
|
23
|
-
struct REVCroptopAllowedPost {
|
|
24
|
-
uint24 category;
|
|
25
|
-
uint104 minimumPrice;
|
|
26
|
-
uint32 minimumTotalSupply;
|
|
27
|
-
uint32 maximumTotalSupply;
|
|
28
|
-
uint32 maximumSplitPercent;
|
|
29
|
-
address[] allowedAddresses;
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
package/docs/src/src/structs/REVDeploy721TiersHookConfig.sol/struct.REVDeploy721TiersHookConfig.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# REVDeploy721TiersHookConfig
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVDeploy721TiersHookConfig.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: baseline721HookConfiguration The baseline config.
|
|
6
|
-
|
|
7
|
-
- member: salt The salt to base the collection's address on.
|
|
8
|
-
|
|
9
|
-
- member: splitOperatorCanAdjustTiers A flag indicating if the revnet's split operator can add tiers and remove
|
|
10
|
-
tiers if
|
|
11
|
-
the tier is allowed to be removed
|
|
12
|
-
|
|
13
|
-
- member: splitOperatorCanUpdateMetadata A flag indicating if the revnet's split operator can update the 721's
|
|
14
|
-
metadata.
|
|
15
|
-
|
|
16
|
-
- member: splitOperatorCanMint A flag indicating if the revnet's split operator can mint 721's from tiers that
|
|
17
|
-
allow it.
|
|
18
|
-
|
|
19
|
-
- member: splitOperatorCanIncreaseDiscountPercent A flag indicating if the revnet's split operator can increase
|
|
20
|
-
the
|
|
21
|
-
discount of a tier.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```solidity
|
|
25
|
-
struct REVDeploy721TiersHookConfig {
|
|
26
|
-
JBDeploy721TiersHookConfig baseline721HookConfiguration;
|
|
27
|
-
bytes32 salt;
|
|
28
|
-
bool splitOperatorCanAdjustTiers;
|
|
29
|
-
bool splitOperatorCanUpdateMetadata;
|
|
30
|
-
bool splitOperatorCanMint;
|
|
31
|
-
bool splitOperatorCanIncreaseDiscountPercent;
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# REVDescription
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVDescription.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: name The name of the ERC-20 token being create for the revnet.
|
|
6
|
-
|
|
7
|
-
- member: ticker The ticker of the ERC-20 token being created for the revnet.
|
|
8
|
-
|
|
9
|
-
- member: uri The metadata URI containing revnet's info.
|
|
10
|
-
|
|
11
|
-
- member: salt Revnets deployed across chains by the same address with the same salt will have the same
|
|
12
|
-
address.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```solidity
|
|
16
|
-
struct REVDescription {
|
|
17
|
-
string name;
|
|
18
|
-
string ticker;
|
|
19
|
-
string uri;
|
|
20
|
-
bytes32 salt;
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# REVLoan
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVLoan.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: borrowedAmount The amount that is being borrowed.
|
|
6
|
-
|
|
7
|
-
- member: collateralTokenCount The number of collateral tokens currently accounted for.
|
|
8
|
-
|
|
9
|
-
- member: createdAt The timestamp when the loan was created.
|
|
10
|
-
|
|
11
|
-
- member: prepaidFeePercent The percentage of the loan's fees that were prepaid.
|
|
12
|
-
|
|
13
|
-
- member: prepaidDuration The duration that the loan was prepaid for.
|
|
14
|
-
|
|
15
|
-
- member: source The source of the loan.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```solidity
|
|
19
|
-
struct REVLoan {
|
|
20
|
-
uint112 amount;
|
|
21
|
-
uint112 collateral;
|
|
22
|
-
uint48 createdAt;
|
|
23
|
-
uint16 prepaidFeePercent;
|
|
24
|
-
uint32 prepaidDuration;
|
|
25
|
-
REVLoanSource source;
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# REVLoanSource
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVLoanSource.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: token The token that is being loaned.
|
|
6
|
-
|
|
7
|
-
- member: terminal The terminal that the loan is being made from.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
```solidity
|
|
11
|
-
struct REVLoanSource {
|
|
12
|
-
address token;
|
|
13
|
-
IJBPayoutTerminal terminal;
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# REVStageConfig
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVStageConfig.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: startsAtOrAfter The timestamp to start a stage at the given rate at or after.
|
|
6
|
-
|
|
7
|
-
- member: autoIssuances The configurations of mints during this stage.
|
|
8
|
-
|
|
9
|
-
- member: splitPercent The percentage of newly issued tokens that should be split with the operator, out
|
|
10
|
-
of 10_000 (JBConstants.MAX_RESERVED_PERCENT).
|
|
11
|
-
|
|
12
|
-
- member: splits The splits for the revnet.
|
|
13
|
-
|
|
14
|
-
- member: initialIssuance The number of revnet tokens that one unit of the revnet's base currency will buy, as
|
|
15
|
-
a fixed point number
|
|
16
|
-
with 18 decimals.
|
|
17
|
-
|
|
18
|
-
- member: issuanceCutFrequency The number of seconds between applied issuance decreases. This
|
|
19
|
-
should be at least 24 hours.
|
|
20
|
-
|
|
21
|
-
- member: issuanceCutPercent The percent that issuance should decrease over time. This percentage is out
|
|
22
|
-
of 1_000_000_000 (JBConstants.MAX_CUT_PERCENT). 0% corresponds to no issuance increase.
|
|
23
|
-
|
|
24
|
-
- member: cashOutTaxRate The factor determining how much each token can cash out from the revnet once
|
|
25
|
-
cashed out. This rate is out of 10_000 (JBConstants.MAX_CASH_OUT_TAX_RATE). 0% corresponds to no tax when cashing
|
|
26
|
-
out.
|
|
27
|
-
|
|
28
|
-
- member: extraMetadata Extra info to attach set into this stage that may affect hooks.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```solidity
|
|
32
|
-
struct REVStageConfig {
|
|
33
|
-
uint48 startsAtOrAfter;
|
|
34
|
-
REVAutoIssuance[] autoIssuances;
|
|
35
|
-
uint16 splitPercent;
|
|
36
|
-
JBSplit[] splits;
|
|
37
|
-
uint112 initialIssuance;
|
|
38
|
-
uint32 issuanceCutFrequency;
|
|
39
|
-
uint32 issuanceCutPercent;
|
|
40
|
-
uint16 cashOutTaxRate;
|
|
41
|
-
uint16 extraMetadata;
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
package/docs/src/src/structs/REVSuckerDeploymentConfig.sol/struct.REVSuckerDeploymentConfig.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# REVSuckerDeploymentConfig
|
|
2
|
-
[Git Source](https://github.com/rev-net/revnet-core-v6/blob/94c003a3a16de2bd012d63cccedd6bd38d21f6e7/src/structs/REVSuckerDeploymentConfig.sol)
|
|
3
|
-
|
|
4
|
-
**Notes:**
|
|
5
|
-
- member: deployerConfigurations The information for how to suck tokens to other chains.
|
|
6
|
-
|
|
7
|
-
- member: salt The salt to use for creating suckers so that they use the same address across chains.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
```solidity
|
|
11
|
-
struct REVSuckerDeploymentConfig {
|
|
12
|
-
JBSuckerDeployerConfig[] deployerConfigurations;
|
|
13
|
-
bytes32 salt;
|
|
14
|
-
}
|
|
15
|
-
```
|
|
16
|
-
|