Contract 0x7e97964adfa5d0c27af1cc859037bc2072b11a13 2

Contract Overview

Balance:
0 MATIC

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x06dda0c3acc4638d3a606acc936aa211d025f6bf8020b3f7f2a1865c50bc8515Increase Balance275562272022-08-10 9:57:3620 hrs 4 mins ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00113587234
0x7ebd137a67d0856620024069072fd9d52e8fc56cb137f5f1d3513cc846009637Increase Balance275562272022-08-10 9:57:3620 hrs 4 mins ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00113668834
0xaa7d9dbf0e9d8793fd8683154b6d79f6340f22a797b47f35d092b6c9956166dbIncrease Balance275211402022-08-08 0:00:323 days 6 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0000668162
0xdc8f7556b395469bdac9a6d40a54aa355af1dc90bbc85e5e43cacd55b487ece6Increase Balance275211402022-08-08 0:00:323 days 6 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0000668162
0x30860dd02b8eda021f37db6001e93f61afed94f8b78b57c35342cb3dd27f58e1Increase Balance275211402022-08-08 0:00:323 days 6 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.000066842
0xc131ccad6525d2079840429468b25843ec630196ea3703a62aa189941ccb18ffIncrease Balance275211382022-08-08 0:00:223 days 6 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00103564831
0x06bd78698fe578e86320147017d9d05ca5a88776f6f3c357e51f87a53e2bb6a5Increase Balance275211382022-08-08 0:00:223 days 6 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00103564831
0xb61e7ddda95181e58d9731a487174ee21a0fc0578d0c11bb1bf48058c4dcc443Increase Balance275211382022-08-08 0:00:223 days 6 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0010360231
0x0804134daa55714a5364ae41a92a089b47bc4dd6ff51823711b43f6889dd058bIncrease Balance275211362022-08-08 0:00:123 days 6 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0010360231
0x9dbeacfea1eacde1a33bf92acb274952fb1ca2efe3a431181240de2fbb2d0cd0Increase Balance275211362022-08-08 0:00:123 days 6 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0010360231
0x9bff3b4be8bb6f06f578faa5066e03a197724adaee2de49a6537f3d735021a6dIncrease Balance275211362022-08-08 0:00:123 days 6 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.0010360231
0x7987926bec2f8029cf0f523a0968539ec3e2177400641358e337b03e2e7a3e79Increase Balance275109232022-08-07 8:32:483 days 21 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0x977d8be8980a3a5f52740b93e9e76c9a8325cab39f440429fc8bbffcd0440a24Increase Balance275109232022-08-07 8:32:483 days 21 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0xf5e3b76e69aca2360233a454f5c55697797d3c67cdb57f2d8aee66733cf50582Increase Balance275109222022-08-07 8:32:383 days 21 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0x0b8d3eee8c1eec252d287102d2ce80919065e1ddf2deeec06a62a738e9fb7790Increase Balance275109222022-08-07 8:32:383 days 21 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0x1c167c3a68f4f2e4e4c75bbb11825c4b6403d0b3e8981842adf86c51fb199ec6Increase Balance275109222022-08-07 8:32:383 days 21 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00130291239
0xee07394023ef78e3a6b0a36edf0063521aa5b50a97bb86afeb81abf7bbadc14bIncrease Balance275109212022-08-07 8:32:283 days 21 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00123698437
0xab4193a5f58887285d53b35273f9f7fea081d08d5c12e2532fa006ccdf0a1656Increase Balance275109212022-08-07 8:32:283 days 21 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00123698437
0x947424258a1d028a3d93f4c4498026932461f0d3993e774f780fa5f5a94ae5bfIncrease Balance275109212022-08-07 8:32:283 days 21 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00123609637
0x92f36c54b862a1150ae81020d577a55da5d687dd81dd816d1618b233a97cab7aIncrease Balance275109202022-08-07 8:32:183 days 21 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00123609637
0xaeffb55191c75e7c617952b4be30e0497728c777b23c9f7ab5bccc369a1066bbIncrease Balance275109202022-08-07 8:32:183 days 21 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00123698437
0xaee383a9490a7029a9e04af9baf6065c9fa8cec7765cfbef1af2aee2f7e251abIncrease Balance275109202022-08-07 8:32:183 days 21 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0x9b82c9e7c09b96c7cf16025cd83e5243f20b29b7c2d3104e3066131e85fc8312Increase Balance275109192022-08-07 8:32:083 days 21 hrs ago0x8ebf0c35138140f4356132b4a81a40020c450293 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00110246433
0x84940d546cc8e8639d4c272b4debf9c36f038565ec496c86d6e658dd5d07ad56Increase Balance275109192022-08-07 8:32:083 days 21 hrs ago0xebf3dec0d88d1637ff3bde84496ba4810f8bda0b IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00126950438
0xaebb89b653f99c59ee960e3ff38feb0b2a0602dd1627274ce08b646abb870568Increase Balance275109182022-08-07 8:31:583 days 21 hrs ago0x778d8cb2b6db0c090de48e393b68eeceea108eb0 IN  0x7e97964adfa5d0c27af1cc859037bc2072b11a130 MATIC0.00110325633
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BalanceVault

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : BalanceVault.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

