ETH Price: $3,726.45 (+3.76%)

Contract

0x4753659d2e431304eff2A95a16BaE4E768Acb72b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...135172462021-10-30 7:53:131127 days ago1635580393IN
0x4753659d...768Acb72b
0 ETH0.00384251133.89493832

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

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewardVault

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2021-10-30
*/

// File: node_modules\@openzeppelin\contracts\utils\Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin\contracts\access\Ownable.sol



pragma solidity ^0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @openzeppelin\contracts\token\ERC20\IERC20.sol



pragma solidity ^0.8.0;

/**
 * @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: contracts\StakingRewardVault.sol


pragma solidity ^0.8.0;



contract StakingRewardVault is Ownable {

    event RewardTransferred(address receiver, uint256 amount);

    IERC20 public cpdtToken;

    constructor(IERC20 _cpdtToken)
    {
        cpdtToken = _cpdtToken;
    }

    function transfer(address _receiver, uint256 _amount)
        public
        onlyOwner
    {
        require(_receiver != address(0), "StakingRewardVault: address is invalid");

        cpdtToken.transfer(_receiver, _amount);

        emit RewardTransferred(_receiver, _amount);
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_cpdtToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardTransferred","type":"event"},{"inputs":[],"name":"cpdtToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161055438038061055483398101604081905261002f91610095565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100c5565b6000602082840312156100a757600080fd5b81516001600160a01b03811681146100be57600080fd5b9392505050565b610480806100d46000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b14610066578063a9059cbb1461008f578063dc229ed9146100a2578063f2fde38b146100b5575b600080fd5b6100646100c8565b005b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006461009d3660046103a7565b610145565b600154610073906001600160a01b031681565b6100646100c33660046103d1565b6102a1565b6000546001600160a01b031633146100fb5760405162461bcd60e51b81526004016100f2906103f3565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461016f5760405162461bcd60e51b81526004016100f2906103f3565b6001600160a01b0382166101d45760405162461bcd60e51b815260206004820152602660248201527f5374616b696e675265776172645661756c743a206164647265737320697320696044820152651b9d985b1a5960d21b60648201526084016100f2565b60015460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561022257600080fd5b505af1158015610236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025a9190610428565b50604080516001600160a01b0384168152602081018390527f9c944f9bf53dd7797190e4b01a2e438a604c4d8f33a684d386a7e93769296141910160405180910390a15050565b6000546001600160a01b031633146102cb5760405162461bcd60e51b81526004016100f2906103f3565b6001600160a01b0381166103305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b03811681146103a257600080fd5b919050565b600080604083850312156103ba57600080fd5b6103c38361038b565b946020939093013593505050565b6000602082840312156103e357600080fd5b6103ec8261038b565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561043a57600080fd5b815180151581146103ec57600080fdfea2646970667358221220c50a861254246f5b65e86c967dead9eef48edb7b5a458ac7a4db206f72e5496e64736f6c63430008090033000000000000000000000000b74c385cbf463aa5ba5686e06fa582852bf1dd32

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b14610066578063a9059cbb1461008f578063dc229ed9146100a2578063f2fde38b146100b5575b600080fd5b6100646100c8565b005b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006461009d3660046103a7565b610145565b600154610073906001600160a01b031681565b6100646100c33660046103d1565b6102a1565b6000546001600160a01b031633146100fb5760405162461bcd60e51b81526004016100f2906103f3565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461016f5760405162461bcd60e51b81526004016100f2906103f3565b6001600160a01b0382166101d45760405162461bcd60e51b815260206004820152602660248201527f5374616b696e675265776172645661756c743a206164647265737320697320696044820152651b9d985b1a5960d21b60648201526084016100f2565b60015460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b15801561022257600080fd5b505af1158015610236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025a9190610428565b50604080516001600160a01b0384168152602081018390527f9c944f9bf53dd7797190e4b01a2e438a604c4d8f33a684d386a7e93769296141910160405180910390a15050565b6000546001600160a01b031633146102cb5760405162461bcd60e51b81526004016100f2906103f3565b6001600160a01b0381166103305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b03811681146103a257600080fd5b919050565b600080604083850312156103ba57600080fd5b6103c38361038b565b946020939093013593505050565b6000602082840312156103e357600080fd5b6103ec8261038b565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561043a57600080fd5b815180151581146103ec57600080fdfea2646970667358221220c50a861254246f5b65e86c967dead9eef48edb7b5a458ac7a4db206f72e5496e64736f6c63430008090033

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

000000000000000000000000b74c385cbf463aa5ba5686e06fa582852bf1dd32

-----Decoded View---------------
Arg [0] : _cpdtToken (address): 0xB74c385CBf463Aa5bA5686E06Fa582852bF1dD32

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b74c385cbf463aa5ba5686e06fa582852bf1dd32


Deployed Bytecode Sourcemap

6196:529:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2761:148;;;:::i;:::-;;2110:87;2156:7;2183:6;-1:-1:-1;;;;;2183:6:0;2110:87;;;-1:-1:-1;;;;;178:32:1;;;160:51;;148:2;133:18;2110:87:0;;;;;;;6427:293;;;;;;:::i;:::-;;:::i;6310:23::-;;;;;-1:-1:-1;;;;;6310:23:0;;;3064:244;;;;;;:::i;:::-;;:::i;2761:148::-;2156:7;2183:6;-1:-1:-1;;;;;2183:6:0;748:10;2330:23;2322:68;;;;-1:-1:-1;;;2322:68:0;;;;;;;:::i;:::-;;;;;;;;;2868:1:::1;2852:6:::0;;2831:40:::1;::::0;-1:-1:-1;;;;;2852:6:0;;::::1;::::0;2831:40:::1;::::0;2868:1;;2831:40:::1;2899:1;2882:19:::0;;-1:-1:-1;;;;;;2882:19:0::1;::::0;;2761:148::o;6427:293::-;2156:7;2183:6;-1:-1:-1;;;;;2183:6:0;748:10;2330:23;2322:68;;;;-1:-1:-1;;;2322:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;6540:23:0;::::1;6532:74;;;::::0;-1:-1:-1;;;6532:74:0;;1635:2:1;6532:74:0::1;::::0;::::1;1617:21:1::0;1674:2;1654:18;;;1647:30;1713:34;1693:18;;;1686:62;-1:-1:-1;;;1764:18:1;;;1757:36;1810:19;;6532:74:0::1;1433:402:1::0;6532:74:0::1;6619:9;::::0;:38:::1;::::0;-1:-1:-1;;;6619:38:0;;-1:-1:-1;;;;;2032:32:1;;;6619:38:0::1;::::0;::::1;2014:51:1::0;2081:18;;;2074:34;;;6619:9:0;;::::1;::::0;:18:::1;::::0;1987::1;;6619:38:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;6675:37:0::1;::::0;;-1:-1:-1;;;;;2032:32:1;;2014:51;;2096:2;2081:18;;2074:34;;;6675:37:0::1;::::0;1987:18:1;6675:37:0::1;;;;;;;6427:293:::0;;:::o;3064:244::-;2156:7;2183:6;-1:-1:-1;;;;;2183:6:0;748:10;2330:23;2322:68;;;;-1:-1:-1;;;2322:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;3153:22:0;::::1;3145:73;;;::::0;-1:-1:-1;;;3145:73:0;;2603:2:1;3145:73:0::1;::::0;::::1;2585:21:1::0;2642:2;2622:18;;;2615:30;2681:34;2661:18;;;2654:62;-1:-1:-1;;;2732:18:1;;;2725:36;2778:19;;3145:73:0::1;2401:402:1::0;3145:73:0::1;3255:6;::::0;;3234:38:::1;::::0;-1:-1:-1;;;;;3234:38:0;;::::1;::::0;3255:6;::::1;::::0;3234:38:::1;::::0;::::1;3283:6;:17:::0;;-1:-1:-1;;;;;;3283:17:0::1;-1:-1:-1::0;;;;;3283:17:0;;;::::1;::::0;;;::::1;::::0;;3064:244::o;222:173:1:-;290:20;;-1:-1:-1;;;;;339:31:1;;329:42;;319:70;;385:1;382;375:12;319:70;222:173;;;:::o;400:254::-;468:6;476;529:2;517:9;508:7;504:23;500:32;497:52;;;545:1;542;535:12;497:52;568:29;587:9;568:29;:::i;:::-;558:39;644:2;629:18;;;;616:32;;-1:-1:-1;;;400:254:1:o;881:186::-;940:6;993:2;981:9;972:7;968:23;964:32;961:52;;;1009:1;1006;999:12;961:52;1032:29;1051:9;1032:29;:::i;:::-;1022:39;881:186;-1:-1:-1;;;881:186:1:o;1072:356::-;1274:2;1256:21;;;1293:18;;;1286:30;1352:34;1347:2;1332:18;;1325:62;1419:2;1404:18;;1072:356::o;2119:277::-;2186:6;2239:2;2227:9;2218:7;2214:23;2210:32;2207:52;;;2255:1;2252;2245:12;2207:52;2287:9;2281:16;2340:5;2333:13;2326:21;2319:5;2316:32;2306:60;;2362:1;2359;2352:12

Swarm Source

ipfs://c50a861254246f5b65e86c967dead9eef48edb7b5a458ac7a4db206f72e5496e

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  ]

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.