Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xC19B6A4Ac7C7Cc24459F08984Bbd09664af17bD1
Balance 0 ETH
Nonce 1
Code Size 5844 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

5844 bytes
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80636ef8d66d1161010457806398650275116100a2578063b86c1f3411610071578063b86c1f34146104f7578063bf1c8016146104ff578063dd62ed3e14610507578063e7827e8514610535576101cf565b80639865027514610471578063a457c2d714610479578063a9059cbb146104a5578063aa271e1a146104d1576101cf565b806382dc1ec4116100de57806382dc1ec4146104155780638456cb591461043b57806395d89b4114610443578063983b2d561461044b576101cf565b80636ef8d66d146103df57806370a08231146103e7578063785605781461040d576101cf565b8063395093511161017157806346fbf68e1161014b57806346fbf68e146103a15780634969a01e146103c75780635be4d800146103cf5780635c975abb146103d7576101cf565b8063395093511461033f5780633f4ba83a1461036b57806340c10f1914610375576101cf565b806318160ddd116101ad57806318160ddd146102c357806323b872dd146102dd57806331bf066714610313578063355274ea14610337576101cf565b806306fdde03146101d4578063095ea7b314610251578063156e29f614610291575b600080fd5b6101dc610552565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102165781810151838201526020016101fe565b50505050905090810190601f1680156102435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027d6004803603604081101561026757600080fd5b506001600160a01b0381351690602001356105e0565b604080519115158252519081900360200190f35b61027d600480360360608110156102a757600080fd5b506001600160a01b03813516906020810135906040013561066b565b6102cb6106c6565b60408051918252519081900360200190f35b61027d600480360360608110156102f357600080fd5b506001600160a01b038135811691602081013590911690604001356106cc565b61031b610759565b604080516001600160a01b039092168252519081900360200190f35b6102cb610768565b61027d6004803603604081101561035557600080fd5b506001600160a01b03813516906020013561076e565b6103736107f2565b005b61027d6004803603604081101561038b57600080fd5b506001600160a01b0381351690602001356108c3565b61027d600480360360208110156103b757600080fd5b50356001600160a01b031661091c565b6102cb610935565b6102cb61093b565b61027d610944565b61037361094d565b6102cb600480360360208110156103fd57600080fd5b50356001600160a01b0316610958565b6102cb610973565b6103736004803603602081101561042b57600080fd5b50356001600160a01b031661097b565b6103736109cb565b6101dc610ac8565b6103736004803603602081101561046157600080fd5b50356001600160a01b0316610b23565b610373610b70565b61027d6004803603604081101561048f57600080fd5b506001600160a01b038135169060200135610b79565b61027d600480360360408110156104bb57600080fd5b506001600160a01b038135169060200135610bfd565b61027d600480360360208110156104e757600080fd5b50356001600160a01b0316610c81565b6102cb610c94565b61031b610c9c565b6102cb6004803603604081101561051d57600080fd5b506001600160a01b0381358116916020013516610cab565b61027d6004803603602081101561054b57600080fd5b5035610cd6565b6008805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105d85780601f106105ad576101008083540402835291602001916105d8565b820191906000526020600020905b8154815290600101906020018083116105bb57829003601f168201915b505050505081565b600a546000906001600160a01b03163314806106065750600b546001600160a01b031633145b806106165750610614610944565b155b61065a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6106648383610d3a565b9392505050565b600061067633610c81565b6106b15760405162461bcd60e51b81526004018080602001828103825260308152602001806115e46030913960400191505060405180910390fd5b6106bc848484610d47565b5060019392505050565b60025490565b600a546000906001600160a01b03163314806106f25750600b546001600160a01b031633145b806107025750610700610944565b155b610746576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610751848484610dec565b949350505050565b600b546001600160a01b031681565b60045490565b600a546000906001600160a01b03163314806107945750600b546001600160a01b031633145b806107a457506107a2610944565b155b6107e8576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6106648383610e39565b6107fb3361091c565b6108365760405162461bcd60e51b81526004018080602001828103825260308152602001806115926030913960400191505060405180910390fd5b60065460ff16610884576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6006805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b60006108ce33610c81565b6109095760405162461bcd60e51b81526004018080602001828103825260308152602001806115e46030913960400191505060405180910390fd5b6109138383610e75565b50600192915050565b600061092f60058363ffffffff610ee116565b92915050565b60095481565b6401ca7a9b0081565b60065460ff1690565b61095633610f48565b565b6001600160a01b031660009081526020819052604090205490565b637735940081565b6109843361091c565b6109bf5760405162461bcd60e51b81526004018080602001828103825260308152602001806115926030913960400191505060405180910390fd5b6109c881610f90565b50565b6109d43361091c565b610a0f5760405162461bcd60e51b81526004018080602001828103825260308152602001806115926030913960400191505060405180910390fd5b600a546001600160a01b0316331480610a325750600b546001600160a01b031633145b80610a425750610a40610944565b155b610a86576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6006805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105d85780601f106105ad576101008083540402835291602001916105d8565b610b2c33610c81565b610b675760405162461bcd60e51b81526004018080602001828103825260308152602001806115e46030913960400191505060405180910390fd5b6109c881610fd8565b61095633611020565b600a546000906001600160a01b0316331480610b9f5750600b546001600160a01b031633145b80610baf5750610bad610944565b155b610bf3576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6106648383611068565b600a546000906001600160a01b0316331480610c235750600b546001600160a01b031633145b80610c335750610c31610944565b155b610c77576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b61066483836110a4565b600061092f60038363ffffffff610ee116565b63b2d05e0081565b600a546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000610ce133610c81565b610d1c5760405162461bcd60e51b81526004018080602001828103825260308152602001806115e46030913960400191505060405180910390fd5b600954610d2f908363ffffffff6110b116565b600955506001919050565b600061091333848461110e565b8015610ddd57610d55610768565b610d7782610d6b85610d6b600954610d6b6106c6565b9063ffffffff6111fa16565b1115610dc6576040805162461bcd60e51b8152602060048201526019602482015278115490cc8c10d85c1c19590e8818d85c08195e18d959591959603a1b604482015290519081900360640190fd5b600954610dd9908263ffffffff6111fa16565b6009555b610de78383610e75565b505050565b6000610df9848484611254565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546106bc918691610e34908663ffffffff6110b116565b61110e565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610913918590610e34908663ffffffff6111fa16565b600454610e8482610d6b6106c6565b1115610ed3576040805162461bcd60e51b8152602060048201526019602482015278115490cc8c10d85c1c19590e8818d85c08195e18d959591959603a1b604482015290519081900360640190fd5b610edd8282611396565b5050565b60006001600160a01b038216610f285760405162461bcd60e51b81526004018080602001828103825260228152602001806116356022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610f5960058263ffffffff61148616565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b610fa160058263ffffffff6114ed16565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b610fe960038263ffffffff6114ed16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b61103160038263ffffffff61148616565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610913918590610e34908663ffffffff6110b116565b6000610913338484611254565b600082821115611108576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b0383166111535760405162461bcd60e51b815260040180806020018281038252602481526020018061167c6024913960400191505060405180910390fd5b6001600160a01b0382166111985760405162461bcd60e51b81526004018080602001828103825260228152602001806115c26022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082820183811015610664576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b0383166112995760405162461bcd60e51b81526004018080602001828103825260258152602001806116576025913960400191505060405180910390fd5b6001600160a01b0382166112de5760405162461bcd60e51b815260040180806020018281038252602381526020018061156f6023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054611307908263ffffffff6110b116565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461133c908263ffffffff6111fa16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6001600160a01b0382166113f1576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611404908263ffffffff6111fa16565b6002556001600160a01b038216600090815260208190526040902054611430908263ffffffff6111fa16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6114908282610ee1565b6114cb5760405162461bcd60e51b81526004018080602001828103825260218152602001806116146021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6114f78282610ee1565b15611549576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff1916600117905556fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c6545524332303a20617070726f766520746f20746865207a65726f20616464726573734d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72315820f7166001d92e4497488d4450ece7eb6e028075038b9cffea8ddf19161bc2dfef64736f6c634300050b0032

