ETH Price: $2,179.16 (+1.87%)

Contract

0x5a83c24515a0f603419CcCE8C048Eed66f8f82e7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Invoke196127012024-04-08 18:22:11334 days ago1712600531IN
0x5a83c245...66f8f82e7
0 ETH0.0024370144.00856808
Invoke192799912024-02-22 1:48:47381 days ago1708566527IN
0x5a83c245...66f8f82e7
0 ETH0.0029319437.96131933
Invoke184346492023-10-26 13:20:35499 days ago1698326435IN
0x5a83c245...66f8f82e7
0 ETH0.0019468325.21055373
Invoke184303702023-10-25 22:57:59500 days ago1698274679IN
0x5a83c245...66f8f82e7
0 ETH0.0016536421.40252917
Invoke184133522023-10-23 13:45:59502 days ago1698068759IN
0x5a83c245...66f8f82e7
0 ETH0.0017040722.05870991
Invoke183920322023-10-20 14:08:47505 days ago1697810927IN
0x5a83c245...66f8f82e7
0 ETH0.0017725329.46759705
Invoke183566122023-10-15 15:16:23510 days ago1697382983IN
0x5a83c245...66f8f82e7
0 ETH0.001061413.73956383
Invoke183416982023-10-13 13:13:23512 days ago1697202803IN
0x5a83c245...66f8f82e7
0 ETH0.0007970410.31581427
Invoke183276012023-10-11 13:48:23514 days ago1697032103IN
0x5a83c245...66f8f82e7
0 ETH0.00057169.49882278
Invoke183275922023-10-11 13:46:35514 days ago1697031995IN
0x5a83c245...66f8f82e7
0 ETH0.000696459.0167516
Invoke182841552023-10-05 11:56:59520 days ago1696507019IN
0x5a83c245...66f8f82e7
0 ETH0.000589067.62529688
Invoke182571382023-10-01 17:20:47524 days ago1696180847IN
0x5a83c245...66f8f82e7
0 ETH0.0007947210.29444639
Invoke182062652023-09-24 14:31:11531 days ago1695565871IN
0x5a83c245...66f8f82e7
0 ETH0.0008832111.43893516
Invoke181583392023-09-17 21:15:47538 days ago1694985347IN
0x5a83c245...66f8f82e7
0 ETH0.0011570814.97809989
Invoke180918272023-09-08 12:54:23547 days ago1694177663IN
0x5a83c245...66f8f82e7
0 ETH0.0010301313.33473203
Invoke180170022023-08-29 1:26:23558 days ago1693272383IN
0x5a83c245...66f8f82e7
0 ETH0.0016481221.33446115
Invoke162648842022-12-25 22:55:47804 days ago1672008947IN
0x5a83c245...66f8f82e7
0 ETH0.0009578612.40387987
Invoke162553902022-12-24 15:08:11805 days ago1671894491IN
0x5a83c245...66f8f82e7
0 ETH0.0008555714.23043642
Invoke162543092022-12-24 11:30:59805 days ago1671881459IN
0x5a83c245...66f8f82e7
0 ETH0.0009739912.60602967
Invoke162212642022-12-19 20:54:47810 days ago1671483287IN
0x5a83c245...66f8f82e7
0 ETH0.0014613218.91344747
Invoke161994162022-12-16 19:41:47813 days ago1671219707IN
0x5a83c245...66f8f82e7
0 ETH0.0013520817.50614231
Invoke161776452022-12-13 18:44:47816 days ago1670957087IN
0x5a83c245...66f8f82e7
0 ETH0.0020401326.41056872
Invoke161672842022-12-12 7:57:35817 days ago1670831855IN
0x5a83c245...66f8f82e7
0 ETH0.0009490515.77759951
Invoke161548902022-12-10 14:25:59819 days ago1670682359IN
0x5a83c245...66f8f82e7
0 ETH0.0018291323.69003686
Invoke161459222022-12-09 8:20:35820 days ago1670574035IN
0x5a83c245...66f8f82e7
0 ETH0.0019046424.65106795
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
-127280802021-06-29 9:08:351348 days ago1624957715  Contract Creation0 ETH
Loading...
Loading

