Skip to content

Commit

Permalink
Merge branch 'main' into pre-audit
Browse files Browse the repository at this point in the history
  • Loading branch information
filipviz committed Apr 6, 2024
2 parents 5222537 + b7de18b commit 648aee8
Show file tree
Hide file tree
Showing 24 changed files with 3,628 additions and 970 deletions.
335 changes: 335 additions & 0 deletions deployments/compiler-inputs/950f56a064d8d2e7ba7c87a45921f9f4.json

Large diffs are not rendered by default.

146 changes: 86 additions & 60 deletions deployments/nana-721-hook/optimism_sepolia/JB721TiersHook.json

Large diffs are not rendered by default.

146 changes: 86 additions & 60 deletions deployments/nana-721-hook/optimism_sepolia/JB721TiersHookDeployer.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

517 changes: 409 additions & 108 deletions deployments/nana-721-hook/optimism_sepolia/JBAddressRegistry.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

185 changes: 125 additions & 60 deletions deployments/nana-721-hook/polygon_mumbai/JB721TiersHook.json

Large diffs are not rendered by default.

185 changes: 125 additions & 60 deletions deployments/nana-721-hook/polygon_mumbai/JB721TiersHookDeployer.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

436 changes: 376 additions & 60 deletions deployments/nana-721-hook/polygon_mumbai/JBAddressRegistry.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

168 changes: 97 additions & 71 deletions deployments/nana-721-hook/sepolia/JB721TiersHook.json

Large diffs are not rendered by default.

168 changes: 97 additions & 71 deletions deployments/nana-721-hook/sepolia/JB721TiersHookDeployer.json

Large diffs are not rendered by default.

170 changes: 98 additions & 72 deletions deployments/nana-721-hook/sepolia/JB721TiersHookProjectDeployer.json

Large diffs are not rendered by default.

