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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | mintToken | function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] = balanceOf[target].add(mintedAmount);
totalSupply = totalSupply.add(mintedAmount);
emit Transfer(0, this, mintedAmount);
emit Transfer(this, target, mintedAmount);
}
| /// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
1978,
2262
]
} | 10,400 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | freezeAccount | function freezeAccount(address target, bool freeze) onlyOwner public {
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
| /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not | NatSpecSingleLine | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
2437,
2591
]
} | 10,401 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | function () payable public {
require(icoEndDate > now);
require(icoStartDate < now);
require(!safeguard);
uint ethervalueWEI=msg.value;
// calculate token amount to be sent
uint256 token = ethervalueWEI.mul(exchangeRate); //weiamount * price
tokensSold = tokensSold.add(token);
_transfer(this, m... | // how many tokens sold through crowdsale
//@dev fallback function, only accepts ether if ICO is running or Reject | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
3109,
3533
]
} | 10,402 | ||
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | forwardEherToOwner | function forwardEherToOwner() internal {
owner.transfer(msg.value);
}
| //Automatocally forwards ether from smart contract to owner address | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
3607,
3687
]
} | 10,403 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | startIco | function startIco(uint256 start,uint256 end, uint256 exchangeRateNew, uint256 TokensAllocationForICO) onlyOwner public {
require(start < end);
uint256 tokenAmount = TokensAllocationForICO.mul(1 ether);
require(balanceOf[msg.sender] > tokenAmount);
icoStartDate=start;
icoEndDate=end;
exchangeRate = exchangeR... | //function to start an ICO.
//It requires: timestamp of start and end date, exchange rate (1 ETH = ? Tokens), and token amounts to allocate for the ICO
//It will transfer allocated amount to the smart contract from Owner | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
3920,
4336
]
} | 10,404 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | stopICO | function stopICO() onlyOwner public{
icoEndDate = 0;
uint256 tokenAmount=balanceOf[this];
_transfer(this, msg.sender, tokenAmount);
}
| //Stops an ICO.
//It will also transfer remaining tokens to owner | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
4431,
4615
]
} | 10,405 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | isICORunning | function isICORunning() public view returns(bool){
if(icoEndDate > now && icoStartDate < now){
return true;
}else{
return false;
}
}
| //function to check wheter ICO is running or not. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
4685,
4924
]
} | 10,406 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | setICOExchangeRate | function setICOExchangeRate(uint256 newExchangeRate) onlyOwner public {
changeRate=newExchangeRate;
}
| //Function to set ICO Exchange rate. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
4982,
5104
]
} | 10,407 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | manualWithdrawToken | function manualWithdrawToken(uint256 _amount) onlyOwner public {
uint256 tokenAmount = _amount.mul(1 ether);
_transfer(this, msg.sender, tokenAmount);
}
| //Just in case, owner wants to transfer Tokens from contract to owner address | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
5202,
5394
]
} | 10,408 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | manualWithdrawEther | function manualWithdrawEther()onlyOwner public{
56 amount=address(this).balance;
.transfer(amount);
| //Just in case, owner wants to transfer Ether from contract to owner address | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
5493,
5624
]
} | 10,409 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | destructContract | function destructContract()onlyOwner public{
selfdestruct(owner);
}
| //selfdestruct function. just in case owner decided to destruct this contract. | LineComment | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
5711,
5788
]
} | 10,410 | |
PAYTOKEN | PAYTOKEN.sol | 0xf987a949e3b7f2bb8528332ac527782ba6f42b4b | Solidity | PAYTOKEN | contract PAYTOKEN is owned, TokenERC20 {
using SafeMath for uint256;
/**********************************/
/* Code for the ERC20 PAYTOKEN */
/**********************************/
// Public variables of the token
string private tokenName = "PAYTOKEN";
string ... | //*******************************************************//
//------------- ADVANCED TOKEN STARTS HERE -------------//
//*******************************************************// | LineComment | changeSafeguardStatus | function changeSafeguardStatus() onlyOwner public{
if (safeguard == false){
afeguard = true;
}
else{
safeguard = false;
}
| /**
* Change safeguard status on or off
*
* When safeguard is true, then all the non-owner functions will stop working.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://b43ea8b9c688ff831e3e0ab912b8224284f8ff3b5a0f866a67d7859c6dbdc811 | {
"func_code_index": [
5959,
6176
]
} | 10,411 | |
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OwnershipRenounced(address indexed previousOwner);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sen... | transferOwnerShip | function transferOwnerShip(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit 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.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
526,
723
]
} | 10,412 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OwnershipRenounced(address indexed previousOwner);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sen... | renounceOwnerShip | function renounceOwnerShip() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
821,
950
]
} | 10,413 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | TokenERC20 | contract TokenERC20 is Ownable {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allow... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// Check if the address is empty
require(_to != address(0));
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value > balanceOf[_to]);
// Save ... | /**
* Internal transfer, only can be called by this contract
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
1472,
2304
]
} | 10,414 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | TokenERC20 | contract TokenERC20 is Ownable {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allow... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* Transfer tokens
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
2502,
2614
]
} | 10,415 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | TokenERC20 | contract TokenERC20 is Ownable {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allow... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* Transfer tokens from other address
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
2881,
3182
]
} | 10,416 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | TokenERC20 | contract TokenERC20 is Ownable {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allow... | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* Set allowance for other address
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
3438,
3659
]
} | 10,417 | ||
TokenERC20 | TokenERC20.sol | 0x0eaf66da21eee374b7e8becae6afef9918186000 | Solidity | TokenERC20 | contract TokenERC20 is Ownable {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allow... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
return true;
}
... | /**
* Set allowance for other address and notify
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send ... | NatSpecMultiLine | v0.5.10+commit.5a6ea5b1 | None | bzzr://09cc86525eef3ca2527ff123368ef12a6bfe88f18df8ffd25fc3a5f40a669964 | {
"func_code_index": [
4045,
4395
]
} | 10,418 | ||
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view virtual returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
399,
491
]
} | 10,419 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1050,
1149
]
} | 10,420 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | Ownable | abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1299,
1496
]
} | 10,421 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryAdd | function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
| /**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
161,
388
]
} | 10,422 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | trySub | function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
| /**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
536,
735
]
} | 10,423 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMul | function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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
... | /**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
885,
1393
]
} | 10,424 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryDiv | function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
| /**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1544,
1744
]
} | 10,425 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | tryMod | function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1905,
2105
]
} | 10,426 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
2347,
2450
]
} | 10,427 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
2728,
2831
]
} | 10,428 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
| /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
3085,
3188
]
} | 10,429 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
3484,
3587
]
} | 10,430 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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 (consu... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
4049,
4152
]
} | 10,431 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | sub | function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterp... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
4626,
4871
]
} | 10,432 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
| /**
* @dev Returns the integer division of two unsigned integers, reverting 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 ... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
5364,
5608
]
} | 10,433 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) ... | /**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/ | NatSpecMultiLine | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
6266,
6510
]
} | 10,434 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
606,
998
]
} | 10,435 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1928,
2250
]
} | 10,436 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
3007,
3187
]
} | 10,437 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
3412,
3646
]
} | 10,438 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
4016,
4281
]
} | 10,439 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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");
require(isContract(target), "Address: call to non-contract");... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
4532,
5047
]
} | 10,440 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
5227,
5431
]
} | 10,441 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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 | functionStaticCall | function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallRe... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
5618,
6018
]
} | 10,442 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
6200,
6405
]
} | 10,443 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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 | functionDelegateCall | function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
6594,
6995
]
} | 10,444 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | 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 | verifyCallResult | function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
... | /**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
7218,
7935
]
} | 10,445 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
94,
154
]
} | 10,446 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
237,
310
]
} | 10,447 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
534,
616
]
} | 10,448 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
895,
983
]
} | 10,449 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
1647,
1726
]
} | 10,450 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
2039,
2175
]
} | 10,451 |
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | ETHCoin | contract ETHCoin is IERC20, Ownable, BaseToken {
using SafeMath for uint256;
using Address for address;
uint256 public constant VERSION = 1;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
10524,
10558
]
} | 10,452 | ||||
ETHCoin | ETHCoin.sol | 0xabc5045a4d0e7184f1f0d11a37f882279e589f29 | Solidity | ETHCoin | contract ETHCoin is IERC20, Ownable, BaseToken {
using SafeMath for uint256;
using Address for address;
uint256 public constant VERSION = 1;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private... | _tokenTransfer | function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
if (!takeFee) removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _is... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.8.7+commit.e28d00a7 | MIT | ipfs://803ba1cb4f318a9aaed69f4d6b49a021d0a2866a10381ccdb21cd208a7fd9aeb | {
"func_code_index": [
19803,
20646
]
} | 10,453 | ||
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | CrestToken | function CrestToken() public {
symbol = "CSTT";
name = "Crest Token";
decimals = 18;
_totalSupply = 12500000 * 10**uint(decimals);
owner = 0x4a17ccd1f0bb40c64919404851e3c5a33c4c3c58;
balances[owner] = _totalSupply;
emit Transfer(address(0), owner, _totalSupply);
}
| // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
671,
1008
]
} | 10,454 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | function() public payable {
revert();
}
| // ------------------------------------------------------------------------
// Reject when someone sends ethers to this contract
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
1241,
1299
]
} | 10,455 | ||
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply;
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
1495,
1588
]
} | 10,456 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
1810,
1935
]
} | 10,457 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
if(balances[msg.sender] >= tokens && tokens > 0 && to != address(0)) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sender, to, tokens);
... | // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
2281,
2683
]
} | 10,458 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
if(tokens > 0 && spender != address(0)) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
} else { return false; }
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
3195,
3505
]
} | 10,459 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
if (balances[from] >= tokens && allowed[from][msg.sender] >= tokens && tokens > 0) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfe... | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
4044,
4540
]
} | 10,460 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
4823,
4975
]
} | 10,461 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| // ------------------------------------------------------------------------
// Increase the amount of tokens that an owner allowed to a spender.
//
// approve should be called when allowed[_spender] == 0. To increment
// allowed value is better to use this function to avoid 2 calls (and wait until
// the first transact... | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
5596,
5881
]
} | 10,462 | |
CrestToken | CrestToken.sol | 0x699a27f71bf580b94b4aeec09b54e264b67f5cce | Solidity | CrestToken | contract CrestToken is ERC20Interface {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and an
// initial fixed supply
// ---------------------------------------------------------------------------- | LineComment | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}... | // ------------------------------------------------------------------------
// Decrease the amount of tokens that an owner allowed to a spender.
//
// approve should be called when allowed[_spender] == 0. To decrement
// allowed value is better to use this function to avoid 2 calls (and wait until
// the first transact... | LineComment | v0.4.23+commit.124ca40d | bzzr://dbfcb0af2a362245280f9db2f52a95ca15bcb7dad8fc7273e111b13f9234035c | {
"func_code_index": [
6507,
6962
]
} | 10,463 | |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
497,
581
]
} | 10,464 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
1139,
1292
]
} | 10,465 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
1442,
1691
]
} | 10,466 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | paused | function paused() public view returns (bool) {
return _paused;
}
| /**
* @dev Returns true if the contract is paused, and false otherwise.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
531,
614
]
} | 10,467 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _pause | function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
| /**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
1321,
1444
]
} | 10,468 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | Pausable | contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev I... | /**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your co... | NatSpecMultiLine | _unpause | function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
| /**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/ | NatSpecMultiLine | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
1580,
1705
]
} | 10,469 |
Sync | Sync.sol | 0xfa85069e3d1ca1b09945cf11d2365386b1e4430a | Solidity | EtherChain | contract EtherChain is Ownable, Destructible, Pausable {
struct User {
uint256 cycle;
address upline;
uint256 referrals;
uint256 payouts;
uint256 direct_bonus;
uint256 pool_bonus;
uint256 match_bonus;
uint256 deposit_amount;
uint256 d... | userInfo | function userInfo(address _addr) view external returns(address upline, uint40 deposit_time, uint256 deposit_amount, uint256 payouts, uint256 direct_bonus, uint256 pool_bonus, uint256 match_bonus) {
return (users[_addr].upline, users[_addr].deposit_time, users[_addr].deposit_amount, users[_addr].payouts, users[_add... | /*
Only external call
*/ | Comment | v0.6.8+commit.0bbfe453 | None | ipfs://3acf27e8be49e88c16dc36ee5295556f6523ac6a7ad967e63ab168f663afa386 | {
"func_code_index": [
10343,
10747
]
} | 10,470 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance);
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
638,
716
]
} | 10,471 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
953,
1035
]
} | 10,472 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1358,
1459
]
} | 10,473 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | approve | function approve(address _spender, uint256 _value) public returns (bool success);
| /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1749,
1835
]
} | 10,474 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining);
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
2043,
2141
]
} | 10,475 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20NonStandardInterface | contract EIP20NonStandardInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base co... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance);
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
649,
727
]
} | 10,476 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20NonStandardInterface | contract EIP20NonStandardInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base co... | transfer | function transfer(address _to, uint256 _value) public;
| ///
/// !!!!!!!!!!!!!!
/// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification
/// !!!!!!!!!!!!!!
///
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether... | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1133,
1192
]
} | 10,477 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20NonStandardInterface | contract EIP20NonStandardInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base co... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public;
| ///
/// !!!!!!!!!!!!!!
/// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification
/// !!!!!!!!!!!!!!
///
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the ... | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1688,
1766
]
} | 10,478 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20NonStandardInterface | contract EIP20NonStandardInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base co... | approve | function approve(address _spender, uint256 _value) public;
| // function approve(address _spender, uint256 _value) public returns (bool success); | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
2146,
2209
]
} | 10,479 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | EIP20NonStandardInterface | contract EIP20NonStandardInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base co... | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining);
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
2417,
2515
]
} | 10,480 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | ErrorReporter | contract ErrorReporter {
/**
* @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
* contract-specific code that enables us to report opaque error codes from upgradeable contracts.
**/
event Failure(uint error, uint info, uint det... | fail | function fail(Error err, FailureInfo info) internal returns (uint) {
emit Failure(uint(err), uint(info), 0);
return uint(err);
}
| /**
* @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
6566,
6724
]
} | 10,481 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | ErrorReporter | contract ErrorReporter {
/**
* @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
* contract-specific code that enables us to report opaque error codes from upgradeable contracts.
**/
event Failure(uint error, uint info, uint det... | failOpaque | function failOpaque(FailureInfo info, uint opaqueError) internal returns (uint) {
emit Failure(uint(Error.OPAQUE_ERROR), uint(info), opaqueError);
return uint(Error.OPAQUE_ERROR);
}
| /**
* @dev use this when reporting an opaque error from an upgradeable collaborator contract
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
6844,
7055
]
} | 10,482 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | InterestRateModel | contract InterestRateModel {
/**
* @notice Gets the current supply interest rate based on the given asset, total cash and total borrows
* @dev The return value should be scaled by 1e18, thus a return value of
* `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per... | getSupplyRate | function getSupplyRate(address asset, uint cash, uint borrows) public view returns (uint, uint);
| /**
* @notice Gets the current supply interest rate based on the given asset, total cash and total borrows
* @dev The return value should be scaled by 1e18, thus a return value of
* `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.
* @param asset The asset to get the inte... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
623,
724
]
} | 10,483 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | InterestRateModel | contract InterestRateModel {
/**
* @notice Gets the current supply interest rate based on the given asset, total cash and total borrows
* @dev The return value should be scaled by 1e18, thus a return value of
* `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per... | getBorrowRate | function getBorrowRate(address asset, uint cash, uint borrows) public view returns (uint, uint);
| /**
* @notice Gets the current borrow interest rate based on the given asset, total cash and total borrows
* @dev The return value should be scaled by 1e18, thus a return value of
* `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.
* @param asset The asset to get the inte... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1318,
1419
]
} | 10,484 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | PriceOracleInterface | contract PriceOracleInterface {
/**
* @notice Gets the price of a given asset
* @dev fetches the price of a given asset
* @param asset Asset to get the price of
* @return the price scaled by 10**18, or zero if the price is not available
*/
function assetPrices(address asse... | assetPrices | function assetPrices(address asset) public view returns (uint);
| /**
* @notice Gets the price of a given asset
* @dev fetches the price of a given asset
* @param asset Asset to get the price of
* @return the price scaled by 10**18, or zero if the price is not available
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
283,
351
]
} | 10,485 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | PriceOracleProxy | contract PriceOracleProxy {
address public mostRecentCaller;
uint public mostRecentBlock;
PriceOracleInterface public realPriceOracle;
constructor(address realPriceOracle_) public {
realPriceOracle = PriceOracleInterface(realPriceOracle_);
}
/**
* @notice Gets the price... | assetPrices | function assetPrices(address asset) public returns (uint) {
mostRecentCaller = tx.origin;
mostRecentBlock = block.number;
return realPriceOracle.assetPrices(asset);
}
| /**
* @notice Gets the price of a given asset
* @dev fetches the price of a given asset
* @param asset Asset to get the price of
* @return the price scaled by 10**18, or zero if the price is not available
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
529,
734
]
} | 10,486 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | SafeToken | contract SafeToken is ErrorReporter {
/**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/
function checkTransferIn(address asset, addre... | checkTransferIn | function checkTransferIn(address asset, address from, uint amount) internal view returns (Error) {
EIP20Interface token = EIP20Interface(asset);
if (token.allowance(from, address(this)) < amount) {
return Error.TOKEN_INSUFFICIENT_ALLOWANCE;
}
if (token.balanceOf(from) < amount) {
... | /**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
271,
717
]
} | 10,487 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | SafeToken | contract SafeToken is ErrorReporter {
/**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/
function checkTransferIn(address asset, addre... | doTransferIn | function doTransferIn(address asset, address from, uint amount) internal returns (Error) {
EIP20NonStandardInterface token = EIP20NonStandardInterface(asset);
bool result;
token.transferFrom(from, address(this), amount);
assembly {
switch returndatasize()
case 0 { ... | /**
* @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and returns an explanatory
* error code rather than reverting. If caller has not called `checkTransferIn`, this may revert due to
* insufficient balance or insufficient allowance. If caller has called `checkTrans... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1426,
2438
]
} | 10,488 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | SafeToken | contract SafeToken is ErrorReporter {
/**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/
function checkTransferIn(address asset, addre... | getCash | function getCash(address asset) internal view returns (uint) {
EIP20Interface token = EIP20Interface(asset);
return token.balanceOf(address(this));
}
| /**
* @dev Checks balance of this contract in asset
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
2515,
2694
]
} | 10,489 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | SafeToken | contract SafeToken is ErrorReporter {
/**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/
function checkTransferIn(address asset, addre... | getBalanceOf | function getBalanceOf(address asset, address from) internal view returns (uint) {
EIP20Interface token = EIP20Interface(asset);
return token.balanceOf(from);
}
| /**
* @dev Checks balance of `from` in `asset`
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
2766,
2955
]
} | 10,490 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | SafeToken | contract SafeToken is ErrorReporter {
/**
* @dev Checks whether or not there is sufficient allowance for this contract to move amount from `from` and
* whether or not `from` has a balance of at least `amount`. Does NOT do a transfer.
*/
function checkTransferIn(address asset, addre... | doTransferOut | function doTransferOut(address asset, address to, uint amount) internal returns (Error) {
EIP20NonStandardInterface token = EIP20NonStandardInterface(asset);
bool result;
token.transfer(to, amount);
assembly {
switch returndatasize()
case 0 { // This ... | /**
* @dev Similar to EIP20 transfer, except it handles a False result from `transfer` and returns an explanatory
* error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to
* insufficient cash held in this contract. If caller has checked protocol's ba... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
3661,
4655
]
} | 10,491 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | CarefulMath | contract CarefulMath is ErrorReporter {
/**
* @dev Multiplies two numbers, returns an error on overflow.
*/
function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a ... | mul | function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a != b) {
return (Error.INTEGER_OVERFLOW, 0);
} else {
return (Error.NO_ERROR, c);
}
}
| /**
* @dev Multiplies two numbers, returns an error on overflow.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
126,
454
]
} | 10,492 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | CarefulMath | contract CarefulMath is ErrorReporter {
/**
* @dev Multiplies two numbers, returns an error on overflow.
*/
function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a ... | div | function div(uint a, uint b) internal pure returns (Error, uint) {
if (b == 0) {
return (Error.DIVISION_BY_ZERO, 0);
}
return (Error.NO_ERROR, a / b);
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
544,
748
]
} | 10,493 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | CarefulMath | contract CarefulMath is ErrorReporter {
/**
* @dev Multiplies two numbers, returns an error on overflow.
*/
function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a ... | sub | function sub(uint a, uint b) internal pure returns (Error, uint) {
if (b <= a) {
return (Error.NO_ERROR, a - b);
} else {
return (Error.INTEGER_UNDERFLOW, 0);
}
}
| /**
* @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
878,
1103
]
} | 10,494 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | CarefulMath | contract CarefulMath is ErrorReporter {
/**
* @dev Multiplies two numbers, returns an error on overflow.
*/
function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a ... | add | function add(uint a, uint b) internal pure returns (Error, uint) {
uint c = a + b;
if (c >= a) {
return (Error.NO_ERROR, c);
} else {
return (Error.INTEGER_OVERFLOW, 0);
}
}
| /**
* @dev Adds two numbers, returns an error on overflow.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1183,
1430
]
} | 10,495 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | CarefulMath | contract CarefulMath is ErrorReporter {
/**
* @dev Multiplies two numbers, returns an error on overflow.
*/
function mul(uint a, uint b) internal pure returns (Error, uint) {
if (a == 0) {
return (Error.NO_ERROR, 0);
}
uint c = a * b;
if (c / a ... | addThenSub | function addThenSub(uint a, uint b, uint c) internal pure returns (Error, uint) {
(Error err0, uint sum) = add(a, b);
if (err0 != Error.NO_ERROR) {
return (err0, 0);
}
return sub(sum, c);
}
| /**
* @dev add a and b and then subtract c
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1494,
1746
]
} | 10,496 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | Exponential | contract Exponential is ErrorReporter, CarefulMath {
// TODO: We may wish to put the result of 10**18 here instead of the expression.
// Per https://solidity.readthedocs.io/en/latest/contracts.html#constant-state-variables
// the optimizer MAY replace the expression 10**18 with its calculated value.
... | getExp | function getExp(uint num, uint denom) pure internal returns (Error, Exp memory) {
(Error err0, uint scaledNumerator) = mul(num, expScale);
if (err0 != Error.NO_ERROR) {
return (err0, Exp({mantissa: 0}));
}
(Error err1, uint rational) = div(scaledNumerator, denom);
if (err1 != Error.N... | /**
* @dev Creates an exponential from numerator and denominator values.
* Note: Returns an error if (`num` * 10e18) > MAX_INT,
* or if `denom` is zero.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
773,
1261
]
} | 10,497 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | Exponential | contract Exponential is ErrorReporter, CarefulMath {
// TODO: We may wish to put the result of 10**18 here instead of the expression.
// Per https://solidity.readthedocs.io/en/latest/contracts.html#constant-state-variables
// the optimizer MAY replace the expression 10**18 with its calculated value.
... | addExp | function addExp(Exp memory a, Exp memory b) pure internal returns (Error, Exp memory) {
(Error error, uint result) = add(a.mantissa, b.mantissa);
return (error, Exp({mantissa: result}));
}
| /**
* @dev Adds two exponentials, returning a new exponential.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1345,
1563
]
} | 10,498 | ||
Liquidator | Liquidator.sol | 0x9893292300c4e530a14fb2526271732a2a9b3f05 | Solidity | Exponential | contract Exponential is ErrorReporter, CarefulMath {
// TODO: We may wish to put the result of 10**18 here instead of the expression.
// Per https://solidity.readthedocs.io/en/latest/contracts.html#constant-state-variables
// the optimizer MAY replace the expression 10**18 with its calculated value.
... | subExp | function subExp(Exp memory a, Exp memory b) pure internal returns (Error, Exp memory) {
(Error error, uint result) = sub(a.mantissa, b.mantissa);
return (error, Exp({mantissa: result}));
}
| /**
* @dev Subtracts two exponentials, returning a new exponential.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://261d473bdc5526bcaaa7e11945778a3ac166d499c0a0a578b8cd2ae71935f52c | {
"func_code_index": [
1652,
1870
]
} | 10,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.