Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discounts #33

Merged
merged 22 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ solc = '0.8.23'
vm_version = 'paris' # Required for L2s (Optimism, Arbitrum, etc.)
sizes = true
verbosity = 3 # display errors
optimizer_runs = 1000
optimizer_runs = 800
block_number = 14126430
block_timestamp = 1643802347
runs = 4096
Expand Down
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"dependencies": {
"@bananapus/address-registry": "^0.0.4",
"@bananapus/core": "^0.0.25",
"@bananapus/core": "^0.0.30",
"@bananapus/ownable": "^0.0.6",
"@bananapus/permission-ids": "^0.0.11",
"@bananapus/permission-ids": "^0.0.12",
"@openzeppelin/contracts": "^5.0.2",
"@prb/math": "^4.0.3"
},
Expand Down
26 changes: 14 additions & 12 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,33 @@ contract DeployScript is Script, Sphinx {
: JBAddressRegistry(_registry);
}

JB721TiersHookStore store;
{
// Perform the check for the store.
(address _store, bool _storeIsDeployed) =
_isDeployed(HOOK_STORE_SALT, type(JB721TiersHookStore).creationCode, "");

// Deploy it if it has not been deployed yet.
store = !_storeIsDeployed ? new JB721TiersHookStore{salt: HOOK_STORE_SALT}() : JB721TiersHookStore(_store);
}

JB721TiersHook hook;
{
// Perform the check for the registry.
(address _hook, bool _hookIsDeployed) = _isDeployed(
HOOK_SALT,
type(JB721TiersHook).creationCode,
abi.encode(core.directory, core.permissions, TRUSTED_FORWARDER)
abi.encode(core.directory, core.permissions, core.rulesets, store, TRUSTED_FORWARDER)
);

// Deploy it if it has not been deployed yet.
hook = !_hookIsDeployed
? new JB721TiersHook{salt: HOOK_SALT}(core.directory, core.permissions, TRUSTED_FORWARDER)
? new JB721TiersHook{salt: HOOK_SALT}(
core.directory, core.permissions, core.rulesets, store, TRUSTED_FORWARDER
)
: JB721TiersHook(_hook);
}

JB721TiersHookStore store;
{
// Perform the check for the store.
(address _store, bool _storeIsDeployed) =
_isDeployed(HOOK_STORE_SALT, type(JB721TiersHookStore).creationCode, "");

// Deploy it if it has not been deployed yet.
store = !_storeIsDeployed ? new JB721TiersHookStore{salt: HOOK_STORE_SALT}() : JB721TiersHookStore(_store);
}

JB721TiersHookDeployer hookDeployer;
{
// Perform the check for the registry.
Expand Down
Loading