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
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
AddressSet
library AddressSet { struct Set { mapping(address => uint) keyPointers; address[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
count
function count(Set storage self) internal view returns(uint) { return(self.keyList.length); }
/** * @notice count the keys. * @param self storage pointer to a Set. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1355, 1467 ] }
4,700
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
AddressSet
library AddressSet { struct Set { mapping(address => uint) keyPointers; address[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
exists
function exists(Set storage self, address key) internal view returns(bool) { if(self.keyList.length == 0) return false; return self.keyList[self.keyPointers[key]] == key; }
/** * @notice check if a key is in the Set. * @param self storage pointer to a Set. * @param key value to check. * @return bool true: Set member, false: not a Set member. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1682, 1882 ] }
4,701
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
AddressSet
library AddressSet { struct Set { mapping(address => uint) keyPointers; address[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
keyAtIndex
function keyAtIndex(Set storage self, uint index) internal view returns(address) { return self.keyList[index]; }
/** * @notice fetch a key by row (enumerate). * @param self storage pointer to a Set. * @param index row to enumerate. Must be < count() - 1. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 2065, 2196 ] }
4,702
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 251, 437 ] }
4,703
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 707, 848 ] }
4,704
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1138, 1335 ] }
4,705
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1581, 2057 ] }
4,706
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 2520, 2657 ] }
4,707
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 3140, 3490 ] }
4,708
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 3942, 4077 ] }
4,709
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 4549, 4720 ] }
4,710
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
Bytes32Set
library Bytes32Set { struct Set { mapping(bytes32 => uint) keyPointers; bytes32[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
insert
function insert(Set storage self, bytes32 key) internal { require(!exists(self, key), "Bytes32Set: key already exists in the set."); self.keyPointers[key] = self.keyList.length; self.keyList.push(key); }
/** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 313, 553 ] }
4,711
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
Bytes32Set
library Bytes32Set { struct Set { mapping(bytes32 => uint) keyPointers; bytes32[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
remove
function remove(Set storage self, bytes32 key) internal { require(exists(self, key), "Bytes32Set: key does not exist in the set."); uint last = count(self) - 1; uint rowToReplace = self.keyPointers[key]; if(rowToReplace != last) { bytes32 keyToMove = self.keyList[last]; self.keyPoi...
/** * @notice remove a key. * @dev key to remove must exist. * @param self storage pointer to a Set. * @param key value to remove. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 726, 1246 ] }
4,712
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
Bytes32Set
library Bytes32Set { struct Set { mapping(bytes32 => uint) keyPointers; bytes32[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
count
function count(Set storage self) internal view returns(uint) { return(self.keyList.length); }
/** * @notice count the keys. * @param self storage pointer to a Set. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1350, 1462 ] }
4,713
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
Bytes32Set
library Bytes32Set { struct Set { mapping(bytes32 => uint) keyPointers; bytes32[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
exists
function exists(Set storage self, bytes32 key) internal view returns(bool) { if(self.keyList.length == 0) return false; return self.keyList[self.keyPointers[key]] == key; }
/** * @notice check if a key is in the Set. * @param self storage pointer to a Set. * @param key value to check. * @return bool true: Set member, false: not a Set member. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1679, 1879 ] }
4,714
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
Bytes32Set
library Bytes32Set { struct Set { mapping(bytes32 => uint) keyPointers; bytes32[] keyList; } /** * @notice insert a key. * @dev duplicate keys are not permitted. * @param self storage pointer to a Set. * @param key value to insert. */ fun...
keyAtIndex
function keyAtIndex(Set storage self, uint index) internal view returns(bytes32) { return self.keyList[index]; }
/** * @notice fetch a key by row (enumerate). * @param self storage pointer to a Set. * @param index row to enumerate. Must be < count() - 1. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 2060, 2191 ] }
4,715
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
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...
/** * @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 returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 497, 581 ] }
4,716
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
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...
/** * @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 { 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1139, 1292 ] }
4,717
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
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...
/** * @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"); 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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1442, 1691 ] }
4,718
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 94, 154 ] }
4,719
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 237, 310 ] }
4,720
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 534, 616 ] }
4,721
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 895, 983 ] }
4,722
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 1647, 1726 ] }
4,723
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 2039, 2141 ] }
4,724
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 606, 1230 ] }
4,725
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
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 ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 2160, 2562 ] }
4,726
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
poke
function poke() external distribute ifRunning { _accrueByTime(); }
/************************************************************************************** * Anyone can nudge the time-based accrual forward **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 8009, 8094 ] }
4,727
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
hodlTIssue
function hodlTIssue(uint amount) external distribute accrueByTime ifRunning { User storage u = userStruct[msg.sender]; User storage t = userStruct[address(token)]; u.balanceHodl = u.balanceHodl.sub(amount); t.balanceHodl = t.balanceHodl.add(amount); _pruneHodler(msg.sender); token.transfer...
/************************************************************************************** * 1:1 Convertability to HODLT ERC20 **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 8332, 8756 ] }
4,728
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
sellHodlC
function sellHodlC(uint quantityHodl, uint lowGas) external accrueByTime distribute ifRunning returns(bytes32 orderId) { emit SellHodlC(msg.sender, quantityHodl, lowGas); uint orderUsd = convertHodlToUsd(quantityHodl); uint orderLimit = orderLimit(); require(orderUsd >= minOrderUsd, "Sell order is ...
/************************************************************************************** * Sell HodlC to buy orders, or if no buy orders open a sell order. * Selectable low gas protects against future EVM price changes. * Completes as much as possible (gas) and return unprocessed Hodl. **************************...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 9613, 10225 ] }
4,729
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
buyHodlC
function buyHodlC(uint amountEth, uint lowGas) external accrueByTime distribute ifRunning returns(bytes32 orderId) { emit BuyHodlC(msg.sender, amountEth, lowGas); uint orderLimit = orderLimit(); uint orderUsd = convertEthToUsd(amountEth); require(orderUsd >= minOrderUsd, "Buy order is less ...
/************************************************************************************** * Buy HodlC from sell orders, or if no sell orders, from reserve. Lastly, open a * buy order is the reserve is sold out. * Selectable low gas protects against future EVM price changes. * Completes as much as possible (gas) ...
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 13701, 14347 ] }
4,730
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
cancelSell
function cancelSell(bytes32 orderId) external accrueByTime distribute ifRunning { SellOrder storage o = sellOrder[orderId]; User storage u = userStruct[o.seller]; require(o.seller == msg.sender, "Sender is not the seller."); u.balanceHodl = u.balanceHodl.add(o.volumeHodl); u.sellOrderIdFifo.rem...
/************************************************************************************** * Cancel orders **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 18270, 18732 ] }
4,731
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
convertEthToUsd
function convertEthToUsd(uint amtEth) public view returns(uint inUsd) { inUsd = amtEth.mul(maker.read()).div(USD_PRECISION); }
/************************************************************************************** * Prices and quotes **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 19406, 19551 ] }
4,732
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
depositEth
function depositEth() external accrueByTime distribute ifRunning payable { require(msg.value > 0, "You must send Eth to this function"); User storage u = userStruct[msg.sender]; u.balanceEth = u.balanceEth.add(msg.value); emit UserDepositEth(msg.sender, msg.value); }
/************************************************************************************** * Eth accounts **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 20693, 21009 ] }
4,733
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
rates
function rates() public view returns(uint hodlUsd, uint dailyAccrualRate) { hodlUsd = HODL_USD; dailyAccrualRate = DAILY_ACCRUAL_RATE; uint startTime = BIRTHDAY.add(SLEEP_TIME); if(now > startTime) { uint daysFromStart = (now.sub(startTime)) / 1 days; uint daysUnprocessed = daysFro...
// Moves forward in 1-day steps to prevent overflow
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 21584, 22223 ] }
4,734
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
_accrueByTransaction
function _accrueByTransaction() private { HODL_USD = HODL_USD.add(USD_TXN_ADJUSTMENT); }
/************************************************************************************** * Stateful activity-based and time-based rate adjustments **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 22479, 22590 ] }
4,735
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
_makeHodler
function _makeHodler(address user) private { User storage u = userStruct[user]; if(convertHodlToUsd(u.balanceHodl) >= minOrderUsd) { if(!hodlerAddrSet.exists(user)) hodlerAddrSet.insert(user); } }
/************************************************************************************** * Add and remove from hodlerAddrSet based on total HODLC owned/controlled **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 23273, 23526 ] }
4,736
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
contractBalanceEth
function contractBalanceEth() public view returns(uint ineth) { return address(this).balance; }
// Courtesy function
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 24045, 24145 ] }
4,737
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
distributionsLength
function distributionsLength() public view returns(uint row) { return distribution.length; }
// Distribution queue
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 24175, 24272 ] }
4,738
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
hodlerCount
function hodlerCount() public view returns(uint count) { return hodlerAddrSet.count(); }
// Hodlers in no particular order
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 24318, 24411 ] }
4,739
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
sellOrderCount
function sellOrderCount() public view returns(uint count) { return sellOrderIdFifo.count(); }
// Open orders, FIFO
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 24570, 24668 ] }
4,740
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
userSellOrderCount
function userSellOrderCount(address userAddr) public view returns(uint count) { return userStruct[userAddr].sellOrderIdFifo.count(); }
// open orders by user, FIFO
LineComment
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 25576, 25715 ] }
4,741
HodlDex
HodlDex.sol
0x56b9d34f9f4e4a1a82d847128c1b2264b34d2fae
Solidity
HodlDex
contract HodlDex is Ownable { using Address for address payable; // OpenZeppelin address utility using SafeMath for uint; // OpenZeppelin safeMath utility using Bytes32Set for Bytes32Set.Set; // Unordered...
initUser
function initUser(address userAddr, uint hodl) external onlyOwner payable { User storage u = userStruct[userAddr]; User storage r = userStruct[address(this)]; u.balanceEth = u.balanceEth.add(msg.value); u.balanceHodl = u.balanceHodl.add(hodl); r.balanceHodl = r.balanceHodl.sub(hodl); _mak...
/************************************************************************************** * Initialization functions that support migration cannot be used after trading starts **************************************************************************************/
NatSpecMultiLine
v0.6.6+commit.6c089d02
None
ipfs://79694aa4d1d0a87f083e18c227af8c99a7024083b34b5be57d06a5a91e1162a4
{ "func_code_index": [ 28052, 28496 ] }
4,742
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
Proxy
abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); ...
/** * @dev Fallback function. * Implemented entirely in `_fallback`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 118, 178 ] }
4,743
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
Proxy
abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); ...
_implementation
function _implementation() internal virtual view returns (address);
/** * @return The Address of the implementation. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 247, 318 ] }
4,744
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
Proxy
abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); ...
_delegate
function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calld...
/** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 615, 1647 ] }
4,745
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
Proxy
abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); ...
_willFallback
function _willFallback() internal virtual {}
/** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1865, 1913 ] }
4,746
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
Proxy
abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); ...
_fallback
function _fallback() internal { _willFallback(); _delegate(_implementation()); }
/** * @dev fallback implementation. * Extracted to enable manual triggering. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 2015, 2119 ] }
4,747
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 589, 1203 ] }
4,748
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 2117, 2513 ] }
4,749
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3251, 3426 ] }
4,750
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3645, 3843 ] }
4,751
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 4202, 4430 ] }
4,752
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
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 return fa...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
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://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 4675, 4992 ] }
4,753
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
/** * @notice This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Upgrad...
NatSpecMultiLine
_implementation
function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } }
/** * @dev Returns the current implementation. * @return impl Address of the current implementation */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1057, 1246 ] }
4,754
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
/** * @notice This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Upgrad...
NatSpecMultiLine
_upgradeTo
function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); }
/** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1388, 1544 ] }
4,755
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
UpgradeabilityProxy
contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address implementation); /** * @dev Storage slot with the address of the current implementation. * This is t...
/** * @notice This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/Upgrad...
NatSpecMultiLine
_setImplementation
function _setImplementation(address newImplementation) private { require( Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } }
/** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1688, 2036 ] }
4,756
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
admin
function admin() external view returns (address) { return _admin(); }
/** * @return The address of the proxy admin. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1437, 1522 ] }
4,757
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
implementation
function implementation() external view returns (address) { return _implementation(); }
/** * @return The address of the implementation. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1591, 1694 ] }
4,758
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
changeAdmin
function changeAdmin(address newAdmin) external ifAdmin { require( newAdmin != address(0), "Cannot change the admin of a proxy to the zero address" ); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); }
/** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 1879, 2155 ] }
4,759
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
upgradeTo
function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); }
/** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 2348, 2461 ] }
4,760
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
upgradeToAndCall
function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); // prettier-ignore // solhint-disable-next-line avoid-low-level-calls (bool success,) = address(this).call{value: msg.value}(data); // solhint-disa...
/** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3002, 3412 ] }
4,761
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
_admin
function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } }
/** * @return adm The admin slot. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3466, 3628 ] }
4,762
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
_setAdmin
function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } }
/** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3751, 3909 ] }
4,763
FiatTokenProxy
FiatTokenProxy.sol
0x2c9e7a3009f4a1c289a3608067d6f13a39e362d6
Solidity
AdminUpgradeabilityProxy
contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); ...
/** * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev Forked from https://github.com/zeppelinos/zos-lib/blob/8a16ef3ad17ec7430e3a9d2b5e3f39b8204f8c8d/contracts/upgradeability/AdminUpgradeabilityProxy.sol * Modifications: * 1. Reformat, ...
NatSpecMultiLine
_willFallback
function _willFallback() internal override { require( msg.sender != _admin(), "Cannot call fallback function from the proxy admin" ); super._willFallback(); }
/** * @dev Only fall back when the sender is not the admin. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://805b1c87d32334e4682f629e60368cb513ac343a0470ae5bcd139e1141e3ebed
{ "func_code_index": [ 3989, 4203 ] }
4,764
wBTClfBTCLPTokenSharePool
contracts/IRewardDistributionRecipient.sol
0x4db2fa451e1051a013a42fad98b04c2ab81043af
Solidity
wBTClfBTCLPTokenSharePool
contract wBTClfBTCLPTokenSharePool is LPTokenWrapper, IRewardDistributionRecipient, Operator { using SafeMath for uint256; using SafeERC20 for IERC20; address public boardroom; address public share; // lift uint256 public DURATION = 730 days; uint256 public starttime;...
stake
function stake(uint256 amount) public updateReward(msg.sender) { require(amount > 0, 'wBTClkBTCLPTokenSharePool: Cannot stake 0'); super.stake(msg.sender, msg.sender, amount); emit Staked(msg.sender, amount); }
// stake visibility is public as overriding LPTokenWrapper's stake() function
LineComment
v0.7.0+commit.9e61f92b
{ "func_code_index": [ 2627, 2897 ] }
4,765
wBTClfBTCLPTokenSharePool
contracts/IRewardDistributionRecipient.sol
0x4db2fa451e1051a013a42fad98b04c2ab81043af
Solidity
wBTClfBTCLPTokenSharePool
contract wBTClfBTCLPTokenSharePool is LPTokenWrapper, IRewardDistributionRecipient, Operator { using SafeMath for uint256; using SafeERC20 for IERC20; address public boardroom; address public share; // lift uint256 public DURATION = 730 days; uint256 public starttime;...
burnRewards
function burnRewards() external onlyOwner { IBasisAsset(share).burn(IERC20(share).balanceOf(address(this))); }
//EVERY PROJECT I HAVE SEEN HAS A NEED TO NUKE THEIR LP AT SOME POINT
LineComment
v0.7.0+commit.9e61f92b
{ "func_code_index": [ 5328, 5463 ] }
4,766
wBTClfBTCLPTokenSharePool
contracts/IRewardDistributionRecipient.sol
0x4db2fa451e1051a013a42fad98b04c2ab81043af
Solidity
wBTClfBTCLPTokenSharePool
contract wBTClfBTCLPTokenSharePool is LPTokenWrapper, IRewardDistributionRecipient, Operator { using SafeMath for uint256; using SafeERC20 for IERC20; address public boardroom; address public share; // lift uint256 public DURATION = 730 days; uint256 public starttime;...
updateBoardroom
function updateBoardroom(address newBoardroom) external onlyOwner { boardroom = newBoardroom; }
// supports the evolution of the boardroom without ending staking
LineComment
v0.7.0+commit.9e61f92b
{ "func_code_index": [ 5537, 5656 ] }
4,767
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
add
function add( uint256 _allocPoint, IERC20 _token, bool _withUpdate ) external onlyOwner { require(!isTokenAdded(_token), "add: token already added"); if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; ...
// Add a new token to the pool. Can only be called by the owner.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 3183, 3989 ] }
4,768
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
claim
function claim() external{ uint256 i; for (i = 0; i < poolInfo.length; ++i) { updatePool(i); accrueReward(i); UserPoolInfo storage userPool = userPoolInfo[i][msg.sender]; userPool.accruedReward = calcReward(poolInfo[i], userPool); } uint256 unlocked = calcUnlocked(rewards...
// claim rewards
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 5987, 6611 ] }
4,769
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
deposit
function deposit(uint256 _pid, uint256 _amount) external { require(block.number <= endBlock, "LP mining has ended."); updatePool(_pid); accrueReward(_pid); UserPoolInfo storage userPool = userPoolInfo[_pid][msg.sender]; if (_amount > 0) { poolInfo[_pid].token.safeTransferFrom( ...
// Deposit tokens to liquidity mining for reward token allocation.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 6684, 7348 ] }
4,770
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
withdrawEmergency
function withdrawEmergency(uint256 _pid) external { PoolInfo storage pool = poolInfo[_pid]; UserPoolInfo storage userPool = userPoolInfo[_pid][msg.sender]; pool.token.safeTransfer(address(msg.sender), userPool.amount); emit EmergencyWithdrawn(msg.sender, _pid, userPool.amount); userPool.amount = 0; ...
// Withdraw without caring about rewards. EMERGENCY ONLY.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 7412, 7797 ] }
4,771
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
reallocatePool
function reallocatePool( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) external onlyOwner { if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add( _allocPoint ); poolInfo[_pid].allocPoint = _allocPoint; e...
// Update the given pool's reward token allocation point. Can only be called by the owner.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 7894, 8335 ] }
4,772
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
setRewardPerBlock
function setRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner { rewardPerBlock = _rewardPerBlock; emit RewardPerBlockSet(_rewardPerBlock); }
// Set reward per block. Can only be called by the owner.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 8399, 8573 ] }
4,773
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
setUnlocks
function setUnlocks(uint256[] calldata _blocks, uint256[] calldata _quotas) external onlyOwner { require(_blocks.length == _quotas.length, "Should be same length"); for (uint256 i = 0; i < _blocks.length; ++i) { unlocks.push(UnlockInfo(_blocks[i], _quotas[i])); unlocksTotalQuotation = unlocksTot...
// Set unlocks infos - block number and quota.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 8626, 9010 ] }
4,774
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
withdraw
function withdraw(uint256 _pid, uint256 _amount) external { require(userPoolInfo[_pid][msg.sender].amount >= _amount, "withdraw: not enough amount"); updatePool(_pid); accrueReward(_pid); UserPoolInfo storage userPool = userPoolInfo[_pid][msg.sender]; if (_amount > 0) { userPool.amount = use...
// Withdraw tokens from rewardToken liquidity mining.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 9070, 9682 ] }
4,775
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
poolCount
function poolCount() external view returns (uint256) { return poolInfo.length; }
// Number of pools.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 9708, 9804 ] }
4,776
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
massUpdatePools
function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } }
// Update reward variables for all pools. Be careful of gas spending!
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 9979, 10158 ] }
4,777
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
updatePool
function updatePool(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; uint256 currentBlock = block.number; if (currentBlock > endBlock) { currentBlock = endBlock; } if (currentBlock <= pool.lastRewardBlock) { return; } uint256 lpSupply = pool.token.balanceOf(addr...
// Update reward variables of the given pool to be up-to-date.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 10227, 11153 ] }
4,778
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
isTokenAdded
function isTokenAdded(IERC20 _token) public view returns (bool) { uint256 pid = poolPidByAddress[address(_token)]; return poolInfo.length > pid && address(poolInfo[pid].token) == address(_token); }
// Return bool - is token added or not
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 11198, 11443 ] }
4,779
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
_safeRewardTransfer
function _safeRewardTransfer(address _to, uint256 _amount) internal { uint256 balance = rewardToken.balanceOf(address(this)); if (_amount > balance) { rewardToken.transfer(_to, balance); } else { rewardToken.transfer(_to, _amount); } }
// Safe rewardToken transfer function.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 11488, 11787 ] }
4,780
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
setMigrator
function setMigrator(IMigrator _migrator) external onlyOwner { migrator = _migrator; emit MigratorSet(address(_migrator)); }
// Set the migrator contract. Can only be called by the owner.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 11856, 12004 ] }
4,781
LiquidityMining
contracts/LiquidityMining.sol
0x8a5827ad1f28d3f397b748ce89895e437b8ef90d
Solidity
LiquidityMining
contract LiquidityMining is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user per pool. struct UserPoolInfo { uint256 amount; // How many tokens the user has provided. uint256 accruedReward; // Reward accrued. } // Info of each pool. str...
migrate
function migrate(uint256 _pid) external { require(address(migrator) != address(0), "migrate: no migrator"); PoolInfo storage pool = poolInfo[_pid]; IERC20 token = pool.token; uint256 bal = token.balanceOf(address(this)); token.safeApprove(address(migrator), bal); IERC20 newToken = migrator.migra...
// Migrate token to another lp contract. Can be called by anyone.
LineComment
v0.7.6+commit.7338295f
{ "func_code_index": [ 12076, 12718 ] }
4,782
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
__PaymentSplitter_init
function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal initializer { __Context_init_unchained(); __PaymentSplitter_init_unchained(payees, shares_); }
/** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1066, 1280 ] }
4,783
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
/** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn mo...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2215, 2319 ] }
4,784
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalShares
function totalShares() public view returns (uint256) { return _totalShares; }
/** * @dev Getter for the total shares held by payees. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2397, 2493 ] }
4,785
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalReleased
function totalReleased() public view returns (uint256) { return _totalReleased; }
/** * @dev Getter for the total amount of Ether already released. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2582, 2682 ] }
4,786
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
totalReleased
function totalReleased(IERC20Upgradeable token) public view returns (uint256) { return _erc20TotalReleased[token]; }
/** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2834, 2969 ] }
4,787
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
shares
function shares(address account) public view returns (uint256) { return _shares[account]; }
/** * @dev Getter for the amount of shares held by an account. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3055, 3165 ] }
4,788
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
released
function released(address account) public view returns (uint256) { return _released[account]; }
/** * @dev Getter for the amount of Ether already released to a payee. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3259, 3373 ] }
4,789
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
released
function released(IERC20Upgradeable token, address account) public view returns (uint256) { return _erc20Released[token][account]; }
/** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3537, 3688 ] }
4,790
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
payee
function payee(uint256 index) public view returns (address) { return _payees[index]; }
/** * @dev Getter for the address of the payee number `index`. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3774, 3879 ] }
4,791
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
release
function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0,...
/** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4074, 4656 ] }
4,792
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
release
function release(IERC20Upgradeable token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, a...
/** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 4919, 5587 ] }
4,793
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
_pendingPayment
function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; }
/** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 5760, 6013 ] }
4,794
ERC1155PaymentSplitterUAEUpgradeable
contracts/additional/PaymentSplitterUpgradeable.sol
0x14d1170ce870a7dfb5ea570977b2baabd4bdf708
Solidity
PaymentSplitterUpgradeable
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from...
/** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proporti...
NatSpecMultiLine
_addPayee
function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account)...
/** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 6200, 6678 ] }
4,795
SuperXinfinitive
SuperXinfinitive.sol
0x996fa957b5a5d83f29008aa0a11c9a209b3a5d8b
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance);
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://20d65a0a03cfc45c20aadf014a2ddeec63574e380c4b38800f4963200fd094f3
{ "func_code_index": [ 638, 716 ] }
4,796
SuperXinfinitive
SuperXinfinitive.sol
0x996fa957b5a5d83f29008aa0a11c9a209b3a5d8b
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
transfer
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://20d65a0a03cfc45c20aadf014a2ddeec63574e380c4b38800f4963200fd094f3
{ "func_code_index": [ 953, 1035 ] }
4,797
SuperXinfinitive
SuperXinfinitive.sol
0x996fa957b5a5d83f29008aa0a11c9a209b3a5d8b
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://20d65a0a03cfc45c20aadf014a2ddeec63574e380c4b38800f4963200fd094f3
{ "func_code_index": [ 1358, 1459 ] }
4,798
SuperXinfinitive
SuperXinfinitive.sol
0x996fa957b5a5d83f29008aa0a11c9a209b3a5d8b
Solidity
EIP20Interface
contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract sinc...
approve
function approve(address _spender, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://20d65a0a03cfc45c20aadf014a2ddeec63574e380c4b38800f4963200fd094f3
{ "func_code_index": [ 1749, 1835 ] }
4,799