ETH Price: $3,093.06 (-2.19%)

Contract

0x6eBb63DeB7efdfF79615e8c3eA4BF2D38Ce77a25

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeManager

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

import {IFeeManager} from "./IFeeManager.sol";

/// @title FeeManager
/// @author GmBoost Team
/// @notice Single source of truth for GM fee and payout policy (per chain).
/// @dev   Owned by your Safe (2-of-3). No ETH is held here; it's pure config.
contract FeeManager is IFeeManager {
    // -------------------------- Custom Errors --------------------------
    error NotOwner();
    error ZeroAddress();
    error InvalidBps();

    uint16 internal constant _BPS_DENOMINATOR = 10_000;

    // ---------------------------- Storage ------------------------------
    /// @notice Safe 2-of-3 multisig that controls config updates.
    address public owner;            // Safe 2-of-3
    /// @notice Platform treasury receiving the platform share.
    address public feeRecipient;     // Platform treasury (receives platform share)
    /// @notice Required ETH amount to call onChainGM (minimum; tips allowed).
    uint256 public ethFeeWei;        // Required ETH amount to call onChainGM (min; tips allowed)
    /// @notice Owner share in basis points (0..10_000).
    uint16  public ownerShareBps;    // Owner share in basis points (0..10_000)
    /// @notice Required ETH amount to deploy GM contract via Factory (minimum; tips allowed).
    uint256 public deployFeeWei;     // Required ETH amount to deploy GM contract via Factory (min; tips allowed)

    // ---------------------------- Events -------------------------------
    /// @notice Emitted when contract ownership changes.
    /// @param previousOwner Address of the previous owner.
    /// @param newOwner Address of the new owner.
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    ); // solhint-disable-line gas-indexed-events

    /// @notice Emitted when the platform treasury address is updated.
    /// @param newRecipient New treasury address.
    event RecipientUpdated(address indexed newRecipient); // solhint-disable-line gas-indexed-events

    /// @notice Emitted when the GM fee is updated.
    /// @param newEthFeeWei New fee in wei.
    event EthFeeUpdated(uint256 newEthFeeWei); // solhint-disable-line gas-indexed-events

    /// @notice Emitted when the owner share basis points are updated.
    /// @param newOwnerShareBps New owner share in basis points.
    event OwnerShareUpdated(uint16 newOwnerShareBps); // solhint-disable-line gas-indexed-events

    /// @notice Emitted when the deployment fee is updated.
    /// @param newDeployFeeWei New deployment fee in wei.
    event DeployFeeUpdated(uint256 newDeployFeeWei); // solhint-disable-line gas-indexed-events

    // --------------------------- Constructor ---------------------------
    /// @notice Initializes fee manager configuration.
    /// @param initialOwner      The Safe address that will control this contract.
    /// @param initialRecipient  Platform treasury (non-zero).
    /// @param initialEthFeeWei  Initial ETH fee in wei (can be 0 if desired).
    /// @param initialOwnerShareBps Owner share BPS (0..10_000).
    /// @param initialDeployFeeWei Initial deployment fee in wei (can be 0 if desired).
    constructor(
        address initialOwner,
        address initialRecipient,
        uint256 initialEthFeeWei,
        uint16 initialOwnerShareBps,
        uint256 initialDeployFeeWei
    ) {
        if (initialOwner == address(0) || initialRecipient == address(0)) revert ZeroAddress();
        if (initialOwnerShareBps > _BPS_DENOMINATOR) revert InvalidBps();

        owner = initialOwner;
        feeRecipient = initialRecipient;
        ethFeeWei = initialEthFeeWei;
        ownerShareBps = initialOwnerShareBps;
        deployFeeWei = initialDeployFeeWei;

        emit OwnershipTransferred(address(0), initialOwner);
        emit RecipientUpdated(initialRecipient);
        emit EthFeeUpdated(initialEthFeeWei);
        emit OwnerShareUpdated(initialOwnerShareBps);
        emit DeployFeeUpdated(initialDeployFeeWei);
    }

    // --------------------------- Modifiers -----------------------------
    modifier onlyOwner() {
        if (msg.sender != owner) revert NotOwner();
        _;
    }

    // --------------------------- Admin Ops -----------------------------
    /// @notice Transfers contract ownership to a new address.
    /// @dev Only callable by current owner. New owner receives all admin privileges.
    /// @param newOwner Address of the new owner (must be non-zero).
    function transferOwnership(address newOwner) external onlyOwner {
        if (newOwner == address(0)) revert ZeroAddress();
        if (newOwner == owner) return;
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    /// @notice Updates the platform treasury address.
    /// @dev Only callable by owner. Changes take effect immediately for all future GMs.
    /// @param newRecipient New treasury address (must be non-zero).
    function setFeeRecipient(address newRecipient) external onlyOwner {
        if (newRecipient == address(0)) revert ZeroAddress();
        if (newRecipient == feeRecipient) return;
        feeRecipient = newRecipient;
        emit RecipientUpdated(newRecipient);
    }

    /// @notice Updates the required ETH fee for sending GMs.
    /// @dev Only callable by owner. Changes take effect immediately for all future GMs.
    /// @param newEthFeeWei New fee amount in wei.
    function setEthFeeWei(uint256 newEthFeeWei) external onlyOwner {
        if (newEthFeeWei == ethFeeWei) return;
        ethFeeWei = newEthFeeWei;
        emit EthFeeUpdated(newEthFeeWei);
    }

    /// @notice Updates the owner revenue share percentage.
    /// @dev Only callable by owner. Must be <= 10_000 (100%). Changes take effect immediately.
    /// @param newOwnerShareBps New owner share in basis points (0-10000).
    function setOwnerShareBps(uint16 newOwnerShareBps) external onlyOwner {
        if (newOwnerShareBps > _BPS_DENOMINATOR) revert InvalidBps();
        if (newOwnerShareBps == ownerShareBps) return;
        ownerShareBps = newOwnerShareBps;
        emit OwnerShareUpdated(newOwnerShareBps);
    }

    /// @notice Updates the deployment fee for creating new GM contracts.
    /// @dev Only callable by owner. Changes take effect immediately for new deployments.
    /// @param newDeployFeeWei New deployment fee amount in wei.
    function setDeployFeeWei(uint256 newDeployFeeWei) external onlyOwner {
        if (newDeployFeeWei == deployFeeWei) return;
        deployFeeWei = newDeployFeeWei;
        emit DeployFeeUpdated(newDeployFeeWei);
    }

    // ---------------------------- Views --------------------------------
    /// @inheritdoc IFeeManager
    function getConfig()
        external
        view
        returns (uint256, uint16, address)
    {
        return (ethFeeWei, ownerShareBps, feeRecipient);
    }

    /// @inheritdoc IFeeManager
    function getDeployConfig()
        external
        view
        returns (uint256, address)
    {
        return (deployFeeWei, feeRecipient);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

/// @title IFeeManager - Interface for reading the current GM payout/fee config
/// @author GmBoost Team
/// @notice Exposes read-only accessors for GM fee and deployment settings.
interface IFeeManager {
    /// @notice Returns the current configuration used by GM contracts.
    /// @return ethFeeWei  The minimum ETH required to call onChainGM (tips allowed).
    /// @return ownerShareBps  The owner's share in basis points (0..10_000).
    /// @return feeRecipient  The platform treasury receiving the platform share.
    function getConfig()
        external
        view
        returns (uint256 ethFeeWei, uint16 ownerShareBps, address feeRecipient);

    /// @notice Returns deployment configuration used by the Factory.
    /// @return deployFeeWei  The ETH fee required to deploy a GM contract (tips allowed).
    /// @return feeRecipient  The platform treasury receiving deployment fees.
    function getDeployConfig()
        external
        view
        returns (uint256 deployFeeWei, address feeRecipient);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"initialRecipient","type":"address"},{"internalType":"uint256","name":"initialEthFeeWei","type":"uint256"},{"internalType":"uint16","name":"initialOwnerShareBps","type":"uint16"},{"internalType":"uint256","name":"initialDeployFeeWei","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidBps","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDeployFeeWei","type":"uint256"}],"name":"DeployFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newEthFeeWei","type":"uint256"}],"name":"EthFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"newOwnerShareBps","type":"uint16"}],"name":"OwnerShareUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"RecipientUpdated","type":"event"},{"inputs":[],"name":"deployFeeWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethFeeWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConfig","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDeployConfig","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerShareBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDeployFeeWei","type":"uint256"}],"name":"setDeployFeeWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newEthFeeWei","type":"uint256"}],"name":"setEthFeeWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newOwnerShareBps","type":"uint16"}],"name":"setOwnerShareBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516107f23803806107f283398101604081905261002f916101fc565b6001600160a01b038516158061004c57506001600160a01b038416155b1561006a5760405163d92e233d60e01b815260040160405180910390fd5b61271061ffff831611156100915760405163c6cc5d7f60e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b038881169182178455600180549093169088161790915560028590556003805461ffff191661ffff861617905560048390556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36040516001600160a01b038516907f566f16f5ede69bb6f837d5da3a6cf41c863ba95621d677ff3c931aa687da646690600090a26040518381527f61b5bc21bba621e4f96abbe5e52875f75968403b78592128757747ab31f561b59060200160405180910390a160405161ffff831681527f36142ad9a07171b3c33baae70a3775b592efe9c5d49244f861394a82fb100e619060200160405180910390a16040518181527f88ca289aff008916b3068fa17e0341247318f1252174a5ebe4b3eceaba433e869060200160405180910390a1505050505061025f565b80516001600160a01b03811681146101f757600080fd5b919050565b600080600080600060a0868803121561021457600080fd5b61021d866101e0565b945061022b602087016101e0565b60408701516060880151919550935061ffff8116811461024a57600080fd5b60809690960151949793965091949392915050565b6105848061026e6000396000f3fe608060405234801561001057600080fd5b50600436106100b35760003560e01c806399101c4e1161007157806399101c4e14610167578063b77ba83e1461017e578063c3f909d414610191578063cdbfb4d7146101c1578063e74b981b146101ca578063f2fde38b146101dd57600080fd5b80625002a8146100b857806333022a98146100e0578063333e2f521461010157806346904840146101165780638da5cb5b146101415780638f79dcd914610154575b600080fd5b600454600154604080519283526001600160a01b039091166020830152015b60405180910390f35b6003546100ee9061ffff1681565b60405161ffff90911681526020016100d7565b61011461010f3660046104e1565b6101f0565b005b600154610129906001600160a01b031681565b6040516001600160a01b0390911681526020016100d7565b600054610129906001600160a01b031681565b61011461016236600461050c565b61029e565b61017060045481565b6040519081526020016100d7565b61011461018c36600461050c565b610307565b6002546003546001546040805193845261ffff90921660208401526001600160a01b0316908201526060016100d7565b61017060025481565b6101146101d8366004610525565b610370565b6101146101eb366004610525565b610421565b6000546001600160a01b0316331461021b576040516330cd747160e01b815260040160405180910390fd5b61271061ffff821611156102425760405163c6cc5d7f60e01b815260040160405180910390fd5b60035461ffff82811691161461029b576003805461ffff191661ffff83169081179091556040519081527f36142ad9a07171b3c33baae70a3775b592efe9c5d49244f861394a82fb100e61906020015b60405180910390a15b50565b6000546001600160a01b031633146102c9576040516330cd747160e01b815260040160405180910390fd5b600454811461029b5760048190556040518181527f88ca289aff008916b3068fa17e0341247318f1252174a5ebe4b3eceaba433e8690602001610292565b6000546001600160a01b03163314610332576040516330cd747160e01b815260040160405180910390fd5b600254811461029b5760028190556040518181527f61b5bc21bba621e4f96abbe5e52875f75968403b78592128757747ab31f561b590602001610292565b6000546001600160a01b0316331461039b576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166103c25760405163d92e233d60e01b815260040160405180910390fd5b6001546001600160a01b0382811691161461029b57600180546001600160a01b0319166001600160a01b0383169081179091556040517f566f16f5ede69bb6f837d5da3a6cf41c863ba95621d677ff3c931aa687da646690600090a250565b6000546001600160a01b0316331461044c576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166104735760405163d92e233d60e01b815260040160405180910390fd5b6000546001600160a01b0382811691161461029b57600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0383166001600160a01b031990911617905550565b6000602082840312156104f357600080fd5b813561ffff8116811461050557600080fd5b9392505050565b60006020828403121561051e57600080fd5b5035919050565b60006020828403121561053757600080fd5b81356001600160a01b038116811461050557600080fdfea264697066735822122069b62c293b0ce2a8a00d71a6805b0a44d58abad29fb76a8ff267043d7d3837de64736f6c634300081e0033000000000000000000000000f3f860d86e8693fdc0ff92def673b41d2b1ce7ac0000000000000000000000002d91e0ed849782a8c6bda99a2f4104497a1c81d80000000000000000000000000000000000000000000000000000105ef39b200000000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000105ef39b2000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b35760003560e01c806399101c4e1161007157806399101c4e14610167578063b77ba83e1461017e578063c3f909d414610191578063cdbfb4d7146101c1578063e74b981b146101ca578063f2fde38b146101dd57600080fd5b80625002a8146100b857806333022a98146100e0578063333e2f521461010157806346904840146101165780638da5cb5b146101415780638f79dcd914610154575b600080fd5b600454600154604080519283526001600160a01b039091166020830152015b60405180910390f35b6003546100ee9061ffff1681565b60405161ffff90911681526020016100d7565b61011461010f3660046104e1565b6101f0565b005b600154610129906001600160a01b031681565b6040516001600160a01b0390911681526020016100d7565b600054610129906001600160a01b031681565b61011461016236600461050c565b61029e565b61017060045481565b6040519081526020016100d7565b61011461018c36600461050c565b610307565b6002546003546001546040805193845261ffff90921660208401526001600160a01b0316908201526060016100d7565b61017060025481565b6101146101d8366004610525565b610370565b6101146101eb366004610525565b610421565b6000546001600160a01b0316331461021b576040516330cd747160e01b815260040160405180910390fd5b61271061ffff821611156102425760405163c6cc5d7f60e01b815260040160405180910390fd5b60035461ffff82811691161461029b576003805461ffff191661ffff83169081179091556040519081527f36142ad9a07171b3c33baae70a3775b592efe9c5d49244f861394a82fb100e61906020015b60405180910390a15b50565b6000546001600160a01b031633146102c9576040516330cd747160e01b815260040160405180910390fd5b600454811461029b5760048190556040518181527f88ca289aff008916b3068fa17e0341247318f1252174a5ebe4b3eceaba433e8690602001610292565b6000546001600160a01b03163314610332576040516330cd747160e01b815260040160405180910390fd5b600254811461029b5760028190556040518181527f61b5bc21bba621e4f96abbe5e52875f75968403b78592128757747ab31f561b590602001610292565b6000546001600160a01b0316331461039b576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166103c25760405163d92e233d60e01b815260040160405180910390fd5b6001546001600160a01b0382811691161461029b57600180546001600160a01b0319166001600160a01b0383169081179091556040517f566f16f5ede69bb6f837d5da3a6cf41c863ba95621d677ff3c931aa687da646690600090a250565b6000546001600160a01b0316331461044c576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166104735760405163d92e233d60e01b815260040160405180910390fd5b6000546001600160a01b0382811691161461029b57600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0383166001600160a01b031990911617905550565b6000602082840312156104f357600080fd5b813561ffff8116811461050557600080fd5b9392505050565b60006020828403121561051e57600080fd5b5035919050565b60006020828403121561053757600080fd5b81356001600160a01b038116811461050557600080fdfea264697066735822122069b62c293b0ce2a8a00d71a6805b0a44d58abad29fb76a8ff267043d7d3837de64736f6c634300081e0033

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

000000000000000000000000f3f860d86e8693fdc0ff92def673b41d2b1ce7ac0000000000000000000000002d91e0ed849782a8c6bda99a2f4104497a1c81d80000000000000000000000000000000000000000000000000000105ef39b200000000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000105ef39b2000

-----Decoded View---------------
Arg [0] : initialOwner (address): 0xf3F860D86E8693FDC0fF92DEf673b41D2b1cE7aC
Arg [1] : initialRecipient (address): 0x2D91e0ED849782A8C6bdA99A2F4104497A1c81d8
Arg [2] : initialEthFeeWei (uint256): 18000000000000
Arg [3] : initialOwnerShareBps (uint16): 2000
Arg [4] : initialDeployFeeWei (uint256): 18000000000000

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3f860d86e8693fdc0ff92def673b41d2b1ce7ac
Arg [1] : 0000000000000000000000002d91e0ed849782a8c6bda99a2f4104497a1c81d8
Arg [2] : 0000000000000000000000000000000000000000000000000000105ef39b2000
Arg [3] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [4] : 0000000000000000000000000000000000000000000000000000105ef39b2000


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

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.