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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
2080,
2418
]
} | 8,000 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
2870,
3027
]
} | 8,001 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
290,
386
]
} | 8,002 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
444,
559
]
} | 8,003 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
767,
928
]
} | 8,004 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
986,
1125
]
} | 8,005 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
| /**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
1267,
1420
]
} | 8,006 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
| /**
* @dev See `IERC20.transferFrom`.
*
* Emits an `Approval` event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of `ERC20`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `valu... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
1886,
2147
]
} | 8,007 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
2551,
2762
]
} | 8,008 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to `approve` that can be used as a mitigation for
* problems described in `IERC20.approve`.
*
* Emits an `Approval` event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
3260,
3481
]
} | 8,009 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] ... | /**
* @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.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
3966,
4400
]
} | 8,010 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
| /** @dev 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.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
4676,
4989
]
} | 8,011 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Destoys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a `Transfer` event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
5316,
5627
]
} | 8,012 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
| /**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an `Approval` event.
*
* Requirements:
*
* - `owner` cannot be the zero... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
6062,
6402
]
} | 8,013 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
| /**
* @dev Destoys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See `_burn` and `_approve`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
6582,
6775
]
} | 8,014 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
550,
638
]
} | 8,015 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
752,
844
]
} | 8,016 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
* these values are immutable: they can only be set once during
* construction.
*/
con... | /**
* @dev Optional functions from the ERC20 standard.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei.
*
*... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
1408,
1496
]
} | 8,017 |
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | MoonBase | contract MoonBase is ERC20, ERC20Detailed {
using SafeMath for uint256;
IERC20 public based;
constructor (address _based, string memory name, string memory symbol)
public
ERC20Detailed(name, symbol, 18)
{
based = IERC20(_based);
}
function balance() public ... | getPricePerFullShare | function getPricePerFullShare() public view returns (uint) {
uint256 supply = totalSupply();
if (supply == 0) return 0;
return balance().mul(1e18).div(supply);
}
| /// Returns price in BASED per share e18 | NatSpecSingleLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
446,
644
]
} | 8,018 | ||
MoonBase | MoonBase.sol | 0x26cf82e4ae43d31ea51e72b663d26e26a75af729 | Solidity | MoonBase | contract MoonBase is ERC20, ERC20Detailed {
using SafeMath for uint256;
IERC20 public based;
constructor (address _based, string memory name, string memory symbol)
public
ERC20Detailed(name, symbol, 18)
{
based = IERC20(_based);
}
function balance() public ... | deposit | function deposit(uint _amount) public {
require(_amount > 0, "Nothing to deposit");
uint _pool = balance();
based.transferFrom(msg.sender, address(this), _amount);
uint _after = balance();
_amount = _after.sub(_pool); // Additional check for deflationary baseds
uint shares = 0;
if (... | /// @param _amount amount in BASED to deposit | NatSpecSingleLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://f935d5ccde7221a438fa262f6e70e4d860af324a927244a91e415368cc11da0d | {
"func_code_index": [
792,
1332
]
} | 8,019 | ||
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | withdraw | function withdraw(address _property) external {
/**
* Validates the passed Property address is included the Property address set.
*/
addressValidator().validateGroup(_property, config().propertyGroup());
/**
* Gets the withdrawable rewards amount and the latest cumulative sum of the maximum mint amount... | /**
* Withdraws rewards.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
423,
2170
]
} | 8,020 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | beforeBalanceChange | function beforeBalanceChange(
address _property,
address _from,
address _to
) external {
/**
* Validates the sender is Allocator contract.
*/
addressValidator().validateAddress(msg.sender, config().allocator());
WithdrawStorage withdrawStorage = getStorage();
/**
* Gets the cumulative sum of... | /**
* Updates the change in compensation amount due to the change in the ownership ratio of the passed Property.
* When the ownership ratio of Property changes, the reward that the Property holder can withdraw will change.
* It is necessary to update the status before and after the ownership ratio changes.
... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
2498,
4225
]
} | 8,021 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | getRewardsAmount | function getRewardsAmount(address _property)
external
view
returns (uint256)
{
return getStorage().getRewardsAmount(_property);
}
| /**
* Returns the reward amount already withdrawn in the passed Property.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
4313,
4460
]
} | 8,022 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | difference | function difference(
WithdrawStorage withdrawStorage,
address _property,
address _user
)
private
view
returns (
uint256 _reward,
uint256 _holdersAmount,
uint256 _holdersPrice,
uint256 _interestAmount,
uint256 _interestPrice
)
{
/**
* Gets and passes the last recorded cumulative sum o... | /**
* Passthrough to `Lockup.difference` function.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
4525,
5070
]
} | 8,023 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | _calculateAmount | function _calculateAmount(address _property, address _user)
private
view
returns (uint256 _amount, uint256 _price)
{
WithdrawStorage withdrawStorage = getStorage();
/**
* Gets the latest cumulative sum of the maximum mint amount,
* and the difference to the previous withdrawal of holder reward unit p... | /**
* Returns the holder reward.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
5117,
6045
]
} | 8,024 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | _calculateWithdrawableAmount | function _calculateWithdrawableAmount(address _property, address _user)
private
view
returns (uint256 _amount, uint256 _price)
{
/**
* Gets the latest withdrawal reward amount.
*/
(uint256 _value, uint256 price) = _calculateAmount(_property, _user);
/**
* If the passed Property has not authentic... | /**
* Returns the total rewards currently available for withdrawal. (For calling from inside the contract)
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
6166,
7015
]
} | 8,025 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | calculateWithdrawableAmount | function calculateWithdrawableAmount(address _property, address _user)
external
view
returns (uint256)
{
(uint256 value, ) = _calculateWithdrawableAmount(_property, _user);
return value;
}
| /**
* Returns the total rewards currently available for withdrawal. (For calling from external of the contract)
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
7141,
7350
]
} | 8,026 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | calculateTotalWithdrawableAmount | function calculateTotalWithdrawableAmount(address _property)
external
view
returns (uint256)
{
(, uint256 _amount, , , ) = ILockup(config().lockup()).difference(
_property,
0
);
/**
* Adjusts decimals to 10^18 and returns the result.
*/
return _amount.divBasis().divBasis();
}
| /**
* Returns the cumulative sum of the holder rewards of the passed Property.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
7443,
7764
]
} | 8,027 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | __legacyWithdrawableAmount | function __legacyWithdrawableAmount(address _property, address _user)
private
view
returns (uint256)
{
WithdrawStorage withdrawStorage = getStorage();
uint256 _last = withdrawStorage.getLastWithdrawalPrice(
_property,
_user
);
uint256 price = withdrawStorage.getCumulativePrice(_property);
uint256... | /**
* Returns the reward amount of the calculation model before DIP4.
* It can be calculated by subtracting "the last cumulative sum of reward unit price" from
* "the current cumulative sum of reward unit price," and multiplying by the balance of the user.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
8041,
8541
]
} | 8,028 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | __updateLegacyWithdrawableAmount | function __updateLegacyWithdrawableAmount(address _property, address _user)
private
{
WithdrawStorage withdrawStorage = getStorage();
uint256 price = withdrawStorage.getCumulativePrice(_property);
withdrawStorage.setLastWithdrawalPrice(_property, _user, price);
}
| /**
* Updates and treats the reward of before DIP4 as already received.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
8627,
8908
]
} | 8,029 |
WithdrawMigration | contracts/src/withdraw/LegacyWithdraw.sol | 0xfe11597d2b26f1aa63fb8ac33ee86915cb466e5d | Solidity | LegacyWithdraw | contract LegacyWithdraw is IWithdraw, UsingConfig, UsingValidator {
using SafeMath for uint256;
using Decimals for uint256;
event PropertyTransfer(address _property, address _from, address _to);
/**
* Initialize the passed address as AddressConfig address.
*/
// solium-disable-next-line no-empty-block... | /**
* A contract that manages the withdrawal of holder rewards for Property holders.
*/ | NatSpecMultiLine | getStorage | function getStorage() private view returns (WithdrawStorage) {
return WithdrawStorage(config().withdrawStorage());
}
| /**
* Returns WithdrawStorage instance.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | MPL-2.0 | bzzr://667b5de3a803aaac8684108683c8810e13256a965db08b51f2f62d7cb8b8b153 | {
"func_code_index": [
8962,
9085
]
} | 8,030 |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
268,
606
]
} | 8,031 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) ret... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) constant 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.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
812,
921
]
} | 8,032 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
require(_to != address(0));
var _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balan... | /**
* @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.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
392,
930
]
} | 8,033 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) returns (bool) {
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs... | /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
1166,
1714
]
} | 8,034 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
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.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
2038,
2176
]
} | 8,035 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue)
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* 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
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
2421,
2692
]
} | 8,036 | |
CAWD | CAWD.sol | 0x0c3bf90635c32434865504d25380ed1b89ba8f9e | Solidity | CAWD | contract CAWD is StandardToken {
string public constant name = "CAWD";
string public constant symbol = "CAWD";
uint8 public constant decimals = 18; // only two deciminals, token cannot be divided past 1/100th
uint256 public constant INITIAL_SUPPLY = 1000000000000000000000000000; // 50 million + 18 deci... | /**
* @title Limuchun
*/ | NatSpecMultiLine | CAWD | function CAWD() {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
}
| /**
* @dev Contructor that gives msg.sender all of existing tokens.
*/ | NatSpecMultiLine | v0.4.13+commit.fb4cb1a | bzzr://e37e53278298a0e4445254728b5b873eab252af2cf3e71de389661e067f1ff24 | {
"func_code_index": [
410,
514
]
} | 8,037 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | GodlyCoin | function GodlyCoin() public {
symbol = "GDL";
name = "GodlyCoin";
decimals = 3;
_totalSupply = 98000000000;
balances[0xadCC8514336E65be1966d457200CB098bD64A94c] = _totalSupply;
Transfer(address(0), 0xadCC8514336E65be1966d457200CB098bD64A94c, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
456,
778
]
} | 8,038 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
966,
1087
]
} | 8,039 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
1307,
1436
]
} | 8,040 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
1780,
2057
]
} | 8,041 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
2565,
2773
]
} | 8,042 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
3304,
3662
]
} | 8,043 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
3945,
4101
]
} | 8,044 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
4456,
4773
]
} | 8,045 | |
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
4965,
5024
]
} | 8,046 | ||
GodlyCoin | GodlyCoin.sol | 0xa0bab5dce6e80b0b2ced32ba52bea15c7abdbab9 | Solidity | GodlyCoin | contract GodlyCoin is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// ---------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://8a71a9fffd48588d2913b77403edb8ab34460fe24ff67a4b3e10bbdc1613b54a | {
"func_code_index": [
5257,
5446
]
} | 8,047 | |
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
94,
154
]
} | 8,048 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
237,
310
]
} | 8,049 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | 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.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
534,
616
]
} | 8,050 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | 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.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
895,
983
]
} | 8,051 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | 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.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1647,
1726
]
} | 8,052 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | 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);
/**... | 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.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2039,
2175
]
} | 8,053 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | name | function name() external view returns (string memory);
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
100,
159
]
} | 8,054 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the symbol of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
226,
287
]
} | 8,055 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns t... | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
363,
418
]
} | 8,056 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | name | function name() public view virtual override returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
811,
916
]
} | 8,057 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1030,
1139
]
} | 8,058 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1773,
1871
]
} | 8,059 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1931,
2044
]
} | 8,060 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2102,
2234
]
} | 8,061 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2442,
2622
]
} | 8,062 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2680,
2836
]
} | 8,063 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2978,
3152
]
} | 8,064 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;... | /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
3629,
3989
]
} | 8,065 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
4393,
4616
]
} | 8,066 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
5114,
5388
]
} | 8,067 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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);
... | /**
* @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.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
5873,
6451
]
} | 8,068 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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 = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @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:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
6733,
7116
]
} | 8,069 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @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.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
7444,
7867
]
} | 8,070 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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(own... | /**
* @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.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
8300,
8685
]
} | 8,071 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**... | _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.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
9283,
9413
]
} | 8,072 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
259,
445
]
} | 8,073 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @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.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
723,
864
]
} | 8,074 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1162,
1359
]
} | 8,075 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1613,
2089
]
} | 8,076 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
2560,
2697
]
} | 8,077 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts 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 in... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
3188,
3471
]
} | 8,078 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
3931,
4066
]
} | 8,079 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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 opcod... | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
4546,
4717
]
} | 8,080 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
492,
576
]
} | 8,081 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1134,
1287
]
} | 8,082 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1437,
1686
]
} | 8,083 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | mul | function mul(int256 a, int256 b) internal pure returns (int256) {
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
| /**
* @dev Multiplies two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
234,
542
]
} | 8,084 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | div | function div(int256 a, int256 b) internal pure returns (int256) {
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
| /**
* @dev Division of two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
632,
896
]
} | 8,085 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | sub | function sub(int256 a, int256 b) internal pure returns (int256) {
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a));
return c;
}
| /**
* @dev Subtracts two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
984,
1165
]
} | 8,086 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | add | function add(int256 a, int256 b) internal pure returns (int256) {
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a));
return c;
}
| /**
* @dev Adds two int256 variables and fails on overflow.
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1248,
1429
]
} | 8,087 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | SafeMathInt | library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 ... | abs | function abs(int256 a) internal pure returns (int256) {
require(a != MIN_INT256);
return a < 0 ? -a : a;
}
| /**
* @dev Converts to absolute value, and fails on overflow. (easter egg from the genius dev @nomessages9.)
*/ | NatSpecMultiLine | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
1561,
1695
]
} | 8,088 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | enableTrading | function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
}
| // once enabled, can never be turned off | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
5821,
5938
]
} | 8,089 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | removeLimits | function removeLimits() external onlyOwner returns (bool){
limitsInEffect = false;
gasLimitActive = false;
transferDelayEnabled = false;
return true;
}
| // remove limits after token is stable | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
5989,
6186
]
} | 8,090 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | disableTransferDelay | function disableTransferDelay() external onlyOwner returns (bool){
transferDelayEnabled = false;
return true;
}
| // disable Transfer delay - cannot be reenabled | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
6246,
6385
]
} | 8,091 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | updateSwapTokensAtAmount | function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply.");
swapToken... | // change the minimum amount of tokens to sell from fees | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
7451,
7837
]
} | 8,092 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | updateSwapEnabled | function updateSwapEnabled(bool enabled) external onlyOwner(){
swapEnabled = enabled;
}
| // only use to disable contract sales if absolutely necessary (emergency use only) | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
8331,
8437
]
} | 8,093 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | forceSwapBack | function forceSwapBack() external onlyOwner {
uint256 contractBalance = balanceOf(address(this));
require(contractBalance >= totalSupply() / 100, "Can only swap back if more than 1% of tokens stuck on contract");
swapBack();
emit OwnerForcedSwapBack(block.timestamp);
}
| // force Swap back if slippage above 49% for launch. | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
20044,
20359
]
} | 8,094 | ||
GeniusDAO | GeniusDAO.sol | 0x0413a18dbd0dcea70cd054387fbf3b34d3ca7b9a | Solidity | GeniusDAO | contract GeniusDAO is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public marketingWallet;
address p... | buyBackTokens | function buyBackTokens(uint256 ethAmountInWei) external onlyOwner {
// generate the uniswap pair path of weth -> eth
address[] memory path = new address[](2);
path[0] = uniswapV2Router.WETH();
path[1] = address(this);
// make the swap
uniswapV2Router.swapExactETHForTokensSupportingFeeOnT... | // useful for buybacks or to reclaim any ETH on the contract in a way that helps holders. | LineComment | v0.8.9+commit.e5eed63a | MIT | ipfs://3ee98a2343ee7994439fe1deae5234c10dc9b225770d9443fe4f2e3134b4a09f | {
"func_code_index": [
20461,
21041
]
} | 8,095 | ||
InfernoHound | contracts\open-zeppelin-contracts\token\ERC20\ERC20.sol | 0x07bc8d1a87c2b7caa596abce2d5bb41efc475c5c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @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 .
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin... | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return _totalSupply;
}
| /**
* @dev See `IERC20.totalSupply`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://9ecdd37ddbf1fd1a47e80b496ddd930d0cb6d9bb6d48f04230557fd4727dbcd4 | {
"func_code_index": [
290,
386
]
} | 8,096 |
InfernoHound | contracts\open-zeppelin-contracts\token\ERC20\ERC20.sol | 0x07bc8d1a87c2b7caa596abce2d5bb41efc475c5c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @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 .
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
| /**
* @dev See `IERC20.balanceOf`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://9ecdd37ddbf1fd1a47e80b496ddd930d0cb6d9bb6d48f04230557fd4727dbcd4 | {
"func_code_index": [
444,
559
]
} | 8,097 |
InfernoHound | contracts\open-zeppelin-contracts\token\ERC20\ERC20.sol | 0x07bc8d1a87c2b7caa596abce2d5bb41efc475c5c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @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 .
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
| /**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://9ecdd37ddbf1fd1a47e80b496ddd930d0cb6d9bb6d48f04230557fd4727dbcd4 | {
"func_code_index": [
767,
928
]
} | 8,098 |
InfernoHound | contracts\open-zeppelin-contracts\token\ERC20\ERC20.sol | 0x07bc8d1a87c2b7caa596abce2d5bb41efc475c5c | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() pub... | /**
* @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 .
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See `IERC20.allowance`.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://9ecdd37ddbf1fd1a47e80b496ddd930d0cb6d9bb6d48f04230557fd4727dbcd4 | {
"func_code_index": [
986,
1125
]
} | 8,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.