ETH Price: $3,317.18 (-1.27%)

Contract

0xc3CA38091061e3E5358A52d74730F16C60cA9c26
 
Transaction Hash
Method
Block
From
To
Transfer212465492024-11-22 23:27:356 mins ago1732318055IN
Rhino.fi: Transfer Proxy
0.03059161 ETH0.0007818713.49784149
Transfer212465462024-11-22 23:26:597 mins ago1732318019IN
Rhino.fi: Transfer Proxy
0.01152627 ETH0.0008249514.24159363
Transfer212465292024-11-22 23:23:3510 mins ago1732317815IN
Rhino.fi: Transfer Proxy
0.86211713 ETH0.0009418816.26009511
Transfer212465272024-11-22 23:23:1111 mins ago1732317791IN
Rhino.fi: Transfer Proxy
0.00286445 ETH0.0008862115.29915531
Transfer ERC20212465002024-11-22 23:17:3516 mins ago1732317455IN
Rhino.fi: Transfer Proxy
0 ETH0.0015446615.4695505
Transfer212464302024-11-22 23:03:3530 mins ago1732316615IN
Rhino.fi: Transfer Proxy
0.10908504 ETH0.0009738616.81230177
Transfer212464122024-11-22 22:59:5934 mins ago1732316399IN
Rhino.fi: Transfer Proxy
0.0060163 ETH0.0009435716.28924607
Transfer212463292024-11-22 22:43:2350 mins ago1732315403IN
Rhino.fi: Transfer Proxy
0.51696537 ETH0.0014393817.35745015
Transfer212463102024-11-22 22:39:3554 mins ago1732315175IN
Rhino.fi: Transfer Proxy
0.04328895 ETH0.0011383419.65177265
Transfer212462872024-11-22 22:34:591 hrs ago1732314899IN
Rhino.fi: Transfer Proxy
0.02610125 ETH0.001050518.1352919
Transfer212462512024-11-22 22:27:351 hr ago1732314455IN
Rhino.fi: Transfer Proxy
1.93197105 ETH0.0010665218.41181397
Transfer ERC20212462492024-11-22 22:27:111 hr ago1732314431IN
Rhino.fi: Transfer Proxy
0 ETH0.001698820.07550759
Transfer212462382024-11-22 22:24:591 hr ago1732314299IN
Rhino.fi: Transfer Proxy
0.00891987 ETH0.0011143819.23813048
Transfer212462342024-11-22 22:24:111 hr ago1732314251IN
Rhino.fi: Transfer Proxy
0.01041781 ETH0.0011443919.76032903
Transfer212462172024-11-22 22:20:471 hr ago1732314047IN
Rhino.fi: Transfer Proxy
0.04598573 ETH0.0011311119.52696633
Transfer212462012024-11-22 22:17:351 hr ago1732313855IN
Rhino.fi: Transfer Proxy
0.60393089 ETH0.0011746720.27884741
Transfer212462012024-11-22 22:17:351 hr ago1732313855IN
Rhino.fi: Transfer Proxy
0.00359911 ETH0.0011746720.27884741
Transfer212461682024-11-22 22:10:591 hr ago1732313459IN
Rhino.fi: Transfer Proxy
0.00478827 ETH0.001263221.80728953
Transfer212461342024-11-22 22:04:111 hr ago1732313051IN
Rhino.fi: Transfer Proxy
0.01271766 ETH0.0013636423.54123113
Transfer212460922024-11-22 21:55:351 hr ago1732312535IN
Rhino.fi: Transfer Proxy
0.00193062 ETH0.0013609523.49470555
Transfer212460842024-11-22 21:53:591 hr ago1732312439IN
Rhino.fi: Transfer Proxy
0.00327461 ETH0.0018436822.2328405
Transfer212460592024-11-22 21:48:591 hr ago1732312139IN
Rhino.fi: Transfer Proxy
0.00821792 ETH0.0013185422.7625483
Transfer212460142024-11-22 21:39:591 hr ago1732311599IN
Rhino.fi: Transfer Proxy
0.00292629 ETH0.0012879422.23432454
Transfer ERC20212459962024-11-22 21:36:231 hr ago1732311383IN
Rhino.fi: Transfer Proxy
0 ETH0.0016919519.99162755
Transfer212459752024-11-22 21:32:112 hrs ago1732311131IN
Rhino.fi: Transfer Proxy
0.00302773 ETH0.0013106522.6264452
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
212465492024-11-22 23:27:356 mins ago1732318055
Rhino.fi: Transfer Proxy
0.03059161 ETH
212465462024-11-22 23:26:597 mins ago1732318019
Rhino.fi: Transfer Proxy
0.01152627 ETH
212465292024-11-22 23:23:3510 mins ago1732317815
Rhino.fi: Transfer Proxy
0.86211713 ETH
212465272024-11-22 23:23:1111 mins ago1732317791
Rhino.fi: Transfer Proxy
0.00286445 ETH
212464302024-11-22 23:03:3530 mins ago1732316615
Rhino.fi: Transfer Proxy
0.10908504 ETH
212464122024-11-22 22:59:5934 mins ago1732316399
Rhino.fi: Transfer Proxy
0.0060163 ETH
212463292024-11-22 22:43:2350 mins ago1732315403
Rhino.fi: Transfer Proxy
0.51696537 ETH
212463102024-11-22 22:39:3554 mins ago1732315175
Rhino.fi: Transfer Proxy
0.04328895 ETH
212462872024-11-22 22:34:591 hrs ago1732314899
Rhino.fi: Transfer Proxy
0.02610125 ETH
212462512024-11-22 22:27:351 hr ago1732314455
Rhino.fi: Transfer Proxy
1.93197105 ETH
212462382024-11-22 22:24:591 hr ago1732314299
Rhino.fi: Transfer Proxy
0.00891987 ETH
212462342024-11-22 22:24:111 hr ago1732314251
Rhino.fi: Transfer Proxy
0.01041781 ETH
212462172024-11-22 22:20:471 hr ago1732314047
Rhino.fi: Transfer Proxy
0.04598573 ETH
212462012024-11-22 22:17:351 hr ago1732313855
Rhino.fi: Transfer Proxy
0.60393089 ETH
212462012024-11-22 22:17:351 hr ago1732313855
Rhino.fi: Transfer Proxy
0.00359911 ETH
212461682024-11-22 22:10:591 hr ago1732313459
Rhino.fi: Transfer Proxy
0.00478827 ETH
212461342024-11-22 22:04:111 hr ago1732313051
Rhino.fi: Transfer Proxy
0.01271766 ETH
212460922024-11-22 21:55:351 hr ago1732312535
Rhino.fi: Transfer Proxy
0.00193062 ETH
212460842024-11-22 21:53:591 hr ago1732312439
Rhino.fi: Transfer Proxy
0.00327461 ETH
212460592024-11-22 21:48:591 hr ago1732312139
Rhino.fi: Transfer Proxy
0.00821792 ETH
212460142024-11-22 21:39:591 hr ago1732311599
Rhino.fi: Transfer Proxy
0.00292629 ETH
212459752024-11-22 21:32:112 hrs ago1732311131
Rhino.fi: Transfer Proxy
0.00302773 ETH
212459522024-11-22 21:27:352 hrs ago1732310855
Rhino.fi: Transfer Proxy
1.09795193 ETH
212459472024-11-22 21:26:352 hrs ago1732310795
Rhino.fi: Transfer Proxy
0.00371593 ETH
212459272024-11-22 21:22:352 hrs ago1732310555
Rhino.fi: Transfer Proxy
0.00371593 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TransferRegistry

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-04
*/

