ETH Price: $3,069.77 (-1.45%)

Contract

0x2dE8e18BDaef25C2DE0bED29C8B72E49261CA88d
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Update Beneficia...903147722023-04-14 13:03:29401 days ago1681477409IN
0x2dE8e18B...9261CA88d
0 ETH0.000000070.001
Update Beneficia...540781072022-12-23 13:06:57513 days ago1671800817IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540780762022-12-23 13:06:57513 days ago1671800817IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540780482022-12-23 13:06:57513 days ago1671800817IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540780232022-12-23 13:06:57513 days ago1671800817IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540780062022-12-23 13:06:57513 days ago1671800817IN
0x2dE8e18B...9261CA88d
0 ETH0.000000020.001
Update Beneficia...540779802022-12-23 13:06:42513 days ago1671800802IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540779492022-12-23 13:06:42513 days ago1671800802IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540779292022-12-23 13:06:42513 days ago1671800802IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540778982022-12-23 13:06:42513 days ago1671800802IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540778782022-12-23 13:06:42513 days ago1671800802IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540778472022-12-23 13:06:27513 days ago1671800787IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540778222022-12-23 13:06:27513 days ago1671800787IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540777932022-12-23 13:06:27513 days ago1671800787IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540777702022-12-23 13:06:27513 days ago1671800787IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540777462022-12-23 13:06:12513 days ago1671800772IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540777202022-12-23 13:06:12513 days ago1671800772IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540776872022-12-23 13:06:12513 days ago1671800772IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540776582022-12-23 13:06:12513 days ago1671800772IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540776372022-12-23 13:06:12513 days ago1671800772IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540776162022-12-23 13:05:57513 days ago1671800757IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540774882022-12-23 13:05:42513 days ago1671800742IN
0x2dE8e18B...9261CA88d
0 ETH0.000000050.001
Update Beneficia...540766572022-12-23 13:04:12513 days ago1671800652IN
0x2dE8e18B...9261CA88d
0 ETH0.000000020.001
Update Beneficia...540757442022-12-23 13:02:12513 days ago1671800532IN
0x2dE8e18B...9261CA88d
0 ETH0.000000020.001
Update Beneficia...464509082022-12-07 16:24:47529 days ago1670430287IN
0x2dE8e18B...9261CA88d
0 ETH0.000000070.001
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
1074117472023-07-27 1:44:31297 days ago1690422271
0x2dE8e18B...9261CA88d
0 ETH
1074117472023-07-27 1:44:31297 days ago1690422271
0x2dE8e18B...9261CA88d
0 ETH
1074117342023-07-27 1:44:05297 days ago1690422245
0x2dE8e18B...9261CA88d
0 ETH
1074117342023-07-27 1:44:05297 days ago1690422245
0x2dE8e18B...9261CA88d
0 ETH
1074115282023-07-27 1:37:13297 days ago1690421833
0x2dE8e18B...9261CA88d
0 ETH
1074115282023-07-27 1:37:13297 days ago1690421833
0x2dE8e18B...9261CA88d
0 ETH
1071231622023-07-20 9:25:01304 days ago1689845101
0x2dE8e18B...9261CA88d
0 ETH
1071231622023-07-20 9:25:01304 days ago1689845101
0x2dE8e18B...9261CA88d
0 ETH
1068860932023-07-14 21:42:43309 days ago1689370963
0x2dE8e18B...9261CA88d
0 ETH
1068860932023-07-14 21:42:43309 days ago1689370963
0x2dE8e18B...9261CA88d
0 ETH
1067198232023-07-11 1:20:23313 days ago1689038423
0x2dE8e18B...9261CA88d
0 ETH
1067198232023-07-11 1:20:23313 days ago1689038423
0x2dE8e18B...9261CA88d
0 ETH
1066013562023-07-08 7:31:29316 days ago1688801489
0x2dE8e18B...9261CA88d
0 ETH
1066013562023-07-08 7:31:29316 days ago1688801489
0x2dE8e18B...9261CA88d
0 ETH
1065447792023-07-07 0:05:35317 days ago1688688335
0x2dE8e18B...9261CA88d
0 ETH
1065447792023-07-07 0:05:35317 days ago1688688335
0x2dE8e18B...9261CA88d
0 ETH
1064299932023-07-04 8:19:23320 days ago1688458763
0x2dE8e18B...9261CA88d
0 ETH
1064299932023-07-04 8:19:23320 days ago1688458763
0x2dE8e18B...9261CA88d
0 ETH
1063960052023-07-03 13:26:27321 days ago1688390787
0x2dE8e18B...9261CA88d
0 ETH
1063960052023-07-03 13:26:27321 days ago1688390787
0x2dE8e18B...9261CA88d
0 ETH
1061320322023-06-27 10:47:21327 days ago1687862841
0x2dE8e18B...9261CA88d
0 ETH
1061320322023-06-27 10:47:21327 days ago1687862841
0x2dE8e18B...9261CA88d
0 ETH
1061319332023-06-27 10:44:03327 days ago1687862643
0x2dE8e18B...9261CA88d
0 ETH
1061319332023-06-27 10:44:03327 days ago1687862643
0x2dE8e18B...9261CA88d
0 ETH
1060978152023-06-26 15:46:47328 days ago1687794407
0x2dE8e18B...9261CA88d
0 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardDelegate

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 4 : RewardDelegate.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.7.6;

