Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: MCP Sentinel 2.29.0 — Minor update available for module mcp_sentinel (2.29.0). Release: Audit Chain 1.10.9 — Minor update available for module audit_chain (1.10.9). Release: Menu Autopilot 1.4.7 — Minor update available for module menu_autopilot (1.4.7). Release: FileGate 1.11.3 — Minor update available for module file_gate (1.11.3). Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

This module implement a new plugin type (e.g. web3_provider) to allow your site to interact with blockchains - such as making JSON-RPC calls to Ethereum network nodes - and with web3 wallets such (e.g. like Metamask)

This module does nothing on its own except providing a settings form to configure the existing Web3 Provider plugins. Developers can use the plugin.manager.web3_provider service to embed the configuration and/or transaction plugins' forms.

You can define your own plugin as follow:

<?php

namespace Drupal\mymodule\Plugin\Web3Provider;

use Drupal\web3_provider\Plugin\Web3Provider\Web3ProviderBase;

/**
 * Defines my custom web3_provider plugin to communicate with the XXX blockchain.
 *
 * @Web3Provider(
 *   id = "mymodule_provider",
 *   title = @Translation("TheBest Blockchain"),
 *   description = @Translation("Interact with the most profitable blockchain in the universe.")
 * )
 */
class MyModuleProvider extends Web3ProviderBase {

  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    // Add your custom editable settings here.
     return $form;
  }

  public function buildTransactionForm(array $form, FormStateInterface $form_state) {
    // Do your things here.
    return $form;
  }
}

Related modules

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-beta1 Pre-release Mar 6, 2023
1.0.x-dev Dev Mar 2, 2023