这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6358ad2
Merge pull request #4 from 0xZeroLabs/main
notxorand Feb 9, 2025
c8e8896
feat: init `payment`-processor
notxorand Feb 9, 2025
187f938
Merge pull request #7 from 0xZeroLabs/main
notxorand Feb 21, 2025
6d06492
chore: update `.env.example`
notxorand Feb 23, 2025
4ac7f86
refactor: `alloy` update
notxorand Feb 23, 2025
9c73e02
chore: init `ForgeStorage`
notxorand Feb 23, 2025
51503a3
refactor: updated deps to include `PIL` data
notxorand Feb 23, 2025
7952205
chore: payment & pils
notxorand Feb 23, 2025
d9df4bb
refactor: made actionable steps
notxorand Feb 23, 2025
b852bfc
refactor: index event amounts
notxorand Feb 23, 2025
b4e012a
refactor: added comments
notxorand Feb 23, 2025
76e1ce0
feat: added `reinitialize`
notxorand Mar 3, 2025
79a82a1
chore: `ROYALTY_POLICY_LAP`
notxorand Mar 3, 2025
26e2fc9
chore: updated `ForgeRegistry` script
notxorand Mar 3, 2025
180ac38
chore: upgraded `remappings` and deps
notxorand Mar 3, 2025
f3aaa8c
refactor: updated `upgrade` shell script
notxorand Mar 3, 2025
18c2376
refactor: removed redundant crate
notxorand Mar 3, 2025
cd70bfe
refactor: removed redundant `bin`
notxorand Mar 3, 2025
ac9dd00
fix: `0_ForgeRegistry.t.sol`
notxorand Mar 3, 2025
0735705
chore: redeployed contract
notxorand Mar 3, 2025
1d5f3fa
refactor: updated deps, cleaned crates
notxorand Mar 3, 2025
ccb32ed
refactor: updated `register` args
notxorand Mar 3, 2025
f76e829
refactor: check `is_batcher` & `submitter_balance`, set `gas_price`
notxorand Mar 6, 2025
973a65b
refactor: corrected error code
notxorand Mar 6, 2025
488b458
refactor: current version
notxorand Mar 6, 2025
33d864a
refactor: `require` > `revert PayerInsufficientBalance`
notxorand Mar 6, 2025
129ccf4
chore: hold of on `PIL`
notxorand Mar 6, 2025
ceb074c
refactor: new deployment
notxorand Mar 6, 2025
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: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PRIVATE_KEY_DEPLOYER=
L1_CHAIN=
L2_CHAIN=
OTHENTIC_BOOTSTRAP_SEED=
OTHENTIC_BOOTSTRAP_ID=
100 changes: 64 additions & 36 deletions execution/contracts/broadcast/ForgeRegistry.s.sol/1315/run-latest.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion execution/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ cache_path = 'forge-cache'
gas_reports = ["*"]
optimizer = true
optimizer_runs = 20000
via_ir = true
test = 'test'
solc = '0.8.26'
fs_permissions = [{ access = 'read', path = './' }, { access = 'read-write', path = './deploy-out' }]
fs_permissions = [{ access = 'read', path = './out' }, { access = 'read-write', path = './deploy-out' }]
evm_version = 'cancun'
23 changes: 12 additions & 11 deletions execution/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"dependencies": {
"@openzeppelin/contracts": "^5.1.0",
"@openzeppelin/contracts-upgradeable": "^5.1.0",
"@story-protocol/protocol-core": "github:storyprotocol/protocol-core-v1#v1.2.3",
"@story-protocol/protocol-periphery": "github:storyprotocol/protocol-periphery-v1#v1.2.4",
"erc6551": "^0.3.1"
},
"devDependencies": {
"ds-test": "github:dapphub/ds-test",
"forge-std": "github:foundry-rs/forge-std#v1.7.6"
}
"dependencies": {
"@openzeppelin/contracts": "^5.2.0",
"@openzeppelin/contracts-upgradeable": "^5.2.0",
"@story-protocol/protocol-core": "github:storyprotocol/protocol-core-v1#v1.3.1",
"@story-protocol/protocol-periphery": "github:storyprotocol/protocol-periphery-v1#v1.3.1",
"erc6551": "^0.3.1",
"solady": "^0.1.10"
},
"devDependencies": {
"ds-test": "github:dapphub/ds-test",
"forge-std": "github:foundry-rs/forge-std#v1.7.6"
}
}
115 changes: 41 additions & 74 deletions execution/contracts/pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions execution/contracts/remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
erc6551/=node_modules/erc6551/
forge-std/=node_modules/forge-std/src/
ds-test/=node_modules/ds-test/src/
@storyprotocol/test/=node_modules/@story-protocol/protocol-core/test/foundry/
@solady/=node_modules/solady/
23 changes: 19 additions & 4 deletions execution/contracts/script/ForgeRegistry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ contract DeployForgeRegistry is Script {
ForgeRegistry.initialize.selector,
vm.envAddress("IP_ASSET_REGISTRY_ADDRESS"),
vm.envAddress("REGISTRATION_WORKFLOWS_ADDRESS"),
deployer
vm.envAddress("PILICENSE_TEMPLATE_ADDRESS"),
vm.envAddress("ROYALTY_POLICY_LAP_ADDRESS"),
vm.envAddress("LICENSING_MODULE_ADDRESS"),
deployer,
vm.envAddress("BATCHER_ADDRESS")
);

ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), data);

ForgeRegistry(address(proxy));
ForgeRegistry(payable(address(proxy)));

vm.stopBroadcast();

Expand All @@ -36,16 +40,27 @@ contract UpgradeForgeRegistry is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address proxyAddress = vm.envAddress("PROXY_ADDRESS");
address deployer = vm.addr(deployerPrivateKey);

vm.startBroadcast(deployerPrivateKey);

// Deploy new implementation
ForgeRegistry newImplementation = new ForgeRegistry();

// Upgrade
bytes memory data = abi.encodeWithSelector(
ForgeRegistry.reinitialize.selector,
vm.envAddress("IP_ASSET_REGISTRY_ADDRESS"),
vm.envAddress("REGISTRATION_WORKFLOWS_ADDRESS"),
vm.envAddress("PILICENSE_TEMPLATE_ADDRESS"),
vm.envAddress("ROYALTY_POLICY_LAP_ADDRESS"),
vm.envAddress("LICENSING_MODULE_ADDRESS"),
deployer,
vm.envAddress("BATCHER_ADDRESS")
);
// Upgrade and call the reinitializer
UUPSUpgradeable(proxyAddress).upgradeToAndCall(
address(newImplementation),
"" // No need to call initialize again
data
);

vm.stopBroadcast();
Expand Down
Loading
Loading