/**
 * @dev Store balance of players transfer from MetaMask.
 * Has functions to deposit and withdraw to transfer Naka between Balance Vault and Metamask.
 * Has functions to increase and decrease Naka amount in vault when players buy items or play games.
 * Has a function to get amount of players' Naka.
 * Has funtions to pause and unpause other functions when malicious people attack.
 * The purpose of this function is to reduce gas fee in transfer process.
 */
contract BalanceVault is Ownable, AccessControl, ReentrancyGuard {
    using SafeERC20 for IERC20;

    address public tokenAddress;
    mapping (address => uint256) public nakaAmountbyAddress;

    bytes32 public constant VAULT_ADMIN = keccak256("VAULT_ADMIN");

    bool public _pausedBalanceVault;
    
     /**
     * @dev Declare event for use emit `DepositNaka`,`WithdrawNaka`,`IncreaseBalance`,`DecreaseBalance`
     * ,`BalanceVaultPaused`, `BalanceVaultUnpaused`.
     */
    event DepositNaka(address indexed userAddress, uint256 nakaAmount);
    event WithdrawNaka(address indexed userAddress, uint256 nakaAmount);

    event IncreaseBalance(address indexed userAddress, uint256 nakaAmount);
    event DecreaseBalance(address indexed userAddress, uint256 nakaAmount);

    event BalanceVaultPaused();
    event BalanceVaultUnpaused();

    /** 
    * @dev Sets the value of the `tokenAddress` and `uri`. This value is immutable, 
    * it can only be set once during construction.
    * @param _tokenAddress - Contract address of Naka token.
    * Set up a role for contract deployer to be DEFAULT_ADMIN_ROLE.
    */
    constructor(
        address _tokenAddress
    ) {
        tokenAddress = _tokenAddress;
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
    * @dev Modifier to only allow the function to be executed when it isn't paused.
    */
    modifier whenBalanceVaultNotPaused() {
        require(!_pausedBalanceVault, "[BalanceVault.whenBalanceVaultNotPaused] Not Paused");
        _;
    }

    /**
    * @dev Modifier to only allow the function to be executed when it is paused.
    */
    modifier whenBalanceVaultPaused() {
        require(_pausedBalanceVault, "[BalanceVault.whenBalanceVaultPaused] Paused");
        _;
    }

    /**
     * @dev Deposit Naka token from user's wallet into the vault.
     * User need to approve this contract in Naka token contract in order to
     * deposit token into the vault. Emit deposit amount of naka.
     * @param _nakaAmount - Amount of Naka token that user wanted to deposit.
     */
    function depositNaka(uint256 _nakaAmount) external{
        require(nakaAmountbyAddress[msg.sender] + _nakaAmount >= nakaAmountbyAddress[msg.sender], "[BalanceVault.depositNaka] User has balance overflows");
        IERC20 token = IERC20(tokenAddress);
        nakaAmountbyAddress[msg.sender] += _nakaAmount;
        token.safeTransferFrom(msg.sender, address(this), _nakaAmount);

        emit DepositNaka(msg.sender, _nakaAmount);
    }

    /**
     * @dev Deposit Naka token from user's wallet into the vault.
     * User need to approve this contract in Naka token contract in order to
     * deposit token into the vault. Emit withdraw amount of naka.
     * @param _nakaAmount - Amount of Naka token that user wanted to withdraw.
     */
    function withdrawNaka(uint256 _nakaAmount) external nonReentrant{
        require(_nakaAmount <= nakaAmountbyAddress[msg.sender], "[BalanceVault.withdrawNaka] withdraw amount should be less than user balance");
        require(nakaAmountbyAddress[msg.sender] - _nakaAmount <= nakaAmountbyAddress[msg.sender], "[BalanceVault.withdrawNaka] User has balance underflows");
        nakaAmountbyAddress[msg.sender] -= _nakaAmount;
        safeNakaTransfer(msg.sender, _nakaAmount);

        emit WithdrawNaka(msg.sender, _nakaAmount);
    }
  
    /**
     * @dev Function for increase naka in Vault when user get Naka as a reward in return after playing game.
     * increase Naka in vault by using userAddress, nakaAmount. 
     * into user. Emit user address, time of execution, and nakaAmount to increase.
     * @param _userAddress - Address of user to increase Naka in vault by Address .
     * @param _nakaAmount - Amount of naka uses to increase Naka in vault .
     */
    function increaseBalance(address _userAddress, uint256 _nakaAmount) external whenBalanceVaultNotPaused onlyRole(VAULT_ADMIN){
        require(nakaAmountbyAddress[_userAddress] + _nakaAmount >= nakaAmountbyAddress[_userAddress], "[BalanceVault.increaseBalance] User has balance overflows");
        nakaAmountbyAddress[_userAddress] += _nakaAmount;

        emit IncreaseBalance(_userAddress, _nakaAmount);
    }

    /**
     * @dev Function for decrease naka in Vault when user buy items.
     * decrease Naka in vault by using userAddress,nakaAmount. 
     * into user. Emit user address, time of execution, and nakaAmount to decrease.
     * @param _userAddress - Address of user to decrease Naka in vault by Address .
     * @param _nakaAmount - Amount of naka to decrease Naka in vault .
     */
    function decreaseBalance(address _userAddress, uint256 _nakaAmount) external whenBalanceVaultNotPaused onlyRole(VAULT_ADMIN){
        require(_nakaAmount <= nakaAmountbyAddress[_userAddress], "[BalanceVault.decreaseBalance] decrease amount should be less than user balance");
        require(nakaAmountbyAddress[_userAddress] - _nakaAmount <= nakaAmountbyAddress[_userAddress], "[BalanceVault.decreaseBalance] User has balance underflows");
        nakaAmountbyAddress[_userAddress] -= _nakaAmount;

        emit DecreaseBalance(_userAddress, _nakaAmount);
    }

    /**
     * @dev Function to get user's naka amount in vault.
     * @param _userAddress - Address of user to get naka amount.
     * @return balance of player's Naka stored in the vault
     */
    function getBalance(address _userAddress) external view returns (uint256) {
        return nakaAmountbyAddress[_userAddress];
    }

    /**
     * @dev Function to check transfer Naka safely
     * @param _userAddress - Address of user to get naka amount.
     * @param _nakaAmount - Naka amount want to transfer
     */
    function safeNakaTransfer(address _userAddress, uint256 _nakaAmount) internal {
        IERC20 token = IERC20(tokenAddress);
        
        uint256 nakaBalance = token.balanceOf(address(this));
        if (_nakaAmount >= nakaBalance) {
            token.safeTransfer(_userAddress, nakaBalance);
        } else {
            token.safeTransfer(_userAddress, _nakaAmount);
        }
    }

    /**
    * @dev Function to pause functions in this contract.
    * can only be called by the creator of contract.
    */
    function pauseBalanceVault() external onlyOwner whenBalanceVaultNotPaused {
        _pausedBalanceVault = true;
        emit BalanceVaultPaused();
    }

    /**
    * @dev Function to unpause functions in this contract.
    * can only be called by the creator of contract.
    */
    function unpauseBalanceVault() external onlyOwner whenBalanceVaultPaused {
        _pausedBalanceVault = false;
        emit BalanceVaultUnpaused();
    }
}

File 2 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 3 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 12 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 6 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

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 9 of 12 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 10 of 12 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 11 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

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);
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"BalanceVaultPaused","type":"event"},{"anonymous":false,"inputs":[],"name":"BalanceVaultUnpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nakaAmount","type":"uint256"}],"name":"DecreaseBalance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nakaAmount","type":"uint256"}],"name":"DepositNaka","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nakaAmount","type":"uint256"}],"name":"IncreaseBalance","type":"event"},{"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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nakaAmount","type":"uint256"}],"name":"WithdrawNaka","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VAULT_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_pausedBalanceVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"},{"internalType":"uint256","name":"_nakaAmount","type":"uint256"}],"name":"decreaseBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nakaAmount","type":"uint256"}],"name":"depositNaka","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_userAddress","type":"address"},{"internalType":"uint256","name":"_nakaAmount","type":"uint256"}],"name":"increaseBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nakaAmountbyAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseBalanceVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseBalanceVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nakaAmount","type":"uint256"}],"name":"withdrawNaka","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620018723803806200187283398101604081905262000034916200015b565b6200003f3362000073565b6001600255600380546001600160a01b0319166001600160a01b0383161790556200006c600033620000c3565b506200018d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000cf8282620000d3565b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620000cf5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6000602082840312156200016e57600080fd5b81516001600160a01b03811681146200018657600080fd5b9392505050565b6116d5806200019d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063cb8243731161007c578063cb8243731461027c578063d547741f146102a3578063f2fde38b146102b6578063f4ca97d7146102c9578063f8b2cb4f146102dc578063ff0569491461030557600080fd5b80638da5cb5b1461020957806391d148541461022e5780639d76ea5814610241578063a217fddf14610254578063b42685c71461025c57600080fd5b80633cd869dc116100ff5780633cd869dc146101c65780635b86f599146101d3578063715018a6146101e65780637787ae9a146101ee5780637aa4905e1461020157600080fd5b8063017cabb71461013c57806301ffc9a714610146578063248a9ca31461016e5780632f2ff15d146101a057806336568abe146101b3575b600080fd5b610144610318565b005b61015961015436600461143d565b6103e7565b60405190151581526020015b60405180910390f35b61019261017c3660046113f8565b6000908152600160208190526040909120015490565b604051908152602001610165565b6101446101ae366004611411565b61041e565b6101446101c1366004611411565b61044a565b6005546101599060ff1681565b6101446101e13660046113ac565b6104c8565b61014461061e565b6101446101fc3660046113f8565b610654565b61014461075c565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610165565b61015961023c366004611411565b6107e1565b600354610216906001600160a01b031681565b610192600081565b61019261026a366004611391565b60046020526000908152604090205481565b6101927fb15e2bb6de8e562b452dcfd0ca719f799c9919f6645dee389052d6326e77eb6081565b6101446102b1366004611411565b61080c565b6101446102c4366004611391565b610833565b6101446102d73660046113f8565b6108ce565b6101926102ea366004611391565b6001600160a01b031660009081526004602052604090205490565b6101446103133660046113ac565b610ab8565b6000546001600160a01b0316331461034b5760405162461bcd60e51b815260040161034290611597565b60405180910390fd5b60055460ff166103b25760405162461bcd60e51b815260206004820152602c60248201527f5b42616c616e63655661756c742e7768656e42616c616e63655661756c74506160448201526b1d5cd959174814185d5cd95960a21b6064820152608401610342565b6005805460ff191690556040517f7bf3260ea5aa4fba463ac88b602265b0643dc16203f18863f5db4da9ffe147fa90600090a1565b60006001600160e01b03198216637965db0b60e01b148061041857506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000828152600160208190526040909120015461043b8133610cab565b6104458383610d0f565b505050565b6001600160a01b03811633146104ba5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610342565b6104c48282610d7a565b5050565b60055460ff16156104eb5760405162461bcd60e51b815260040161034290611544565b7fb15e2bb6de8e562b452dcfd0ca719f799c9919f6645dee389052d6326e77eb606105168133610cab565b6001600160a01b03831660009081526004602052604090205461053983826115cc565b10156105ad5760405162461bcd60e51b815260206004820152603960248201527f5b42616c616e63655661756c742e696e63726561736542616c616e63655d205560448201527f736572206861732062616c616e6365206f766572666c6f7773000000000000006064820152608401610342565b6001600160a01b038316600090815260046020526040812080548492906105d59084906115cc565b90915550506040518281526001600160a01b038416907f6fdf5a559aca442d78e8b84a7cbe5c21c91c9a305149d90ed6ae43c1a7e8f8c3906020015b60405180910390a2505050565b6000546001600160a01b031633146106485760405162461bcd60e51b815260040161034290611597565b6106526000610de1565b565b3360009081526004602052604090205461066e82826115cc565b10156106da5760405162461bcd60e51b815260206004820152603560248201527f5b42616c616e63655661756c742e6465706f7369744e616b615d2055736572206044820152746861732062616c616e6365206f766572666c6f777360581b6064820152608401610342565b60035433600090815260046020526040812080546001600160a01b03909316928492906107089084906115cc565b9091555061072390506001600160a01b038216333085610e31565b60405182815233907fc1dc2713583c514093893ae9b91f20eca0de1d439779f4600909401f5ed3c57e9060200160405180910390a25050565b6000546001600160a01b031633146107865760405162461bcd60e51b815260040161034290611597565b60055460ff16156107a95760405162461bcd60e51b815260040161034290611544565b6005805460ff191660011790556040517fb1f0e2663bcb6f72ca375724e3f971c691b1067c823ca6d7cd0c28a2b368cb0390600090a1565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600082815260016020819052604090912001546108298133610cab565b6104458383610d7a565b6000546001600160a01b0316331461085d5760405162461bcd60e51b815260040161034290611597565b6001600160a01b0381166108c25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610342565b6108cb81610de1565b50565b6002805414156109205760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610342565b60028055336000908152600460205260409020548111156109be5760405162461bcd60e51b815260206004820152604c60248201527f5b42616c616e63655661756c742e77697468647261774e616b615d207769746860448201527f6472617720616d6f756e742073686f756c64206265206c657373207468616e2060648201526b757365722062616c616e636560a01b608482015260a401610342565b336000908152600460205260409020546109d88282611603565b1115610a4c5760405162461bcd60e51b815260206004820152603760248201527f5b42616c616e63655661756c742e77697468647261774e616b615d205573657260448201527f206861732062616c616e636520756e646572666c6f77730000000000000000006064820152608401610342565b3360009081526004602052604081208054839290610a6b908490611603565b90915550610a7b90503382610ea2565b60405181815233907fbe3f6cd7b5163f40a8f82c3c651ee7f7c6a4f3345a3c17774969a6e121011ead9060200160405180910390a2506001600255565b60055460ff1615610adb5760405162461bcd60e51b815260040161034290611544565b7fb15e2bb6de8e562b452dcfd0ca719f799c9919f6645dee389052d6326e77eb60610b068133610cab565b6001600160a01b038316600090815260046020526040902054821115610bac5760405162461bcd60e51b815260206004820152604f60248201527f5b42616c616e63655661756c742e646563726561736542616c616e63655d206460448201527f6563726561736520616d6f756e742073686f756c64206265206c65737320746860648201526e616e20757365722062616c616e636560881b608482015260a401610342565b6001600160a01b038316600090815260046020526040902054610bcf8382611603565b1115610c435760405162461bcd60e51b815260206004820152603a60248201527f5b42616c616e63655661756c742e646563726561736542616c616e63655d205560448201527f736572206861732062616c616e636520756e646572666c6f77730000000000006064820152608401610342565b6001600160a01b03831660009081526004602052604081208054849290610c6b908490611603565b90915550506040518281526001600160a01b038416907fed00f4b3c46d7c225a3a5a0771589317e7d55742990d035231f4bd4ac10c6ad390602001610611565b610cb582826107e1565b6104c457610ccd816001600160a01b03166014610f58565b610cd8836020610f58565b604051602001610ce992919061149c565b60408051601f198184030181529082905262461bcd60e51b825261034291600401611511565b610d1982826107e1565b6104c45760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610d8482826107e1565b156104c45760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610e9c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526110fb565b50505050565b6003546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a082319060240160206040518083038186803b158015610eea57600080fd5b505afa158015610efe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f229190611467565b9050808310610f4457610f3f6001600160a01b03831685836111cd565b610e9c565b610e9c6001600160a01b03831685856111cd565b60606000610f678360026115e4565b610f729060026115cc565b67ffffffffffffffff811115610f8a57610f8a611689565b6040519080825280601f01601f191660200182016040528015610fb4576020820181803683370190505b509050600360fc1b81600081518110610fcf57610fcf611673565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610ffe57610ffe611673565b60200101906001600160f81b031916908160001a90535060006110228460026115e4565b61102d9060016115cc565b90505b60018111156110a5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061106157611061611673565b1a60f81b82828151811061107757611077611673565b60200101906001600160f81b031916908160001a90535060049490941c9361109e81611646565b9050611030565b5083156110f45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610342565b9392505050565b6000611150826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111fd9092919063ffffffff16565b805190915015610445578080602001905181019061116e91906113d6565b6104455760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610342565b6040516001600160a01b03831660248201526044810182905261044590849063a9059cbb60e01b90606401610e65565b606061120c8484600085611214565b949350505050565b6060824710156112755760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610342565b843b6112c35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610342565b600080866001600160a01b031685876040516112df9190611480565b60006040518083038185875af1925050503d806000811461131c576040519150601f19603f3d011682016040523d82523d6000602084013e611321565b606091505b509150915061133182828661133c565b979650505050505050565b6060831561134b5750816110f4565b82511561135b5782518084602001fd5b8160405162461bcd60e51b81526004016103429190611511565b80356001600160a01b038116811461138c57600080fd5b919050565b6000602082840312156113a357600080fd5b6110f482611375565b600080604083850312156113bf57600080fd5b6113c883611375565b946020939093013593505050565b6000602082840312156113e857600080fd5b815180151581146110f457600080fd5b60006020828403121561140a57600080fd5b5035919050565b6000806040838503121561142457600080fd5b8235915061143460208401611375565b90509250929050565b60006020828403121561144f57600080fd5b81356001600160e01b0319811681146110f457600080fd5b60006020828403121561147957600080fd5b5051919050565b6000825161149281846020870161161a565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516114d481601785016020880161161a565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161150581602884016020880161161a565b01602801949350505050565b602081526000825180602084015261153081604085016020870161161a565b601f01601f19169190910160400192915050565b60208082526033908201527f5b42616c616e63655661756c742e7768656e42616c616e63655661756c744e6f6040820152721d14185d5cd9591748139bdd0814185d5cd959606a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156115df576115df61165d565b500190565b60008160001904831182151516156115fe576115fe61165d565b500290565b6000828210156116155761161561165d565b500390565b60005b8381101561163557818101518382015260200161161d565b83811115610e9c5750506000910152565b6000816116555761165561165d565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212201bbe766a48e3c3f02492d653d446359ebb3aac1750d0d437eb650e617cc5328e64736f6c634300080700330000000000000000000000002b7623690fc399cdce28f4a60dfb64e75697db8d

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

0000000000000000000000002b7623690fc399cdce28f4a60dfb64e75697db8d

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x2b7623690fc399cdce28f4a60dfb64e75697db8d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002b7623690fc399cdce28f4a60dfb64e75697db8d


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading