Smart contracts built for the Werk platform.
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.
At its core, the Werk protocol enables users to create Space accounts, which serve as vaults for depositing ERC-20 tokens and native tokens (ETH). These accounts are flexible and can be extended to meet the evolving needs of users. A Space is built on the ERC-4337 standard, leveraging the benefits of the Account Abstraction ecosystem. This architecture allows Space accounts to execute arbitrary code through enabled modules. This capability endows the Werk protocol with a modular and extensible framework. It also creates opportunities for an open market of modules, where external developers can design and integrate their own use cases into the protocol, fostering innovation and expanding the ecosystem.
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 Space
account.
Our first available module is called PaymentModule
. This module enables users to create on-chain payment requests that
can be paid in any ERC-20 token or native ETH using various methods, such as transfer,
linear or
tranched stream.
The PaymentModule
relies on the Sablier V2 protocol for stream
creation and management.
Werk protocol provides a peripheral module called WerkSubdomainRegistrar
that allows users to register ENS subdomains
for their Space
accounts. This feature enables users to easily manage and reference their Space
accounts using
familiar domain names.
Install Werk contracts using your favourite package manager:
bun install
Anyone is welcomed to contribute either by creating & proposing a new module or simply opening 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.
The primary license for Werk contracts is the GNU General Public License v3.0 (GPL-3.0-or-later
),
see LICENSE. However, many files in test/
are unlicensed.