@croptop/core-v6 0.0.3 → 0.0.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croptop/core-v6",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,16 +16,17 @@
16
16
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'croptop-core-v5'"
17
17
  },
18
18
  "dependencies": {
19
- "@bananapus/core-v6": "^0.0.3",
20
- "@bananapus/721-hook-v6": "^0.0.2",
21
- "@bananapus/permission-ids-v6": "^0.0.1",
19
+ "@bananapus/721-hook-v6": "^0.0.3",
20
+ "@bananapus/buyback-hook-v6": "^0.0.2",
21
+ "@bananapus/core-v6": "^0.0.4",
22
22
  "@bananapus/ownable-v6": "^0.0.2",
23
- "@bananapus/suckers-v6": "^0.0.1",
24
- "@bananapus/buyback-hook-v6": "^0.0.1",
23
+ "@bananapus/permission-ids-v6": "^0.0.2",
24
+ "@bananapus/suckers-v6": "^0.0.2",
25
25
  "@bananapus/swap-terminal-v6": "^0.0.2",
26
26
  "@openzeppelin/contracts": "^5.2.0"
27
27
  },
28
28
  "devDependencies": {
29
+ "@rev-net/core-v6": "^0.0.2",
29
30
  "@sphinx-labs/plugins": "^0.33.1"
30
31
  }
31
32
  }
@@ -2,7 +2,6 @@
2
2
  pragma solidity 0.8.23;
3
3
 
4
4
  import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
5
- import "@bananapus/buyback-hook-v6/script/helpers/BuybackDeploymentLib.sol";
6
5
  import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
7
6
  import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
8
7
  import "@bananapus/swap-terminal-v6/script/helpers/SwapTerminalDeploymentLib.sol";
@@ -28,28 +27,22 @@ import {JBCurrencyIds} from "@bananapus/core-v6/src/libraries/JBCurrencyIds.sol"
28
27
  import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
29
28
  import {JBTokenMapping} from "@bananapus/suckers-v6/src/structs/JBTokenMapping.sol";
30
29
  import {REVAutoIssuance} from "@rev-net/core-v6/src/structs/REVAutoIssuance.sol";
31
- import {REVBuybackHookConfig} from "@rev-net/core-v6/src/structs/REVBuybackHookConfig.sol";
32
- import {REVBuybackPoolConfig} from "@rev-net/core-v6/src/structs/REVBuybackPoolConfig.sol";
33
30
  import {REVConfig} from "@rev-net/core-v6/src/structs/REVConfig.sol";
34
31
  import {REVCroptopAllowedPost} from "@rev-net/core-v6/src/structs/REVCroptopAllowedPost.sol";
35
32
  import {REVDeploy721TiersHookConfig} from "@rev-net/core-v6/src/structs/REVDeploy721TiersHookConfig.sol";
36
33
  import {REVDescription} from "@rev-net/core-v6/src/structs/REVDescription.sol";
37
- import {REVLoanSource} from "@rev-net/core-v6/src/structs/REVLoanSource.sol";
38
34
  import {REVStageConfig} from "@rev-net/core-v6/src/structs/REVStageConfig.sol";
39
35
  import {REVSuckerDeploymentConfig} from "@rev-net/core-v6/src/structs/REVSuckerDeploymentConfig.sol";
40
36
 
41
37
  struct FeeProjectConfig {
42
38
  REVConfig configuration;
43
39
  JBTerminalConfig[] terminalConfigurations;
44
- REVBuybackHookConfig buybackHookConfiguration;
45
40
  REVSuckerDeploymentConfig suckerDeploymentConfiguration;
46
41
  REVDeploy721TiersHookConfig hookConfiguration;
47
42
  REVCroptopAllowedPost[] allowedPosts;
48
43
  }
49
44
 