Verified Source Code Partial Match

Compiler: v0.5.11+commit.c082d0b4 EVM: petersburg Optimization: Yes (200 runs)
SENSOToken.sol 813 lines
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
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.
     *
     * > 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: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.5.0;



/**
 * @dev Implementation of the `IERC20` interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using `_mint`.
 * For a generic mechanism see `ERC20Mintable`.
 *
 * *For a detailed writeup see our guide [How to implement supply
 * mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an `Approval` event is emitted on calls to `transferFrom`.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard `decreaseAllowance` and `increaseAllowance`
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See `IERC20.approve`.
 */
contract ERC20 is IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    /**
     * @dev See `IERC20.totalSupply`.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See `IERC20.balanceOf`.
     */
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See `IERC20.transfer`.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    /**
     * @dev See `IERC20.allowance`.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See `IERC20.approve`.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    /**
     * @dev See `IERC20.transferFrom`.
     *
     * Emits an `Approval` event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of `ERC20`;
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `value`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to `approve` that can be used as a mitigation for
     * problems described in `IERC20.approve`.
     *
     * Emits an `Approval` event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to `approve` that can be used as a mitigation for
     * problems described in `IERC20.approve`.
     *
     * Emits an `Approval` event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to `transfer`, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a `Transfer` event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount);
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a `Transfer` event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

     /**
     * @dev Destoys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a `Transfer` event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 value) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _totalSupply = _totalSupply.sub(value);
        _balances[account] = _balances[account].sub(value);
        emit Transfer(account, address(0), value);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an `Approval` event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    /**
     * @dev Destoys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See `_burn` and `_approve`.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
    }
}

// File: openzeppelin-solidity/contracts/access/Roles.sol

pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

// File: openzeppelin-solidity/contracts/access/roles/MinterRole.sol

pragma solidity ^0.5.0;


contract MinterRole {
    using Roles for Roles.Role;

    event MinterAdded(address indexed account);
    event MinterRemoved(address indexed account);

    Roles.Role private _minters;

    constructor () internal {
        _addMinter(msg.sender);
    }

    modifier onlyMinter() {
        require(isMinter(msg.sender), "MinterRole: caller does not have the Minter role");
        _;
    }

    function isMinter(address account) public view returns (bool) {
        return _minters.has(account);
    }

    function addMinter(address account) public onlyMinter {
        _addMinter(account);
    }

    function renounceMinter() public {
        _removeMinter(msg.sender);
    }

    function _addMinter(address account) internal {
        _minters.add(account);
        emit MinterAdded(account);
    }

    function _removeMinter(address account) internal {
        _minters.remove(account);
        emit MinterRemoved(account);
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Mintable.sol

pragma solidity ^0.5.0;



/**
 * @dev Extension of `ERC20` that adds a set of accounts with the `MinterRole`,
 * which have permission to mint (create) new tokens as they see fit.
 *
 * At construction, the deployer of the contract is the only minter.
 */
