Contract 0xdc81B9928F6a1357EEb833D174e173CD1fafAED4

Txn Hash Method
Block
From
To
Value
0x6cd521cc891106d702b1659454d34ba3a2741712498db8fdd56cd427073fccd5Send On Close Pe...177018782023-11-24 13:17:0497 days 13 hrs ago0xd866b2332d4383c1bf719732177e2d9109c99dbc IN  0xdc81b9928f6a1357eeb833d174e173cd1fafaed40 ETH0.000041940780.21
0x59dc0ccafcc503067e4c7f655454186344d2a3eb364b2b661ca0e50b512047bb0x60806040176991912023-11-24 11:47:3097 days 14 hrs ago0xd866b2332d4383c1bf719732177e2d9109c99dbc IN  Create: MockStakingThales0 ETH0.0000000023980.00001
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MockStakingThales

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : MockStakingThales.sol
pragma solidity ^0.5.16;

import "../interfaces/ICCIPCollector.sol";

contract MockStakingThales {
    mapping(address => uint) private _stakedBalances;
    mapping(address => uint) public volume;

    uint public baseRewards;
    uint public extraRewards;
    uint public bonusPoints;
    uint public totalStaked;
    uint public totalEscrowed;

    constructor() public {}

    function stakedBalanceOf(address account) external view returns (uint) {
        return _stakedBalances[account];
    }

    function stake(uint amount) external {
        _stakedBalances[msg.sender] = amount;
    }

    function updateVolume(address account, uint amount) external {
        volume[msg.sender] = amount;
    }

    function sendOnClosePeriod(
        uint totalStakedLastPeriodEnd,
        uint totalEscrowedLastPeriodEnd,
        uint totalBonusPoints,
        address ccipCollector
    ) external {
        ICCIPCollector(ccipCollector).sendOnClosePeriod(
            totalStakedLastPeriodEnd,
            totalEscrowedLastPeriodEnd,
            totalBonusPoints
        );
    }

    function updateStakingRewards(
        uint _baseRewards,
        uint _extraRewards,
        uint _stakedAmount,
        uint _escrowedAmount
    ) external {
        baseRewards = _baseRewards;
        extraRewards = _extraRewards;
        totalStaked = _stakedAmount;
        totalEscrowed = _escrowedAmount;
        emit UpdatedStakingRewards(_baseRewards, _extraRewards, _stakedAmount, _escrowedAmount);
    }

    event UpdatedStakingRewards(uint baseRewards, uint extraRewards, uint stakedAmount, uint escrowedAmount);
}

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

pragma solidity >=0.5.16;

interface ICCIPCollector {
    function sendOnClosePeriod(uint _totalStakedLastPeriodEnd, uint _totalEscrowedLastPeriodEnd, uint _totalBonusPointsInRound) external;
}

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

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseRewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extraRewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"escrowedAmount","type":"uint256"}],"name":"UpdatedStakingRewards","type":"event"},{"constant":true,"inputs":[],"name":"baseRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"extraRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"totalStakedLastPeriodEnd","type":"uint256"},{"internalType":"uint256","name":"totalEscrowedLastPeriodEnd","type":"uint256"},{"internalType":"uint256","name":"totalBonusPoints","type":"uint256"},{"internalType":"address","name":"ccipCollector","type":"address"}],"name":"sendOnClosePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEscrowed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_baseRewards","type":"uint256"},{"internalType":"uint256","name":"_extraRewards","type":"uint256"},{"internalType":"uint256","name":"_stakedAmount","type":"uint256"},{"internalType":"uint256","name":"_escrowedAmount","type":"uint256"}],"name":"updateStakingRewards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"updateVolume","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"volume","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50610360806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a694fc3a11610071578063a694fc3a1461012c578063adeabba914610149578063b1e979fa1461016f578063bd886a5a146101a7578063e21c81d3146101d6578063f9168231146101de576100a9565b806302c7739b146100ae5780630ef7d139146100dc57806316765391146100f65780634a2e4a8d1461011c578063817b1cd214610124575b600080fd5b6100da600480360360408110156100c457600080fd5b506001600160a01b0381351690602001356101e6565b005b6100e46101f9565b60408051918252519081900360200190f35b6100e46004803603602081101561010c57600080fd5b50356001600160a01b03166101ff565b6100e461021a565b6100e4610220565b6100da6004803603602081101561014257600080fd5b5035610226565b6100e46004803603602081101561015f57600080fd5b50356001600160a01b0316610238565b6100da6004803603608081101561018557600080fd5b50803590602081013590604081013590606001356001600160a01b031661024a565b6100da600480360360808110156101bd57600080fd5b50803590602081013590604081013590606001356102be565b6100e461031f565b6100e4610325565b3360009081526001602052604090205550565b60025481565b6001600160a01b031660009081526020819052604090205490565b60045481565b60055481565b33600090815260208190526040902055565b60016020526000908152604090205481565b806001600160a01b031663e3d0603e8585856040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b5050505050505050565b600284905560038390556005829055600681905560408051858152602081018590528082018490526060810183905290517ff403422587b14f2ce3bb372a8676b8570f30cf5f45fb13217f393e38b019df169181900360800190a150505050565b60035481565b6006548156fea265627a7a72315820689c6fcd194bf4ebd3adfdd55947588e8a7e4faef5092f716ca5c410058e884864736f6c63430005100032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a694fc3a11610071578063a694fc3a1461012c578063adeabba914610149578063b1e979fa1461016f578063bd886a5a146101a7578063e21c81d3146101d6578063f9168231146101de576100a9565b806302c7739b146100ae5780630ef7d139146100dc57806316765391146100f65780634a2e4a8d1461011c578063817b1cd214610124575b600080fd5b6100da600480360360408110156100c457600080fd5b506001600160a01b0381351690602001356101e6565b005b6100e46101f9565b60408051918252519081900360200190f35b6100e46004803603602081101561010c57600080fd5b50356001600160a01b03166101ff565b6100e461021a565b6100e4610220565b6100da6004803603602081101561014257600080fd5b5035610226565b6100e46004803603602081101561015f57600080fd5b50356001600160a01b0316610238565b6100da6004803603608081101561018557600080fd5b50803590602081013590604081013590606001356001600160a01b031661024a565b6100da600480360360808110156101bd57600080fd5b50803590602081013590604081013590606001356102be565b6100e461031f565b6100e4610325565b3360009081526001602052604090205550565b60025481565b6001600160a01b031660009081526020819052604090205490565b60045481565b60055481565b33600090815260208190526040902055565b60016020526000908152604090205481565b806001600160a01b031663e3d0603e8585856040518463ffffffff1660e01b8152600401808481526020018381526020018281526020019350505050600060405180830381600087803b1580156102a057600080fd5b505af11580156102b4573d6000803e3d6000fd5b5050505050505050565b600284905560038390556005829055600681905560408051858152602081018590528082018490526060810183905290517ff403422587b14f2ce3bb372a8676b8570f30cf5f45fb13217f393e38b019df169181900360800190a150505050565b60035481565b6006548156fea265627a7a72315820689c6fcd194bf4ebd3adfdd55947588e8a7e4faef5092f716ca5c410058e884864736f6c63430005100032

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading