creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "Forwarder.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.23;\n\nimport \"IForwarder.sol\";\nimport \"IDelegationFactory.sol\";\n\ncontract Forwarder is IForwarder {\n    address public boostDelegate;\n    address public immutable vault;\n    IDelegationFactory public immutable factory;\n\n    constructor(address _vault, IDelegationFactory _factory) {\n        vault = _vault;\n        factory = _factory;\n    }\n\n    function initialize(address _delegate) external returns (bool) {\n        require(msg.sender == address(factory));\n        boostDelegate = _delegate;\n\n        return true;\n    }\n\n    function getFeePct(\n        address claimant,\n        address receiver,\n        uint amount,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external view returns (uint256 feePct) {\n        return factory.forwardFeePct(claimant, receiver, boostDelegate, amount, previousAmount, totalWeeklyEmissions);\n    }\n\n    function delegatedBoostCallback(\n        address claimant,\n        address receiver,\n        uint amount,\n        uint adjustedAmount,\n        uint fee,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external returns (bool success) {\n        require(msg.sender == vault);\n        factory.forwardCallback(\n            claimant,\n            receiver,\n            boostDelegate,\n            amount,\n            adjustedAmount,\n            fee,\n            previousAmount,\n            totalWeeklyEmissions\n        );\n        return true;\n    }\n}\n"
      },
      "IForwarder.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.23;\n\nimport \"IBoostDelegate.sol\";\n\ninterface IForwarder is IBoostDelegate {\n    function initialize(address _delegate) external returns (bool);\n}\n"
      },
      "IBoostDelegate.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n    @title Prisma Boost Delegate Interface\n    @notice When enabling boost delegation via `Vault.setBoostDelegationParams`,\n            you may optionally set a `callback` contract. If set, it should adhere\n            to the following interface.\n */\ninterface IBoostDelegate {\n    /**\n        @notice Get the current fee percent charged to use this boost delegate\n        @dev Optional. Only called if the feePct is set to `type(uint16).max` when\n             enabling delegation.\n        @param claimant Address that will perform the claim\n        @param amount Amount to be claimed (before applying boost or fee)\n        @param previousAmount Previous amount claimed this week by this contract\n        @param totalWeeklyEmissions Total weekly emissions released this week\n        @return feePct Fee % charged for claims that use this contracts' delegated boost.\n                      Given as a whole number out of 10000. If a claim would be rejected,\n                      the preferred return value is `type(uint256).max`.\n     */\n    function getFeePct(\n        address claimant,\n        address receiver,\n        uint amount,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external view returns (uint256 feePct);\n\n    /**\n        @notice Callback function for boost delegators\n        @dev MUST BE INCLUDED. Called after each successful claim which used\n             this contract's delegated boost.\n        @param claimant Address that performed the claim\n        @param amount Amount that claimed (before applying boost or fee)\n        @param adjustedAmount Actual amount received by `claimant`\n        @param fee Fee amount paid by `claimant`\n        @param previousAmount Previous amount claimed this week by this contract\n        @param totalWeeklyEmissions Total weekly emissions released this week\n     */\n    function delegatedBoostCallback(\n        address claimant,\n        address receiver,\n        uint amount,\n        uint adjustedAmount,\n        uint fee,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external returns (bool success);\n}\n"
      },
      "IDelegationFactory.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IDelegationFactory {\n    function forwardFeePct(\n        address claimant,\n        address receiver,\n        address boostDelegate,\n        uint amount,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external view returns (uint256 feePct);\n\n    function forwardCallback(\n        address claimant,\n        address receiver,\n        address boostDelegate,\n        uint amount,\n        uint adjustedAmount,\n        uint fee,\n        uint previousAmount,\n        uint totalWeeklyEmissions\n    ) external returns (bool success);\n}\n"
      }
    },
    "settings": {
      "evmVersion": "paris",
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "libraries": {
        "Forwarder.sol": {}
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}