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
FavorUSD
ClaimableOwnable.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
ClaimableOwnable
contract ClaimableOwnable is ProxyStorage { /** * @dev emitted when ownership is transferred * @param previousOwner previous owner of this contract * @param newOwner new owner of this contract */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** ...
/** * @title ClamableOwnable * @dev The ClamableOwnable contract is a copy of Claimable Contract by Zeppelin. * and provides basic authorization control functions. Inherits storage layout of * ProxyStorage. */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { pendingOwner = newOwner; }
/** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1098, 1204 ] }
9,400
FavorUSD
ClaimableOwnable.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
ClaimableOwnable
contract ClaimableOwnable is ProxyStorage { /** * @dev emitted when ownership is transferred * @param previousOwner previous owner of this contract * @param newOwner new owner of this contract */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** ...
/** * @title ClamableOwnable * @dev The ClamableOwnable contract is a copy of Claimable Contract by Zeppelin. * and provides basic authorization control functions. Inherits storage layout of * ProxyStorage. */
NatSpecMultiLine
claimOwnership
function claimOwnership() public onlyPendingOwner { emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); }
/** * @dev Allows the pendingOwner address to finalize the transfer. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1292, 1474 ] }
9,401
CoolFrens
contracts/CoolFrens.sol
0xb9cd19a3e2422dc900c88ecd1fb29a7ad2399941
Solidity
CoolFrens
contract CoolFrens is Ownable, ERC721A, ReentrancyGuard { constructor( uint256 maxBatchSize_, uint256 collectionSize_, uint256 amountForAuctionAndDev_, uint256 amountForDevs_ ) ERC721A("CoolFrens", "CoolFrens", maxBatchSize_, collectionSize_) { require(amountForAuctionAndDev_ <= collect...
isInvalidAccessMessage
function isInvalidAccessMessage( uint8 _v, bytes32 _r, bytes32 _s) view public returns (bool) { bytes32 hash = keccak256(abi.encodePacked(this)); address signAddress = ecrecover( keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)), _v, _r, ...
/* * @dev Verifies if message was signed by owner to give access to _add for this contract. * Assumes Geth signature prefix. * @param _add Address of agent with access * @param _v ECDSA signature parameter v. * @param _r ECDSA signature parameters r. * @param _s ECDSA signature parameters s. * @retu...
Comment
v0.8.7+commit.e28d00a7
MIT
ipfs://ae6fb218b84b9b1766c1e8176fd5d9fa4af34d5595aac14b93f5615a13cf2c79
{ "func_code_index": [ 1442, 1966 ] }
9,402
CoolFrens
contracts/CoolFrens.sol
0xb9cd19a3e2422dc900c88ecd1fb29a7ad2399941
Solidity
CoolFrens
contract CoolFrens is Ownable, ERC721A, ReentrancyGuard { constructor( uint256 maxBatchSize_, uint256 collectionSize_, uint256 amountForAuctionAndDev_, uint256 amountForDevs_ ) ERC721A("CoolFrens", "CoolFrens", maxBatchSize_, collectionSize_) { require(amountForAuctionAndDev_ <= collect...
mint
function mint(uint256 quantity) external payable { require(quantity <= 10, "Cant mint more than 10"); require(totalSupply() + quantity <= 3183, "Sold out"); require(msg.value >= pricePerPublic * quantity, "Not enough Eth"); require(publicLive, "sale not live"); _safeMint(msg.sender, quantity); }
/* * @dev Public Sale Mint * @param quantity Number of NFT's to be minted at 0.06 with a max of 10 per transaction. This is a gas efficient function. */
Comment
v0.8.7+commit.e28d00a7
MIT
ipfs://ae6fb218b84b9b1766c1e8176fd5d9fa4af34d5595aac14b93f5615a13cf2c79
{ "func_code_index": [ 2522, 2849 ] }
9,403
CoolFrens
contracts/CoolFrens.sol
0xb9cd19a3e2422dc900c88ecd1fb29a7ad2399941
Solidity
CoolFrens
contract CoolFrens is Ownable, ERC721A, ReentrancyGuard { constructor( uint256 maxBatchSize_, uint256 collectionSize_, uint256 amountForAuctionAndDev_, uint256 amountForDevs_ ) ERC721A("CoolFrens", "CoolFrens", maxBatchSize_, collectionSize_) { require(amountForAuctionAndDev_ <= collect...
mintWL
function mintWL(uint256 quantity, uint8 _v, bytes32 _r, bytes32 _s) external payable noInvalidAccess(_v, _r, _s){ require(quantity <= 3, "Cant mint more than 3"); require(totalSupply() + quantity <= 3183, "Sold out"); require(msg.value >= pricePerWL * quantity, "Not enough Eth"); require(presaleLive, "sale ...
/* * @dev Verifies if message was signed by owner to give access to this contract. * Assumes Geth signature prefix. * @param quantity Number of NFT's to be minted at 0.04 with a max of 3. This is a gas efficient function. * @param _v ECDSA signature parameter v. * @param _r ECDSA signature parameters r....
Comment
v0.8.7+commit.e28d00a7
MIT
ipfs://ae6fb218b84b9b1766c1e8176fd5d9fa4af34d5595aac14b93f5615a13cf2c79
{ "func_code_index": [ 3526, 4027 ] }
9,404
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 94, 154 ] }
9,405
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 237, 310 ] }
9,406
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 534, 616 ] }
9,407
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 958, 1046 ] }
9,408
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 1710, 1789 ] }
9,409
YFLinkBalancerYCRVRewards
@openzeppelin/contracts/token/ERC20/IERC20.sol
0x01877a9b00ae3c7101525721464f3e5840e07f49
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. Does not include * the optional functions; to access them see {ERC20Detailed}. */
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.5.17+commit.d19bba13
MIT
bzzr://65a743056fd404143f0a496253c8b25cbad227a32a82b92f6085db6ae9b952d3
{ "func_code_index": [ 2102, 2204 ] }
9,410
TEDFarming
contracts/IRewardDistributionRecipient.sol
0x3befe5cb43873f3fdbb148b80df7f0f55e843686
Solidity
TEDFarming
contract TEDFarming is LPTokenWrapper, IRewardDistributionRecipient { IERC20 public rewardToken; uint256 public duration = 30 days; /* Fees breaker, to protect withdraws if anything ever goes wrong */ bool public breaker = false; mapping(address => uint) public farmLock; // period that your s...
farm
function farm(uint256 amount) public updateReward(msg.sender) { require(amount > 0, "Cannot farm 0"); super.farm(amount); farmLock[msg.sender] = lock.add(block.number); emit Farmed(msg.sender, amount); }
// farm visibility is public as overriding LPTokenWrapper's farm() function
LineComment
v0.5.16+commit.9c3226ce
None
bzzr://6efc86e1f2577e0ae346c18ef736b83d32d61055438d355ff87860c30f6bf723
{ "func_code_index": [ 2874, 3123 ] }
9,411
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
merkleRoot
function merkleRoot() external view returns (bytes32);
/** * @dev Function for retrieving the current merkle root. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 759, 817 ] }
9,412
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
token
function token() external view returns (IERC20);
/** * @dev Function for retrieving the token contract address. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 897, 949 ] }
9,413
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
expireTimestamp
function expireTimestamp() external view returns (uint256);
/** * @dev Function for retrieving the expire timestamp of the merkle drop. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1042, 1105 ] }
9,414
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
claimedBitMap
function claimedBitMap(uint256 wordIndex) external view returns (uint256);
/** * @dev Function for checking the claimed bit map. * @param wordIndex - the word index of te bit map. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1231, 1309 ] }
9,415
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
isClaimed
function isClaimed(uint256 index) external view returns (bool);
/** * @dev Function for checking whether the tokens were already claimed. * @param index - the index of the user that is part of the merkle root. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1476, 1543 ] }
9,416
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
claim
function claim( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external;
/** * @dev Function for claiming the tokens to the account address. * @param index - the index of the user that is part of the merkle root. * @param account - the address of the user that is part of the merkle root. * @param amount - the amount of tokens that the user was allocated. * @param merkleProof - an array...
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1957, 2103 ] }
9,417
MerkleDrop
contracts/interfaces/IMerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
IMerkleDrop
interface IMerkleDrop { /** * @dev Event for tracking token claims. * @param account - the address of the user that has claimed the tokens. * @param index - the index of the user that has claimed the tokens. * @param amount - the amount of tokens that the user has claimed. */ event Claimed(u...
/** * @dev Interface of the MerkleDrop contract. * Allows anyone to claim a token if they exist in a merkle root. */
NatSpecMultiLine
stop
function stop(address beneficiary) external;
/** * @dev Function for stopping the expired merkle drop. Can only be called by the contract owner. * @param beneficiary - the address of the beneficiary where the left tokens will be transferred. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 2321, 2369 ] }
9,418
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 649, 829 ] }
9,419
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1089, 1227 ] }
9,420
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1547, 1738 ] }
9,421
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1974, 2437 ] }
9,422
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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 revert (co...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 2888, 3022 ] }
9,423
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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 invalid ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 3533, 3875 ] }
9,424
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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 (consuming all...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 4315, 4447 ] }
9,425
FavorUSD
SafeMath.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
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 opcode to r...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 4947, 5114 ] }
9,426
MerkleDrop
contracts/merkles/MerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
MerkleDrop
contract MerkleDrop is IMerkleDrop, Ownable { using SafeERC20 for IERC20; // @dev Address of the token contract. IERC20 public immutable override token; // @dev Merkle Root for proving tokens ownership. bytes32 public immutable override merkleRoot; // @dev Expire timestamp for te merkle drop....
/** * @title MerkleDrop * * @dev MerkleDrop contract allows users to claim their tokens by proving that they're part of the merkle tree. * Adopted from https://github.com/Uniswap/merkle-distributor/blob/0d478d722da2e5d95b7292fd8cbdb363d98e9a93/contracts/MerkleDistributor.sol */
NatSpecMultiLine
isClaimed
function isClaimed(uint256 index) public view override returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; }
/** * @dev See {IMerkleDrop-isClaimed}. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1154, 1483 ] }
9,427
MerkleDrop
contracts/merkles/MerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
MerkleDrop
contract MerkleDrop is IMerkleDrop, Ownable { using SafeERC20 for IERC20; // @dev Address of the token contract. IERC20 public immutable override token; // @dev Merkle Root for proving tokens ownership. bytes32 public immutable override merkleRoot; // @dev Expire timestamp for te merkle drop....
/** * @title MerkleDrop * * @dev MerkleDrop contract allows users to claim their tokens by proving that they're part of the merkle tree. * Adopted from https://github.com/Uniswap/merkle-distributor/blob/0d478d722da2e5d95b7292fd8cbdb363d98e9a93/contracts/MerkleDistributor.sol */
NatSpecMultiLine
claim
function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override { require(!isClaimed(index), "MerkleDrop: drop already claimed"); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(m...
/** * @dev See {IMerkleDrop-claim}. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 1790, 2363 ] }
9,428
MerkleDrop
contracts/merkles/MerkleDrop.sol
0x2aab6822a1a9f982fd7b0fe35a5a5b6148ecf4d5
Solidity
MerkleDrop
contract MerkleDrop is IMerkleDrop, Ownable { using SafeERC20 for IERC20; // @dev Address of the token contract. IERC20 public immutable override token; // @dev Merkle Root for proving tokens ownership. bytes32 public immutable override merkleRoot; // @dev Expire timestamp for te merkle drop....
/** * @title MerkleDrop * * @dev MerkleDrop contract allows users to claim their tokens by proving that they're part of the merkle tree. * Adopted from https://github.com/Uniswap/merkle-distributor/blob/0d478d722da2e5d95b7292fd8cbdb363d98e9a93/contracts/MerkleDistributor.sol */
NatSpecMultiLine
stop
function stop(address beneficiary) external override onlyOwner { require(beneficiary != address(0), "MerkleDrop: beneficiary is the zero address"); // solhint-disable-next-line not-rely-on-time require(block.timestamp >= expireTimestamp, "MerkleDrop: not expired"); uint256 amount = token.balanceOf(addre...
/** * @dev See {IMerkleDrop-stop}. */
NatSpecMultiLine
v0.7.5+commit.eb77ed08
{ "func_code_index": [ 2417, 2865 ] }
9,429
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; address private _contractDeployer = address(0x4286e7eD9BDee5735a0664eC1A44bf5438C4418C); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deplo...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 493, 585 ] }
9,430
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; address private _contractDeployer = address(0x4286e7eD9BDee5735a0664eC1A44bf5438C4418C); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deplo...
/** * @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 { _setOwner(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 1191, 1290 ] }
9,431
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; address private _contractDeployer = address(0x4286e7eD9BDee5735a0664eC1A44bf5438C4418C); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deplo...
/** * @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"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 1440, 1637 ] }
9,432
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
tryRecover
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 6...
/** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lo...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 1913, 3226 ] }
9,433
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
recover
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; }
/** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half ord...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 4023, 4259 ] }
9,434
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
tryRecover
function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRec...
/** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 4517, 4913 ] }
9,435
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
recover
function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; }
/** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 5080, 5345 ] }
9,436
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
tryRecover
function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ether...
/** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 5522, 7156 ] }
9,437
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
recover
function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; }
/** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 7290, 7574 ] }
9,438
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
toEthSignedMessageHash
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); }
/** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 7869, 8143 ] }
9,439
CRYPTOTYCOON
@openzeppelin/contracts/access/Ownable.sol
0xde5b5d5878688dc158591820f63d56de236f5afb
Solidity
ECDSA
library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no err...
/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */
NatSpecMultiLine
toTypedDataHash
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); }
/** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
GNU LGPLv3
ipfs://dc5b7c3a7dc3484e40b87fe833551260652d502eee314634c7d053e4c3cf7581
{ "func_code_index": [ 8488, 8689 ] }
9,440
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 649, 829 ] }
9,441
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1089, 1227 ] }
9,442
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
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. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1547, 1738 ] }
9,443
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1974, 2437 ] }
9,444
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
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 revert (co...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 2888, 3022 ] }
9,445
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
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 invalid ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 3533, 3875 ] }
9,446
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
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 (consuming all...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 4315, 4447 ] }
9,447
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
SafeMath
library SafeMath { function min(uint x, uint y) internal pure returns (uint z) { return x <= y ? x : y; } function max(uint x, uint y) internal pure returns (uint z) { return x >= y ? x : y; } function imin(int x, int y) internal pure returns (int z) { return x <= y ? x : y; ...
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 opcode to r...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 4947, 5114 ] }
9,448
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
mint
function mint(address account, uint256 amount) external onlyOwner { require(!isBlacklisted[account], "FavorCurrency: account is blacklisted"); require(!isRedemptionAddress(account), "FavorCurrency: account is a redemption address"); _mint(account, amount); emit Mint(account, amount); }
/** * @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * @param account address to mint tokens for * @param amount amount of tokens to be minted * * Emits a {Mint} event * * Requirements * * - `account` cannot be the zero address. * - `account` cannot be blacklisted....
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 980, 1306 ] }
9,449
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
setBlacklisted
function setBlacklisted(address account, bool _isBlacklisted) external onlyOwner { require(uint160(account) >= REDEMPTION_ADDRESS_COUNT, "FavorCurrency: blacklisting of redemption address is not allowed"); isBlacklisted[account] = _isBlacklisted; emit Blacklisted(account, _isBlacklisted); }
/** * @dev Set blacklisted status for the account. * @param account address to set blacklist flag for * @param _isBlacklisted blacklist flag value * * Requirements: * * - `msg.sender` should be owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 1556, 1879 ] }
9,450
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
setCanBurn
function setCanBurn(address account, bool _canBurn) external onlyOwner { canBurn[account] = _canBurn; }
/** * @dev Set canBurn status for the account. * @param account address to set canBurn flag for * @param _canBurn canBurn flag value * * Requirements: * * - `msg.sender` should be owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 2115, 2234 ] }
9,451
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { require(!isBlacklisted[sender], "FavorCurrency: sender is blacklisted"); require(!isBlacklisted[recipient], "FavorCurrency: recipient is blacklisted"); if (isRedemptionAddress(recipient)) { ...
/** * @dev Check if neither account is blacklisted before performing transfer * If transfer recipient is a redemption address, burns tokens * @notice Transfer to redemption address will burn tokens with a 1 cent precision * @param sender address of sender * @param recipient address of recipient * @param amount am...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 2619, 3192 ] }
9,452
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
_approve
function _approve( address owner, address spender, uint256 amount ) internal override { require(!isBlacklisted[owner], "FavorCurrency: tokens owner is blacklisted"); require(!isBlacklisted[spender] || amount == 0, "FavorCurrency: tokens spender is blacklisted"); super._approve(owner, spender, a...
/** * @dev Requere neither accounts to be blacklisted before approval * @param owner address of owner giving approval * @param spender address of spender to approve for * @param amount amount of tokens to approve */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 3439, 3804 ] }
9,453
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal override { require(canBurn[account], "FavorCurrency: cannot burn from this address"); super._burn(account, amount); }
/** * @dev Check if tokens can be burned at address before burning * @param account account to burn tokens from * @param amount amount of tokens to burn */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 3986, 4184 ] }
9,454
FavorUSD
FavorCurrency.sol
0xe59d7e8bdc197aaa626e154020e149a14faca03b
Solidity
FavorCurrency
abstract contract FavorCurrency is BurnableTokenWithBounds { using SafeMath for uint256; uint256 constant CENT = 10**16; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; /** * @dev Emitted when account blacklist status changes */ event Blacklisted(address indexed account, bool isBlack...
/** * @title FavorCurrency * @dev FavorCurrency is an ERC20 with blacklist & redemption addresses * * FavorCurrency is a compliant stablecoin with blacklist and redemption * addresses. Only the owner can blacklist accounts. Redemption addresses * are assigned automatically to the first 0x100000 addresses. Sending...
NatSpecMultiLine
isRedemptionAddress
function isRedemptionAddress(address account) internal pure returns (bool) { return uint160(account) < uint160(REDEMPTION_ADDRESS_COUNT) && uint160(account) != 0; }
/** * @dev First 0x100000-1 addresses (0x0000000000000000000000000000000000000001 to 0x00000000000000000000000000000000000fffff) * are the redemption addresses. * @param account address to check is a redemption address * * All transfers to redemption address will trigger token burn. * * @notice For transfer to s...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://ab27100e8b3558a4e8d3f0d334f675339a375af40333a549acb1b2f03ffab0a0
{ "func_code_index": [ 4654, 4834 ] }
9,455
CompoundLens
contracts/Governance/GovernorAlpha.sol
0xd513d22422a3062bd342ae374b4b9c20e0a9a074
Solidity
GovernorAlpha
contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Compound Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { ret...
quorumVotes
function quorumVotes() public pure returns (uint) { return 400000e18; } // 400,000 = 4% of Comp
/// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
NatSpecSingleLine
v0.5.16+commit.9c3226ce
None
{ "func_code_index": [ 261, 360 ] }
9,456
CompoundLens
contracts/Governance/GovernorAlpha.sol
0xd513d22422a3062bd342ae374b4b9c20e0a9a074
Solidity
GovernorAlpha
contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Compound Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { ret...
proposalThreshold
function proposalThreshold() public pure returns (uint) { return 100000e18; } // 100,000 = 1% of Comp
/// @notice The number of votes required in order for a voter to become a proposer
NatSpecSingleLine
v0.5.16+commit.9c3226ce
None
{ "func_code_index": [ 449, 554 ] }
9,457
CompoundLens
contracts/Governance/GovernorAlpha.sol
0xd513d22422a3062bd342ae374b4b9c20e0a9a074
Solidity
GovernorAlpha
contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Compound Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { ret...
proposalMaxOperations
function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions
/// @notice The maximum number of actions that can be included in a proposal
NatSpecSingleLine
v0.5.16+commit.9c3226ce
None
{ "func_code_index": [ 637, 729 ] }
9,458
CompoundLens
contracts/Governance/GovernorAlpha.sol
0xd513d22422a3062bd342ae374b4b9c20e0a9a074
Solidity
GovernorAlpha
contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Compound Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { ret...
votingDelay
function votingDelay() public pure returns (uint) { return 1; } // 1 block
/// @notice The delay before voting on a proposal may take place, once proposed
NatSpecSingleLine
v0.5.16+commit.9c3226ce
None
{ "func_code_index": [ 815, 893 ] }
9,459
CompoundLens
contracts/Governance/GovernorAlpha.sol
0xd513d22422a3062bd342ae374b4b9c20e0a9a074
Solidity
GovernorAlpha
contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Compound Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { ret...
votingPeriod
function votingPeriod() public pure returns (uint) { return 17280; } // ~3 days in blocks (assuming 15s blocks)
/// @notice The duration of voting on a proposal, in blocks
NatSpecSingleLine
v0.5.16+commit.9c3226ce
None
{ "func_code_index": [ 959, 1074 ] }
9,460
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 89, 476 ] }
9,461
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 560, 840 ] }
9,462
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 954, 1070 ] }
9,463
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://githu...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 1134, 1264 ] }
9,464
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
isOwner
function isOwner(address _who) public view returns (bool) { return owners[_who]; }
/// @notice Look up for the owner role on providen address /// @param _who is address to look up /// @return A boolean of owner role
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 1494, 1587 ] }
9,465
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
isMinter
function isMinter(address _who) public view returns (bool) { return minters[_who]; }
/// @notice Look up for the minter role on providen address /// @param _who is address to look up /// @return A boolean of minter role
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 1734, 1829 ] }
9,466
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
addOwner
function addOwner(address _who) public onlyOwner returns (bool) { _setOwner(_who, true); }
/// @notice Adds the owner role to provided address /// @dev Requires owner role to interact /// @param _who is address to add role /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 2046, 2147 ] }
9,467
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
deleteOwner
function deleteOwner(address _who) public onlyOwner returns (bool) { _setOwner(_who, false); }
/// @notice Deletes the owner role to provided address /// @dev Requires owner role to interact /// @param _who is address to delete role /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 2370, 2475 ] }
9,468
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
addMinter
function addMinter(address _who) public onlyOwner returns (bool) { _setMinter(_who, true); }
/// @notice Adds the minter role to provided address /// @dev Requires owner role to interact /// @param _who is address to add role /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 2693, 2796 ] }
9,469
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
deleteMinter
function deleteMinter(address _who) public onlyOwner returns (bool) { _setMinter(_who, false); }
/// @notice Deletes the minter role to provided address /// @dev Requires owner role to interact /// @param _who is address to delete role /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 3020, 3127 ] }
9,470
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
_setOwner
function _setOwner(address _who, bool _flag) private returns (bool) { require(owners[_who] != _flag); owners[_who] = _flag; if (_flag) { emit AddOwner(_who); } else { emit DeleteOwner(_who); } return true; }
/// @notice Changes the owner role to provided address /// @param _who is address to change role /// @param _flag is next role status after success /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 3360, 3617 ] }
9,471
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
RBACMixin
contract RBACMixin { /// @notice Constant string message to throw on lack of access string constant FORBIDDEN = "Haven't enough right to access"; /// @notice Public map of owners mapping (address => bool) public owners; /// @notice Public map of minters mapping (address => bool) public minters; /...
/// @title Role based access control mixin for Rasmart Platform /// @author Abha Mai <maiabha82@gmail.com> /// @dev Ignore DRY approach to achieve readability
NatSpecSingleLine
_setMinter
function _setMinter(address _who, bool _flag) private returns (bool) { require(minters[_who] != _flag); minters[_who] = _flag; if (_flag) { emit AddMinter(_who); } else { emit DeleteMinter(_who); } return true; }
/// @notice Changes the minter role to provided address /// @param _who is address to change role /// @param _flag is next role status after success /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 3851, 4113 ] }
9,472
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
PlatformBucket
contract PlatformBucket is RBACMixin, IMintableToken { using SafeMath for uint; /// @notice Limit maximum amount of available for minting tokens when bucket is full /// @dev Should be enough to mint tokens with proper speed but less enough to prevent overminting in case of losing pkey uint256 public size;...
/// @title Very simplified implementation of Token Bucket Algorithm to secure token minting /// @author Abha Mai <maiabha82@gmail.com> /// @notice Works with tokens implemented Mintable interface /// @dev Transfer ownership/minting role to contract and execute mint over PlatformBucket proxy to secure
NatSpecSingleLine
setSize
function setSize(uint256 _size) public onlyOwner returns (bool) { size = _size; return true; }
/// @notice Change size of bucket /// @dev Require owner role to call /// @param _size is new size of bucket /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 1658, 1768 ] }
9,473
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
PlatformBucket
contract PlatformBucket is RBACMixin, IMintableToken { using SafeMath for uint; /// @notice Limit maximum amount of available for minting tokens when bucket is full /// @dev Should be enough to mint tokens with proper speed but less enough to prevent overminting in case of losing pkey uint256 public size;...
/// @title Very simplified implementation of Token Bucket Algorithm to secure token minting /// @author Abha Mai <maiabha82@gmail.com> /// @notice Works with tokens implemented Mintable interface /// @dev Transfer ownership/minting role to contract and execute mint over PlatformBucket proxy to secure
NatSpecSingleLine
setRate
function setRate(uint256 _rate) public onlyOwner returns (bool) { rate = _rate; return true; }
/// @notice Change refill rate of bucket /// @dev Require owner role to call /// @param _rate is new refill rate of bucket /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 1976, 2086 ] }
9,474
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
PlatformBucket
contract PlatformBucket is RBACMixin, IMintableToken { using SafeMath for uint; /// @notice Limit maximum amount of available for minting tokens when bucket is full /// @dev Should be enough to mint tokens with proper speed but less enough to prevent overminting in case of losing pkey uint256 public size;...
/// @title Very simplified implementation of Token Bucket Algorithm to secure token minting /// @author Abha Mai <maiabha82@gmail.com> /// @notice Works with tokens implemented Mintable interface /// @dev Transfer ownership/minting role to contract and execute mint over PlatformBucket proxy to secure
NatSpecSingleLine
setSizeAndRate
function setSizeAndRate(uint256 _size, uint256 _rate) public onlyOwner returns (bool) { return setSize(_size) && setRate(_rate); }
/// @notice Change size and refill rate of bucket /// @dev Require owner role to call /// @param _size is new size of bucket /// @param _rate is new refill rate of bucket /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 2345, 2486 ] }
9,475
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
PlatformBucket
contract PlatformBucket is RBACMixin, IMintableToken { using SafeMath for uint; /// @notice Limit maximum amount of available for minting tokens when bucket is full /// @dev Should be enough to mint tokens with proper speed but less enough to prevent overminting in case of losing pkey uint256 public size;...
/// @title Very simplified implementation of Token Bucket Algorithm to secure token minting /// @author Abha Mai <maiabha82@gmail.com> /// @notice Works with tokens implemented Mintable interface /// @dev Transfer ownership/minting role to contract and execute mint over PlatformBucket proxy to secure
NatSpecSingleLine
mint
function mint(address _to, uint256 _amount) public onlyMinter returns (bool) { uint256 available = availableTokens(); require(_amount <= available); leftOnLastMint = available.sub(_amount); lastMintTime = now; // solium-disable-line security/no-block-members require(token.mint(_to, _amount)); return t...
/// @notice Function to mint tokens /// @param _to The address that will receive the minted tokens. /// @param _amount The amount of tokens to mint. /// @return A boolean that indicates if the operation was successful.
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 2720, 3064 ] }
9,476
PlatformBucket
PlatformBucket.sol
0xa8550944706f8c6dc51a71f6b8ee29826468c0a9
Solidity
PlatformBucket
contract PlatformBucket is RBACMixin, IMintableToken { using SafeMath for uint; /// @notice Limit maximum amount of available for minting tokens when bucket is full /// @dev Should be enough to mint tokens with proper speed but less enough to prevent overminting in case of losing pkey uint256 public size;...
/// @title Very simplified implementation of Token Bucket Algorithm to secure token minting /// @author Abha Mai <maiabha82@gmail.com> /// @notice Works with tokens implemented Mintable interface /// @dev Transfer ownership/minting role to contract and execute mint over PlatformBucket proxy to secure
NatSpecSingleLine
availableTokens
function availableTokens() public view returns (uint) { // solium-disable-next-line security/no-block-members uint256 timeAfterMint = now.sub(lastMintTime); uint256 refillAmount = rate.mul(timeAfterMint).add(leftOnLastMint); return size < refillAmount ? size : refillAmount; }
/// @notice Function to calculate and get available in bucket tokens /// @return An amount of available tokens in bucket
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://e8222a9f0fd59b8113ff1346a3cba13133854607afc7942535e47e52ed741f17
{ "func_code_index": [ 3194, 3497 ] }
9,477
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
OnliCoinToken
function OnliCoinToken() public { symbol = "OCT"; name = "OnliCoin Token"; decimals = 18; _totalSupply = 88888888000000000000000000; balances[0x9455680b53FbF52f59Cc199122ad8a586878186E] = _totalSupply; Transfer(address(0), 0x9455680b53FbF52f59Cc199122ad8a586878186E, _totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 460, 807 ] }
9,478
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 995, 1116 ] }
9,479
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 1336, 1465 ] }
9,480
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 1809, 2086 ] }
9,481
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 2594, 2802 ] }
9,482
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 3333, 3691 ] }
9,483
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 3974, 4130 ] }
9,484
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 4485, 4802 ] }
9,485
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 4994, 5053 ] }
9,486
OnliCoinToken
OnliCoinToken.sol
0xd6658bc6b09286a298f4367c951f9ad1da8141d9
Solidity
OnliCoinToken
contract OnliCoinToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.23-nightly.2018.4.19+commit.ae834e3d
bzzr://17bef0c3a8a22ba191c68a6c9da070994cec6db19665f813e728c9fb3cd58f80
{ "func_code_index": [ 5286, 5475 ] }
9,487
PrePaid
@animoca/ethereum-contracts-core_library/contracts/access/WhitelistedOperators.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
WhitelistedOperators
contract WhitelistedOperators is Ownable { mapping(address => bool) internal _whitelistedOperators; event WhitelistedOperator(address operator, bool enabled); /// @notice Enable or disable address operator access /// @param operator address that will be given/removed operator right. /// @...
whitelistOperator
function whitelistOperator(address operator, bool enabled) external onlyOwner { _whitelistedOperators[operator] = enabled; emit WhitelistedOperator(operator, enabled); }
/// @notice Enable or disable address operator access /// @param operator address that will be given/removed operator right. /// @param enabled set whether the operator is enabled or disabled.
NatSpecSingleLine
v0.6.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 384, 581 ] }
9,488
PrePaid
@animoca/ethereum-contracts-core_library/contracts/access/WhitelistedOperators.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
WhitelistedOperators
contract WhitelistedOperators is Ownable { mapping(address => bool) internal _whitelistedOperators; event WhitelistedOperator(address operator, bool enabled); /// @notice Enable or disable address operator access /// @param operator address that will be given/removed operator right. /// @...
isOperator
function isOperator(address who) public view returns (bool) { return _whitelistedOperators[who]; }
/// @notice check whether address `who` is given operator rights. /// @param who The address to query. /// @return whether the address is whitelisted operator
NatSpecSingleLine
v0.6.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 758, 875 ] }
9,489
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 662, 722 ] }
9,490
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 805, 878 ] }
9,491
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 1102, 1184 ] }
9,492
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 1463, 1551 ] }
9,493
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 2215, 2294 ] }
9,494
PrePaid
@animoca/ethereum-contracts-erc20_base/contracts/token/ERC20/IERC20.sol
0x590df9dc51ea5e1c7a93e61f1a973cea1fc730b8
Solidity
IERC20
interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer( address indexed _from, address indexed _to, uint256 _value ); /** ...
/** * @dev 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.8+commit.0bbfe453
MIT
ipfs://76837e53ae3de2f335dc63db9411b9cee342d7b69eed8996a4928ce505ae018d
{ "func_code_index": [ 2607, 2709 ] }
9,495
ovatel
ovatel.sol
0x22581e0198ed6ea34d438148a106903f5fb846c0
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://1843f3b3f57f4c854536dd3b78bc5e57d051cfa15f97a983dd71a0ac4c79a2d0
{ "func_code_index": [ 60, 124 ] }
9,496
ovatel
ovatel.sol
0x22581e0198ed6ea34d438148a106903f5fb846c0
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://1843f3b3f57f4c854536dd3b78bc5e57d051cfa15f97a983dd71a0ac4c79a2d0
{ "func_code_index": [ 232, 309 ] }
9,497
ovatel
ovatel.sol
0x22581e0198ed6ea34d438148a106903f5fb846c0
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) 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.24+commit.e67f0147
bzzr://1843f3b3f57f4c854536dd3b78bc5e57d051cfa15f97a983dd71a0ac4c79a2d0
{ "func_code_index": [ 546, 623 ] }
9,498
ovatel
ovatel.sol
0x22581e0198ed6ea34d438148a106903f5fb846c0
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) 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.24+commit.e67f0147
bzzr://1843f3b3f57f4c854536dd3b78bc5e57d051cfa15f97a983dd71a0ac4c79a2d0
{ "func_code_index": [ 946, 1042 ] }
9,499