contract_name
stringlengths
1
61
file_path
stringlengths
5
50.4k
contract_address
stringlengths
42
42
language
stringclasses
1 value
class_name
stringlengths
1
61
class_code
stringlengths
4
330k
class_documentation
stringlengths
0
29.1k
class_documentation_type
stringclasses
6 values
func_name
stringlengths
0
62
func_code
stringlengths
1
303k
func_documentation
stringlengths
2
14.9k
func_documentation_type
stringclasses
4 values
compiler_version
stringlengths
15
42
license_type
stringclasses
14 values
swarm_source
stringlengths
0
71
meta
dict
__index_level_0__
int64
0
60.4k
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - sub...
/** * @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` c...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 5146, 5528 ] }
4,807
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 sende...
/** * @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. *...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 6013, 6622 ] }
4,808
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0x8b9C35C79AF5319C70dd9A3E3850...
/** @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. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 6899, 7283 ] }
4,809
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `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. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 7611, 8110 ] }
4,810
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This 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 a...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 8543, 8894 ] }
4,811
Dogecoin
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xd2292ef492697b0361bd22026861c905f1bfd64f
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values fo...
/** * @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 {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://6d5fa39edbc25359b7c15f8705d8f34d094f0e27847dca39790f696280f8acdb
{ "func_code_index": [ 9492, 9589 ] }
4,812
LIZVIP
LIZVIP.sol
0x9dad3e41ce1d34179e96f7195ec938f938f6b968
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender;...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://976454dabc64d22fa291fccd66b639edcecf2a66d7f2a6026a04812c80fbadec
{ "func_code_index": [ 677, 874 ] }
4,813
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
ContractOwner
contract ContractOwner { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 641, 822 ] }
4,814
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting '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; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 89, 476 ] }
4,815
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 560, 840 ] }
4,816
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 954, 1070 ] }
4,817
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 1134, 1264 ] }
4,818
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
_inMoney
function _inMoney(uint _m) internal { dividends = dividends + _m * 7 / 100; dividendForDev = dividendForDev + _m * 2 / 100; reward = reward + _m * 2 / 100; nextReward = nextReward + _m * 4 / 100; }
////////////////////////// game money
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 1427, 1652 ] }
4,819
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
getMinAuctionValue
function getMinAuctionValue() public view returns (uint256) { uint256 gap = _getGameAuctionGap(); uint256 auctionValue = gap + gameLastAuctionMoney; return auctionValue; }
////////////////////////// game play
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 3405, 3597 ] }
4,820
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
refund
function refund() public { uint256 len = gameAuction[gameId].length; if (len > 1) { if (msg.sender != gameAuction[gameId][len - 2].addr && msg.sender != gameAuction[gameId][len - 1].addr) { uint256 money = 0; for (uint k = 0; k < gameAuction[gameId].length; k++) { if (gameAu...
// can only refund game still on
LineComment
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 6298, 7094 ] }
4,821
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
gameRoundEnd
function gameRoundEnd() public { bool ended = (block.timestamp > gameLastAuctionTime + gameSecondLeft) ? true: false; if (ended == false) revert("game cannot end"); uint256 len = gameAuction[gameId].length; address winner = gameAuction[gameId][len - 1].addr; GameData memory d; gameData.push(d...
// anyone can end this round
LineComment
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 7131, 7813 ] }
4,822
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
_getGameStartAuctionMoney
function _getGameStartAuctionMoney() internal pure returns (uint256) { return 10**15; }
////////////////////////// game rule
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 14321, 14419 ] }
4,823
Etherauction
Etherauction.sol
0x39f996a2cafca0e593d0c46b8365d3936b6cc1cf
Solidity
Etherauction
contract Etherauction is ContractOwner { using SafeMath for uint256; constructor() public payable { owner = msg.sender; gameId = 1; gameStartTime = block.timestamp; gameLastAuctionMoney = 10**15; gameLastAuctionTime = block.timestamp; gameSecondLeft = _getInitAuctionSeconds()...
_getMinAuctionStartPrice
function _getMinAuctionStartPrice() internal view returns (uint256) { if (reward < 10**18) { return 10**15; } uint256 n = 17; for (n = 18; n < 200; n ++) { if (reward >= 10**n && reward < 10**(n + 1)) { break; } } return 10**(n-2); }
// only invoke at the beginning of auction
LineComment
v0.4.24+commit.e67f0147
bzzr://b41ad95a7a559f0ab44e80bbe03d81c0f6ce5b4a76e02a0cb7bb67023870aaf9
{ "func_code_index": [ 15180, 15483 ] }
4,824
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 161, 388 ] }
4,825
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 536, 735 ] }
4,826
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 885, 1393 ] }
4,827
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 1544, 1744 ] }
4,828
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 1905, 2105 ] }
4,829
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 2347, 2450 ] }
4,830
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @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. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 2728, 2831 ] }
4,831
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 3085, 3188 ] }
4,832
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 3484, 3587 ] }
4,833
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 (consu...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 4049, 4152 ] }
4,834
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 4626, 4871 ] }
4,835
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message 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 ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 5364, 5608 ] }
4,836
Warsnails
@openzeppelin/contracts/utils/math/SafeMath.sol
0x3c197a9bbedccd44d71f4dd8581bbf6a7196c57d
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://965e4270ffb99672fc47ec19c80866d92c5b2b82ed007c03d36b5238214c5afa
{ "func_code_index": [ 6266, 6510 ] }
4,837
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getNumMarkets
function getNumMarkets() public view returns (uint256);
/** * Get the total number of markets. * * @return The number of markets */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 331, 418 ] }
4,838
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketTokenAddress
function getMarketTokenAddress( uint256 marketId ) public view returns (address);
/** * Get the ERC20 token address for a market. * * @param marketId The market to query * @return The token address */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 587, 714 ] }
4,839
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketTotalPar
function getMarketTotalPar( uint256 marketId ) public view returns (Types.TotalPar memory);
/** * Get the total principal amounts (borrowed and supplied) for a market. * * @param marketId The market to query * @return The total principal amounts */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 921, 1058 ] }
4,840
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketMarginPremium
function getMarketMarginPremium( uint256 marketId ) public view returns (Decimal.D256 memory);
/** * Get the margin premium for a market. A margin premium makes it so that any positions that * include the market require a higher collateralization to avoid being liquidated. * * @param marketId The market to query * @return The market's margin premium */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 1391, 1531 ] }
4,841
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketSpreadPremium
function getMarketSpreadPremium( uint256 marketId ) public view returns (Decimal.D256 memory);
/** * Get the spread premium for a market. A spread premium makes it so that any liquidations * that include the market have a higher spread than the global default. * * @param marketId The market to query * @return The market's spread premium */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 1834, 1974 ] }
4,842
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketIsClosing
function getMarketIsClosing( uint256 marketId ) public view returns (bool);
/** * Return true if a particular market is in closing mode. Additional borrows cannot be taken * from a market that is closing. * * @param marketId The market to query * @return True if the market is closing */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 2242, 2363 ] }
4,843
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getMarketPrice
function getMarketPrice( uint256 marketId ) public view returns (Monetary.Price memory);
/** * Get the price of the token for a market. * * @param marketId The market to query * @return The price of each atomic unit of the token */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 2556, 2690 ] }
4,844
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getLiquidationSpreadForPair
function getLiquidationSpreadForPair( uint256 heldMarketId, uint256 owedMarketId ) public view returns (Decimal.D256 memory);
/** * Get the adjusted liquidation spread for some market pair. This is equal to the global * liquidation spread multiplied by (1 + spreadPremium) for each of the two markets. * * @param heldMarketId The market for which the account has collateral * @param owedMarketId The market for which the account has...
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 3143, 3323 ] }
4,845
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getNumExcessTokens
function getNumExcessTokens( uint256 marketId ) public view returns (Types.Wei memory);
/** * Get the number of excess tokens for a market. The number of excess tokens is calculated * by taking the current number of tokens held in Solo, adding the number of tokens owed to Solo * by borrowers, and subtracting the number of tokens owed to suppliers by Solo. * * @param marketId The market to quer...
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 3753, 3886 ] }
4,846
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAccountPar
function getAccountPar( Account.Info memory account, uint256 marketId ) public view returns (Types.Par memory);
/** * Get the principal value for a particular account and market. * * @param account The account to query * @param marketId The market to query * @return The principal value */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 4180, 4346 ] }
4,847
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAccountWei
function getAccountWei( Account.Info memory account, uint256 marketId ) public view returns (Types.Wei memory);
/** * Get the token balance for a particular account and market. * * @param account The account to query * @param marketId The market to query * @return The token amount */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 4578, 4744 ] }
4,848
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAccountStatus
function getAccountStatus( Account.Info memory account ) public view returns (Account.Status);
/** * Get the status of an account (Normal, Liquidating, or Vaporizing). * * @param account The account to query * @return The account's status */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 4940, 5080 ] }
4,849
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAccountValues
function getAccountValues( Account.Info memory account ) public view returns (Monetary.Value memory, Monetary.Value memory);
/** * Get the total supplied and total borrowed value of an account. * * @param account The account to query * @return The following values: * - The supplied value of the account * - The borrowed value of the account */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 5397, 5567 ] }
4,850
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAdjustedAccountValues
function getAdjustedAccountValues( Account.Info memory account ) public view returns (Monetary.Value memory, Monetary.Value memory);
/** * Get the total supplied and total borrowed values of an account adjusted by the marginPremium * of each market. Supplied values are divided by (1 + marginPremium) for each market and * borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these * adjusted values gives the margin-...
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 6333, 6511 ] }
4,851
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getAccountBalances
function getAccountBalances( Account.Info memory account ) public view returns ( address[] memory, Types.Par[] memory, Types.Wei[] memory );
/** * Get an account's summary for each market. * * @param account The account to query * @return The following values: * - The ERC20 token address for each market * - The account's principal value for each market * - The account's (supplied...
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 6923, 7157 ] }
4,852
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getIsLocalOperator
function getIsLocalOperator( address owner, address operator ) public view returns (bool);
/** * Return true if a particular address is approved as an operator for an owner's accounts. * Approved operators can act on the accounts of the owner as if it were the operator's own. * * @param owner The owner of the accounts * @param operator The possible operator * @return True if oper...
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 7616, 7761 ] }
4,853
ExpiryV2
contracts/protocol/Getters.sol
0x739a1df6725657f6a16dc2d5519dc36fd7911a12
Solidity
Getters
contract Getters { // ============ Constants ============ bytes32 FILE = "Getters"; // ============ Getters for Risk ============ /* ... */ // ============ Getters for Markets ============ /** * Get the total number of markets. * * @return The number of markets...
/** * @title Getters * @author dYdX * * Public read-only functions that allow transparency into the state of Solo */
NatSpecMultiLine
getIsGlobalOperator
function getIsGlobalOperator( address operator ) public view returns (bool);
/** * Return true if a particular address is approved as a global operator. Such an address can * act on any account as if it were the operator's own. * * @param operator The address to query * @return True if operator is a global operator */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://1fb5cd76566f136dd46aeb846f717b0de53b65aa3702601b2fed00de2dcc85d5
{ "func_code_index": [ 8060, 8182 ] }
4,854
POIS
POIS.sol
0x45fdc57ea9d9f9966a7da46c5a90d6f5980a11f2
Solidity
POIS
contract POIS is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public _isExcludedFromFee; mapping(address => bool) public _isExcludedFromMaxTx;...
setMaxHoldingPercent
function setMaxHoldingPercent(uint256 value) public onlyOwner { maxHoldingLimit = _totalSupply.mul(value).div(100); }
// for 1% input 100
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://fbf77c416cbc7265534464135ed4d10a8fd73f6a677c0c6f08326812d88364f9
{ "func_code_index": [ 4624, 4760 ] }
4,855
POIS
POIS.sol
0x45fdc57ea9d9f9966a7da46c5a90d6f5980a11f2
Solidity
POIS
contract POIS is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public _isExcludedFromFee; mapping(address => bool) public _isExcludedFromMaxTx;...
_tokenTransfer
function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if ((sender == UniSwapPair || recipient == UniSwapPair) && takeFee) { uint256 allFee = totalFeePerTx(amount); uint256 tTransferAmount = amount.sub(allFee); _balances[...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.9+commit.e5eed63a
MIT
ipfs://fbf77c416cbc7265534464135ed4d10a8fd73f6a677c0c6f08326812d88364f9
{ "func_code_index": [ 8718, 9562 ] }
4,856
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
Ownable
contract Ownable { address public owner; address public candidate; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() ...
/** * @title Ownable smart contract * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev The Ownable contrac...
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 297, 365 ] }
4,857
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
Ownable
contract Ownable { address public owner; address public candidate; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() ...
/** * @title Ownable smart contract * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev The Ownable contrac...
NatSpecMultiLine
requestOwnership
function requestOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); candidate = newOwner; }
/** * @dev Allows the current owner to _request_ transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 719, 866 ] }
4,858
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
Ownable
contract Ownable { address public owner; address public candidate; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() ...
/** * @title Ownable smart contract * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev The Ownable contrac...
NatSpecMultiLine
confirmOwnership
function confirmOwnership() public { require(candidate == msg.sender); owner = candidate; OwnershipTransferred(owner, candidate); }
/** * @dev Allows the _NEW_ candidate to complete transfer control of the contract to him. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 980, 1156 ] }
4,859
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 93, 306 ] }
4,860
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 398, 691 ] }
4,861
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 814, 942 ] }
4,862
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** ...
/** * @title SafeMath * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 1014, 1166 ] }
4,863
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 211, 307 ] }
4,864
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_va...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 477, 900 ] }
4,865
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 1118, 1238 ] }
4,866
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Implementation of the...
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 411, 899 ] }
4,867
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Implementation of the...
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * 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 * ...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 1544, 1750 ] }
4,868
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Implementation of the...
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 2083, 2222 ] }
4,869
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Implementation of the...
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 2701, 2981 ] }
4,870
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want t...
/** * @title Standard ERC20 token * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Implementation of the...
NatSpecMultiLine
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 3465, 3915 ] }
4,871
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param...
/** * @title Mintable token smart contract * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Simple ERC20...
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 508, 805 ] }
4,872
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param...
/** * @title Mintable token smart contract * @author Copyright (c) 2016 Smart Contract Solutions, Inc. * @author "Manuel Araoz <manuelaraoz@gmail.com>" * @dev license: "MIT", source: https://github.com/OpenZeppelin/zeppelin-solidity * @author modification: Dmitriy Khizhinskiy @McFly.aero * @dev Simple ERC20...
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 929, 1087 ] }
4,873
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyToken
contract McFlyToken is MintableToken { string public constant name = "McFlyToken"; string public constant symbol = "McFLY"; uint8 public constant decimals = 18; /// @dev mapping for whitelist mapping(address=>bool) whitelist; /// @dev event throw when allowed to transfer address added ...
/** * @title McFly token smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" */
NatSpecMultiLine
allowTransfer
function allowTransfer(address from) onlyOwner public { whitelist[from] = true; AllowTransfer(from); }
/// @dev add address to whitelist /// @param from address to add
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 645, 775 ] }
4,874
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyToken
contract McFlyToken is MintableToken { string public constant name = "McFlyToken"; string public constant symbol = "McFLY"; uint8 public constant decimals = 18; /// @dev mapping for whitelist mapping(address=>bool) whitelist; /// @dev event throw when allowed to transfer address added ...
/** * @title McFly token smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" */
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 value) canTransfer public returns (bool) { return super.transferFrom(from, to, value); }
/// @dev Do the transfer from address to address value /// @param from address from /// @param to address to /// @param value uint256
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 932, 1095 ] }
4,875
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyToken
contract McFlyToken is MintableToken { string public constant name = "McFlyToken"; string public constant symbol = "McFLY"; uint8 public constant decimals = 18; /// @dev mapping for whitelist mapping(address=>bool) whitelist; /// @dev event throw when allowed to transfer address added ...
/** * @title McFly token smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" */
NatSpecMultiLine
transfer
function transfer(address to, uint256 value) canTransfer public returns (bool) { return super.transfer(to, value); }
/// @dev Do the transfer from token address to "to" address value /// @param to address to /// @param value uint256 value
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 1235, 1370 ] }
4,876
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
Haltable
contract Haltable is MultiOwners { bool public halted; modifier stopInEmergency { require(!halted); _; } modifier onlyInEmergency { require(halted); _; } /// @dev called by the owner on emergency, triggers stopped state function halt() ext...
/** * @title Haltable smart contract - controls owner access * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" */
NatSpecMultiLine
halt
function halt() external onlyOwner { halted = true; }
/// @dev called by the owner on emergency, triggers stopped state
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 297, 369 ] }
4,877
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
Haltable
contract Haltable is MultiOwners { bool public halted; modifier stopInEmergency { require(!halted); _; } modifier onlyInEmergency { require(halted); _; } /// @dev called by the owner on emergency, triggers stopped state function halt() ext...
/** * @title Haltable smart contract - controls owner access * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" */
NatSpecMultiLine
unhalt
function unhalt() external onlyOwner onlyInEmergency { halted = false; }
/// @dev called by the owner on end of emergency, returns to normal state
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 453, 544 ] }
4,878
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
McFlyCrowd
function McFlyCrowd( uint256 _startTimeTLP2, uint256 _preMcFlyTotalSupply, address _wallet, address _wavesAgent, address _wavesGW, address _fundMintingAgent, address _teamWallet, address _bountyOnlineWallet, address _bountyOnlineGW, address _bountyOfflineWallet, ad...
/** * @dev conctructor of contract, set main params, create new token, do minting for some wallets * @param _startTimeTLP2 - set date time of starting of TLP2 (main date!) * @param _preMcFlyTotalSupply - set amount in wei total supply of previouse contract (MFL) * @param _wallet - wallet for transfer ETH to it ...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 5255, 8124 ] }
4,879
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
withinPeriod
function withinPeriod() constant public returns (bool) { return (now >= sT2 && now <= (sT2+dTLP2)); }
/** * @dev check is TLP2 is active? * @return false if crowd TLP2 event was ended */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 8237, 8357 ] }
4,880
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
running
function running() constant public returns (bool) { return withinPeriod() && !token.mintingFinished(); }
/** * @dev check is TLP2 is active and minting Not finished * @return false if crowd event was ended */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 8489, 8612 ] }
4,881
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
stageName
function stageName() constant public returns (uint8) { uint256 eT2 = sT2+dTLP2; if (now < sT2) {return 101;} // not started if (now >= sT2 && now <= eT2) {return (102);} // TLP1.2 if (now > eT2 && now < eT2+dBt) {return (103);} // preTLP1.3 if (now >= (eT2+dBt) && now <= (eT2+dBt+dW)) {retu...
/** * @dev check current stage name * @return uint8 stage number */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 8708, 10090 ] }
4,882
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setFundMintingAgent
function setFundMintingAgent(address agent) onlyOwner public { fundMintingAgent = agent; SetFundMintingAgent(agent); }
/** * @dev change agent for minting * @param agent - new agent address */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 10193, 10339 ] }
4,883
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setTeamWallet
function setTeamWallet(address _newTeamWallet) onlyOwner public { teamWallet = _newTeamWallet; SetTeamWallet(_newTeamWallet); }
/** * @dev change wallet for team vesting (this make possible to set smart-contract address later) * @param _newTeamWallet - new wallet address */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 10515, 10670 ] }
4,884
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setAdvisoryWallet
function setAdvisoryWallet(address _newAdvisoryWallet) onlyOwner public { advisoryWallet = _newAdvisoryWallet; SetAdvisoryWallet(_newAdvisoryWallet); }
/** * @dev change wallet for advisory vesting (this make possible to set smart-contract address later) * @param _newAdvisoryWallet - new wallet address */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 10854, 11033 ] }
4,885
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setReservedWallet
function setReservedWallet(address _newReservedWallet) onlyOwner public { reservedWallet = _newReservedWallet; SetReservedWallet(_newReservedWallet); }
/** * @dev change wallet for reserved vesting (this make possible to set smart-contract address later) * @param _newReservedWallet - new wallet address */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 11217, 11396 ] }
4,886
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setMinETHin
function setMinETHin(uint256 _minETHin) onlyOwner public { minETHin = _minETHin; SetMinETHincome(_minETHin); }
/** * @dev change min ETH income during Window1-5 * @param _minETHin - new limit */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 11508, 11646 ] }
4,887
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
setStartEndTimeTLP
function setStartEndTimeTLP(uint256 _at) onlyOwner public { require(block.timestamp < sT2); // forbid change time when TLP1.2 is active require(block.timestamp < _at); // should be great than current block timestamp sT2 = _at; SetStartTimeTLP2(_at); }
/** * @dev set TLP1.X (2-7) start & end dates * @param _at - new or old start date */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 11760, 12059 ] }
4,888
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
fundMinting
function fundMinting(address to, uint256 amount) stopInEmergency public { require(msg.sender == fundMintingAgent || isOwner()); require(block.timestamp < sT2); require(fundTotalSupply.add(amount) <= fundTokens); require(token.totalSupply().add(amount) <= hardCapInTokens); fundTotalSupply = fu...
/** * @dev Large Token Holder minting * @param to - mint to address * @param amount - how much mint */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 12197, 12642 ] }
4,889
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
calcAmountAt
function calcAmountAt( uint256 amount, uint256 at, uint256 _totalSupply ) public constant returns (uint256, uint256) { uint256 estimate; uint256 price; if (at >= sT2 && at <= (sT2+dTLP2)) { if (at <= sT2 + 15 days) {price = 12e13;} else if (at <= sT2 + 30 days) { ...
/** * @dev calculate amount * @param amount - ether to be converted to tokens * @param at - current time * @param _totalSupply - total supplied tokens * @return tokens amount that we should send to our dear ppl * @return odd ethers amount, which contract should send back */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 12972, 14221 ] }
4,890
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
function() external payable { return getTokens(msg.sender); }
/** * @dev fallback for processing ether */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 14287, 14367 ] }
4,891
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
getTokens
function getTokens(address contributor) payable stopInEmergency validPurchase public { uint256 amount; uint256 oddEthers; uint256 ethers; uint256 _at; uint8 _winNum; _at = block.timestamp; require(contributor != 0x0); if (withinPeriod()) { (amount,...
/** * @dev sell token and send to contributor address * @param contributor address */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 14481, 16162 ] }
4,892
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
closeWindow
function closeWindow(uint8 _winNum) onlyOwner stopInEmergency public { require(ww[_winNum].active); ww[_winNum].active = false; wallet.transfer(this.balance); }
/** * @dev close Window and transfer Eth to wallet address * @param _winNum - number of window 0-4 to close */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 16301, 16500 ] }
4,893
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
sendTokensWindow
function sendTokensWindow(uint8 _winNum) onlyOwner stopInEmergency public { uint256 _tokenPerETH; uint256 _tokenToSend = 0; address _tempAddr; uint32 index = ww[_winNum].refundIndex; TokenETH(ww[_winNum].totalEthInWindow, ww[_winNum].totalTransCnt); require(ww[_winNum].active); re...
/** * @dev transfer tokens to ppl accts (window1-5) * @param _winNum - number of window 0-4 to close */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 16632, 17652 ] }
4,894
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
newWindow
function newWindow(uint8 _winNum, uint256 _tokenPerWindow) private { ww[_winNum] = Window(true, 0, 0, 0, _tokenPerWindow); NewWindow(_winNum, _tokenPerWindow); }
/** * @dev open new window 0-5 and write totl token per window in structure * @param _winNum - number of window 0-4 to close * @param _tokenPerWindow - total token for window 0-4 */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 17868, 18057 ] }
4,895
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
finishCrowd
function finishCrowd() onlyOwner public { uint256 _tokenPerWindow; require(now > (sT2.add(dTLP2)) || hardCapInTokens == token.totalSupply()); require(!token.mintingFinished()); _tokenPerWindow = (mintCapInTokens.sub(crowdTokensTLP2).sub(fundTotalSupply)).div(5); token.mint(this, _tokenPerWind...
/** * @dev Finish crowdsale TLP1.2 period and open window1-5 crowdsale */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 18153, 18730 ] }
4,896
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
vestingWithdraw
function vestingWithdraw(address withdrawWallet, uint256 withdrawTokens, uint256 withdrawTotalSupply) private returns (uint256) { require(token.mintingFinished()); require(msg.sender == withdrawWallet || isOwner()); uint256 currentPeriod = (block.timestamp.sub(sT2.add(dTLP2))).div(VestingPeriodInSecond...
/** * @dev withdraw tokens amount within vesting rules for team, advisory and reserved * @param withdrawWallet - wallet to transfer tokens * @param withdrawTokens - amount of tokens to transfer to * @param withdrawTotalSupply - total amount of tokens transfered to account * @return unit256 total amount of tok...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 19108, 20062 ] }
4,897
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
teamWithdraw
function teamWithdraw() public { teamTotalSupply = vestingWithdraw(teamWallet, _teamTokens, teamTotalSupply); }
/** * @dev withdraw tokens amount within vesting rules for team */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 20151, 20281 ] }
4,898
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
advisoryWithdraw
function advisoryWithdraw() public { advisoryTotalSupply = vestingWithdraw(advisoryWallet, _advisoryTokens, advisoryTotalSupply); }
/** * @dev withdraw tokens amount within vesting rules for advisory */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 20374, 20524 ] }
4,899
McFlyCrowd
McFlyCrowd.sol
0xc7c6d400b1bcf7841a1b5061a4d69525c9aa0966
Solidity
McFlyCrowd
contract McFlyCrowd is MultiOwners, Haltable { using SafeMath for uint256; /// @dev Total ETH received during WAVES, TLP1.2 & window[1-5] uint256 public counter_in; // tlp2 /// @dev minimum ETH to partisipate in window 1-5 uint256 public minETHin = 1e18; // 1 ETH /// @dev Token ...
/** * @title McFly crowdsale smart contract * @author Copyright (c) 2018 McFly.aero * @author Dmitriy Khizhinskiy * @author "MIT" * @dev inherited from MultiOwners & Haltable */
NatSpecMultiLine
reservedWithdraw
function reservedWithdraw() public { reservedTotalSupply = vestingWithdraw(reservedWallet, _reservedTokens, reservedTotalSupply); }
/** * @dev withdraw tokens amount within vesting rules for reserved wallet */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
bzzr://4c830ad51b026fcc939bebe3d3fca769676dd770800ad28ffb1d1e8806a0fb59
{ "func_code_index": [ 20624, 20774 ] }
4,900
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 88, 146 ] }
4,901
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 223, 294 ] }
4,902
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 504, 584 ] }
4,903
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 849, 950 ] }
4,904
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @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 ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1586, 1663 ] }
4,905
HODLCapital
HODLCapital.sol
0xeda47e13fd1192e32226753dc2261c4a14908fb7
Solidity
IERC20
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 ...
transferFrom
function transferFrom( address sender, address recipient, 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. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://9c2c7f9cafd0a7530d7a2a99d205ad7b42212cfac9a168d801b0469c70ebe7dd
{ "func_code_index": [ 1958, 2078 ] }
4,906