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
NEONToken
NEONToken.sol
0x23c4464ed220c07fb90803ea3617dc5adc5428f7
Solidity
NEONToken
contract NEONToken is Context, IERC20, Pausable { 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; uint8 privat...
/** * 'NEON' token contract * * Name : NEONToken * Symbol : NEON * Total supply: 10,000 (10 thousands) * Decimals : 18 * * ERC20 Token, with the Burnable, Pausable and Ownable from OpenZeppelin */
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer 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. * - `recipie...
NatSpecMultiLine
v0.7.0+commit.9e61f92b
MIT
ipfs://077603f10ee2ab3efbf0d755aa6f7a2da4c1e936afa9c891588a2e7c04397144
{ "func_code_index": [ 8989, 9465 ] }
20,200
NEONToken
NEONToken.sol
0x23c4464ed220c07fb90803ea3617dc5adc5428f7
Solidity
NEONToken
contract NEONToken is Context, IERC20, Pausable { 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; uint8 privat...
/** * 'NEON' token contract * * Name : NEONToken * Symbol : NEON * Total supply: 10,000 (10 thousands) * Decimals : 18 * * ERC20 Token, with the Burnable, Pausable and Ownable from OpenZeppelin */
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { 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.7.0+commit.9e61f92b
MIT
ipfs://077603f10ee2ab3efbf0d755aa6f7a2da4c1e936afa9c891588a2e7c04397144
{ "func_code_index": [ 9732, 10046 ] }
20,201
NEONToken
NEONToken.sol
0x23c4464ed220c07fb90803ea3617dc5adc5428f7
Solidity
NEONToken
contract NEONToken is Context, IERC20, Pausable { 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; uint8 privat...
/** * 'NEON' token contract * * Name : NEONToken * Symbol : NEON * Total supply: 10,000 (10 thousands) * Decimals : 18 * * ERC20 Token, with the Burnable, Pausable and Ownable from OpenZeppelin */
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); }...
/** * @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 address. *...
NatSpecMultiLine
v0.7.0+commit.9e61f92b
MIT
ipfs://077603f10ee2ab3efbf0d755aa6f7a2da4c1e936afa9c891588a2e7c04397144
{ "func_code_index": [ 10465, 10809 ] }
20,202
HapeMfers
contracts/context/Ownable.sol
0x79d83bac88feec5dfca6e719afade8ccce71a420
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 393, 482 ] }
20,203
HapeMfers
contracts/context/Ownable.sol
0x79d83bac88feec5dfca6e719afade8ccce71a420
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _transferOwnership(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.0+commit.c7dfd78e
{ "func_code_index": [ 1109, 1214 ] }
20,204
HapeMfers
contracts/context/Ownable.sol
0x79d83bac88feec5dfca6e719afade8ccce71a420
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 1359, 1561 ] }
20,205
HapeMfers
contracts/context/Ownable.sol
0x79d83bac88feec5dfca6e719afade8ccce71a420
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * ...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
{ "func_code_index": [ 1711, 1902 ] }
20,206
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 638, 755 ] }
20,207
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 920, 1028 ] }
20,208
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1166, 1344 ] }
20,209
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
add
function add(Role storage role, address addr) internal { role.bearer[addr] = true; }
/** * @dev give an address access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 141, 244 ] }
20,210
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
remove
function remove(Role storage role, address addr) internal { role.bearer[addr] = false; }
/** * @dev remove an address' access to this role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 311, 418 ] }
20,211
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
check
function check(Role storage role, address addr) view internal { require(has(role, addr)); }
/** * @dev check if an address has this role * // reverts */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 497, 612 ] }
20,212
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Roles
library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage role, address addr) internal { role.bearer[addr] = true; } /** * @dev remove an address' access to this role */ functio...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
has
function has(Role storage role, address addr) view internal returns (bool) { return role.bearer[addr]; }
/** * @dev check if an address has this role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 693, 826 ] }
20,213
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
checkRole
function checkRole(address addr, string roleName) view public { roles[roleName].check(addr); }
/** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of the role * // reverts */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 353, 471 ] }
20,214
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
hasRole
function hasRole(address addr, string roleName) view public returns (bool) { return roles[roleName].has(addr); }
/** * @dev determine if addr has role * @param addr address * @param roleName the name of the role * @return bool */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 614, 755 ] }
20,215
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
addRole
function addRole(address addr, string roleName) internal { roles[roleName].add(addr); emit RoleAdded(addr, roleName); }
/** * @dev add a role to an address * @param addr address * @param roleName the name of the role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 877, 1020 ] }
20,216
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address addr, string roleName); event RoleRemoved(address addr, string roleName); /** * @dev reverts if addr does not have role * @param addr address * @param roleName the name of t...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * @dev Supports unlimited numbers of roles and addresses. * @dev See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings t...
NatSpecMultiLine
removeRole
function removeRole(address addr, string roleName) internal { roles[roleName].remove(addr); emit RoleRemoved(addr, roleName); }
/** * @dev remove a role from an address * @param addr address * @param roleName the name of the role */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1147, 1298 ] }
20,217
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 89, 476 ] }
20,218
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 560, 840 ] }
20,219
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 954, 1070 ] }
20,220
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1134, 1264 ] }
20,221
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 199, 287 ] }
20,222
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit 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.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 445, 777 ] }
20,223
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { 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.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 983, 1087 ] }
20,224
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_v...
/** * @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.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 401, 891 ] }
20,225
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1523, 1718 ] }
20,226
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 ) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 2042, 2207 ] }
20,227
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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 ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 2673, 2980 ] }
20,228
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @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
decreaseApproval
function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); }...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 3451, 3894 ] }
20,229
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 513, 609 ] }
20,230
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 693, 791 ] }
20,231
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
addAdministrator
function addAdministrator(address _administrator) onlyOwner public returns (bool) { if (isAdministrator(_administrator)) { return false; } else { addRole(_administrator, ROLE_ADMINISTRATOR); return true; } }
/** * @dev Add an address that can administer the token even when paused. * @param _administrator Address of the given administrator. * @return True if the administrator has been added, false if the address was already an administrator. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 531, 814 ] }
20,232
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
removeAdministrator
function removeAdministrator(address _administrator) onlyOwner public returns (bool) { if (isAdministrator(_administrator)) { removeRole(_administrator, ROLE_ADMINISTRATOR); return true; } else { return false; } }
/** * @dev Remove an administrator. * @param _administrator Address of the administrator to be removed. * @return True if the administrator has been removed, * false if the address wasn't an administrator in the first place. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1081, 1370 ] }
20,233
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
isAdministrator
function isAdministrator(address _administrator) public view returns (bool) { return hasRole(_administrator, ROLE_ADMINISTRATOR); }
/** * @dev Determine if address is an administrator. * @param _administrator Address of the administrator to be checked. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1520, 1670 ] }
20,234
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
transfer
function transfer(address _to, uint256 _value) public whenNotPausedOrAuthorized returns (bool) { return super.transfer(_to, _value); }
/** * @dev Transfer token for a specified address with pause feature for administrator. * @dev Only applies when the transfer is allowed by the owner. * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 1944, 2097 ] }
20,235
Level01Token
Level01Token.sol
0x056ac97cd9dee69660964278d6c689135e9780bc
Solidity
PausableToken
contract PausableToken is StandardToken, Pausable, RBAC { string public constant ROLE_ADMINISTRATOR = "administrator"; modifier whenNotPausedOrAuthorized() { require(!paused || hasRole(msg.sender, ROLE_ADMINISTRATOR)); _; } /** * @dev Add an address that can administer th...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public whenNotPausedOrAuthorized returns (bool) { return super.transferFrom(_from, _to, _value); }
/** * @dev Transfer tokens from one address to another with pause feature for administrator. * @dev Only applies when the transfer is allowed by the owner. * @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 uint2...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://88cbe3d58b159ac9860b0e4ccf4ee7c2ada97cbf9c052a6b966e95ef9bfaeac7
{ "func_code_index": [ 2490, 2673 ] }
20,236
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 94, 154 ] }
20,237
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 237, 310 ] }
20,238
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 534, 616 ] }
20,239
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 895, 983 ] }
20,240
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 1647, 1726 ] }
20,241
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 2039, 2141 ] }
20,242
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 259, 445 ] }
20,243
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 723, 864 ] }
20,244
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 1162, 1359 ] }
20,245
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 1613, 2089 ] }
20,246
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 2560, 2697 ] }
20,247
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 3188, 3471 ] }
20,248
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 3931, 4066 ] }
20,249
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 4546, 4717 ] }
20,250
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 606, 1230 ] }
20,251
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 2160, 2562 ] }
20,252
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 3318, 3496 ] }
20,253
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 3721, 3922 ] }
20,254
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 4292, 4523 ] }
20,255
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 4774, 5095 ] }
20,256
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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 () internal { address msgSender = _msgSend...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 497, 581 ] }
20,257
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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 () internal { address msgSender = _msgSend...
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 1139, 1292 ] }
20,258
CaptainShiba
CaptainShiba.sol
0xb3d613890c538ad1036e619d6cf77073db0221d1
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 () internal { address msgSender = _msgSend...
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.6.12+commit.27d51765
MIT
ipfs://8e9257025f45526778e599ef9574023ea40720a794c49545613037ddcddb0613
{ "func_code_index": [ 1442, 1691 ] }
20,259
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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
GBEX
function GBEX() public { symbol = "GBEX"; name = "Globiance Malta"; decimals = 18; _totalSupply = 1200000000000000000000000000; balances[0x5CD009eac24429Cc5b2914d4677d303C77a05000] = _totalSupply; Transfer(address(0), 0x5CD009eac24429Cc5b2914d4677d303C77a05000, _totalSupply); }...
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 451, 804 ] }
20,260
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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 view returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 992, 1109 ] }
20,261
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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 view returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 1329, 1454 ] }
20,262
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 1798, 2075 ] }
20,263
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 2583, 2791 ] }
20,264
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 3322, 3680 ] }
20,265
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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 view 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 3963, 4115 ] }
20,266
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 4470, 4787 ] }
20,267
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 4979, 5038 ] }
20,268
GBEX
GBEX.sol
0x5b182c02d8b17b5fb7ddec4797c7b03725150185
Solidity
GBEX
contract GBEX 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.25+commit.59dbf8f1
bzzr://a73fa5dce7075ed64d1e260235336d99c59215f2a002653c9db6b17bfa4b7f96
{ "func_code_index": [ 5271, 5460 ] }
20,269
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
GHC
function GHC( uint256 _totalSupply, string _name, uint8 _decimals, string _symbol ) { balanceOf[msg.sender] = _totalSupply; // Give the creator all initial tokens totalSupply = _totalSupply; // Update total supply name = _name; ...
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 998, 1638 ] }
20,270
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
transfer
function transfer(address _to, uint256 _value) { if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) throw; if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < ba...
/* Send coins */
Comment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 1663, 2431 ] }
20,271
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
approve
function approve(address _spender, uint256 _value) returns (bool success) { if (_value <= 0) throw; allowance[msg.sender][_spender] = _value; return true; }
/* Allow another contract to spend some tokens in your behalf */
Comment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 2504, 2702 ] }
20,272
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) throw; if (balanceOf[_from] < _value) throw; // Check if the sender has ...
/* A contract attempts to get the coins */
Comment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 2755, 3685 ] }
20,273
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
withdrawEther
function withdrawEther(uint256 amount) { if(msg.sender != owner)throw; owner.transfer(amount); }
// transfer balance to owner
LineComment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 5223, 5347 ] }
20,274
GHC
GHC.sol
0x65ef92858bf93494730c9373915e2a1274a2858b
Solidity
GHC
contract GHC is SafeMath{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf...
function() payable { }
// can accept ether
LineComment
v0.4.12+commit.194ff033
bzzr://442261b3f10bee5d6792446ee82b5aea48aaf0af2dd0d1a41eaf515b0bc25451
{ "func_code_index": [ 5375, 5407 ] }
20,275
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
ownershipTransfer
function ownershipTransfer(address payable _owner) onlyOwner public returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .ownershipTransfer.selector, _owner ); (result, ) = slotSetterAddr.delegatecall(callData); assert(result); }
/** * @dev Transfer ownership * @param _owner the address of the new owner * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 1100, 1407 ] }
20,276
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setOracleProxy
function setOracleProxy(address oracleProxyAddr) onlyOwner external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .setOracleProxy.selector, oracleProxyAddr ); (result, ) = slotSetterAddr.delegatecall(callData); assert(result); }
/** * @dev Set the address of OracleProxy contract * @param oracleProxyAddr The address of OracleProxy contract * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 1913, 2224 ] }
20,277
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setRewardErc20
function setRewardErc20(address erc20Addr) onlyOwner public returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .setRewardErc20.selector, erc20Addr ); (result, ) = slotSetterAddr.delegatecall(callData); assert(result); }
/** * @dev Set the address of BiFi reward token contract * @param erc20Addr The address of BiFi reward token contract * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 2417, 2714 ] }
20,278
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setBreakerTable
function setBreakerTable(address _target, bool _status) onlyOwner external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .setBreakerTable.selector, _target, _status ); (result, ) = slotSetterAddr.delegatecall(callData); assert(result); }
/** * @dev Authorize admin user for circuitBreaker * @param _target The address of the circuitBreaker admin user. * @param _status The boolean status of circuitBreaker (on/off) * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 2968, 3288 ] }
20,279
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setCircuitBreaker
function setCircuitBreaker(bool _emergency) onlyBreaker external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .setCircuitBreaker.selector, _emergency ); (result, ) = slotSetterAddr.delegatecall(callData); assert(result); }
/** * @dev Set circuitBreak to freeze/unfreeze all handlers * @param _emergency The boolean status of circuitBreaker (on/off) * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 3489, 3793 ] }
20,280
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getCircuitBreaker
function getCircuitBreaker() external view returns (bool) { return emergency; }
/** * @dev Get the circuitBreak status * @return The circuitBreak status */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 4838, 4926 ] }
20,281
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlerInfo
function getTokenHandlerInfo(uint256 handlerID) external view returns (bool, address, string memory) { bool support; address tokenHandlerAddr; string memory tokenName; if (dataStorageInstance.getTokenHandlerSupport(handlerID)) { tokenHandlerAddr = dataStorageInstance.getTokenHandlerAddr(handlerID); IPr...
/** * @dev Get information for a handler * @param handlerID Handler ID * @return (success or failure, handler address, handler name) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 5075, 5736 ] }
20,282
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
handlerRegister
function handlerRegister(uint256 handlerID, address tokenHandlerAddr, uint256 flashFeeRate, uint256 discountBase) onlyOwner external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .handlerRegister.selector, handlerID, tokenHandlerAddr, flashFeeRate, discountB...
/** * @dev Register a handler * @param handlerID Handler ID and address * @param tokenHandlerAddr The handler address * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 5931, 6349 ] }
20,283
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setLiquidationManager
function setLiquidationManager(address liquidationManagerAddr) onlyOwner external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IManagerSlotSetter .setLiquidationManager.selector, liquidationManagerAddr ); (result, ) = slotSetterAddr.delegatecall(callData); assert(re...
/** * @dev Set a liquidation manager contract * @param liquidationManagerAddr The address of liquidiation manager * @return result the setter call in contextSetter contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 6536, 6875 ] }
20,284
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
rewardUpdateOfInAction
function rewardUpdateOfInAction(address payable userAddr, uint256 callerID) external returns (bool) { ContractInfo memory handlerInfo; (handlerInfo.support, handlerInfo.addr) = dataStorageInstance.getTokenHandlerInfo(callerID); if (handlerInfo.support) { IProxy TokenHandler; TokenHandler = IProxy(handler...
/** * @dev Update the (SI) rewards for a user * @param userAddr The address of the user * @param callerID The handler ID * @return true (TODO: validate results) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 7054, 7563 ] }
20,285
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
applyInterestHandlers
function applyInterestHandlers(address payable userAddr, uint256 callerID, bool allFlag) external returns (uint256, uint256, uint256, uint256, uint256, uint256) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .applyInterestHandlers.selector, userAddr, callerID, allFlag ); (bool ...
/** * @dev Update interest of a user for a handler (internal) * @param userAddr The user address * @param callerID The handler ID * @param allFlag Flag for the full calculation mode (calculting for all handlers) * @return (uint256, uint256, uint256, uint256, uint256, uint256) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 7860, 8385 ] }
20,286
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
interestUpdateReward
function interestUpdateReward() external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .interestUpdateReward.selector ); (result, ) = handlerManagerAddr.delegatecall(callData); assert(result); }
/** * @dev Reward the user (msg.sender) with the reward token after calculating interest. * @return result the interestUpdateReward call in ManagerInterest contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 8564, 8832 ] }
20,287
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
updateRewardParams
function updateRewardParams(address payable userAddr) onlyOperators external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .updateRewardParams.selector, userAddr ); (result, ) = handlerManagerAddr.delegatecall(callData); assert(result); }
/** * @dev (Update operation) update the rewards parameters. * @param userAddr The address of operator * @return result the updateRewardParams call in ManagerInterest contract */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 9024, 9344 ] }
20,288
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
rewardClaimAll
function rewardClaimAll(address payable userAddr) external returns (uint256) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .rewardClaimAll.selector, userAddr ); (bool result, bytes memory returnData) = handlerManagerAddr.delegatecall(callData); assert(result); r...
/** * @dev Claim all rewards for the user * @param userAddr The user address * @return true (TODO: validate results) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 9477, 9852 ] }
20,289
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
claimHandlerReward
function claimHandlerReward(uint256 handlerID, address payable userAddr) external returns (uint256) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .claimHandlerReward.selector, handlerID, userAddr ); (bool result, bytes memory returnData) = handlerManagerAddr.delegatecall(cal...
/** * @dev Claim handler rewards for the user * @param handlerID The ID of claim reward handler * @param userAddr The user address * @return true (TODO: validate results) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 10041, 10450 ] }
20,290
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
ownerRewardTransfer
function ownerRewardTransfer(uint256 _amount) onlyOwner external returns (bool result) { bytes memory callData = abi.encodeWithSelector( IHandlerManager .ownerRewardTransfer.selector, _amount ); (result, ) = handlerManagerAddr.delegatecall(callData); assert(result); }
/** * @dev Transfer reward tokens to owner (for administration) * @param _amount The amount of the reward token * @return result (TODO: validate results) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 10620, 10930 ] }
20,291
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlerPrice
function getTokenHandlerPrice(uint256 handlerID) external view returns (uint256) { return _getTokenHandlerPrice(handlerID); }
/** * @dev Get the token price of the handler * @param handlerID The handler ID * @return The token price of the handler */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 11069, 11203 ] }
20,292
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlerMarginCallLimit
function getTokenHandlerMarginCallLimit(uint256 handlerID) external view returns (uint256) { return _getTokenHandlerMarginCallLimit(handlerID); }
/** * @dev Get the margin call limit of the handler (external) * @param handlerID The handler ID * @return The margin call limit */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 11348, 11502 ] }
20,293
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
_getTokenHandlerMarginCallLimit
function _getTokenHandlerMarginCallLimit(uint256 handlerID) internal view returns (uint256) { IProxy TokenHandler = IProxy(dataStorageInstance.getTokenHandlerAddr(handlerID)); bytes memory data; (, data) = TokenHandler.handlerViewProxy( abi.encodeWithSelector( IMarketHandler .getTokenHandlerMarginCall...
/** * @dev Get the margin call limit of the handler (internal) * @param handlerID The handler ID * @return The margin call limit */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 11647, 12045 ] }
20,294
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlerBorrowLimit
function getTokenHandlerBorrowLimit(uint256 handlerID) external view returns (uint256) { return _getTokenHandlerBorrowLimit(handlerID); }
/** * @dev Get the borrow limit of the handler (external) * @param handlerID The handler ID * @return The borrow limit */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 12180, 12326 ] }
20,295
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
_getTokenHandlerBorrowLimit
function _getTokenHandlerBorrowLimit(uint256 handlerID) internal view returns (uint256) { IProxy TokenHandler = IProxy(dataStorageInstance.getTokenHandlerAddr(handlerID)); bytes memory data; (, data) = TokenHandler.handlerViewProxy( abi.encodeWithSelector( IMarketHandler .getTokenHandlerBorrowLimit....
/** * @dev Get the borrow limit of the handler (internal) * @param handlerID The handler ID * @return The borrow limit */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 12461, 12853 ] }
20,296
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlerSupport
function getTokenHandlerSupport(uint256 handlerID) external view returns (bool) { return dataStorageInstance.getTokenHandlerSupport(handlerID); }
/** * @dev Get the handler status of whether the handler is supported or not. * @param handlerID The handler ID * @return Whether the handler is supported or not */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 13031, 13185 ] }
20,297
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
setTokenHandlersLength
function setTokenHandlersLength(uint256 _tokenHandlerLength) onlyOwner external returns (bool) { tokenHandlerLength = _tokenHandlerLength; return true; }
/** * @dev Set the length of the handler list * @param _tokenHandlerLength The length of the handler list * @return true (TODO: validate results) */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 13347, 13512 ] }
20,298
TokenManager
contracts/marketManager/TokenManager.sol
0xfef1974aeb87a92e8b8b99b7bc260f116679938f
Solidity
TokenManager
contract TokenManager is ManagerSlot { /** * @dev Constructor for marketManager * @param managerDataStorageAddr The address of the manager storage contract * @param oracleProxyAddr The address of oracle proxy contract (e.g., price feeds) * @param breaker The address of default circuit breaker * @param erc...
/** * @title BiFi's marketManager contract * @notice Implement business logic and manage handlers * @author BiFi(seinmyung25, Miller-kk, tlatkdgus1, dongchangYoo) */
NatSpecMultiLine
getTokenHandlersLength
function getTokenHandlersLength() external view returns (uint256) { return tokenHandlerLength; }
/** * @dev Get the length of the handler list * @return the length of the handler list */
NatSpecMultiLine
v0.6.12+commit.27d51765
BSD-3-Clause
ipfs://1002b3b4f250d3861b527c1cfa08904bbc13ed9463aebc40677e5f875813adf8
{ "func_code_index": [ 13613, 13718 ] }
20,299