50
45
  contract ConfigureFeeProjectScript is Script, Sphinx {
51
- /// @notice tracks the deployment of the buyback hook.
52
- BuybackDeployment buybackHook;
53
46
  /// @notice tracks the deployment of the core contracts for the chain we are deploying to.
54
47
  CoreDeployment core;
55
48
  /// @notice tracks the latest croptop deployment.
@@ -104,7 +97,7 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
104
97
  hook = Hook721DeploymentLib.getDeployment(
105
98
  vm.envOr("NANA_721_DEPLOYMENT_PATH", string("node_modules/@bananapus/721-hook-v6/deployments/"))
106
99
  );
107
- // Get the deployment addresses for the 721 hook contracts for this chain.
100
+ // Get the deployment addresses for the revnet contracts for this chain.
108
101
  revnet = RevnetCoreDeploymentLib.getDeployment(
109
102
  vm.envOr("REVNET_CORE_DEPLOYMENT_PATH", string("node_modules/@rev-net/core-v6/deployments/"))
110
103
  );
@@ -112,7 +105,7 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
112
105
  suckers = SuckerDeploymentLib.getDeployment(
113
106
  vm.envOr("NANA_SUCKERS_DEPLOYMENT_PATH", string("node_modules/@bananapus/suckers-v6/deployments/"))
114
107
  );
115
- // Get the deployment addresses for the 721 hook contracts for this chain.
108
+ // Get the deployment addresses for the swap terminal contracts for this chain.
116
109
  swapTerminal = SwapTerminalDeploymentLib.getDeployment(
117
110
  vm.envOr(
118
111
  "NANA_SWAP_TERMINAL_DEPLOYMENT_PATH", string("node_modules/@bananapus/swap-terminal-v6/deployments/")
@@ -204,33 +197,14 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
204
197
  extraMetadata: 4 // Allow adding suckers.
205
198
  });
206
199
 
207
- // The projects loan configuration.
208
- REVLoanSource[] memory loanSources = new REVLoanSource[](1);
209
- loanSources[0] = REVLoanSource({token: JBConstants.NATIVE_TOKEN, terminal: core.terminal});
210
-
211
200
  // The project's revnet configuration
212
201
  REVConfig memory revnetConfiguration = REVConfig({
213
202
  description: REVDescription(NAME, SYMBOL, PROJECT_URI, ERC20_SALT),
214
203
  baseCurrency: ETH_CURRENCY,
215
204
  splitOperator: OPERATOR,
216
- stageConfigurations: stageConfigurations,
217
- loanSources: loanSources,
218
- loans: address(revnet.loans)
205
+ stageConfigurations: stageConfigurations
219
206
  });
220
207
 
221
- REVBuybackHookConfig memory buybackHookConfiguration;
222
- {
223
- // The project's buyback hook configuration.
224
- REVBuybackPoolConfig[] memory buybackPoolConfigurations = new REVBuybackPoolConfig[](1);
225
- buybackPoolConfigurations[0] =
226
- REVBuybackPoolConfig({token: JBConstants.NATIVE_TOKEN, fee: 10_000, twapWindow: 2 days});
227
- buybackHookConfiguration = REVBuybackHookConfig({
228
- dataHook: buybackHook.registry,
229
- hookToConfigure: buybackHook.hook,
230
- poolConfigurations: buybackPoolConfigurations
231
- });
232
- }
233
-
234
208
  // Organize the instructions for how this project will connect to other chains.
235
209
  JBTokenMapping[] memory tokenMappings = new JBTokenMapping[](1);
236
210
  tokenMappings[0] = JBTokenMapping({
@@ -315,7 +289,6 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
315
289
  return FeeProjectConfig({
316
290
  configuration: revnetConfiguration,
317
291
  terminalConfigurations: terminalConfigurations,
318
- buybackHookConfiguration: buybackHookConfiguration,
319
292
  suckerDeploymentConfiguration: suckerDeploymentConfiguration,
320
293
  hookConfiguration: REVDeploy721TiersHookConfig({
321
294
  baseline721HookConfiguration: JBDeploy721TiersHookConfig({
@@ -352,16 +325,14 @@ contract ConfigureFeeProjectScript is Script, Sphinx {
352
325
  core.projects.approve(address(revnet.basic_deployer), FEE_PROJECT_ID);
353
326
 
354
327
  // Deploy the NANA fee project.
355
- revnet.basic_deployer
356
- .deployWith721sFor({
357
- revnetId: FEE_PROJECT_ID,
358
- configuration: feeProjectConfig.configuration,
359
- terminalConfigurations: feeProjectConfig.terminalConfigurations,
360
- buybackHookConfiguration: feeProjectConfig.buybackHookConfiguration,
361
- suckerDeploymentConfiguration: feeProjectConfig.suckerDeploymentConfiguration,
362
- tiered721HookConfiguration: feeProjectConfig.hookConfiguration,
363
- allowedPosts: feeProjectConfig.allowedPosts
364
- });
328
+ revnet.basic_deployer.deployWith721sFor({
329
+ revnetId: FEE_PROJECT_ID,
330
+ configuration: feeProjectConfig.configuration,
331
+ terminalConfigurations: feeProjectConfig.terminalConfigurations,
332
+ suckerDeploymentConfiguration: feeProjectConfig.suckerDeploymentConfiguration,
333
+ tiered721HookConfiguration: feeProjectConfig.hookConfiguration,
334
+ allowedPosts: feeProjectConfig.allowedPosts
335
+ });
365
336
  }
366
337
 
367
338
  function _isDeployed(
@@ -9,7 +9,7 @@ import {IJBSplitHook} from "@bananapus/core-v6/src/interfaces/IJBSplitHook.sol";
9
9
  import {IJBOwnable} from "@bananapus/ownable-v6/src/interfaces/IJBOwnable.sol";
10
10
  import {IJB721TiersHook} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHook.sol";
11
11
  import {IJB721TiersHookStore} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHookStore.sol";
12
-
12
+ import {IJB721TiersHook} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHook.sol";
13
13
  import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
14
14
  import {JBSplit} from "@bananapus/core-v6/src/structs/JBSplit.sol";
15
15
  import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
@@ -10,7 +10,7 @@ import {IJBSplitHook} from "@bananapus/core-v6/src/interfaces/IJBSplitHook.sol";
10
10
  import {IJBOwnable} from "@bananapus/ownable-v6/src/interfaces/IJBOwnable.sol";
11
11
  import {IJB721TiersHook} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHook.sol";
12
12
  import {IJB721TiersHookStore} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHookStore.sol";
13
-
13
+ import {IJB721TiersHook} from "@bananapus/721-hook-v6/src/interfaces/IJB721TiersHook.sol";
14
14
  import {JB721TierConfig} from "@bananapus/721-hook-v6/src/structs/JB721TierConfig.sol";
15
15
  import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
16
16
  import {JBSplit} from "@bananapus/core-v6/src/structs/JBSplit.sol";
package/test/Fork.t.sol CHANGED
@@ -95,7 +95,7 @@ contract ForkTest is Test {
95
95
  tokens[0] = JBTokenMapping({
96
96
  localToken: address(JBConstants.NATIVE_TOKEN),
97
97
  minGas: 200_000,
98
- remoteToken: bytes32(uint256(uint160(address(JBConstants.NATIVE_TOKEN)))),
98
+ remoteToken: bytes32(uint256(uint160(JBConstants.NATIVE_TOKEN))),
99
99
  minBridgeAmount: 0.001 ether
100
100
  });
101
101