🪝Hooks

Hooks are play-and-play smart contract modules that turbocharge your Organization with new features as needs grow and evolve.

Hooks are the secret sauce that makes Badger a powerful tool for building and managing onchain Organizations. They're pre-built smart contract modules that you can plug into your Organization to enhance its functionality, automate processes, and add new features as your needs evolve.

With Hooks, you don't have to start from scratch every time you need to add a new functionality to your Organization. Instead, you can choose from a variety of pre-built modules that have already been tested and verified.

Hooks cover a wide range of use cases, from managing treasury and voting systems to implementing reward mechanisms and enforcing permissions. Whatever your Organization's needs are, chances are there's a Hook that may help you achieve your goals.

🥳 In the coming weeks the Badger web application will unlock this feature for everyone and empower you to enable and disable precise functionality custom-tailored to your situation.

The Hook-Logic Powering Badger

To use Hooks in your Organization, you don't need to be a Solidity developer or have a deep understanding of smart contracts. Hooks are designed to be plug-and-play modules that you can easily integrate into your organization with just a few clicks.

At the core, Hooks work are triggered by key actions of the Badger protocol including:

  • beforeSetHook - Run before a new Hook is enabled.

  • beforeMint - Run before a Badge is minted.

  • beforeRevoke - Run before a new Badge is revoked.

  • beforeForfeit - Run before a Badge is forfeited.

  • beforeTransfer - Run before a Badge is transferred.

The possibilities with Hooks are endless. With the ability to integrate third-party services like IPFS, Oracles, and other Dapps, you can create a powerful network of services that work seamlessly together.

Built-In Hooks

Badger is built including a variety of Hooks that can be used to customize and extend the functionality of your Organization.

As Badger continues to evolve, additional built-In hooks will be added to provide even more functionality and flexibility to your Organization. These Hooks will be designed to be easily integrated and configured to meet your specific needs.

Account Bound Badges

The first built-In hook powers Account Bound Badges, which allows an Organization to bind a user's account to their Ethereum address.

By utilizing Account Bound Badges, only Managers may transfer the Badge.

To enable and disable account bound enforcement on a Badge:

Last updated