Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

Features

Safe Smart Accounts integrates Safe Smart Accounts (formerly Gnosis Safe) into Drupal, enabling users to deploy and manage multi-signature Ethereum wallets directly from their Drupal user profiles.

Basic Functionality

  • Deploy Safe Smart Accounts: Users can deploy their own Safe accounts to Sepolia testnet (or mainnet) with custom signer configurations and threshold requirements
  • Multi-Signature Management: Create transactions that require multiple signatures before execution, ideal for shared treasuries and collaborative fund management
  • Transaction Workflow: Full transaction lifecycle from creation through signature collection to on-chain execution, all within Drupal's UI
  • Signer Management: Add or remove signers and adjust signature thresholds through on-chain configuration changes
  • Role-Based Access: Supports both Safe owners (creators) and signers (collaborators) with appropriate permissions

Unique Features

  • Entity-First Architecture: Safe accounts, transactions, and configurations are Drupal entities with full CRUD workflows, caching, and access control
  • Deterministic Deployment: Uses CREATE2 for predictable Safe addresses before deployment
  • MetaMask Integration: Seamless wallet integration for deployment, signing, and execution without custom backend infrastructure
  • SIWE Authentication: Integrates with the SIWE Login module for Ethereum wallet-based authentication
  • Automatic State Sync: Database automatically updates to reflect on-chain state changes after transaction execution

Use Cases

  • DAO Treasuries: Enable Drupal-based DAOs and communities to manage shared funds with multi-signature security
  • Group Financial Management: Organizations using Drupal can deploy Safe accounts for collaborative fund management
  • Web3 Community Platforms: Social platforms built with Open Social or similar distributions can offer treasury features to groups
  • Crypto-Native Organizations: Companies operating on-chain can use Drupal as their organizational interface while maintaining custody through Safe accounts

Post-Installation

Initial Setup

  1. Enable the Module: drush en safe_smart_accounts -y
  2. Configure Network Settings: Visit /admin/config/safe-smart-accounts/settings to configure:
    • Ethereum network (Sepolia testnet or Ethereum mainnet)
    • RPC endpoint URL (Alchemy, Infura, or custom)
    • Safe contract addresses (pre-filled for standard deployments)
  3. Ensure SIWE Login is Enabled: Users must authenticate with Ethereum wallets via the SIWE Login module

User Workflow

Once installed, SIWE-authenticated users can:

  • Navigate to their profile tab: "Manage Safes"
  • Click "Create Safe Smart Account" to deploy a new Safe
  • Configure initial signers (Ethereum addresses) and threshold (e.g., 2 of 3 signatures required)
  • Approve deployment transaction in MetaMask
  • Wait for blockchain confirmation (~30 seconds on testnet)
  • Begin creating and signing transactions from the Safe management interface

Special Considerations

  • MetaMask Required: Users need MetaMask or a compatible Web3 wallet browser extension
  • Gas Fees: Deploying Safes and executing transactions requires ETH for gas fees
  • Testnet First: Start with Sepolia testnet to familiarize users before mainnet deployment
  • Cache Management: The module uses Drupal's cache system extensively; always use drush cr after configuration changes

Additional Requirements

Drupal Modules

  • SIWE Login (Required) - Provides Ethereum wallet authentication (EIP-4361: Sign-In with Ethereum)

PHP Requirements

  • PHP 8.2+ with GMP extension (required for Ethereum address checksum validation)
  • DDEV users: Add webimage_extra_packages: [php8.3-gmp] to .ddev/config.yaml

JavaScript Libraries

  • ethers.js v6 - Loaded via CDN (no local installation required)
  • Module includes all necessary JavaScript for Safe deployment, transaction signing, and configuration management

Blockchain Infrastructure

  • Ethereum RPC Endpoint - Alchemy, Infura, or self-hosted node
  • Safe Contracts - Pre-deployed on Sepolia and mainnet (addresses configured in module settings)
  • Open Social - This module integrates seamlessly with Open Social distributions for group treasury functionality
  • Group - For organizing users and associating Safe accounts with Drupal groups
  • Group Treasury - A companion module that extends Safe Smart Accounts to provide group-based treasury management for Drupal groups

Similar projects

To our knowledge, there are no other Drupal modules providing Safe Smart Account integration. Related projects include:

  • Ethereum - Provides lower-level Ethereum blockchain integration but does not include Safe-specific functionality or multi-signature wallet management
  • Web3 - General Web3 connectivity utilities, but lacks the entity-first Safe account management approach
  • SIWE Login - Required dependency; handles wallet authentication but not treasury management

What differentiates Safe Smart Accounts:

  • Complete entity-based architecture with Drupal-native CRUD workflows
  • Full Safe Smart Account lifecycle management (deployment, configuration, transactions)
  • Multi-signature transaction signing and execution workflows
  • Automatic synchronization between blockchain state and Drupal database
  • Production-ready MetaMask integration with proper signature handling (eth_sign flow with v=31/32)

Supporting this Module

This module was developed as part of ongoing research into decentralized governance and Web3 community tools. If you find it useful, consider:

  • Contributing bug reports and feature requests on the issue queue
  • Submitting patches and improvements via merge requests
  • Sharing your use cases and deployment stories with the community
  • Sponsoring development through GitHub Sponsors (link coming soon)

Community Documentation

  • GitHub Repository: https://github.com/proofoftom/drupal_safe_smart_accounts - Includes comprehensive CLAUDE.md documentation and service interface specs
  • User Guide: See USERGUIDE.md in the module directory for step-by-step workflows
  • Service Interfaces: See SERVICE_INTERFACES.md for developer documentation on the service architecture
  • Safe Documentation: https://docs.safe.global - Official Safe Smart Account documentation for understanding the underlying protocol
  • Demo Site: Coming soon - DrupalPod instance for testing without local setup

Development & Testing

This module includes comprehensive development tooling:

  • Hardhat Integration: Smart contract testing environment included in hardhat.config.ts
  • TypeScript Tests: Integration tests in test-safe-contracts.ts using Mocha and ethers.js v6
  • Manual QA Checklists: Validation checklists in validation/ directory for Safe deployment, transactions, and configuration management
  • PHPStan & PHPCS: Static analysis and coding standards compliance

Architecture Highlights

Safe Smart Accounts follows Drupal best practices with a service-oriented architecture:

  • Three Custom Entities: SafeAccount, SafeTransaction, SafeConfiguration
  • Service Layer: SafeConfigurationService, SafeTransactionService, SafeBlockchainService, UserSignerResolver
  • Cache Invalidation: Automatic cache tag invalidation when Safe state changes, including propagation to all signers
  • Access Control: Both route-level and entity-level access checks supporting owners and signers
  • Post-Execution Sync: Database automatically updates after on-chain configuration changes

Roadmap

Planned features for future releases:

  • Support for additional EVM networks (Polygon, Optimism, Arbitrum, Base)
  • Integration with Safe Transaction Service API for off-chain signature collection
  • Module support (enable Safe modules like spending limits, recovery mechanisms)
  • ENS name resolution for signer addresses
  • Transaction templates and common operation shortcuts
  • Safe app integration framework for extending functionality

Activity

Total releases
1
First release
Dec 2025
Latest release
4 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Dec 12, 2025