/*
  Copyright 2019,2020 StarkWare Industries Ltd.
  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  https://www.starkware.co/open-source-license/
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/

pragma solidity ^0.6.2;


interface IFactRegistry {
    /*
      Returns true if the given fact was previously registered in the contract.
    */
    function isValid(bytes32 fact)
        external view
        returns(bool);
}

/*
  Extends the IFactRegistry interface with a query method that indicates
  whether the fact registry has successfully registered any fact or is still empty of such facts.
*/
interface IQueryableFactRegistry is IFactRegistry {

    /*
      Returns true if at least one fact has been registered.
    */
    function hasRegisteredFact()
        external view
        returns(bool);

}


contract FactRegistry is IQueryableFactRegistry {
    // Mapping: fact hash -> true.
    mapping (bytes32 => bool) private verifiedFact;

    // Indicates whether the Fact Registry has at least one fact registered.
    bool anyFactRegistered;

    /*
      Checks if a fact has been verified.
    */
    function isValid(bytes32 fact)
        external view override
        returns(bool)
    {
        return _factCheck(fact);
    }


    /*
      This is an internal method to check if the fact is already registered.
      In current implementation of FactRegistry it's identical to isValid().
      But the check is against the local fact registrey,
      So for a derived referral fact registry, it's not the same.
    */
    function _factCheck(bytes32 fact)
        internal view
        returns(bool)
    {
        return verifiedFact[fact];
    }

    function registerFact(
        bytes32 factHash
        )
        internal
    {
        // This function stores the fact hash in the mapping.
        verifiedFact[factHash] = true;

        // Mark first time off.
        if (!anyFactRegistered) {
            anyFactRegistered = true;
        }
    }

    /*
      Indicates whether at least one fact was registered.
    */
    function hasRegisteredFact()
        external view override
        returns(bool)
    {
        return anyFactRegistered;
    }

}

interface Identity {

    /*
      Allows a caller, typically another contract,
      to ensure that the provided address is of the expected type and version.
    */
    function identify()
        external view
        returns(string memory);
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


/**
 * @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 in 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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

contract TransferRegistry is FactRegistry, Identity {
    using SafeERC20 for IERC20;

    event LogRegisteredTransfer(
        address recipient,
        address token,
        uint256 amount,
        uint256 salt
    );

    function identify()
        external view override
        returns(string memory)
    {
        return "StarkWare_TransferRegistry_2020_1";
    }

    /*
      Passes on the transaction ETH value onto the recipient address,
      and register the associated fact.
      Reverts if the fact has already been registered.
    */
    function transfer(address payable recipient, uint256 salt) // NOLINT: erc20-interface.
        payable
        external {
        bytes32 transferFact = keccak256(
            abi.encodePacked(recipient, msg.value, address(0x0), salt));
        require(!_factCheck(transferFact), "TRANSFER_ALREADY_REGISTERED");
        registerFact(transferFact);
        emit LogRegisteredTransfer(recipient, address(0x0), msg.value, salt);
        recipient.transfer(msg.value);
    }

    /*
      Transfer the specified amount of erc20 tokens from msg.sender balance to the recipient's
      balance.
      Pre-conditions to successful transfer are that the msg.sender has sufficient balance,
      and the the approval (for the transfer) was granted to this contract.
      A fact with the transfer details is registered upon success.
      Reverts if the fact has already been registered.
    */
    function transferERC20(address recipient, address erc20, uint256 amount, uint256 salt)
        external {
        bytes32 transferFact = keccak256(
            abi.encodePacked(recipient, amount, erc20, salt));
        require(!_factCheck(transferFact), "TRANSFER_ALREADY_REGISTERED");
        registerFact(transferFact);
        emit LogRegisteredTransfer(recipient, erc20, amount, salt);
        IERC20(erc20).safeTransferFrom(msg.sender, recipient, amount);
    }

}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"LogRegisteredTransfer","type":"event"},{"inputs":[],"name":"hasRegisteredFact","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"identify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"fact","type":"bytes32"}],"name":"isValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"erc20","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"transferERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610850806100206000396000f3fe60806040526004361061005a5760003560e01c8063a9059cbb11610043578063a9059cbb146100e8578063d6354e1514610114578063eeb72866146101295761005a565b806355a2ba681461005f5780636a938567146100aa575b600080fd5b34801561006b57600080fd5b506100a86004803603608081101561008257600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356101b3565b005b3480156100b657600080fd5b506100d4600480360360208110156100cd57600080fd5b50356102df565b604080519115158252519081900360200190f35b6100a8600480360360408110156100fe57600080fd5b506001600160a01b0381351690602001356102f0565b34801561012057600080fd5b506100d461043e565b34801561013557600080fd5b5061013e610447565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610178578181015183820152602001610160565b50505050905090810190601f1680156101a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008483858460405160200180856001600160a01b031660601b8152601401848152602001836001600160a01b031660601b815260140182815260200194505050505060405160208183030381529060405280519060200120905061021781610467565b15610269576040805162461bcd60e51b815260206004820152601b60248201527f5452414e534645525f414c52454144595f524547495354455245440000000000604482015290519081900360640190fd5b6102728161047c565b604080516001600160a01b038088168252861660208201528082018590526060810184905290517f36c96ccc320eab9b6da1de6cc1e8ebc52a51cb114710b9c7db204cdad3067ce19181900360800190a16102d86001600160a01b0385163387866104b0565b5050505050565b60006102ea82610467565b92915050565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b16602080830191909152346034830152600060548301526068808301859052835180840390910181526088909201909252805191012061035981610467565b156103ab576040805162461bcd60e51b815260206004820152601b60248201527f5452414e534645525f414c52454144595f524547495354455245440000000000604482015290519081900360640190fd5b6103b48161047c565b604080516001600160a01b03851681526000602082015234818301526060810184905290517f36c96ccc320eab9b6da1de6cc1e8ebc52a51cb114710b9c7db204cdad3067ce19181900360800190a16040516001600160a01b038416903480156108fc02916000818181858888f19350505050158015610438573d6000803e3d6000fd5b50505050565b60015460ff1690565b60606040518060600160405280602181526020016107d060219139905090565b60009081526020819052604090205460ff1690565b6000818152602081905260409020805460ff191660019081179091555460ff166104ad576001805460ff1916811790555b50565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104389085906060610588826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105e99092919063ffffffff16565b8051909150156105e4578080602001905160208110156105a757600080fd5b50516105e45760405162461bcd60e51b815260040180806020018281038252602a8152602001806107f1602a913960400191505060405180910390fd5b505050565b60606105f88484600085610600565b949350505050565b606061060b856107c9565b61065c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106106b957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161067c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461071b576040519150601f19603f3d011682016040523d82523d6000602084013e610720565b606091505b509150915081156107345791506105f89050565b8051156107445780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561078e578181015183820152602001610776565b50505050905090810190601f1680156107bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe537461726b576172655f5472616e7366657252656769737472795f323032305f315361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122022ef9b8f9e3bb52bb7e2a2bce3be395d92542be9df6273e686b25c815955ada464736f6c634300060c0033

Deployed Bytecode

0x60806040526004361061005a5760003560e01c8063a9059cbb11610043578063a9059cbb146100e8578063d6354e1514610114578063eeb72866146101295761005a565b806355a2ba681461005f5780636a938567146100aa575b600080fd5b34801561006b57600080fd5b506100a86004803603608081101561008257600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356101b3565b005b3480156100b657600080fd5b506100d4600480360360208110156100cd57600080fd5b50356102df565b604080519115158252519081900360200190f35b6100a8600480360360408110156100fe57600080fd5b506001600160a01b0381351690602001356102f0565b34801561012057600080fd5b506100d461043e565b34801561013557600080fd5b5061013e610447565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610178578181015183820152602001610160565b50505050905090810190601f1680156101a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008483858460405160200180856001600160a01b031660601b8152601401848152602001836001600160a01b031660601b815260140182815260200194505050505060405160208183030381529060405280519060200120905061021781610467565b15610269576040805162461bcd60e51b815260206004820152601b60248201527f5452414e534645525f414c52454144595f524547495354455245440000000000604482015290519081900360640190fd5b6102728161047c565b604080516001600160a01b038088168252861660208201528082018590526060810184905290517f36c96ccc320eab9b6da1de6cc1e8ebc52a51cb114710b9c7db204cdad3067ce19181900360800190a16102d86001600160a01b0385163387866104b0565b5050505050565b60006102ea82610467565b92915050565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b16602080830191909152346034830152600060548301526068808301859052835180840390910181526088909201909252805191012061035981610467565b156103ab576040805162461bcd60e51b815260206004820152601b60248201527f5452414e534645525f414c52454144595f524547495354455245440000000000604482015290519081900360640190fd5b6103b48161047c565b604080516001600160a01b03851681526000602082015234818301526060810184905290517f36c96ccc320eab9b6da1de6cc1e8ebc52a51cb114710b9c7db204cdad3067ce19181900360800190a16040516001600160a01b038416903480156108fc02916000818181858888f19350505050158015610438573d6000803e3d6000fd5b50505050565b60015460ff1690565b60606040518060600160405280602181526020016107d060219139905090565b60009081526020819052604090205460ff1690565b6000818152602081905260409020805460ff191660019081179091555460ff166104ad576001805460ff1916811790555b50565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104389085906060610588826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105e99092919063ffffffff16565b8051909150156105e4578080602001905160208110156105a757600080fd5b50516105e45760405162461bcd60e51b815260040180806020018281038252602a8152602001806107f1602a913960400191505060405180910390fd5b505050565b60606105f88484600085610600565b949350505050565b606061060b856107c9565b61065c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106106b957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161067c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461071b576040519150601f19603f3d011682016040523d82523d6000602084013e610720565b606091505b509150915081156107345791506105f89050565b8051156107445780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561078e578181015183820152602001610776565b50505050905090810190601f1680156107bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b3b15159056fe537461726b576172655f5472616e7366657252656769737472795f323032305f315361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122022ef9b8f9e3bb52bb7e2a2bce3be395d92542be9df6273e686b25c815955ada464736f6c634300060c0033

