👩‍💻
Unlockd Developers Docs
Unlockd for Devs V2
Unlockd for Devs V2
  • Introduction
  • ⚙️Core
    • Unlockd
    • BaseCore
    • BaseCoreModule
  • ⚙️Modules
    • Installer
    • Manager
    • Action
    • SellNow
    • BuyNow
    • Market
    • Auction
  • 🆕Vault and Tokens
    • UTokenVault
    • BaseToken
    • ScaledToken
    • WethGateway
  • 🆕Adapters and Strategies
    • ReservoirAdapter
    • MaxApyStrategy
  • 🆕Storage
    • CoreStorage
    • UVaultStorage
  • 📔Deployed Contracts
    • Ethereum Sepolia
    • Ethereum Mainnet
  • 📫Unlockd Account (Wallet)
    • Introduction
    • Architecture
    • DelegationWalletFactory
    • DelegationWalletRegistry
    • DelegationOwner
    • GuardOwner
    • ProtocolOwner
    • TransactionGuard
    • DelegationRecipes
    • AllowedControllers
    • Deployed Contracts
      • Ethereum Sepolia (Testnet)
  • 🧰SDK
    • Typescript Package
    • SDK Docs
  • 🤝DEVELOPERS HELP
    • Best Practices
    • Security and Risk Management
    • Github
    • Bug Bounty - ACTIVE
Powered by GitBook
On this page
  • Key Functions:
  • Parameters:
  • Parameters:
  • Parameters:
  • Returns:
  • Interactions:
  1. Unlockd Account (Wallet)

DelegationRecipes

The DelegationRecipes contract registers and manages allowed functions for specific asset collections. It defines the rules and permissions for asset delegation within the Unlockd Wallet.

Key Functions:

function add(
    address _collection, 
    address[] calldata _contracts, 
    bytes4[] calldata _selectors, 
    string[] calldata _descriptions
) external

Adds a group of allowed functions for a specific asset collection.

Parameters:

_collection (address): The address of the asset collection.

_contracts (address[]): An array of target contract addresses.

_selectors (bytes4[]): An array of allowed function selectors.

_descriptions (string[]): An array of function descriptions.


function remove(
    address _collection, 
    address[] calldata _contracts, 
    bytes4[] calldata _selectors
) external

Removes a group of allowed functions from a specific asset collection.

Parameters:

_collection (address): The address of the asset collection.

_contracts (address[]): An array of target contract addresses.

_selectors (bytes4[]): An array of function selectors to remove.


function isAllowedFunction(
    address _collection, 
    address _contract, 
    bytes4 _selector
) external view returns (bool)

Checks if a function is allowed for a given asset collection.

Parameters:

_collection (address): The address of the asset collection.

_contract (address): The address of the target contract.

_selector (bytes4): The function selector.

Returns:

A boolean indicating whether the function is allowed for the asset collection.


Interactions:

  • Interacts with the DelegationOwner contract to determine allowed functions for asset delegation.

PreviousTransactionGuardNextAllowedControllers

Last updated 1 year ago

📫