ETH Price: $3,301.84 (-1.91%)

Contract

0x2ea614635fe5Fac4C9aaB6dD48514AE48a429044
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit Token104152252020-07-07 23:08:471655 days ago1594163327IN
0x2ea61463...48a429044
0 ETH0.0032194723
Deposit Token103223992020-06-23 13:52:211669 days ago1592920341IN
0x2ea61463...48a429044
0 ETH0.0015158358
Deposit Token103194672020-06-23 2:52:411670 days ago1592880761IN
0x2ea61463...48a429044
0 ETH0.0013067550
Deposit Token103193852020-06-23 2:36:061670 days ago1592879766IN
0x2ea61463...48a429044
0 ETH0.001045440
Deposit Token103193662020-06-23 2:32:291670 days ago1592879549IN
0x2ea61463...48a429044
0 ETH0.001045440
Deposit Token103145682020-06-22 8:49:461670 days ago1592815786IN
0x2ea61463...48a429044
0 ETH0.0069988550
Deposit Token102848772020-06-17 18:32:161675 days ago1592418736IN
0x2ea61463...48a429044
0 ETH0.0055990840
Deposit Token102848052020-06-17 18:17:531675 days ago1592417873IN
0x2ea61463...48a429044
0 ETH0.0057390541
Withdraw Token102846642020-06-17 17:44:581675 days ago1592415898IN
0x2ea61463...48a429044
0 ETH0.0013476353
Deposit Token102846282020-06-17 17:36:471675 days ago1592415407IN
0x2ea61463...48a429044
0 ETH0.0082137853
Deposit Token102846102020-06-17 17:31:591675 days ago1592415119IN
0x2ea61463...48a429044
0 ETH0.0010505947
Deposit Token102845962020-06-17 17:30:451675 days ago1592415045IN
0x2ea61463...48a429044
0 ETH0.0012294155
Set Addr Token102798992020-06-16 23:59:591676 days ago1592351999IN
0x2ea61463...48a429044
0 ETH0.0010418624

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xd33031F2...4cB068B79
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Staking

Compiler Version
v0.5.7+commit.6da8b019

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-06-16
*/

pragma solidity ^0.5.7;

contract Token {
    mapping (address => uint256) public balanceOf;
    function transfer(address _to, uint256 _value) public;
    function transferFrom(address _from, address _to, uint256 _value) public;
    function approve(address _spender, uint256 _value) public;
    function approveContract(address _spender, uint256 _value) public;
    function createTokens(address _user, uint _tokens) external;
}

contract Staking  {

    address owner;
    address token;
    bool iniziali = false;
    uint256 public minimalToken = 100000000000000000000;

    struct stakingStruct {
        bool isExist;
        bool status;
        uint256 tokens;
        uint256 profit;
        uint start;
        uint finish;
    }
    
    mapping(address => uint) public stakingCount;
    mapping(address => mapping (uint => stakingStruct)) public stakings;
    
    constructor() public {
        owner = msg.sender;
    }

    modifier onlyOwner{
        require(owner == msg.sender, "Only Owner");
        _;
    }

    function setAddrToken(address _addr) external onlyOwner {
        token = _addr;
    }

    function calculate(address _user, uint _id) public view returns (uint256) {
        uint _seconds = ((now - stakings[_user][_id].start) / 86400);
        uint256 _days = uint256(_seconds);
        uint256 _profit = (stakings[_user][_id].tokens * 260000000000000000 / 100000000000000000000) * _days;
        if(_profit > 0){
            return _profit;
        } else {
            return 0;
        }
    }

    function depositToken(uint256 amount) public {
        require(amount >= minimalToken, "Please enter a valid amount of tokens.");
        require(Token(token).balanceOf(msg.sender) >= amount, "You don't have the amount of tokens.");
        Token(token).approveContract(address(this), amount);
        Token(token).transferFrom(msg.sender, address(this), amount);
        stakingStruct memory staking_struct;
        staking_struct = stakingStruct({
            isExist: true,
            status: true,
            tokens: amount,
            profit: 0,
            start: now,            
            finish: 0
        });
        stakings[msg.sender][stakingCount[msg.sender]] = staking_struct;
        stakingCount[msg.sender]++;
        emit eventDeposit(msg.sender, amount, now);
    }

    function withdrawToken(uint _id) public {
        require(stakings[msg.sender][_id].isExist, "Staking not exists.");
        require(stakings[msg.sender][_id].status, "It was already withdrawn.");
        uint256 _profit = calculate(msg.sender, _id);
        require(_profit > 0, "The profit is wrong.");
        Token(token).createTokens(msg.sender, (_profit/600));
        Token(token).transfer(msg.sender, stakings[msg.sender][_id].tokens);
        stakings[msg.sender][_id].status = false;
        stakings[msg.sender][_id].profit = _profit;
        stakings[msg.sender][_id].finish = now;
        emit eventWithdraw(msg.sender, _id, stakings[msg.sender][_id].tokens, stakings[msg.sender][_id].profit, now);
    }

    event eventDeposit(address indexed _user, uint256 _tokens, uint256 _time);
    event eventWithdraw(address indexed _user, uint indexed _id, uint256 _tokens, uint256 _profit, uint256 _time);

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"stakings","outputs":[{"name":"isExist","type":"bool"},{"name":"status","type":"bool"},{"name":"tokens","type":"uint256"},{"name":"profit","type":"uint256"},{"name":"start","type":"uint256"},{"name":"finish","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"stakingCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"uint256"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"depositToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"},{"name":"_id","type":"uint256"}],"name":"calculate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimalToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"setAddrToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_user","type":"address"},{"indexed":false,"name":"_tokens","type":"uint256"},{"indexed":false,"name":"_time","type":"uint256"}],"name":"eventDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_user","type":"address"},{"indexed":true,"name":"_id","type":"uint256"},{"indexed":false,"name":"_tokens","type":"uint256"},{"indexed":false,"name":"_profit","type":"uint256"},{"indexed":false,"name":"_time","type":"uint256"}],"name":"eventWithdraw","type":"event"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80636215be771161005b5780636215be771461013a5780636e908ca314610157578063d72eabb814610183578063e2101f771461018b5761007d565b80631849d8ea146100825780631e38ef84146100e357806350baa6221461011b575b600080fd5b6100ae6004803603604081101561009857600080fd5b506001600160a01b0381351690602001356101b1565b6040805196151587529415156020870152858501939093526060850191909152608084015260a0830152519081900360c00190f35b610109600480360360208110156100f957600080fd5b50356001600160a01b03166101f5565b60408051918252519081900360200190f35b6101386004803603602081101561013157600080fd5b5035610207565b005b6101386004803603602081101561015057600080fd5b50356104ce565b6101096004803603604081101561016d57600080fd5b506001600160a01b038135169060200135610799565b61010961080e565b610138600480360360208110156101a157600080fd5b50356001600160a01b0316610814565b600460208181526000938452604080852090915291835291208054600182015460028301546003840154939094015460ff8084169561010090940416939192919086565b60036020526000908152604090205481565b33600090815260046020908152604080832084845290915290205460ff166102795760408051600160e51b62461bcd02815260206004820152601360248201527f5374616b696e67206e6f74206578697374732e00000000000000000000000000604482015290519081900360640190fd5b336000908152600460209081526040808320848452909152902054610100900460ff166102f05760408051600160e51b62461bcd02815260206004820152601960248201527f49742077617320616c72656164792077697468647261776e2e00000000000000604482015290519081900360640190fd5b60006102fc3383610799565b9050600081116103565760408051600160e51b62461bcd02815260206004820152601460248201527f5468652070726f6669742069732077726f6e672e000000000000000000000000604482015290519081900360640190fd5b60015460408051600160e11b63534f44a70281523360048201526102588404602482015290516001600160a01b039092169163a69e894e9160448082019260009290919082900301818387803b1580156103af57600080fd5b505af11580156103c3573d6000803e3d6000fd5b5050600180543360008181526004602081815260408084208b8552909152808320909501548551600160e01b63a9059cbb02815291820193909352602481019290925292516001600160a01b03909216945063a9059cbb9350604480820193929182900301818387803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b5050336000818152600460208181526040808420898552825292839020805461ff001916815560028101889055429281018390556001015483519081529081018790528083019190915290518694509192507f67dfeb30a6c2ae0a5c8af5ddf2ba05ea99bbcf5eaf8b266b5862d07cd71f0949919081900360600190a35050565b60025481101561051257604051600160e51b62461bcd0281526004018080602001828103825260268152602001806108e76026913960400191505060405180910390fd5b60015460408051600160e01b6370a08231028152336004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561055f57600080fd5b505afa158015610573573d6000803e3d6000fd5b505050506040513d602081101561058957600080fd5b505110156105cb57604051600160e51b62461bcd0281526004018080602001828103825260248152602001806108c36024913960400191505060405180910390fd5b60015460408051600160e31b630bccb5ff0281523060048201526024810184905290516001600160a01b0390921691635e65aff89160448082019260009290919082900301818387803b15801561062157600080fd5b505af1158015610635573d6000803e3d6000fd5b505060015460408051600160e01b6323b872dd0281523360048201523060248201526044810186905290516001600160a01b0390921693506323b872dd925060648082019260009290919082900301818387803b15801561069557600080fd5b505af11580156106a9573d6000803e3d6000fd5b505050506106b5610888565b506040805160c08101825260018082526020808301828152838501868152600060608601818152426080880181815260a08901848152338086526004808a528c87206003808c528e892080548a52918c528e89208e5181549c5115156101000261ff001991151560ff19909e169d909d17169b909b178b5598518a8d0155955160028a01559251888801559051969091019590955591849052918452815490940190558451868152918201929092528351929391927fc27cdd62c15bb01e02047fa68cc5735f1115f3e4c56faa54cab3dd384428cd33929181900390910190a25050565b6001600160a01b0382166000908152600460209081526040808320848452909152812060038101546001909101546201518042929092039190910490819068056bc75e2d6310000067039bb49f599a00009091020481028015610800579250610808915050565b600093505050505b92915050565b60025481565b6000546001600160a01b031633146108665760408051600160e51b62461bcd02815260206004820152600a6024820152600160b11b6927b7363c9027bbb732b902604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6040518060c0016040528060001515815260200160001515815260200160008152602001600081526020016000815260200160008152509056fe596f7520646f6e277420686176652074686520616d6f756e74206f6620746f6b656e732e506c6561736520656e74657220612076616c696420616d6f756e74206f6620746f6b656e732ea165627a7a723058202632d8d3fda85ba2c7d4391b8cad1179ac4ab295336b72d77a643adb38a3b4090029

Deployed Bytecode Sourcemap

443:2895:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;443:2895:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;828:67;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;828:67:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;777:44;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;777:44:0;-1:-1:-1;;;;;777:44:0;;:::i;:::-;;;;;;;;;;;;;;;;2407:728;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2407:728:0;;:::i;:::-;;1592:807;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1592:807:0;;:::i;1169:415::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1169:415:0;;;;;;;;:::i;538:51::-;;;:::i;1073:88::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1073:88:0;-1:-1:-1;;;;;1073:88:0;;:::i;828:67::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;777:44::-;;;;;;;;;;;;;:::o;2407:728::-;2475:10;2466:20;;;;:8;:20;;;;;;;;:25;;;;;;;;:33;;;2458:65;;;;;-1:-1:-1;;;;;2458:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2551:10;2542:20;;;;:8;:20;;;;;;;;:25;;;;;;;;:32;;;;;;2534:70;;;;;-1:-1:-1;;;;;2534:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2615:15;2633:26;2643:10;2655:3;2633:9;:26::i;:::-;2615:44;;2688:1;2678:7;:11;2670:44;;;;;-1:-1:-1;;;;;2670:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2731:5;;2725:52;;;-1:-1:-1;;;;;2725:52:0;;2751:10;2725:52;;;;2772:3;2764:11;;2725:52;;;;;;-1:-1:-1;;;;;2731:5:0;;;;2725:25;;:52;;;;;-1:-1:-1;;2725:52:0;;;;;;;;-1:-1:-1;2731:5:0;2725:52;;;5:2:-1;;;;30:1;27;20:12;5:2;2725:52:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2794:5:0;;;2810:10;2794:5;2822:20;;;:8;:20;;;;;;;;:25;;;;;;;;;:32;;;;2788:67;;-1:-1:-1;;;;;2788:67:0;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2794:5:0;;;;-1:-1:-1;2788:21:0;;-1:-1:-1;2788:67:0;;;;;2794:5;2788:67;;;;;;2794:5;;2788:67;;;5:2:-1;;;;30:1;27;20:12;5:2;2788:67:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2875:10:0;2901:5;2866:20;;;:8;:20;;;;;;;;:25;;;;;;;;;:40;;-1:-1:-1;;2866:40:0;;;2917:32;;;:42;;;3005:3;2970:32;;;:38;;;-1:-1:-1;3055:32:0;;3024:103;;;;;;;;;;;;;;;;;;;;2866:25;;-1:-1:-1;2875:10:0;;-1:-1:-1;3024:103:0;;;;;;;;;;2407:728;;:::o;1592:807::-;1666:12;;1656:6;:22;;1648:73;;;;-1:-1:-1;;;;;1648:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1746:5;;1740:34;;;-1:-1:-1;;;;;1740:34:0;;1763:10;1740:34;;;;;;1778:6;;-1:-1:-1;;;;;1746:5:0;;1740:22;;:34;;;;;;;;;;;;;;1746:5;1740:34;;;5:2:-1;;;;30:1;27;20:12;5:2;1740:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1740:34:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1740:34:0;:44;;1732:93;;;;-1:-1:-1;;;;;1732:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1842:5;;1836:51;;;-1:-1:-1;;;;;1836:51:0;;1873:4;1836:51;;;;;;;;;;;;-1:-1:-1;;;;;1842:5:0;;;;1836:28;;:51;;;;;1842:5;;1836:51;;;;;;;;1842:5;;1836:51;;;5:2:-1;;;;30:1;27;20:12;5:2;1836:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;1904:5:0;;1898:60;;;-1:-1:-1;;;;;1898:60:0;;1924:10;1898:60;;;;1944:4;1898:60;;;;;;;;;;;;-1:-1:-1;;;;;1904:5:0;;;;-1:-1:-1;1898:25:0;;-1:-1:-1;1898:60:0;;;;;1904:5;;1898:60;;;;;;;;1904:5;;1898:60;;;5:2:-1;;;;30:1;27;20:12;5:2;1898:60:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1898:60:0;;;;1969:35;;:::i;:::-;-1:-1:-1;2032:195:0;;;;;;;;2070:4;2032:195;;;;;;;;;;;;;;;;-1:-1:-1;2032:195:0;;;;;;2176:3;2032:195;;;;;;;;;;;;2247:10;2238:20;;;:8;:20;;;;;;2259:12;:24;;;;;;;;2238:46;;;;;;;;:63;;;;;;;;;;-1:-1:-1;;2238:63:0;;;-1:-1:-1;;2238:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2312:24;;;;;;;:26;;;;;;;2354:37;;;;;;;;;;;;;;2032:195;;2247:10;;2354:37;;;;;;;;;;;1592:807;;:::o;1169:415::-;-1:-1:-1;;;;;1278:15:0;;1234:7;1278:15;;;:8;:15;;;;;;;;:20;;;;;;;;:26;;;;1388:27;;;;;1308:5;1272:3;:32;;;;1271:42;;;;;;;1439:21;1418:18;1388:48;;;:72;1387:82;;1483:11;;1480:97;;1517:7;-1:-1:-1;1510:14:0;;-1:-1:-1;;1510:14:0;1480:97;1564:1;1557:8;;;;;1169:415;;;;;:::o;538:51::-;;;;:::o;1073:88::-;1011:5;;-1:-1:-1;;;;;1011:5:0;1020:10;1011:19;1003:42;;;;;-1:-1:-1;;;;;1003:42:0;;;;;;;;;;;;-1:-1:-1;;;;;1003:42:0;;;;;;;;;;;;;;;1140:5;:13;;-1:-1:-1;;;;;;1140:13:0;-1:-1:-1;;;;;1140:13:0;;;;;;;;;;1073:88::o;443:2895::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

bzzr://2632d8d3fda85ba2c7d4391b8cad1179ac4ab295336b72d77a643adb38a3b409

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.