import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";
import { IRewardDelegate } from "./interface/IRewardDelegate.sol";

contract RewardDelegate is IRewardDelegate {
    using Address for address;
    using SafeMath for uint256;

    // truster => beneficiaryCandidate
    mapping(address => address) internal _beneficiaryCandidateMap;
    // truster => beneficiary
    mapping(address => address) internal _beneficiaryMap;
    // beneficiary => how many trusters explicitly delegate to this beneficiary,
    // excluding beneficiary self
    // explicitly means calling setBeneficiaryCandidate() and updateBeneficiary()
    mapping(address => uint256) internal _trusterCountMap;

    //
    // EXTERNAL NON-VIEW
    //

    function setBeneficiaryCandidate(address candidate) external override {
        address truster = msg.sender;

        // RD_TNC: truster is not a contract
        require(truster.isContract(), "RD_TNC");

        // RD_CE: candidate error
        require(candidate != truster && !candidate.isContract() && candidate != address(0), "RD_CE");

        _beneficiaryCandidateMap[truster] = candidate;
    }

    function updateBeneficiary(address truster) external override {
        address beneficiary = msg.sender;

        // RD_CNS: candidate not set
        require(_beneficiaryCandidateMap[truster] == beneficiary, "RD_CNS");

        // RD_RUB: repeated update beneficiary
        require(_beneficiaryMap[truster] != beneficiary, "RD_RUB");

        _beneficiaryMap[truster] = beneficiary;
        _trusterCountMap[beneficiary] = _trusterCountMap[beneficiary].add(1);

        emit BeneficiarySet(truster, beneficiary);
    }

    function clearBeneficiary(address beneficiary) external override {
        address truster = msg.sender;

        // RD_BNS: beneficiary not set
        require(_beneficiaryMap[truster] == beneficiary, "RD_BNS");

        delete _beneficiaryCandidateMap[truster];
        delete _beneficiaryMap[truster];

        _trusterCountMap[beneficiary] = _trusterCountMap[beneficiary].sub(1);

        emit BeneficiaryCleared(truster, beneficiary);
    }

    //
    // EXTERNAL VIEW
    //

    function getBeneficiaryCandidate(address truster) external view override returns (address) {
        return _beneficiaryCandidateMap[truster];
    }

    function getBeneficiaryAndQualifiedMultiplier(address user) external view override returns (address, uint256) {
        // if A delegates to B,
        //     getBeneficiaryAndQualifiedMultiplier(A) => B, 2
        //     getBeneficiaryAndQualifiedMultiplier(B) => B, 2
        // if A didn't delegate to anyone,
        //     getBeneficiaryAndQualifiedMultiplier(A) => A, 1
        // if A delegates to B, and C delegates to B,
        //     getBeneficiaryAndQualifiedMultiplier(A) => B, 3
        //     getBeneficiaryAndQualifiedMultiplier(B) => B, 3
        //     getBeneficiaryAndQualifiedMultiplier(C) => B, 3
        address beneficiary = _beneficiaryMap[user];

        if (beneficiary == address(0)) {
            return (user, _trusterCountMap[user].add(1));
        }

        return (beneficiary, _trusterCountMap[beneficiary].add(1));
    }
}

File 2 of 4 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 4 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 4 of 4 : IRewardDelegate.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.7.6;

interface IRewardDelegate {
    event BeneficiarySet(address indexed truster, address indexed beneficiary);

    event BeneficiaryCleared(address indexed truster, address indexed beneficiary);

    function setBeneficiaryCandidate(address candidate) external;

    function updateBeneficiary(address truster) external;

    function clearBeneficiary(address beneficiary) external;

    function getBeneficiaryCandidate(address truster) external view returns (address);

    function getBeneficiaryAndQualifiedMultiplier(address user) external view returns (address, uint256);
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"truster","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"BeneficiaryCleared","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"truster","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"BeneficiarySet","type":"event"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"clearBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getBeneficiaryAndQualifiedMultiplier","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"truster","type":"address"}],"name":"getBeneficiaryCandidate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"candidate","type":"address"}],"name":"setBeneficiaryCandidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"truster","type":"address"}],"name":"updateBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610625806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630aaffd2a1461005c5780636549a321146100845780636fc6a9e3146100c6578063ab768309146100ec578063db02b37314610135575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b031661015b565b005b6100aa6004803603602081101561009a57600080fd5b50356001600160a01b03166102a0565b604080516001600160a01b039092168252519081900360200190f35b610082600480360360208110156100dc57600080fd5b50356001600160a01b03166102be565b6101126004803603602081101561010257600080fd5b50356001600160a01b03166103b4565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6100826004803603602081101561014b57600080fd5b50356001600160a01b0316610439565b6001600160a01b0381811660009081526020819052604090205433911681146101b4576040805162461bcd60e51b815260206004820152600660248201526552445f434e5360d01b604482015290519081900360640190fd5b6001600160a01b038281166000908152600160205260409020548116908216141561020f576040805162461bcd60e51b815260206004820152600660248201526529222fa92aa160d11b604482015290519081900360640190fd5b6001600160a01b03828116600090815260016020818152604080842080546001600160a01b031916958716958617905593835260029052919020546102539161052b565b6001600160a01b038083166000818152600260205260408082209490945592519092918516917f2906d223dc4163733bb374af8641c7e9ae256e2bae53c90e0c9a2be2e611ae4491a35050565b6001600160a01b039081166000908152602081905260409020541690565b336000818152600160205260409020546001600160a01b03838116911614610316576040805162461bcd60e51b815260206004820152600660248201526552445f424e5360d01b604482015290519081900360640190fd5b6001600160a01b0380821660009081526020818152604080832080546001600160a01b031990811690915560018084528285208054909216909155938616835260029091529020546103679161058c565b6001600160a01b038084166000818152600260205260408082209490945592519092918416917f498cea0f06c06eddfcc11ec27c19918753689fe8bef385996fbe9e666928ee8d91a35050565b6001600160a01b03808216600090815260016020526040812054909182911680610408576001600160a01b03841660009081526002602052604090205484906103fe90600161052b565b9250925050610434565b6001600160a01b038116600090815260026020526040902054819061042e90600161052b565b92509250505b915091565b33610443816105e9565b61047d576040805162461bcd60e51b815260206004820152600660248201526552445f544e4360d01b604482015290519081900360640190fd5b806001600160a01b0316826001600160a01b0316141580156104ae57506104ac826001600160a01b03166105e9565b155b80156104c257506001600160a01b03821615155b6104fb576040805162461bcd60e51b815260206004820152600560248201526452445f434560d81b604482015290519081900360640190fd5b6001600160a01b0390811660009081526020819052604090208054919092166001600160a01b0319909116179055565b600082820183811015610585576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156105e3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b15159056fea26469706673582212204b632ae20aebf53a140e7b3fdf1ebd883a183d7c6f5e19fc74d9668a066b2f9f64736f6c63430007060033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c80630aaffd2a1461005c5780636549a321146100845780636fc6a9e3146100c6578063ab768309146100ec578063db02b37314610135575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b031661015b565b005b6100aa6004803603602081101561009a57600080fd5b50356001600160a01b03166102a0565b604080516001600160a01b039092168252519081900360200190f35b610082600480360360208110156100dc57600080fd5b50356001600160a01b03166102be565b6101126004803603602081101561010257600080fd5b50356001600160a01b03166103b4565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6100826004803603602081101561014b57600080fd5b50356001600160a01b0316610439565b6001600160a01b0381811660009081526020819052604090205433911681146101b4576040805162461bcd60e51b815260206004820152600660248201526552445f434e5360d01b604482015290519081900360640190fd5b6001600160a01b038281166000908152600160205260409020548116908216141561020f576040805162461bcd60e51b815260206004820152600660248201526529222fa92aa160d11b604482015290519081900360640190fd5b6001600160a01b03828116600090815260016020818152604080842080546001600160a01b031916958716958617905593835260029052919020546102539161052b565b6001600160a01b038083166000818152600260205260408082209490945592519092918516917f2906d223dc4163733bb374af8641c7e9ae256e2bae53c90e0c9a2be2e611ae4491a35050565b6001600160a01b039081166000908152602081905260409020541690565b336000818152600160205260409020546001600160a01b03838116911614610316576040805162461bcd60e51b815260206004820152600660248201526552445f424e5360d01b604482015290519081900360640190fd5b6001600160a01b0380821660009081526020818152604080832080546001600160a01b031990811690915560018084528285208054909216909155938616835260029091529020546103679161058c565b6001600160a01b038084166000818152600260205260408082209490945592519092918416917f498cea0f06c06eddfcc11ec27c19918753689fe8bef385996fbe9e666928ee8d91a35050565b6001600160a01b03808216600090815260016020526040812054909182911680610408576001600160a01b03841660009081526002602052604090205484906103fe90600161052b565b9250925050610434565b6001600160a01b038116600090815260026020526040902054819061042e90600161052b565b92509250505b915091565b33610443816105e9565b61047d576040805162461bcd60e51b815260206004820152600660248201526552445f544e4360d01b604482015290519081900360640190fd5b806001600160a01b0316826001600160a01b0316141580156104ae57506104ac826001600160a01b03166105e9565b155b80156104c257506001600160a01b03821615155b6104fb576040805162461bcd60e51b815260206004820152600560248201526452445f434560d81b604482015290519081900360640190fd5b6001600160a01b0390811660009081526020819052604090208054919092166001600160a01b0319909116179055565b600082820183811015610585576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828211156105e3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b3b15159056fea26469706673582212204b632ae20aebf53a140e7b3fdf1ebd883a183d7c6f5e19fc74d9668a066b2f9f64736f6c63430007060033

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
[ 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.