519 changes: 410 additions & 109 deletions deployments/nana-721-hook/sepolia/JBAddressRegistry.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/sphinx
Submodule sphinx updated 68 files
+4 −4 .circleci/config.yml
+0 −3 .gitmodules
+7 −1 README.md
+24 −19 docs/cli-existing-project.md
+16 −10 docs/cli-quickstart.md
+43 −0 packages/contracts/CHANGELOG.md
+75 −127 packages/contracts/contracts/foundry/Sphinx.sol
+214 −76 packages/contracts/contracts/foundry/SphinxConstants.sol
+4 −0 packages/contracts/contracts/foundry/SphinxPluginTypes.sol
+375 −29 packages/contracts/contracts/foundry/SphinxUtils.sol
+4 −0 packages/contracts/foundry.toml
+1 −1 packages/contracts/package.json
+14 −1 packages/contracts/scripts/write-constants.ts
+222 −149 packages/contracts/src/networks.ts
+1 −1 packages/contracts/src/version.ts
+422 −2 packages/contracts/test/Sphinx.t.sol
+48 −2 packages/contracts/test/SphinxTestUtils.sol
+137 −13 packages/contracts/test/SphinxUtils.t.sol
+8 −0 packages/contracts/test/forge-tests.sh
+6 −0 packages/contracts/test/helpers/MyTestContracts.t.sol
+21 −0 packages/contracts/test/issues/CHU572.s.sol
+22 −0 packages/contracts/test/issues/CHU663.s.sol
+23 −0 packages/contracts/test/issues/CHU663/CHU663.s.sol
+0 −203 packages/contracts/test/mocha/moonbeam-gas.spec.ts
+73 −0 packages/core/CHANGELOG.md
+3 −2 packages/core/package.json
+80 −11 packages/core/src/actions/execute.ts
+49 −3 packages/core/src/actions/types.ts
+10 −0 packages/core/src/config/types.ts
+2 −0 packages/core/src/constants.ts
+12 −0 packages/core/src/errors.ts
+29 −11 packages/core/src/etherscan.ts
+2 −0 packages/core/src/index.ts
+1 −1 packages/core/src/languages/solidity/predeploys.ts
+3 −2 packages/core/src/networks.ts
+134 −11 packages/core/src/preview.ts
+1 −13 packages/core/src/provider.ts
+67 −11 packages/core/src/utils.ts
+9 −1 packages/core/test/convert.spec.ts
+140 −19 packages/core/test/preview.spec.ts
+32 −2 packages/core/test/utils.spec.ts
+0 −1 packages/demo/foundry.toml
+90 −0 packages/plugins/CHANGELOG.md
+6 −0 packages/plugins/contracts/test/MyContracts.sol
+10 −1 packages/plugins/contracts/test/script/Cases.s.sol
+15 −0 packages/plugins/contracts/test/script/Simple.s.sol
+5 −1 packages/plugins/foundry.toml
+6 −3 packages/plugins/package.json
+19 −4 packages/plugins/src/cli/deploy.ts
+17 −3 packages/plugins/src/cli/propose/index.ts
+2 −4 packages/plugins/src/cli/types.ts
+25 −4 packages/plugins/src/foundry/decode.ts
+8 −0 packages/plugins/src/foundry/error-messages.ts
+10 −6 packages/plugins/src/foundry/options.ts
+80 −26 packages/plugins/src/foundry/utils/index.ts
+19 −16 packages/plugins/src/hardhat/hardhatRunner.ts
+276 −102 packages/plugins/src/hardhat/simulate.ts
+0 −1 packages/plugins/src/sample-project/sample-foundry-config.ts
+2 −0 packages/plugins/test/mocha/artifacts.spec.ts
+259 −169 packages/plugins/test/mocha/cli/deploy.spec.ts
+63 −7 packages/plugins/test/mocha/cli/propose.spec.ts
+230 −42 packages/plugins/test/mocha/common.ts
+56 −1 packages/plugins/test/mocha/dummy.ts
+20 −1 packages/plugins/test/mocha/fake.ts
+26 −4 packages/plugins/test/mocha/foundry/decode.spec.ts
+2 −0 packages/plugins/test/mocha/mock.ts
+294 −2 packages/plugins/test/mocha/simulate.spec.ts
+14 −1 yarn.lock
225 changes: 106 additions & 119 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
},
"dependencies": {
"@bananapus/address-registry": "^0.0.4",
"@bananapus/core": "^0.0.8",
"@bananapus/ownable": "^0.0.4",
"@bananapus/core": "^0.0.9",
"@bananapus/ownable": "^0.0.5",
"@bananapus/permission-ids": "^0.0.5",
"@openzeppelin/contracts": "^5.0.1",
"@openzeppelin/contracts": "^5.0.2",
"@prb/math": "^4.0.2",
"@sphinx-labs/plugins": "^0.30.4"
"@sphinx-labs/plugins": "^0.30.12"
}
}
8 changes: 6 additions & 2 deletions src/JB721TiersHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ contract JB721TiersHook is JBOwnable, ERC2771Context, JB721Hook, IJB721TiersHook
IJBPermissions permissions,
address trustedForwarder
)
JBOwnable(directory.PROJECTS(), permissions)
JBOwnable(directory.PROJECTS(), permissions, msg.sender, uint88(0))
JB721Hook(directory)
ERC2771Context(trustedForwarder)
{
Expand Down Expand Up @@ -404,7 +404,11 @@ contract JB721TiersHook is JBOwnable, ERC2771Context, JB721Hook, IJB721TiersHook
override
{
// Enforce permissions.
_requirePermissionFrom({account: owner(), projectId: projectId, permissionId: JBPermissionIds.SET_721_METADATA});
_requirePermissionFrom({
account: owner(),
projectId: projectId,
permissionId: JBPermissionIds.SET_721_METADATA
});

if (bytes(baseUri).length != 0) {
// Store the new base URI.
Expand Down
2 changes: 1 addition & 1 deletion src/abstract/JB721Hook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {IJBRulesetDataHook} from "@bananapus/core/src/interfaces/IJBRulesetDataH
import {IJBDirectory} from "@bananapus/core/src/interfaces/IJBDirectory.sol";
import {IJBPayHook} from "@bananapus/core/src/interfaces/IJBPayHook.sol";
import {IJBRedeemHook} from "@bananapus/core/src/interfaces/IJBRedeemHook.sol";
import {IJBTerminal} from "@bananapus/core/src/interfaces/terminal/IJBTerminal.sol";
import {IJBTerminal} from "@bananapus/core/src/interfaces/IJBTerminal.sol";
import {JBConstants} from "@bananapus/core/src/libraries/JBConstants.sol";
import {JBBeforePayRecordedContext} from "@bananapus/core/src/structs/JBBeforePayRecordedContext.sol";
import {JBAfterPayRecordedContext} from "@bananapus/core/src/structs/JBAfterPayRecordedContext.sol";
Expand Down
1 change: 1 addition & 0 deletions test/E2E/Pay_Mint_Redeem_E2E.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ contract Test_TiersHook_E2E is TestBaseWorkflow {
super.setUp();
hook = new JB721TiersHook(jbDirectory, jbPermissions, trustedForwarder);
addressRegistry = new JBAddressRegistry();
store = new JB721TiersHookStore();
JB721TiersHookDeployer hookDeployer = new JB721TiersHookDeployer(hook, store, addressRegistry, trustedForwarder);
deployer =
new JB721TiersHookProjectDeployer(IJBDirectory(jbDirectory), IJBPermissions(jbPermissions), hookDeployer);
Expand Down
6 changes: 3 additions & 3 deletions test/utils/TestBaseWorkflow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import "@bananapus/core/src/structs/JBBeforePayRecordedContext.sol";
import "@bananapus/core/src/structs/JBBeforeRedeemRecordedContext.sol";
import "@bananapus/core/src/structs/JBSplit.sol";

import "@bananapus/core/src/interfaces/terminal/IJBTerminal.sol";
import "@bananapus/core/src/interfaces/IJBTerminal.sol";
import "@bananapus/core/src/interfaces/IJBToken.sol";

import "@bananapus/permission-ids/src/JBPermissionIds.sol";
Expand Down Expand Up @@ -80,7 +80,7 @@ contract TestBaseWorkflow is Test {
jbPermissions = new JBPermissions();
vm.label(address(jbPermissions), "JBPermissions");

jbProjects = new JBProjects(projectOwner);
jbProjects = new JBProjects(projectOwner, address(0));
vm.label(address(jbProjects), "JBProjects");

jbPrices = new JBPrices(jbPermissions, jbProjects, projectOwner);
Expand All @@ -98,7 +98,7 @@ contract TestBaseWorkflow is Test {
jbFeelessAddresses = new JBFeelessAddresses(address(69));
vm.label(address(jbFeelessAddresses), "JBFeelessAddresses");

jbTokens = new JBTokens(jbDirectory);
jbTokens = new JBTokens(jbDirectory, new JBERC20());
vm.label(address(jbTokens), "JBTokens");

jbSplits = new JBSplits(jbDirectory);
Expand Down
2 changes: 1 addition & 1 deletion test/utils/UnitTestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import "@bananapus/core/src/structs/JBAfterPayRecordedContext.sol";
import "@bananapus/core/src/structs/JBAfterRedeemRecordedContext.sol";
import "@bananapus/core/src/structs/JBRedeemHookSpecification.sol";
import "@bananapus/core/src/structs/JBFundAccessLimitGroup.sol";
import "@bananapus/core/src/interfaces/terminal/IJBTerminal.sol";
import "@bananapus/core/src/interfaces/IJBTerminal.sol";
import "@bananapus/core/src/interfaces/IJBRulesetApprovalHook.sol";

import "../../src/structs/JBLaunchProjectConfig.sol";
Expand Down

0 comments on commit 648aee8

Please sign in to comment.