Contract 0x0b98057ea310f4d31f2a452b414647007d1645d9

Gnosis 

Contract Overview

Gnosis: GBC Deposit
Balance:
0 xDAI

xDAI Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x71a57c4ae11e45f87393db6e6bd3b1e7b3be16af13200f302bc81c8f455631beOn Token Transfe...259836682023-01-15 22:27:25138 days 20 hrs ago0xa577c7a303ffdfe6beb3542a39f39459b4a0caf8 IN  Gnosis: GBC Deposit0 xDAI0.000062217
0xf3c144f8cb67ada3745a2cb9700bd0fa02df4c1c87cb188450ce04e27455344b0x0cac9f31259833192023-01-15 21:57:25138 days 20 hrs ago0xa577c7a303ffdfe6beb3542a39f39459b4a0caf8 IN  Gnosis: GBC Deposit0 xDAI0.0001612625
0xfd4293ae79d0269071f615432a1301b9dd02bf801176c2bd4eefa88ac60a7e040x0cac9f31259831312023-01-15 21:41:20138 days 20 hrs ago0xa577c7a303ffdfe6beb3542a39f39459b4a0caf8 IN  Gnosis: GBC Deposit0 xDAI0.0000887865
0x96f222bfa3dc1d649f6142b6882b2031fd3db4f040057aaf204c66ed37b02d9dOn Token Transfe...259013592023-01-10 23:02:00143 days 19 hrs ago0xc379e9b385baf44466ca3abc02b1b2897af385a4 IN  Gnosis: GBC Deposit0 xDAI0.0000824025
0x97ef832229375ad357bbd4ff2beb9f9d5ebc54a7c9a077450363c13c592df1430xc82655b7222985842022-05-23 19:30:35375 days 22 hrs ago0x65c02c7d1d8106995ebdda2ba469e3eb3ef69fdb IN  Gnosis: GBC Deposit0 xDAI0.005814065016
0x5dcc6a06d9aeac67c05ee9284c2e7ee269d1822c2fa9020cb8f482a79e3e69840xc82655b7222985652022-05-23 19:28:50375 days 22 hrs ago0x65c02c7d1d8106995ebdda2ba469e3eb3ef69fdb IN  Gnosis: GBC Deposit0 xDAI0.000473432501
0x2ab6646f12c738e4f5fe2d4efc51b30b89b46bec4436dbc5b1dd4059f2f5eb280x0cac9f31206402472022-02-14 19:55:35473 days 22 hrs ago0x65c02c7d1d8106995ebdda2ba469e3eb3ef69fdb IN  Gnosis: GBC Deposit0 xDAI0.0002808275
0xb04dabcba988c6533787ba53711e9ce08cedf0a08b54091ee7260f799a46e7b60x0cac9f31197698302021-12-25 22:34:55524 days 19 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008138447629
0x6fc380df48660505dc16ea76960e17f236e948305d3c1264df2cb8c84275c1940x0cac9f31197698302021-12-25 22:34:55524 days 19 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008140096897
0xe0667f2067811b40f5d20fed45daf0cf84ed7a0a07261498dcb593931da140450x0cac9f31197694162021-12-25 22:00:20524 days 20 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008138447629
0xfc5bf2d64361f2646e03bab1348b6cf72cd1ca1393b98dddd10cf11a1b2285d40x0cac9f31197694162021-12-25 22:00:20524 days 20 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008140096897
0x1a49009d88f4470a470afe688409fa035326baac4faff5b3106440647507728e0x0cac9f31197689852021-12-25 21:24:20524 days 21 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008140096897
0xc4c49187b0effa532de2205f4eccb24a7f6de49e7ac2e056951a2c691122f7af0x0cac9f31197680352021-12-25 20:05:10524 days 22 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.008140096897
0x3f9b7404b557343ff313f6997e7d64c83dbc94778bf8668bf9f7a11fe64d39980x0cac9f31197678502021-12-25 19:49:45524 days 22 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.00355362
0x3eba6cc9ffff24190e6f1795e7ce343203533ea772aae19e95bd032c58c723010x0cac9f31197674642021-12-25 19:17:35524 days 23 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.00355362
0xbae2855b1cd97ff6fe79815508526ed2dd1983d2f1a069342e0581c0f901141a0x0cac9f31197674262021-12-25 19:14:25524 days 23 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.0035529
0x444bbbe0a8a1951643f261eaf61ba855eb8bb16ccc1a8295e166d56967eaf73e0x0cac9f31197674252021-12-25 19:14:20524 days 23 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.00355362
0xffd84fe6e0ac586724d9f694368d6b4d88eea9952300c30c7cd955f4bcacf4cf0x0cac9f31197295792021-12-23 14:36:20527 days 3 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.00355362
0xdceb1746c1adb3331171eeddf78d49e9d468f873d5515401de02d7245e180a690x0cac9f31197295052021-12-23 14:30:10527 days 3 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.004619706
0x59eebca0eec01554239cc4d602239cc9c37748b00e0c8237b878c6f152508f040x0cac9f31197294432021-12-23 14:25:00527 days 4 hrs ago0x9758106dc25403609105e10c11184bcaec93b40e IN  Gnosis: GBC Deposit0 xDAI0.00355362
0x8c79134de8c77be5d2f52693f721dedb504c59b2d51d5162bd91328d8b038f980x0cac9f31196163982021-12-16 22:28:20533 days 19 hrs ago0xd015853ec31b0918e321dca0247f4bd4cb47aaf4 IN  Gnosis: GBC Deposit0 xDAI0.0002688875
0x85e2301f4cdb538603ffc91a837be4f3b2b0032116a930f312d88a8b35ed71af0x0cac9f31196163872021-12-16 22:27:25533 days 20 hrs ago0xd015853ec31b0918e321dca0247f4bd4cb47aaf4 IN  Gnosis: GBC Deposit0 xDAI0.000285055
0xa7101ef4c7ad5e7dc828b60008b23c907c27c7b7145a2d1c8c12f7eb24b3291f0x0cac9f31196163792021-12-16 22:26:45533 days 20 hrs ago0xd015853ec31b0918e321dca0247f4bd4cb47aaf4 IN  Gnosis: GBC Deposit0 xDAI0.0003084625
0x8337c3bbfb3cf4d342546b443f57aae9cc19615cd16ef5504509caa5b2c094d10x0cac9f31196163692021-12-16 22:25:55533 days 20 hrs ago0xd015853ec31b0918e321dca0247f4bd4cb47aaf4 IN  Gnosis: GBC Deposit0 xDAI0.000285085
0xe70482456cba0d47cf93b7dabc40a7ee2c6b9133fcc08b258d9199ffce1b4d980x0cac9f31196163602021-12-16 22:25:10533 days 20 hrs ago0xd015853ec31b0918e321dca0247f4bd4cb47aaf4 IN  Gnosis: GBC Deposit0 xDAI0.0002928575
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
SBCDepositContractProxy

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 5000000 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 12 : SBCDepositContractProxy.sol:SBCDepositContractProxy
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

import "./utils/EIP1967Proxy.sol";
import "./SBCDepositContract.sol";

/**
 * @title SBCDepositContractProxy
 * @dev Upgradeable version of the underlying SBCDepositContract.
 */
contract SBCDepositContractProxy is EIP1967Proxy {
    bool private paused;

    uint256 private constant DEPOSIT_CONTRACT_TREE_DEPTH = 32;
    // first slot from StakeDepositContract
    bytes32[DEPOSIT_CONTRACT_TREE_DEPTH] private zero_hashes;

    constructor(address _admin, address _sbcDepositContract) {
        _setAdmin(_admin);
        _setImplementation(_sbcDepositContract);

        // Compute hashes in empty sparse Merkle tree
        for (uint256 height = 0; height < DEPOSIT_CONTRACT_TREE_DEPTH - 1; height++)
            zero_hashes[height + 1] = sha256(abi.encodePacked(zero_hashes[height], zero_hashes[height]));
    }
}

File 2 of 12 : PausableEIP1967Admin.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

import "contracts/security/Pausable.sol";
import "contracts/EIP1967Admin.sol";

/**
 * @title PausableEIP1967Admin
 * @dev Pausable contract, controlled by the current EIP1967 proxy owner.
 */
contract PausableEIP1967Admin is EIP1967Admin, Pausable {
    function pause() external onlyAdmin {
        _pause();
    }

    function unpause() external onlyAdmin {
        _unpause();
    }
}

File 3 of 12 : EIP1967Proxy.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

import "contracts/EIP1967Admin.sol";

/**
 * @title EIP1967Proxy
 * @dev Upgradeable proxy pattern implementation according to minimalistic EIP1967.
 */
contract EIP1967Proxy is EIP1967Admin {
    // EIP 1967
    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
    uint256 internal constant EIP1967_IMPLEMENTATION_STORAGE =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    event Upgraded(address indexed implementation);
    event AdminChanged(address previousAdmin, address newAdmin);

    function admin() public view returns (address) {
        return _admin();
    }

    function implementation() public view returns (address res) {
        assembly {
            res := sload(EIP1967_IMPLEMENTATION_STORAGE)
        }
    }

    function setAdmin(address _admin) external onlyAdmin {
        _setAdmin(_admin);
    }

    function upgradeTo(address _implementation) external onlyAdmin {
        _setImplementation(_implementation);
    }

    /**
     * @dev Fallback function allowing to perform a delegatecall to the given implementation.
     * This function will return whatever the implementation call returns
     */
    fallback() external payable {
        address impl = implementation();
        require(impl != address(0));
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), impl, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev Internal function for transfer current admin rights to a different account.
     * @param _admin address of the new administrator.
     */
    function _setAdmin(address _admin) internal {
        address previousAdmin = admin();
        require(_admin != address(0));
        require(previousAdmin != _admin);
        assembly {
            sstore(EIP1967_ADMIN_STORAGE, _admin)
        }
        emit AdminChanged(previousAdmin, _admin);
    }

    /**
     * @dev Internal function for setting a new implementation address.
     * @param _implementation address of the new implementation contract.
     */
    function _setImplementation(address _implementation) internal {
        require(_implementation != address(0));
        require(implementation() != _implementation);
        assembly {
            sstore(EIP1967_IMPLEMENTATION_STORAGE, _implementation)
        }
        emit Upgraded(_implementation);
    }
}

File 4 of 12 : EIP1967Admin.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

/**
 * @title EIP1967Admin
 * @dev Upgradeable proxy pattern implementation according to minimalistic EIP1967.
 */
contract EIP1967Admin {
    // EIP 1967
    // bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)
    uint256 internal constant EIP1967_ADMIN_STORAGE =
        0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    modifier onlyAdmin() {
        require(msg.sender == _admin());
        _;
    }

    function _admin() internal view returns (address res) {
        assembly {
            res := sload(EIP1967_ADMIN_STORAGE)
        }
    }
}

File 5 of 12 : Claimable.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

import "contracts/token/ERC20/IERC20.sol";

/**
 * @title Claimable
 * @dev Implementation of the claiming utils that can be useful for withdrawing accidentally sent tokens.
 */
contract Claimable {
    /**
     * @dev Withdraws the erc20 tokens or native coins from this contract.
     * @param _token address of the claimed token or address(0) for native coins.
     * @param _to address of the tokens/coins receiver.
     */
    function _claimValues(address _token, address _to) internal {
        if (_token == address(0)) {
            _claimNativeCoins(_to);
        } else {
            _claimERC20Tokens(_token, _to);
        }
    }

    /**
     * @dev Internal function for withdrawing all native coins from the contract.
     * @param _to address of the coins receiver.
     */
    function _claimNativeCoins(address _to) internal {
        uint256 balance = address(this).balance;
        payable(_to).transfer(balance);
    }

    /**
     * @dev Internal function for withdrawing all tokens of some particular ERC20 contract from this contract.
     * @param _token address of the claimed ERC20 token.
     * @param _to address of the tokens receiver.
     */
    function _claimERC20Tokens(address _token, address _to) internal {
        uint256 balance = IERC20(_token).balanceOf(address(this));
        IERC20(_token).transfer(_to, balance);
    }
}

File 6 of 12 : IERC677Receiver.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

interface IERC677Receiver {
    function onTokenTransfer(
        address from,
        uint256 value,
        bytes calldata data
    ) external returns (bool);
}

File 7 of 12 : IDepositContract.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

