ETH Price: $2,626.34 (-1.23%)

Contract

0xd39164369C37c412a04603666DcF4C7b33137748
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Configure Forwar...218059572025-02-09 2:25:112 days ago1739067911IN
0xd3916436...b33137748
0 ETH0.000129121.05614143
Configure Forwar...217828502025-02-05 21:01:356 days ago1738789295IN
0xd3916436...b33137748
0 ETH0.000158931.3
Configure Forwar...217750142025-02-04 18:45:597 days ago1738694759IN
0xd3916436...b33137748
0 ETH0.000256742.1
Configure Forwar...217281222025-01-29 5:33:1113 days ago1738128791IN
0xd3916436...b33137748
0 ETH0.00020541.68010484
Configure Forwar...216922552025-01-24 5:25:3518 days ago1737696335IN
0xd3916436...b33137748
0 ETH0.00050914.16409729
Configure Forwar...216866922025-01-23 10:47:5919 days ago1737629279IN
0xd3916436...b33137748
0 ETH0.000953287.79718945
Configure Forwar...215754002025-01-07 21:52:1135 days ago1736286731IN
0xd3916436...b33137748
0 ETH0.0014679112.0065215
Configure Forwar...214988512024-12-28 5:23:5945 days ago1735363439IN
0xd3916436...b33137748
0 ETH0.000473153.87004266
Configure Forwar...214490992024-12-21 6:29:4752 days ago1734762587IN
0xd3916436...b33137748
0 ETH0.000877447.17689073
Configure Forwar...213289472024-12-04 11:50:3569 days ago1733313035IN
0xd3916436...b33137748
0 ETH0.0024696520.2
Configure Forwar...212387292024-11-21 21:15:1182 days ago1732223711IN
0xd3916436...b33137748
0 ETH0.001984316.23181644
Configure Forwar...209689912024-10-15 5:51:23119 days ago1728971483IN
0xd3916436...b33137748
0 ETH0.0014773812.08517504
Configure Forwar...208055672024-09-22 10:37:47142 days ago1727001467IN
0xd3916436...b33137748
0 ETH0.0012379110.12629018
Configure Forwar...206732072024-09-03 23:01:47160 days ago1725404507IN
0xd3916436...b33137748
0 ETH0.000084160.68838879
Configure Forwar...206687962024-09-03 8:16:35161 days ago1725351395IN
0xd3916436...b33137748
0 ETH0.000127431.0422935
Configure Forwar...206554592024-09-01 11:35:59163 days ago1725190559IN
0xd3916436...b33137748
0 ETH0.000151081.23572894
Configure Forwar...205646142024-08-19 18:59:11176 days ago1724093951IN
0xd3916436...b33137748
0 ETH0.000224941.8399255
Configure Forwar...205404672024-08-16 10:02:23179 days ago1723802543IN
0xd3916436...b33137748
0 ETH0.000190821.56079414
Configure Forwar...204792972024-08-07 21:10:23188 days ago1723065023IN
0xd3916436...b33137748
0 ETH0.00045363.71015214
Configure Forwar...204654652024-08-05 22:51:35189 days ago1722898295IN
0xd3916436...b33137748
0 ETH0.000281632.30355452
Configure Forwar...204526812024-08-04 4:05:11191 days ago1722744311IN
0xd3916436...b33137748
0 ETH0.00013081.06988952
Configure Forwar...203663372024-07-23 2:46:23203 days ago1721702783IN
0xd3916436...b33137748
0 ETH0.000276832.26430959
Configure Forwar...203174322024-07-16 6:58:47210 days ago1721113127IN
0xd3916436...b33137748
0 ETH0.001060348.67285356
Configure Forwar...203173982024-07-16 6:51:59210 days ago1721112719IN
0xd3916436...b33137748
0 ETH0.000799586.54068893
Configure Forwar...202967182024-07-13 9:33:59213 days ago1720863239IN
0xd3916436...b33137748
0 ETH0.000201351.64694099
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
218059572025-02-09 2:25:112 days ago1739067911
0xd3916436...b33137748
 Contract Creation0 ETH
217828502025-02-05 21:01:356 days ago1738789295
0xd3916436...b33137748
 Contract Creation0 ETH
217750142025-02-04 18:45:597 days ago1738694759
0xd3916436...b33137748
 Contract Creation0 ETH
217281222025-01-29 5:33:1113 days ago1738128791
0xd3916436...b33137748
 Contract Creation0 ETH
216922552025-01-24 5:25:3518 days ago1737696335
0xd3916436...b33137748
 Contract Creation0 ETH
216866922025-01-23 10:47:5919 days ago1737629279
0xd3916436...b33137748
 Contract Creation0 ETH
215754002025-01-07 21:52:1135 days ago1736286731
0xd3916436...b33137748
 Contract Creation0 ETH
214988512024-12-28 5:23:5945 days ago1735363439
0xd3916436...b33137748
 Contract Creation0 ETH
214490992024-12-21 6:29:4752 days ago1734762587
0xd3916436...b33137748
 Contract Creation0 ETH
213289472024-12-04 11:50:3569 days ago1733313035
0xd3916436...b33137748
 Contract Creation0 ETH
212387292024-11-21 21:15:1182 days ago1732223711
0xd3916436...b33137748
 Contract Creation0 ETH
209689912024-10-15 5:51:23119 days ago1728971483
0xd3916436...b33137748
 Contract Creation0 ETH
208055672024-09-22 10:37:47142 days ago1727001467
0xd3916436...b33137748
 Contract Creation0 ETH
206732072024-09-03 23:01:47160 days ago1725404507
0xd3916436...b33137748
 Contract Creation0 ETH
206687962024-09-03 8:16:35161 days ago1725351395
0xd3916436...b33137748
 Contract Creation0 ETH
206554592024-09-01 11:35:59163 days ago1725190559
0xd3916436...b33137748
 Contract Creation0 ETH
205646142024-08-19 18:59:11176 days ago1724093951
0xd3916436...b33137748
 Contract Creation0 ETH
205404672024-08-16 10:02:23179 days ago1723802543
0xd3916436...b33137748
 Contract Creation0 ETH
204792972024-08-07 21:10:23188 days ago1723065023
0xd3916436...b33137748
 Contract Creation0 ETH
204654652024-08-05 22:51:35189 days ago1722898295
0xd3916436...b33137748
 Contract Creation0 ETH
204526812024-08-04 4:05:11191 days ago1722744311
0xd3916436...b33137748
 Contract Creation0 ETH
203663372024-07-23 2:46:23203 days ago1721702783
0xd3916436...b33137748
 Contract Creation0 ETH
203174322024-07-16 6:58:47210 days ago1721113127
0xd3916436...b33137748
 Contract Creation0 ETH
203173982024-07-16 6:51:59210 days ago1721112719
0xd3916436...b33137748
 Contract Creation0 ETH
202967182024-07-13 9:33:59213 days ago1720863239
0xd3916436...b33137748
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DelegationFactory

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, MIT license
File 1 of 8 : DelegationFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.23;

import "Clones.sol";
import "IBoostCallback.sol";
import "IDelegationFactory.sol";
import "IVault.sol";
import "IForwarder.sol";
import "DelegatedOps.sol";

contract DelegationFactory is IDelegationFactory, DelegatedOps {
    using Clones for address;

    IPrismaVault public immutable vault;
    address public immutable forwarderImplementation;

    mapping(address => address) public forwarder;
    mapping(address delegate => IBoostCallback) public feeCallback;
    mapping(address delegate => IBoostCallback) public delegateCallback;
    mapping(address receiver => IBoostCallback) public receiverCallback;

    event ForwarderDeployed(address boostDelegate, address forwarder);
    event ForwarderConfigured(
        address indexed boostDelegate,
        address feeCallback,
        address delegateCallback,
        address receiverCallback
    );

    constructor(IPrismaVault _vault, address _fwdImplementation) {
        vault = _vault;
        forwarderImplementation = _fwdImplementation;
    }

    /**
        @notice Configure boost delegate forwarder for the caller
        @dev Deploys a new `Forwarder` contract on the first call from a new address.
             To activate the forwarder, the caller must set it as their delegate callback
             with `Vault.setBoostDelegationParams`.
        @param _feeCallback If set, the forwarder calls `IBoostCallback.getFeePct` at this address
                            to retrieve the delegation fee percent. You must additionally set the
                            `feePct` to `type(uint16).max` when configuring boost delegation params
                            in the vault.
        @param _delegateCallback If set, the forwarder calls `IBoostCallback.delegateCallback` at this
                                address when `msg.sender` is specified as `boostDelegate` during a call
                                to `Vault.batchClaimRewards`
        @param _receiverCallback If set, the forwarder calls `IBoostCallback.receiverCallback` at this
                                address when `msg.sender` is specified as `receiver` during a call
                                to `Vault.batchClaimRewards`.
     */
    function configureForwarder(
        address account,
        address _feeCallback,
        address _delegateCallback,
        address _receiverCallback
    ) external callerOrDelegated(account) returns (bool) {
        if (forwarder[account] == address(0)) {
            address fwd = forwarderImplementation.cloneDeterministic(bytes32(bytes20(account)));
            IForwarder(fwd).initialize(account);
            forwarder[account] = fwd;
            emit ForwarderDeployed(account, fwd);
        }

        feeCallback[account] = IBoostCallback(_feeCallback);
        delegateCallback[account] = IBoostCallback(_delegateCallback);
        receiverCallback[account] = IBoostCallback(_receiverCallback);

        emit ForwarderConfigured(account, _feeCallback, _delegateCallback, _receiverCallback);

        return true;
    }

    /**
        @notice Returns `true` if the given `boostDelegate` has set their forwarder
                as the callback address within the vault.
        @dev Receivers that have configured a callback should only be used in combination
             with delegates that have an active forwarder, otherwise the receiver callback
             will not occur.
     */
    function isForwarderActive(address boostDelegate) external view returns (bool) {
        if (forwarder[boostDelegate] == address(0)) return false;
        (, , address callback) = vault.boostDelegation(boostDelegate);
        return callback == forwarder[boostDelegate];
    }

    /**
        @notice Forwards a call to the fee callback set by `boostDelegate`
     */
    function forwardFeePct(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external view returns (uint256 feePct) {
        return
            feeCallback[boostDelegate].getFeePct(
                claimant,
                receiver,
                boostDelegate,
                amount,
                previousAmount,
                totalWeeklyEmissions
            );
    }

    /**
        @notice Forwards delegate and receiver callbacks
     */
    function forwardCallback(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint adjustedAmount,
        uint fee,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external returns (bool success) {
        require(msg.sender == forwarder[boostDelegate], "!forwarder");

        IBoostCallback callback = delegateCallback[boostDelegate];
        if (address(callback) != address(0)) {
            callback.delegateCallback(
                claimant,
                receiver,
                boostDelegate,
                amount,
                adjustedAmount,
                fee,
                previousAmount,
                totalWeeklyEmissions
            );
        }

        callback = receiverCallback[receiver];
        if (address(callback) != address(0)) {
            callback.receiverCallback(claimant, receiver, adjustedAmount);
        }

        return true;
    }
}

File 2 of 8 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 3 of 8 : IBoostCallback.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
    @title Prisma Boost Forwarder Callback interface
    @notice Optional callback functions that can be set within `DelegationFactory`
 */
interface IBoostCallback {
    /**
        @notice Get the current fee percent charged to use this boost delegate
        @dev Only called if the feePct is set to `type(uint16).max` when
             enabling delegation within the vault, and `feeCallback` is set within
             `DelegationFactory`.
        @param claimant Address that will perform the claim
        @param receiver Address that will receive the claimed rewards
        @param boostDelegate Address to be used as a boost delegate during the claim
        @param amount Amount to be claimed (before applying boost or fee)
        @param previousAmount Previous amount claimed this week by this contract
        @param totalWeeklyEmissions Total weekly emissions released this week
        @return feePct Fee % charged for claims that use this contracts' delegated boost.
                      Given as a whole number out of 10000. If a claim would be rejected,
                      the preferred return value is `type(uint256).max`.
     */
    function getFeePct(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external view returns (uint256 feePct);

    /**
        @notice Callback function for boost delegators
        @dev Only called if `delegateCallback` is set within `DelegationFactory`
        @param claimant Address that performed the claim
        @param receiver Address that is receiving the claimed rewards
        @param boostDelegate Address of the boost delegate used during the claim.
                             THIS ADDRESS CAN BE INCORRECT IF THE VAULT DELEGATION
                             PARAMS ARE MISCONFIGURED. Logic within the function
                             should not rely on it's correctness.
        @param amount Amount being claimed (before applying boost or fee)
        @param adjustedAmount Actual amount received by `claimant`
        @param fee Fee amount paid by `claimant`
        @param previousAmount Previous amount claimed this week by this contract
        @param totalWeeklyEmissions Total weekly emissions released this week
     */
    function delegateCallback(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint adjustedAmount,
        uint fee,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external returns (bool success);

    /**
        @notice Callback to the reward receiver upon a successful reward claim
        @dev Only called if `receiverCallback` is set within `DelegationFactory`.
     */
    function receiverCallback(address claimant, address receiver, uint amount) external returns (bool success);
}

File 4 of 8 : IDelegationFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IDelegationFactory {
    function forwardFeePct(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external view returns (uint256 feePct);

    function forwardCallback(
        address claimant,
        address receiver,
        address boostDelegate,
        uint amount,
        uint adjustedAmount,
        uint fee,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external returns (bool success);
}

File 5 of 8 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IPrismaVault {
    struct InitialAllowance {
        address receiver;
        uint256 amount;
    }

    event BoostCalculatorSet(address boostCalculator);
    event BoostDelegationSet(address indexed boostDelegate, bool isEnabled, uint256 feePct, address callback);
    event EmissionScheduleSet(address emissionScheduler);
    event IncreasedAllocation(address indexed receiver, uint256 increasedAmount);
    event NewReceiverRegistered(address receiver, uint256 id);
    event ReceiverIsActiveStatusModified(uint256 indexed id, bool isActive);
    event UnallocatedSupplyIncreased(uint256 increasedAmount, uint256 unallocatedTotal);
    event UnallocatedSupplyReduced(uint256 reducedAmount, uint256 unallocatedTotal);

    function allocateNewEmissions(uint256 id) external returns (uint256);

    function batchClaimRewards(
        address receiver,
        address boostDelegate,
        address[] calldata rewardContracts,
        uint256 maxFeePct
    ) external returns (bool);

    function increaseUnallocatedSupply(uint256 amount) external returns (bool);

    function registerReceiver(address receiver, uint256 count) external returns (bool);

    function setBoostCalculator(address _boostCalculator) external returns (bool);

    function setBoostDelegationParams(bool isEnabled, uint256 feePct, address callback) external returns (bool);

    function setEmissionSchedule(address _emissionSchedule) external returns (bool);

    function setInitialParameters(
        address _emissionSchedule,
        address _boostCalculator,
        uint256 totalSupply,
        uint64 initialLockWeeks,
        uint128[] calldata _fixedInitialAmounts,
        InitialAllowance[] calldata initialAllowances
    ) external;

    function setReceiverIsActive(uint256 id, bool isActive) external returns (bool);

    function transferAllocatedTokens(address claimant, address receiver, uint256 amount) external returns (bool);

    function transferTokens(address token, address receiver, uint256 amount) external returns (bool);

    function PRISMA_CORE() external view returns (address);

    function allocated(address) external view returns (uint256);

    function boostCalculator() external view returns (address);

    function boostDelegation(address) external view returns (bool isEnabled, uint16 feePct, address callback);

    function claimableRewardAfterBoost(
        address account,
        address receiver,
        address boostDelegate,
        address rewardContract
    ) external view returns (uint256 adjustedAmount, uint256 feeToDelegate);

    function emissionSchedule() external view returns (address);

    function getClaimableWithBoost(address claimant) external view returns (uint256 maxBoosted, uint256 boosted);

    function getWeek() external view returns (uint256 week);

    function guardian() external view returns (address);

    function idToReceiver(uint256) external view returns (address account, bool isActive);

    function lockWeeks() external view returns (uint64);

    function locker() external view returns (address);

    function owner() external view returns (address);

    function claimableBoostDelegationFees(address claimant) external view returns (uint256 amount);

    function prismaToken() external view returns (address);

    function receiverUpdatedWeek(uint256) external view returns (uint16);

    function totalUpdateWeek() external view returns (uint64);

    function unallocatedTotal() external view returns (uint128);

    function voter() external view returns (address);

    function weeklyEmissions(uint256) external view returns (uint128);
}

File 6 of 8 : IForwarder.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.23;

import "IBoostDelegate.sol";

interface IForwarder is IBoostDelegate {
    function initialize(address _delegate) external returns (bool);
}

File 7 of 8 : IBoostDelegate.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
    @title Prisma Boost Delegate Interface
    @notice When enabling boost delegation via `Vault.setBoostDelegationParams`,
            you may optionally set a `callback` contract. If set, it should adhere
            to the following interface.
 */
interface IBoostDelegate {
    /**
        @notice Get the current fee percent charged to use this boost delegate
        @dev Optional. Only called if the feePct is set to `type(uint16).max` when
             enabling delegation.
        @param claimant Address that will perform the claim
        @param amount Amount to be claimed (before applying boost or fee)
        @param previousAmount Previous amount claimed this week by this contract
        @param totalWeeklyEmissions Total weekly emissions released this week
        @return feePct Fee % charged for claims that use this contracts' delegated boost.
                      Given as a whole number out of 10000. If a claim would be rejected,
                      the preferred return value is `type(uint256).max`.
     */
    function getFeePct(
        address claimant,
        address receiver,
        uint amount,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external view returns (uint256 feePct);

    /**
        @notice Callback function for boost delegators
        @dev MUST BE INCLUDED. Called after each successful claim which used
             this contract's delegated boost.
        @param claimant Address that performed the claim
        @param amount Amount that claimed (before applying boost or fee)
        @param adjustedAmount Actual amount received by `claimant`
        @param fee Fee amount paid by `claimant`
        @param previousAmount Previous amount claimed this week by this contract
        @param totalWeeklyEmissions Total weekly emissions released this week
     */
    function delegatedBoostCallback(
        address claimant,
        address receiver,
        uint amount,
        uint adjustedAmount,
        uint fee,
        uint previousAmount,
        uint totalWeeklyEmissions
    ) external returns (bool success);
}

File 8 of 8 : DelegatedOps.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
    @title Prisma Delegated Operations
    @notice Allows delegation to specific contract functionality. Useful for creating
            wrapper contracts to bundle multiple interactions into a single call.

            Functions that supports delegation should include an `account` input allowing
            the delegated caller to indicate who they are calling on behalf of. In executing
            the call, all internal state updates should be applied for `account` and all
            value transfers should occur to or from the caller.

            For example: a delegated call to `openTrove` should transfer collateral
            from the caller, create the debt position for `account`, and send newly
            minted tokens to the caller.
 */
abstract contract DelegatedOps {
    event DelegateApprovalSet(address indexed caller, address indexed delegate, bool isApproved);

    mapping(address owner => mapping(address caller => bool isApproved)) public isApprovedDelegate;

    modifier callerOrDelegated(address _account) {
        require(msg.sender == _account || isApprovedDelegate[_account][msg.sender], "Delegate not approved");
        _;
    }

    function setDelegateApproval(address _delegate, bool _isApproved) external {
        isApprovedDelegate[msg.sender][_delegate] = _isApproved;
        emit DelegateApprovalSet(msg.sender, _delegate, _isApproved);
    }
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "DelegationFactory.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IPrismaVault","name":"_vault","type":"address"},{"internalType":"address","name":"_fwdImplementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"bool","name":"isApproved","type":"bool"}],"name":"DelegateApprovalSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"boostDelegate","type":"address"},{"indexed":false,"internalType":"address","name":"feeCallback","type":"address"},{"indexed":false,"internalType":"address","name":"delegateCallback","type":"address"},{"indexed":false,"internalType":"address","name":"receiverCallback","type":"address"}],"name":"ForwarderConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"boostDelegate","type":"address"},{"indexed":false,"internalType":"address","name":"forwarder","type":"address"}],"name":"ForwarderDeployed","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"_feeCallback","type":"address"},{"internalType":"address","name":"_delegateCallback","type":"address"},{"internalType":"address","name":"_receiverCallback","type":"address"}],"name":"configureForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"delegateCallback","outputs":[{"internalType":"contract IBoostCallback","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"feeCallback","outputs":[{"internalType":"contract IBoostCallback","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"claimant","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"boostDelegate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"adjustedAmount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"previousAmount","type":"uint256"},{"internalType":"uint256","name":"totalWeeklyEmissions","type":"uint256"}],"name":"forwardCallback","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"claimant","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"boostDelegate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"previousAmount","type":"uint256"},{"internalType":"uint256","name":"totalWeeklyEmissions","type":"uint256"}],"name":"forwardFeePct","outputs":[{"internalType":"uint256","name":"feePct","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"forwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forwarderImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"isApprovedDelegate","outputs":[{"internalType":"bool","name":"isApproved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"boostDelegate","type":"address"}],"name":"isForwarderActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"receiverCallback","outputs":[{"internalType":"contract IBoostCallback","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"bool","name":"_isApproved","type":"bool"}],"name":"setDelegateApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IPrismaVault","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b50604051610cb9380380610cb983398101604081905261002f9161005e565b6001600160a01b039182166080521660a052610098565b6001600160a01b038116811461005b57600080fd5b50565b6000806040838503121561007157600080fd5b825161007c81610046565b602084015190925061008d81610046565b809150509250929050565b60805160a051610bee6100cb6000396000818161022901526106e701526000818161025001526105390152610bee6000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80639df9840e116100715780639df9840e146101aa578063c3c854b6146101d3578063c74ee953146101e8578063dd0c481a146101fb578063e38d60a114610224578063fbfa77cf1461024b57600080fd5b806306c5e59a146100b95780631930e825146100ff5780631d79aba11461013a57806360445f151461015b5780638fb9ec211461016e5780639662995614610181575b600080fd5b6100e26100c736600461095d565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61012a61010d366004610981565b600060208181529281526040808220909352908152205460ff1681565b60405190151581526020016100f6565b61014d6101483660046109ba565b610272565b6040519081526020016100f6565b61012a610169366004610a1f565b61031f565b61012a61017c36600461095d565b6104ee565b6100e261018f36600461095d565b6001602052600090815260409020546001600160a01b031681565b6100e26101b836600461095d565b6004602052600090815260409020546001600160a01b031681565b6101e66101e1366004610aa4565b6105d0565b005b61012a6101f6366004610ad2565b61063a565b6100e261020936600461095d565b6002602052600090815260409020546001600160a01b031681565b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0384811660008181526002602052604080822054905163deeacfed60e01b81528a8516600482015289851660248201526044810193909352606483018790526084830186905260a483018590529092169063deeacfed9060c401602060405180830381865afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103149190610b2e565b979650505050505050565b6001600160a01b03868116600090815260016020526040812054909116331461037c5760405162461bcd60e51b815260206004820152600a60248201526910b337b93bb0b93232b960b11b60448201526064015b60405180910390fd5b6001600160a01b0380881660009081526003602052604090205416801561043f57604051632083eae160e21b81526001600160a01b038b811660048301528a811660248301528981166044830152606482018990526084820188905260a4820187905260c4820186905260e4820185905282169063820fab8490610104016020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610b47565b505b506001600160a01b038089166000908152600460205260409020541680156104de5760405163089ba7a560e11b81526001600160a01b038b811660048301528a81166024830152604482018890528216906311374f4a906064016020604051808303816000875af11580156104b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dc9190610b47565b505b5060019998505050505050505050565b6001600160a01b0381811660009081526001602052604081205490911661051757506000919050565b60405163226883b760e01b81526001600160a01b0383811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063226883b790602401606060405180830381865afa158015610582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a69190610b64565b6001600160a01b039586166000908152600160205260409020548616951694909414949350505050565b336000818152602081815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f92d241afb0a1a9b3441bf1bd6bea0f9164cf5a2562cbe4bcc34ab943b2465608910160405180910390a35050565b600084336001600160a01b038216148061067557506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6106b95760405162461bcd60e51b815260206004820152601560248201527411195b1959d85d19481b9bdd08185c1c1c9bdd9959605a1b6044820152606401610373565b6001600160a01b03868116600090815260016020526040902054166107fa5760006107206001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166bffffffffffffffffffffffff1960608a901b166108a2565b60405163189acdbd60e31b81526001600160a01b0389811660048301529192509082169063c4d66de8906024016020604051808303816000875af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190610b47565b506001600160a01b0387811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f40f6e1fae19716b303a75f93b83a60eecd23b4bbaea91cad5386422bf5f89905910160405180910390a1505b6001600160a01b03868116600081815260026020908152604080832080548b87166001600160a01b031991821681179092556003845282852080548c8916908316811790915560048552948390208054978b16979091168717905581519081529182019290925290810192909252907fd576826405384357e58795622f540b868e86f79b85e1730ed65d35a3ca54b6589060600160405180910390a250600195945050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b03811661093f5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610373565b92915050565b6001600160a01b038116811461095a57600080fd5b50565b60006020828403121561096f57600080fd5b813561097a81610945565b9392505050565b6000806040838503121561099457600080fd5b823561099f81610945565b915060208301356109af81610945565b809150509250929050565b60008060008060008060c087890312156109d357600080fd5b86356109de81610945565b955060208701356109ee81610945565b945060408701356109fe81610945565b959894975094956060810135955060808101359460a0909101359350915050565b600080600080600080600080610100898b031215610a3c57600080fd5b8835610a4781610945565b97506020890135610a5781610945565b96506040890135610a6781610945565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b801515811461095a57600080fd5b60008060408385031215610ab757600080fd5b8235610ac281610945565b915060208301356109af81610a96565b60008060008060808587031215610ae857600080fd5b8435610af381610945565b93506020850135610b0381610945565b92506040850135610b1381610945565b91506060850135610b2381610945565b939692955090935050565b600060208284031215610b4057600080fd5b5051919050565b600060208284031215610b5957600080fd5b815161097a81610a96565b600080600060608486031215610b7957600080fd5b8351610b8481610a96565b602085015190935061ffff81168114610b9c57600080fd5b6040850151909250610bad81610945565b80915050925092509256fea264697066735822122060741253eaedbc10326d74002053f8e77892c70d13b6631b35e5bd43ff6c9ace64736f6c6343000817003300000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c000000000000000000000000b9a3a8735a453b2f8ad375654939cbb08411d9fa

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80639df9840e116100715780639df9840e146101aa578063c3c854b6146101d3578063c74ee953146101e8578063dd0c481a146101fb578063e38d60a114610224578063fbfa77cf1461024b57600080fd5b806306c5e59a146100b95780631930e825146100ff5780631d79aba11461013a57806360445f151461015b5780638fb9ec211461016e5780639662995614610181575b600080fd5b6100e26100c736600461095d565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61012a61010d366004610981565b600060208181529281526040808220909352908152205460ff1681565b60405190151581526020016100f6565b61014d6101483660046109ba565b610272565b6040519081526020016100f6565b61012a610169366004610a1f565b61031f565b61012a61017c36600461095d565b6104ee565b6100e261018f36600461095d565b6001602052600090815260409020546001600160a01b031681565b6100e26101b836600461095d565b6004602052600090815260409020546001600160a01b031681565b6101e66101e1366004610aa4565b6105d0565b005b61012a6101f6366004610ad2565b61063a565b6100e261020936600461095d565b6002602052600090815260409020546001600160a01b031681565b6100e27f000000000000000000000000b9a3a8735a453b2f8ad375654939cbb08411d9fa81565b6100e27f00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c81565b6001600160a01b0384811660008181526002602052604080822054905163deeacfed60e01b81528a8516600482015289851660248201526044810193909352606483018790526084830186905260a483018590529092169063deeacfed9060c401602060405180830381865afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103149190610b2e565b979650505050505050565b6001600160a01b03868116600090815260016020526040812054909116331461037c5760405162461bcd60e51b815260206004820152600a60248201526910b337b93bb0b93232b960b11b60448201526064015b60405180910390fd5b6001600160a01b0380881660009081526003602052604090205416801561043f57604051632083eae160e21b81526001600160a01b038b811660048301528a811660248301528981166044830152606482018990526084820188905260a4820187905260c4820186905260e4820185905282169063820fab8490610104016020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610b47565b505b506001600160a01b038089166000908152600460205260409020541680156104de5760405163089ba7a560e11b81526001600160a01b038b811660048301528a81166024830152604482018890528216906311374f4a906064016020604051808303816000875af11580156104b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104dc9190610b47565b505b5060019998505050505050505050565b6001600160a01b0381811660009081526001602052604081205490911661051757506000919050565b60405163226883b760e01b81526001600160a01b0383811660048301526000917f00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c9091169063226883b790602401606060405180830381865afa158015610582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a69190610b64565b6001600160a01b039586166000908152600160205260409020548616951694909414949350505050565b336000818152602081815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f92d241afb0a1a9b3441bf1bd6bea0f9164cf5a2562cbe4bcc34ab943b2465608910160405180910390a35050565b600084336001600160a01b038216148061067557506001600160a01b03811660009081526020818152604080832033845290915290205460ff165b6106b95760405162461bcd60e51b815260206004820152601560248201527411195b1959d85d19481b9bdd08185c1c1c9bdd9959605a1b6044820152606401610373565b6001600160a01b03868116600090815260016020526040902054166107fa5760006107206001600160a01b037f000000000000000000000000b9a3a8735a453b2f8ad375654939cbb08411d9fa166bffffffffffffffffffffffff1960608a901b166108a2565b60405163189acdbd60e31b81526001600160a01b0389811660048301529192509082169063c4d66de8906024016020604051808303816000875af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190610b47565b506001600160a01b0387811660008181526001602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527f40f6e1fae19716b303a75f93b83a60eecd23b4bbaea91cad5386422bf5f89905910160405180910390a1505b6001600160a01b03868116600081815260026020908152604080832080548b87166001600160a01b031991821681179092556003845282852080548c8916908316811790915560048552948390208054978b16979091168717905581519081529182019290925290810192909252907fd576826405384357e58795622f540b868e86f79b85e1730ed65d35a3ca54b6589060600160405180910390a250600195945050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b03811661093f5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610373565b92915050565b6001600160a01b038116811461095a57600080fd5b50565b60006020828403121561096f57600080fd5b813561097a81610945565b9392505050565b6000806040838503121561099457600080fd5b823561099f81610945565b915060208301356109af81610945565b809150509250929050565b60008060008060008060c087890312156109d357600080fd5b86356109de81610945565b955060208701356109ee81610945565b945060408701356109fe81610945565b959894975094956060810135955060808101359460a0909101359350915050565b600080600080600080600080610100898b031215610a3c57600080fd5b8835610a4781610945565b97506020890135610a5781610945565b96506040890135610a6781610945565b979a96995096976060810135975060808101359660a0820135965060c0820135955060e0909101359350915050565b801515811461095a57600080fd5b60008060408385031215610ab757600080fd5b8235610ac281610945565b915060208301356109af81610a96565b60008060008060808587031215610ae857600080fd5b8435610af381610945565b93506020850135610b0381610945565b92506040850135610b1381610945565b91506060850135610b2381610945565b939692955090935050565b600060208284031215610b4057600080fd5b5051919050565b600060208284031215610b5957600080fd5b815161097a81610a96565b600080600060608486031215610b7957600080fd5b8351610b8481610a96565b602085015190935061ffff81168114610b9c57600080fd5b6040850151909250610bad81610945565b80915050925092509256fea264697066735822122060741253eaedbc10326d74002053f8e77892c70d13b6631b35e5bd43ff6c9ace64736f6c63430008170033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c000000000000000000000000b9a3a8735a453b2f8ad375654939cbb08411d9fa

-----Decoded View---------------
Arg [0] : _vault (address): 0x06bDF212C290473dCACea9793890C5024c7Eb02c
Arg [1] : _fwdImplementation (address): 0xB9A3a8735a453b2F8ad375654939cBB08411D9fa

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000006bdf212c290473dcacea9793890c5024c7eb02c
Arg [1] : 000000000000000000000000b9a3a8735a453b2f8ad375654939cbb08411d9fa


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.