contract ERC20Mintable is ERC20, MinterRole {
    /**
     * @dev See `ERC20._mint`.
     *
     * Requirements:
     *
     * - the caller must have the `MinterRole`.
     */
    function mint(address account, uint256 amount) public onlyMinter returns (bool) {
        _mint(account, amount);
        return true;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol

pragma solidity ^0.5.0;


/**
 * @dev Extension of `ERC20Mintable` that adds a cap to the supply of tokens.
 */
contract ERC20Capped is ERC20Mintable {
    uint256 private _cap;

    /**
     * @dev Sets the value of the `cap`. This value is immutable, it can only be
     * set once during construction.
     */
    constructor (uint256 cap) public {
        require(cap > 0, "ERC20Capped: cap is 0");
        _cap = cap;
    }

    /**
     * @dev Returns the cap on the token's total supply.
     */
    function cap() public view returns (uint256) {
        return _cap;
    }

    /**
     * @dev See `ERC20Mintable.mint`.
     *
     * Requirements:
     *
     * - `value` must not cause the total supply to go over the cap.
     */
    function _mint(address account, uint256 value) internal {
        require(totalSupply().add(value) <= _cap, "ERC20Capped: cap exceeded");
        super._mint(account, value);
    }
}

// File: openzeppelin-solidity/contracts/access/roles/PauserRole.sol

pragma solidity ^0.5.0;


contract PauserRole {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    constructor () internal {
        _addPauser(msg.sender);
    }

    modifier onlyPauser() {
        require(isPauser(msg.sender), "PauserRole: caller does not have the Pauser role");
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(msg.sender);
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }
}

// File: openzeppelin-solidity/contracts/lifecycle/Pausable.sol

pragma solidity ^0.5.0;


/**
 * @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.
 */
contract Pausable is PauserRole {
    /**
     * @dev Emitted when the pause is triggered by a pauser (`account`).
     */
    event Paused(address account);

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state. Assigns the Pauser role
     * to the deployer.
     */
    constructor () internal {
        _paused = false;
    }

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

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

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

    /**
     * @dev Called by a pauser to pause, triggers stopped state.
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev Called by a pauser to unpause, returns to normal state.
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol

pragma solidity ^0.5.0;



/**
 * @title Pausable token
 * @dev ERC20 modified with pausable transfers.
 */
contract ERC20Pausable is ERC20, Pausable {
    function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
        return super.transfer(to, value);
    }

    function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
        return super.transferFrom(from, to, value);
    }

    function approve(address spender, uint256 value) public whenNotPaused returns (bool) {
        return super.approve(spender, value);
    }

    function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
        return super.increaseAllowance(spender, addedValue);
    }

    function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
        return super.decreaseAllowance(spender, subtractedValue);
    }
}

// File: contracts/SENSOToken.sol

pragma solidity 0.5.11;



contract SENSOToken is ERC20Capped, ERC20Pausable {

    string public symbol = "SENSO";
    string public name = "Sensorium";

    /**
     * @dev Emission constants, constraints:
     * tokenCapAmount = closedSaleAmount +
     *                  tokensaleAmount +
     *                  reserveAmount
     */

    uint256 public constant tokenCapAmount =   7692000000;
    uint256 public constant closedSaleAmount = 2000000000;
    uint256 public constant tokensaleAmount =  3000000000;

    // holds amount of total frozen tokens for cap checks
    uint256 public totalFrozenTokens;

    /**
     * @dev Admins wallets, used to override pause limitations
     */

    address public closedSaleWallet;
    address public tokensaleWallet;

    constructor ( address _closedSaleWallet, address _tokenSaleWallet)
        public ERC20Capped(tokenCapAmount) ERC20Pausable()
    {
        closedSaleWallet = _closedSaleWallet;
        tokensaleWallet = _tokenSaleWallet;

        mint(_closedSaleWallet,  closedSaleAmount);

        pause();
    }


    /**
     * @dev closedSaleWallet and tokensaleWallet can ignore pause
     */

    modifier whenNotPaused() {
        require(msg.sender == closedSaleWallet ||
            msg.sender == tokensaleWallet ||
            !paused(), "Pausable: paused");
        _;
    }

    function mint(address account, uint256 amount, uint256 frozenAmount) public onlyMinter returns (bool) {
        _mint(account, amount, frozenAmount);
        return true;
    }

    /**
     * @dev See `ERC20Mintable.mint`.
     *
     * Requirements:
     *
     * - `value` must not cause the total supply to go over the cap.
     * @param account wallet that will receive tokens
     * @param value amount of tokens to be minted
     * @param frozenValue number of tokens to be counted for freezing
     */
    function _mint(address account, uint256 value, uint256 frozenValue) internal {
        // case: minting `value` tokens taking into account that some amount will be frozen
        // if `frozenValue == 0`, this is unfreezing operation
        // we do not have to do this check again
        if (frozenValue != 0) {
            require(totalSupply().add(totalFrozenTokens).add(value).add(frozenValue) <= cap(), "ERC20Capped: cap exceeded");
            totalFrozenTokens = totalFrozenTokens.add(frozenValue);
        }
        super._mint(account, value);
    }

    /**
     * Reduces the value of frozen tokens counter
     *
     * @param unfrozenValue amount of tokens to be unfrozen
     */
    function unfreezeTokens(uint256 unfrozenValue) public onlyMinter returns (bool) {
        totalFrozenTokens = totalFrozenTokens.sub(unfrozenValue);
        return true;
    }

}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
cap 0x355274ea → uint256
closedSaleAmount 0x78560578 → uint256
closedSaleWallet 0xbf1c8016 → address
isMinter 0xaa271e1a → bool
isPauser 0x46fbf68e → bool
name 0x06fdde03 → string
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
tokenCapAmount 0x5be4d800 → uint256
tokensaleAmount 0xb86c1f34 → uint256
tokensaleWallet 0x31bf0667 → address
totalFrozenTokens 0x4969a01e → uint256
totalSupply 0x18160ddd → uint256

Write Contract 14 functions

These functions modify contract state and require a wallet transaction to execute.

addMinter 0x983b2d56
address account
addPauser 0x82dc1ec4
address account
approve 0x095ea7b3
address spender
uint256 value
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x156e29f6
address account
uint256 amount
uint256 frozenAmount
returns: bool
mint 0x40c10f19
address account
uint256 amount
returns: bool
pause 0x8456cb59
No parameters
renounceMinter 0x98650275
No parameters
renouncePauser 0x6ef8d66d
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
unfreezeTokens 0xe7827e85
uint256 unfrozenValue
returns: bool
unpause 0x3f4ba83a
No parameters

Recent Transactions

No transactions found for this address