interface IDepositContract {
    /// @notice A processed deposit event.
    event DepositEvent(bytes pubkey, bytes withdrawal_credentials, bytes amount, bytes signature, bytes index);

    /// @notice Submit a Phase 0 DepositData object.
    /// @param pubkey A BLS12-381 public key.
    /// @param withdrawal_credentials Commitment to a public key for withdrawals.
    /// @param signature A BLS12-381 signature.
    /// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object.
    /// Used as a protection against malformed input.
    function deposit(
        bytes memory pubkey,
        bytes memory withdrawal_credentials,
        bytes memory signature,
        bytes32 deposit_data_root,
        uint256 stake_amount
    ) external;

    /// @notice Query the current deposit root hash.
    /// @return The deposit root hash.
    function get_deposit_root() external view returns (bytes32);

    /// @notice Query the current deposit count.
    /// @return The deposit count encoded as a little endian 64-bit number.
    function get_deposit_count() external view returns (bytes memory);
}

File 8 of 12 : SBCDepositContract.sol
// SPDX-License-Identifier: CC0-1.0

pragma solidity 0.8.9;

import "contracts/utils/introspection/IERC165.sol";
import "./interfaces/IDepositContract.sol";
import "./interfaces/IERC677Receiver.sol";
import "./utils/PausableEIP1967Admin.sol";
import "./utils/Claimable.sol";

/**
 * @title SBCDepositContract
 * @dev Implementation of the ERC20 ETH2.0 deposit contract.
 * For the original implementation, see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs
 */
contract SBCDepositContract is IDepositContract, IERC165, IERC677Receiver, PausableEIP1967Admin, Claimable {
    uint256 private constant DEPOSIT_CONTRACT_TREE_DEPTH = 32;
    // NOTE: this also ensures `deposit_count` will fit into 64-bits
    uint256 private constant MAX_DEPOSIT_COUNT = 2**DEPOSIT_CONTRACT_TREE_DEPTH - 1;

    bytes32[DEPOSIT_CONTRACT_TREE_DEPTH] private zero_hashes;

    bytes32[DEPOSIT_CONTRACT_TREE_DEPTH] private branch;
    uint256 private deposit_count;

    mapping(bytes => bytes32) public validator_withdrawal_credentials;

    IERC20 public immutable stake_token;

    constructor(address _token) {
        stake_token = IERC20(_token);
    }

    function get_deposit_root() external view override returns (bytes32) {
        bytes32 node;
        uint256 size = deposit_count;
        for (uint256 height = 0; height < DEPOSIT_CONTRACT_TREE_DEPTH; height++) {
            if ((size & 1) == 1) {
                node = sha256(abi.encodePacked(branch[height], node));
            } else {
                node = sha256(abi.encodePacked(node, zero_hashes[height]));
            }
            size /= 2;
        }
        return sha256(abi.encodePacked(node, to_little_endian_64(uint64(deposit_count)), bytes24(0)));
    }

    function get_deposit_count() external view override returns (bytes memory) {
        return to_little_endian_64(uint64(deposit_count));
    }

    function deposit(
        bytes memory pubkey,
        bytes memory withdrawal_credentials,
        bytes memory signature,
        bytes32 deposit_data_root,
        uint256 stake_amount
    ) external override whenNotPaused {
        stake_token.transferFrom(msg.sender, address(this), stake_amount);
        _deposit(pubkey, withdrawal_credentials, signature, deposit_data_root, stake_amount);
    }

    function batchDeposit(
        bytes calldata pubkeys,
        bytes calldata withdrawal_credentials,
        bytes calldata signatures,
        bytes32[] calldata deposit_data_roots
    ) external whenNotPaused {
        uint256 count = deposit_data_roots.length;
        require(count > 0, "BatchDeposit: You should deposit at least one validator");
        require(count <= 128, "BatchDeposit: You can deposit max 128 validators at a time");

        require(pubkeys.length == count * 48, "BatchDeposit: Pubkey count don't match");
        require(signatures.length == count * 96, "BatchDeposit: Signatures count don't match");
        require(withdrawal_credentials.length == 32, "BatchDeposit: Withdrawal Credentials count don't match");

        uint256 stake_amount = 32 ether;
        stake_token.transferFrom(msg.sender, address(this), stake_amount * count);

        for (uint256 i = 0; i < count; ++i) {
            bytes memory pubkey = bytes(pubkeys[i * 48:(i + 1) * 48]);
            bytes memory signature = bytes(signatures[i * 96:(i + 1) * 96]);

            _deposit(pubkey, withdrawal_credentials, signature, deposit_data_roots[i], stake_amount);
        }
    }

    function onTokenTransfer(
        address,
        uint256 stake_amount,
        bytes calldata data
    ) external override whenNotPaused returns (bool) {
        require(msg.sender == address(stake_token), "DepositContract: not a deposit token");
        require(data.length % 176 == 32, "DepositContract: incorrect deposit data length");
        uint256 count = data.length / 176;
        require(count > 0, "BatchDeposit: You should deposit at least one validator");
        uint256 stake_amount_per_deposit = stake_amount;
        if (count > 1) {
            require(count <= 128, "BatchDeposit: You can deposit max 128 validators at a time");
            require(stake_amount == 32 ether * count, "BatchDeposit: batch deposits require 32 SBC deposit amount");
            stake_amount_per_deposit = 32 ether;
        }

        bytes memory withdrawal_credentials = data[0:32];
        for (uint256 p = 32; p < data.length; p += 176) {
            bytes memory pubkey = data[p:p + 48];
            bytes memory signature = data[p + 48:p + 144];
            bytes32 deposit_data_root = bytes32(data[p + 144:p + 176]);
            _deposit(pubkey, withdrawal_credentials, signature, deposit_data_root, stake_amount_per_deposit);
        }
        return true;
    }

    function _deposit(
        bytes memory pubkey,
        bytes memory withdrawal_credentials,
        bytes memory signature,
        bytes32 deposit_data_root,
        uint256 stake_amount
    ) internal {
        // Extended ABI length checks since dynamic types are used.
        require(pubkey.length == 48, "DepositContract: invalid pubkey length");
        require(withdrawal_credentials.length == 32, "DepositContract: invalid withdrawal_credentials length");
        require(signature.length == 96, "DepositContract: invalid signature length");

        // Check deposit amount
        require(stake_amount >= 1 ether, "DepositContract: deposit value too low");
        require(stake_amount % 1 gwei == 0, "DepositContract: deposit value not multiple of gwei");
        uint256 deposit_amount = stake_amount / 1 gwei;
        require(deposit_amount <= type(uint64).max, "DepositContract: deposit value too high");

        // Don't allow to use different withdrawal credentials for subsequent deposits
        bytes32 saved_wc = validator_withdrawal_credentials[pubkey];
        bytes32 wc;
        assembly {
            wc := mload(add(withdrawal_credentials, 32))
        }
        if (saved_wc == bytes32(0)) {
            validator_withdrawal_credentials[pubkey] = wc;
        } else {
            require(saved_wc == wc, "DepositContract: invalid withdrawal_credentials");
        }

        // Emit `DepositEvent` log
        bytes memory amount = to_little_endian_64(uint64(deposit_amount));
        emit DepositEvent(
            pubkey,
            withdrawal_credentials,
            amount,
            signature,
            to_little_endian_64(uint64(deposit_count))
        );

        // Compute deposit data root (`DepositData` hash tree root)
        bytes32 pubkey_root = sha256(abi.encodePacked(pubkey, bytes16(0)));
        bytes32[3] memory sig_parts = abi.decode(signature, (bytes32[3]));
        bytes32 signature_root = sha256(
            abi.encodePacked(
                sha256(abi.encodePacked(sig_parts[0], sig_parts[1])),
                sha256(abi.encodePacked(sig_parts[2], bytes32(0)))
            )
        );
        bytes32 node = sha256(
            abi.encodePacked(
                sha256(abi.encodePacked(pubkey_root, withdrawal_credentials)),
                sha256(abi.encodePacked(amount, bytes24(0), signature_root))
            )
        );

        // Verify computed and expected deposit data roots match
        require(
            node == deposit_data_root,
            "DepositContract: reconstructed DepositData does not match supplied deposit_data_root"
        );

        // Avoid overflowing the Merkle tree (and prevent edge case in computing `branch`)
        require(deposit_count < MAX_DEPOSIT_COUNT, "DepositContract: merkle tree full");

        // Add deposit data root to Merkle tree (update a single `branch` node)
        deposit_count += 1;
        uint256 size = deposit_count;
        for (uint256 height = 0; height < DEPOSIT_CONTRACT_TREE_DEPTH; height++) {
            if ((size & 1) == 1) {
                branch[height] = node;
                return;
            }
            node = sha256(abi.encodePacked(branch[height], node));
            size /= 2;
        }
        // As the loop should always end prematurely with the `return` statement,
        // this code should be unreachable. We assert `false` just to be safe.
        assert(false);
    }

    function supportsInterface(bytes4 interfaceId) external pure override returns (bool) {
        return
            interfaceId == type(IERC165).interfaceId ||
            interfaceId == type(IDepositContract).interfaceId ||
            interfaceId == type(IERC677Receiver).interfaceId;
    }

    /**
     * @dev Allows to transfer any locked token from this contract.
     * Only admin can call this method.
     * Deposit-related tokens cannot be claimed.
     * @param _token address of the token, if it is not provided (0x00..00), native coins will be transferred.
     * @param _to address that will receive the locked tokens from this contract.
     */
    function claimTokens(address _token, address _to) external onlyAdmin {
        require(address(stake_token) != _token, "DepositContract: not allowed to claim deposit token");
        _claimValues(_token, _to);
    }

    function to_little_endian_64(uint64 value) internal pure returns (bytes memory ret) {
        ret = new bytes(8);
        bytes8 bytesValue = bytes8(value);
        // Byteswapping during copying to bytes.
        ret[0] = bytesValue[7];
        ret[1] = bytesValue[6];
        ret[2] = bytesValue[5];
        ret[3] = bytesValue[4];
        ret[4] = bytesValue[3];
        ret[5] = bytesValue[2];
        ret[6] = bytesValue[1];
        ret[7] = bytesValue[0];
    }
}

File 9 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 10 of 12 : 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) {
        return msg.data;
    }
}

File 11 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

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 12 of 12 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "contracts/utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

Settings
{
  "evmVersion": "berlin",
  "optimizer": {
    "enabled": true,
    "runs": 5000000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_sbcDepositContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"res","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620008a0380380620008a08339810160408190526200003491620002b4565b6200003f8262000147565b6200004a81620001e3565b60005b6200005b6001602062000302565b8110156200013e576002600182602081106200007b576200007b6200031c565b0154600183602081106200009357620000936200031c565b015460408051602081019390935282015260600160408051601f1981840301815290829052620000c39162000332565b602060405180830381855afa158015620000e1573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019062000106919062000370565b60016200011483826200038a565b602081106200012757620001276200031c565b0155806200013581620003a5565b9150506200004d565b505050620003c3565b60006200015362000278565b90506001600160a01b0382166200016957600080fd5b816001600160a01b0316816001600160a01b031614156200018957600080fd5b60008051602062000860833981519152829055604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b6001600160a01b038116620001f757600080fd5b6001600160a01b03811662000219600080516020620008808339815191525490565b6001600160a01b031614156200022e57600080fd5b600080516020620008808339815191528190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b600062000292600080516020620008608339815191525490565b905090565b80516001600160a01b0381168114620002af57600080fd5b919050565b60008060408385031215620002c857600080fd5b620002d38362000297565b9150620002e36020840162000297565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015620003175762000317620002ec565b500390565b634e487b7160e01b600052603260045260246000fd5b6000825160005b8181101562000355576020818601810151858301520162000339565b8181111562000365576000828501525b509190910192915050565b6000602082840312156200038357600080fd5b5051919050565b60008219821115620003a057620003a0620002ec565b500190565b6000600019821415620003bc57620003bc620002ec565b5060010190565b61048d80620003d36000396000f3fe60806040526004361061003f5760003560e01c80633659cfe6146100af5780635c60da1b146100d1578063704b6c021461012a578063f851a4401461014a575b60006100697f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905073ffffffffffffffffffffffffffffffffffffffff811661008b57600080fd5b3660008037600080366000845af43d6000803e8080156100aa573d6000f35b3d6000fd5b3480156100bb57600080fd5b506100cf6100ca36600461041a565b61015f565b005b3480156100dd57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b34801561013657600080fd5b506100cf61014536600461041a565b6101c4565b34801561015657600080fd5b50610101610226565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101b857600080fd5b6101c181610255565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461021d57600080fd5b6101c18161033d565b60006102507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661027557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166102b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff1614156102d557600080fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81905560405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6000610347610226565b905073ffffffffffffffffffffffffffffffffffffffff821661036957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103a257600080fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038290556040805173ffffffffffffffffffffffffffffffffffffffff8084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a15050565b60006020828403121561042c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461045057600080fd5b939250505056fea2646970667358221220305d41a8accfd141d3a1383d2a5879b8b34f51bc324e7bd043d4650342af3d2664736f6c63430008090033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000ce2b2dd016d13fb2d202405827f134dc85efb5ca0000000000000000000000006da1365c3baad9b6ccb76c2560523dbbbcc94cde

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

000000000000000000000000ce2b2dd016d13fb2d202405827f134dc85efb5ca0000000000000000000000006da1365c3baad9b6ccb76c2560523dbbbcc94cde

-----Decoded View---------------
Arg [0] : _admin (address): 0xce2b2dd016d13fb2d202405827f134dc85efb5ca
Arg [1] : _sbcDepositContract (address): 0x6da1365c3baad9b6ccb76c2560523dbbbcc94cde

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ce2b2dd016d13fb2d202405827f134dc85efb5ca
Arg [1] : 0000000000000000000000006da1365c3baad9b6ccb76c2560523dbbbcc94cde


Deployed ByteCode Sourcemap

240:639:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1283:12:9;1298:16;794:30;788:37;;688:153;1298:16;1283:31;-1:-1:-1;1332:18:9;;;1324:27;;;;;;1629:14;1626:1;1623;1610:34;1833:1;1830;1814:14;1811:1;1805:4;1798:5;1785:50;1909:16;1906:1;1903;1888:38;1947:6;2014:66;;;;2129:16;2126:1;2119:27;2014:66;2049:16;2046:1;2039:27;940:115;;;;;;;;;;-1:-1:-1;940:115:9;;;;;:::i;:::-;;:::i;:::-;;688:153;;;;;;;;;;-1:-1:-1;794:30:9;788:37;688:153;;;504:42:12;492:55;;;474:74;;462:2;447:18;688:153:9;;;;;;;847:87;;;;;;;;;;-1:-1:-1;847:87:9;;;;;:::i;:::-;;:::i;603:79::-;;;;;;;;;;;;;:::i;940:115::-;599:21:0;593:28;452:22;;:10;:22;;;444:31;;;;;;1013:35:9::1;1032:15;1013:18;:35::i;:::-;940:115:::0;:::o;847:87::-;599:21:0;593:28;452:22;;:10;:22;;;444:31;;;;;;910:17:9::1;920:6;910:9;:17::i;603:79::-:0;641:7;667:8;599:21:0;593:28;;499:138;667:8:9;660:15;;603:79;:::o;2811:308::-;2891:29;;;2883:38;;;;;;2959:15;2939:35;;:16;794:30;788:37;;688:153;2939:16;:35;;;;2931:44;;;;;;3015:30;3008:55;;;3087:25;;;;;;;;;;;2811:308;:::o;2341:302::-;2395:21;2419:7;:5;:7::i;:::-;2395:31;-1:-1:-1;2444:20:9;;;2436:29;;;;;;2500:6;2483:23;;:13;:23;;;;2475:32;;;;;;2547:21;2540:37;;;2601:35;;;743:42:12;812:15;;;794:34;;864:15;;859:2;844:18;;837:43;2601:35:9;;706:18:12;2601:35:9;;;;;;;2385:258;2341:302;:::o;14:309:12:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;181:9;168:23;231:42;224:5;220:54;213:5;210:65;200:93;;289:1;286;279:12;200:93;312:5;14:309;-1:-1:-1;;;14:309:12:o

Swarm Source

ipfs://305d41a8accfd141d3a1383d2a5879b8b34f51bc324e7bd043d4650342af3d26
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.