Deployed Bytecode Sourcemap

20548:1967:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22036:474;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;22036:474:0;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1566:133;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1566:133:0;;:::i;:::-;;;;;;;;;;;;;;;;;;21127:479;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21127:479:0;;;;;;;;:::i;2540:132::-;;;;;;;;;;;;;:::i;20785:150::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22036:474;22152:20;22216:9;22227:6;22235:5;22242:4;22199:48;;;;;;-1:-1:-1;;;;;22199:48:0;;;;;;;;;;;;;-1:-1:-1;;;;;22199:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22175:73;;;;;;22152:96;;22268:24;22279:12;22268:10;:24::i;:::-;22267:25;22259:65;;;;;-1:-1:-1;;;22259:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22335:26;22348:12;22335;:26::i;:::-;22377:53;;;-1:-1:-1;;;;;22377:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22441:61;-1:-1:-1;;;;;22441:30:0;;22472:10;22484:9;22495:6;22441:30;:61::i;:::-;22036:474;;;;;:::o;1566:133::-;1646:4;1675:16;1686:4;1675:10;:16::i;:::-;1668:23;1566:133;-1:-1:-1;;1566:133:0:o;21127:479::-;21307:58;;;;;;;;;;;;;;;;;21335:9;21307:58;;;;21260:20;21307:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;21283:83;;;;;21386:24;21283:83;21386:10;:24::i;:::-;21385:25;21377:65;;;;;-1:-1:-1;;;21377:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21453:26;21466:12;21453;:26::i;:::-;21495:63;;;-1:-1:-1;;;;;21495:63:0;;;;21536:3;21495:63;;;;21542:9;21495:63;;;;;;;;;;;;;;;;;;;;;21569:29;;-1:-1:-1;;;;;21569:18:0;;;21588:9;21569:29;;;;;;;;;21588:9;21569:18;:29;;;;;;;;;;;;;;;;;;;;;21127:479;;;:::o;2540:132::-;2647:17;;;;2540:132;:::o;20785:150::-;20854:13;20885:42;;;;;;;;;;;;;;;;;;;20785:150;:::o;2006:129::-;2080:4;2109:18;;;;;;;;;;;;;;2006:129::o;2143:314::-;2300:12;:22;;;;;;;;;;:29;;-1:-1:-1;;2300:29:0;2325:4;2300:29;;;;;;2380:17;2300:29;2380:17;2375:75;;2434:4;2414:24;;-1:-1:-1;;2414:24:0;;;;;2375:75;2143:314;:::o;17660:205::-;17788:68;;;-1:-1:-1;;;;;17788:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17811:27;17788:68;;;17761:96;;17781:5;;20204:23;20230:69;20258:4;20230:69;;;;;;;;;;;;;;;;;20238:5;-1:-1:-1;;;;;20230:27:0;;;:69;;;;;:::i;:::-;20314:17;;20204:95;;-1:-1:-1;20314:21:0;20310:224;;20456:10;20445:30;;;;;;;;;;;;;;;-1:-1:-1;20445:30:0;20437:85;;;;-1:-1:-1;;;20437:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19780:761;;;:::o;14553:196::-;14656:12;14688:53;14711:6;14719:4;14725:1;14728:12;14688:22;:53::i;:::-;14681:60;14553:196;-1:-1:-1;;;;14553:196:0:o;15930:979::-;16060:12;16093:18;16104:6;16093:10;:18::i;:::-;16085:60;;;;;-1:-1:-1;;;16085:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16219:12;16233:23;16260:6;-1:-1:-1;;;;;16260:11:0;16280:8;16291:4;16260:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16218:78;;;;16311:7;16307:595;;;16342:10;-1:-1:-1;16335:17:0;;-1:-1:-1;16335:17:0;16307:595;16456:17;;:21;16452:439;;16719:10;16713:17;16780:15;16767:10;16763:2;16759:19;16752:44;16667:148;16862:12;16855:20;;-1:-1:-1;;;16855:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11635:422;12002:20;12041:8;;;11635:422::o

Swarm Source

ipfs://22ef9b8f9e3bb52bb7e2a2bce3be395d92542be9df6273e686b25c815955ada4

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.