Account Abstraction & SAFE integration: Partitura’s PowerAgentModule module

PowerPool
PowerPool
Published in
3 min readJan 31, 2024

PowerPool is rapidly expanding its ecosystem, providing Builder Grants of up to $20,000 to visionary developers.

In this article, we will explore the developments made by Partitura, one of our ecosystem partners. They are developing the PowerAgentModule, which aims to unlock the full potential of Account Abstraction for Safe users through PowerPool automation.

To apply for a PowerPool Builder Grant, fill in the application on Gitcoin Grants Stack: https://builder.gitcoin.co/#/chains/1/rounds/0xfaf7c654cc14cdeed889685a2a74bf9a2f314ca0

Partitura’s PowerAgentModule for Safe

This module empowers the execution of pre-approved transactions without necessitating the addition of a PowerAgent Keeper as Safe's owner.

Furthermore, this module allows Safe users to whitelist and delist transactions that can be seamlessly automated on a dedicated safe wallet, thereby enabling Account Abstraction in the form of Smart Contact Accounts (SCAs) within the PowerPool ecosystem.

The setup process for the module entails a series of transactions that can be executed in a single batch:

- registerJob registers a new Job in PowerAgent
- addModule adds the PowerPoolModule to the SCA
- whitelistJob adds the created Job to the whitelist in the module

Upon completion of Partitura’s project, the executions on users’ SCAs can be effortlessly automated, unlocking a whole world of possibilities facilitated by PowerAgent. This development brings a new era of efficiency and convenience within the PowerPool ecosystem.

Learn more about Partitura and its project in our previous interview article.

What has been done?

At this stage, Partitura has completed two of the four milestones set in their proposal.

They have developed the Proof-of-Concept, clearly demonstrating the potential for their project, and completed creating the smart contract for the module.

Explaining the code

The code can be found in the Partitura repository. It is open for anyone to test themselves.

The Partitura Module is a smart contract that creates and routes the execution of an automation task (Job) owned by the Safe wallet. This contract can be enabled as a module on your Safe account. After that a seamless automation experience is achieved via the Safe app user interface. The Job can be created and managed through the Partitura Module.

The module ensures that only transactions from the Job, which is owned by your Safe wallet, will pass through, eliminating the risk of someone else targeting your wallet with automated transactions. The only allowed executor is the Agent contract, meaning that any other transactions will be reverted.

Testing results (deployed addresses/Txns/other)

The successful testing transactions can be found on this link. Let us explain the routing that happens during the execution:

  1. The module is enabled in the Safe Account.
  2. An automation task is submitted to the PowerAgent network using the Safe Account.
  3. Once execution conditions are met, the assigned Keeper sends the execution transaction.
  4. The Agent routes the transaction to the Partitura Module if all checks pass.
  5. The Module ensures that (a) the transaction comes from the Agent contract and (b) the transaction originates from the Job that the Safe Account owns.
  6. The Module calls the Safe Account execTransactionFromModuleReturnData function, which is the native to the Account Abstraction way to execute transactions on the Safe Account from an enabled module.

This effectively allows automated transactions from the Safe Account, as if the owner signed the transaction manually.

What’s next?

Now Partitura’s team is getting ready to deploy the smart contract on all supported networks, perform final testing, develop their dApp, and add PowerPool in the Partitura dApp UI.

Twitter | Discord | YouTube |Telegram | CMC Community | Debank | Medium

--

--

PowerPool
PowerPool

DePIN layer powering AI Agents and DeFi automation in multichain universe.