Skip to content

Commit

Permalink
Merge pull request #28 from xWerk/chore/rebranding
Browse files Browse the repository at this point in the history
Update terminology in accordance with the rebranding
  • Loading branch information
gabrielstoica authored Nov 1, 2024
2 parents f8ba449 + 5003d68 commit 00fee3b
Show file tree
Hide file tree
Showing 73 changed files with 915 additions and 1,112 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<h1 align="center">MetaDock Contracts</h1>
<h1 align="center">Werk Contracts</h1>

<p align="center">
<strong>Smart contracts built for the MetaDock platform.</strong>
<strong>Smart contracts built for the Werk platform.</strong>
</p>

<p align="center">
<a href="https://github.com/metadock/contracts/actions?query=workflow%3Atest">
<img src="https://img.shields.io/github/actions/workflow/status/metadock/contracts/test.yml?branch=main&label=Tests" alt="Tests">
<a href="https://github.com/werk/contracts/actions?query=workflow%3Atest">
<img src="https://img.shields.io/github/actions/workflow/status/werk/contracts/test.yml?branch=main&label=Tests" alt="Tests">
</a>
<a href="https://getfoundry.sh/">
<img src="https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg" alt="Built with Foundry">
</a>
<a href="https://x.com/MetaDockApp">
<img src="https://img.shields.io/twitter/follow/MetaDockApp?label=Follow" alt="Follow on X">
<a href="https://x.com/WerkSocial">
<img src="https://img.shields.io/twitter/follow/WerkSocial?label=Follow" alt="Follow on X">
</a>
<a href="https://discord.com/invite/yTcSdN2uCN">
<img src="https://dcbadge.limes.pink/api/server/yTcSdN2uCN?style=flat" alt="Join Discord">
</a>
</p>

<p align="center">
<a href="https://www.metadock.com/">
<img src="docs/images/metadock_banner.jpeg" alt="Logo">
<a href="https://www.werk.so/">
<img src="docs/images/werk_banner.jpeg" alt="Logo">
</a>
</p>

MetaDock aims to offer a decentralised platform for freelancers and small companies to run all their operations
leveraging the power of web3 as an organisation.
Werk aims to offer a decentralised platform for freelancers and small companies to run all their operations leveraging
the power of web3 as an organisation.

## Architecture

Multiple Containers can be deployed, allowing ERC-20 and native tokens (ETH) to be deposited, acting as a user vault. At
the same time, a Container can execute arbitrary code on an unlimited number of Modules. This ability enhances the
MetaDock protocol with a modular architecture, providing an opportunity to create an open market of Modules where
external players can create and integrate their own use-cases into the protocol.
the same time, a Container can execute arbitrary code on an unlimited number of Modules. This ability enhances the Werk
protocol with a modular architecture, providing an opportunity to create an open market of Modules where external
players can create and integrate their own use-cases into the protocol.

A module must first be allowlisted through the `ModuleKeeper` before being made publicly available to MetaDock users.
Currently, due to the high-security risks, only the MetaDock team can add modules to or remove them from the allowlist.
A module must first be allowlisted through the `ModuleKeeper` before being made publicly available to Werk users.
Currently, due to the high-security risks, only the Werk team can add modules to or remove them from the allowlist.

Once a module is allowlisted, it can be enabled via the `enableModule()` method available on any `Container`.

Expand All @@ -54,13 +54,13 @@ creation and management.
## Contribute

Anyone is welcomed to contribute either by creating & proposing a new module or simply
[opening](https://github.com/metadock/contracts/issues/new) an issue, starting a discussion or submitting a PR.
[opening](https://github.com/werk/contracts/issues/new) an issue, starting a discussion or submitting a PR.

If you want to propose a new module, fork this repository and create a new folder inside the `src/modules/[module-name]`
folder following the `src/modules/invoice-module` module structure. Then, create a new PR with the module logic and a
detailed description of its capabilities.

## License

The primary license for MetaDock contracts is the GNU General Public License v3.0 (`GPL-3.0-or-later`),
see [LICENSE](https://github.com/metadock/contracts//blob/main/LICENSE). However, many files in `test/` are unlicensed.
The primary license for Werk contracts is the GNU General Public License v3.0 (`GPL-3.0-or-later`),
see [LICENSE](https://github.com/werk/contracts//blob/main/LICENSE). However, many files in `test/` are unlicensed.
Binary file removed docs/images/metadock_banner.jpeg
Binary file not shown.
Binary file added docs/images/werk_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 0 additions & 25 deletions script/DeployContainer.s.sol

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
pragma solidity ^0.8.26;

import { BaseScript } from "./Base.s.sol";
import { DockRegistry } from "./../src/DockRegistry.sol";
import { StationRegistry } from "./../src/StationRegistry.sol";
import { ModuleKeeper } from "./../src/ModuleKeeper.sol";
import { EntryPoint } from "@thirdweb/contracts/prebuilts/account/utils/Entrypoint.sol";

/// @notice Deploys at deterministic addresses across chains an instance of {DockRegistry}
/// @notice Deploys at deterministic addresses across chains an instance of {StationRegistry}
/// @dev Reverts if any contract has already been deployed
contract DeployDeterministicDockRegistry is BaseScript {
contract DeployDeterministicStationRegistry is BaseScript {
/// @dev By using a salt, Forge will deploy the contract via a deterministic CREATE2 factory
/// https://book.getfoundry.sh/tutorials/create2-tutorial?highlight=deter#deterministic-deployment-using-create2
function run(
string memory create2Salt,
address initialAdmin,
EntryPoint entrypoint,
ModuleKeeper moduleKeeper
) public virtual broadcast returns (DockRegistry dockRegistry) {
) public virtual broadcast returns (StationRegistry stationRegistry) {
bytes32 salt = bytes32(abi.encodePacked(create2Salt));

// Deterministically deploy the {DockRegistry} smart account factory
dockRegistry = new DockRegistry{ salt: salt }(initialAdmin, entrypoint, moduleKeeper);
// Deterministically deploy the {StationRegistry} smart account factory
stationRegistry = new StationRegistry{ salt: salt }(initialAdmin, entrypoint, moduleKeeper);
}
}
25 changes: 25 additions & 0 deletions script/DeploySpace.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.26;

import { BaseScript } from "./Base.s.sol";
import { Space } from "../src/Space.sol";
import { StationRegistry } from "./../src/StationRegistry.sol";

/// @notice Deploys an instance of {Space} and enables initial module(s)
contract DeploySpace is BaseScript {
function run(
address initialAdmin,
StationRegistry stationRegistry,
uint256 stationId,
address[] memory initialModules
) public virtual broadcast returns (Space space) {
// Get the number of total accounts created by the `initialAdmin` deployer
uint256 totalAccountsOfAdmin = stationRegistry.totalAccountsOfSigner(initialAdmin);

// Construct the ABI-encoded data to be passed to the `createAccount` method
bytes memory data = abi.encode(totalAccountsOfAdmin, stationId, initialModules);

// Deploy a new {Space} smart account through the {StationRegistry} account factory
space = Space(payable(stationRegistry.createAccount(initialAdmin, data)));
}
}
162 changes: 0 additions & 162 deletions src/DockRegistry.sol

This file was deleted.

Loading

0 comments on commit 00fee3b

Please sign in to comment.