Minimal Proxy Contract for 0x5825c125a20d233cf83d464b2047f8e81b5ac711

Contract Name:
QredoWalletImplementation

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 5 : QredoWalletImplementation.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.11;

import "../libraries/ECDSA.sol";
import "../libraries/SafeMath.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/IQredoWalletImplementation.sol";

// WalletImplementation => WI

contract QredoWalletImplementation is IQredoWalletImplementation {
  using ECDSA for bytes32;
  using SafeMath for uint256;

  uint256 constant private INCREMENT = 1;
  uint256 private _nonce;
  address private _walletOwner;
  bool private _locked;
  bool private _initialized;
  
  /**
    * @dev Throws if contract is initialized.
  */
  modifier isInitialized() {
      require(!_initialized, "WI::isInitialized:already initialized"); 
      _;
      _initialized = true;
  }

  /**
    * @dev Sets the values for {_walletOwner}
    *
    * This value is immutable: it can only be set once during
    * initialization.
  */
  function init(address walletOwner) isInitialized() external override {
    require(walletOwner != address(0), "WI::init: _walletOwner address can't be 0!");
    _walletOwner = walletOwner;
  }

  modifier noReentrancy() {
      require(!_locked, "WI::noReentrancy:Reentrant call.");
      _locked = true;
      _;
      _locked = false;
  }

  modifier onlySigner(address _to, uint256 _value, bytes calldata _data, bytes memory signature) {
    require(_to != address(0), "WI::onlySigner:to address can not be 0");
    bytes memory payload = abi.encode(_to, _value, _data, _nonce);
    address signatureAddress = keccak256(payload).toEthSignedMessageHash().recover(signature);
    require(_walletOwner == signatureAddress, "WI::onlySigner:Failed to verify signature");
    _;
  }

  function invoke(bytes memory signature, address _to, uint256 _value, bytes calldata _data) noReentrancy() onlySigner(_to, _value, _data, signature) external override returns (bytes memory _result) {
    bool success;
    (success, _result) = _to.call{value: _value}(_data);
    if (!success) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            returndatacopy(0, 0, returndatasize())
            revert(0, returndatasize())
        }
    }

    emit Invoked(msg.sender, _to, _value, _nonce, _data); 
    _nonce = _nonce.add(INCREMENT);
  }
  
  receive() external payable {
      emit Received(msg.sender, msg.value, msg.data);
  }
  
  fallback() external payable {
      emit Fallback(msg.sender, msg.value, msg.data);
  }

  /**
    * @dev Returns Balance of this contract for the current token
  */
  function getBalance(address tokenAddress) external override view returns(uint256 _balance) {
    return IERC20(tokenAddress).balanceOf(address(this));
  }

  /**
    * @dev Returns nonce;
  */
  function getNonce() external override view returns(uint256 nonce) {
    return _nonce;
  }

  /**
    * @dev Returns walletOwner address;
  */
  function getWalletOwnerAddress() external override view returns(address walletOwner) {
    return _walletOwner;
  }
}

File 2 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

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

File 3 of 5 : IQredoWalletImplementation.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.11;

interface IQredoWalletImplementation {
    function init(address _walletOwner) external;
    function invoke(bytes memory signature, address _to, uint256 _value, bytes calldata _data) external returns (bytes memory _result);
    function getBalance(address tokenAddress) external view returns(uint256 _balance);
    function getNonce() external view returns(uint256 nonce);
    function getWalletOwnerAddress() external view returns(address _walletOwner);
    
    event Invoked(address indexed sender, address indexed target, uint256 value, uint256 indexed nonce, bytes data);
    event Received(address indexed sender, uint indexed value, bytes data);
    event Fallback(address indexed sender, uint indexed value, bytes data);
}

File 4 of 5 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }
        
        if (v < 27) {
            v += 27;
        }
        
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

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

pragma solidity 0.6.11;

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

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Fallback","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Invoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Received","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"_balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWalletOwnerAddress","outputs":[{"internalType":"address","name":"walletOwner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"walletOwner","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"invoke","outputs":[{"internalType":"bytes","name":"_result","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

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.