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
Bleeps
src/base/ERC721BaseWithERC4494Permit.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
ERC721BaseWithERC4494Permit
abstract contract ERC721BaseWithERC4494Permit is ERC721Base { using Address for address; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_FOR_ALL_TYPEHASH = keccak256("PermitForAll(a...
supportsInterface
function supportsInterface(bytes4 id) public pure virtual override returns (bool) { return super.supportsInterface(id) || id == type(IERC4494).interfaceId || id == type(IERC4494Alternative).interfaceId; }
/// @notice Check if the contract supports an interface. /// @param id The id of the interface. /// @return Whether the interface is supported.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3122, 3378 ] }
2,300
Bleeps
src/base/ERC721BaseWithERC4494Permit.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
ERC721BaseWithERC4494Permit
abstract contract ERC721BaseWithERC4494Permit is ERC721Base { using Address for address; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_FOR_ALL_TYPEHASH = keccak256("PermitForAll(a...
_requireValidPermit
function _requireValidPermit( address signer, address spender, uint256 id, uint256 deadline, uint256 nonce, bytes memory sig ) internal view { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", _DOMAIN_SEPARATOR(), keccak256(abi.encode(PERMI...
// -------------------------------------------------------- INTERNAL --------------------------------------------------------------------
LineComment
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3523, 4065 ] }
2,301
Bleeps
src/base/ERC721BaseWithERC4494Permit.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
ERC721BaseWithERC4494Permit
abstract contract ERC721BaseWithERC4494Permit is ERC721Base { using Address for address; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_FOR_ALL_TYPEHASH = keccak256("PermitForAll(a...
_DOMAIN_SEPARATOR
function _DOMAIN_SEPARATOR() internal view returns (bytes32) { uint256 chainId; //solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } // in case a fork happen, to support the chain that had to change its chainId,, we compute the domain operator return chainId ...
/// @dev Return the DOMAIN_SEPARATOR.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 4643, 5089 ] }
2,302
Bleeps
src/base/ERC721BaseWithERC4494Permit.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
ERC721BaseWithERC4494Permit
abstract contract ERC721BaseWithERC4494Permit is ERC721Base { using Address for address; bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_FOR_ALL_TYPEHASH = keccak256("PermitForAll(a...
_calculateDomainSeparator
function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), chainId, address(this))); }
/// @dev Calculate the DOMAIN_SEPARATOR.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 5136, 5335 ] }
2,303
ApusToken
ApusToken.sol
0xbeb100a5970f75abb77031cc1832b4c934a0c1be
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://f1b70a6ff9d4103b0deeac5cc94a5a1992d09777605071e824251ac071f1e234
{ "func_code_index": [ 179, 240 ] }
2,304
ApusToken
ApusToken.sol
0xbeb100a5970f75abb77031cc1832b4c934a0c1be
Solidity
Ownable
contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. ...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner { require(newOwner != address(0)); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://f1b70a6ff9d4103b0deeac5cc94a5a1992d09777605071e824251ac071f1e234
{ "func_code_index": [ 589, 726 ] }
2,305
ApusToken
ApusToken.sol
0xbeb100a5970f75abb77031cc1832b4c934a0c1be
Solidity
ApusToken
contract ApusToken is ERC20,StakeStandard,Ownable { using SafeMath for uint256; string public name = "Apus Token"; string public symbol = "APUS"; uint public decimals = 18; uint public chainStartTime; uint public chainStartBlockNumber; uint public stakeStartTime; uint public ...
batchTransfer
function batchTransfer(address[] _recipients, uint[] _values) onlyOwner returns (bool) { require( _recipients.length > 0 && _recipients.length == _values.length); uint total = 0; for(uint i = 0; i < _values.length; i++){ total = total.add(_values[i]); } require(total <= balances[msg....
/* Batch token transfer. Used by contract creator to distribute initial tokens to holders */
Comment
v0.4.18+commit.9cf6e910
bzzr://f1b70a6ff9d4103b0deeac5cc94a5a1992d09777605071e824251ac071f1e234
{ "func_code_index": [ 7030, 8028 ] }
2,306
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
owned
contract owned { address public owner; //*** OwnershipTransferred ***// event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function owned() public { owner = msg.sender; } //*** Change Owner ***// function changeOwner(address newOwner) onlyOwner publi...
//*** Owner ***//
LineComment
changeOwner
function changeOwner(address newOwner) onlyOwner public { owner = newOwner; }
//*** Change Owner ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 265, 349 ] }
2,307
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
owned
contract owned { address public owner; //*** OwnershipTransferred ***// event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function owned() public { owner = msg.sender; } //*** Change Owner ***// function changeOwner(address newOwner) onlyOwner publi...
//*** Owner ***//
LineComment
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
//*** Transfer OwnerShip ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 392, 584 ] }
2,308
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
function() payable public { require(msg.value>0); require(msg.sender != 0x0); uint256 weiAmount; uint256 tokens; wallet=owner; if(isPreSale()){ wallet=preSaleAddress; weiAmount=6000; } else if(isIco()){ wallet=icoAddress; ...
//*** Payable ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 2198, 3487 ] }
2,309
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { if(transfersEnabled){ require(balanceOf[_to] >= _value); // Subtract from the sender balanceOf[msg.sender] = (balanceOf[msg.sender] -_value); balanceOf[_to] =(balanceOf[_to] + _value); Transfer(msg.sende...
/* Send coins */
Comment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 3510, 3933 ] }
2,310
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { if(transfersEnabled){ // Check if the sender has enough require(balanceOf[_from] >= _value); // Check allowed require(_value <= allowed[_from][msg.sender]); // Subtract from the send...
//*** Transfer From ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 3964, 4630 ] }
2,311
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
transferOwner
function transferOwner(address _to,uint256 _value) public onlyOwner returns(bool success){ // Subtract from the sender totalSupply=(totalSupply-_value); // Add the same to the recipient balanceOf[_to] = (balanceOf[_to] + _value); Transfer(this, _to, _value); }
//*** Transfer OnlyOwner ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 4667, 4952 ] }
2,312
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
allowance
function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { return allowed[_owner][_spender]; }
//*** Allowance ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 4980, 5121 ] }
2,313
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
//*** Approve ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 5147, 5337 ] }
2,314
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
burnOwner
function burnOwner(uint256 _value) public onlyOwner returns (bool success) { destroyOwner(msg.sender, _value); Burn(msg.sender, _value); return true; }
//*** Burn Owner***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 5365, 5529 ] }
2,315
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
destroyOwner
function destroyOwner(address _from, uint256 _amount) public onlyOwner{ balanceOf[_from] =(balanceOf[_from] - _amount); totalSupply = (totalSupply - _amount); Transfer(_from, this, _amount); Destruction(_amount); }
//*** Destroy Owner ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 5561, 5794 ] }
2,316
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
killBalance
function killBalance(uint256 _value) onlyOwner public { if(this.balance > 0) { if(_value==1){ preSaleAddress.transfer(this.balance); balanceOf[this]=0; } else if(_value==2){ icoAddress.transfer(this.balance); balanceOf[this]=0; } else{ o...
//*** Kill Balance ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 5825, 6313 ] }
2,317
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
killTokens
function killTokens() onlyOwner public{ Transfer(this, bountyAddress, bountyTokens); Transfer(this, founderAddress, founderTokens); Transfer(this, advisersConsultantsAddress, advisersConsultantTokens); totalSupply=totalSupply-(bountyTokens+founderTokens+advisersConsultantTokens); bountyTokens=0...
//*** Kill Tokens ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 6343, 6732 ] }
2,318
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
contractBalance
function contractBalance() constant public returns (uint256 balance) { return balanceOf[this]; }
//*** Contract Balance ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 6767, 6870 ] }
2,319
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
setParamsTransfer
function setParamsTransfer(bool _value) public onlyOwner{ transfersEnabled=_value; }
//*** Set ParamsTransfer ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 6907, 7001 ] }
2,320
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
setParamsIco
function setParamsIco(bool _value) public onlyOwner returns(bool result){ enableIco=_value; }
//*** Set ParamsICO ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 7033, 7145 ] }
2,321
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
setParamsPreSale
function setParamsPreSale(bool _value) public onlyOwner returns(bool result){ enablePreSale=_value; }
//*** Set ParamsPreSale ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 7184, 7304 ] }
2,322
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
isIco
function isIco() constant public returns (bool ico) { ool result=((icoStart+(35*24*60*60)) >= now); f(enableIco){ return true; lse{ return result;
//*** Is ico ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 7329, 7527 ] }
2,323
GraphenePowerToken
GraphenePowerToken.sol
0x30795a541aea7f76ceccae7dc5146682f6b04cd7
Solidity
GraphenePowerToken
contract GraphenePowerToken is owned{ //************** Token ************// string public standard = 'Token 1'; string public name = 'Graphene Power'; string public symbol = 'GRP'; uint8 public decimals = 18; uint256 public totalSupply =0; //*** Pre-sale ***// uint preSaleStart=15...
//*** GraphenePowerToken ***//
LineComment
isPreSale
function isPreSale() constant public returns (bool preSale) { ol result=(preSaleEnd >= now); (enablePreSale){ return true; se{ return result;
//*** Is PreSale ***//
LineComment
v0.4.19+commit.c4cbbb05
bzzr://75480e7748a5a3a0e4b718d8c45a2909545714329e23ada6d4ea5dbb285079c4
{ "func_code_index": [ 7562, 7751 ] }
2,324
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
transferOwnership
function transferOwnership(address newOwner) external { address oldOwner = owner; require(msg.sender == oldOwner); owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
/** * @notice Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3153, 3374 ] }
2,325
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
setTokenURIAdmin
function setTokenURIAdmin(address newTokenURIAdmin) external { require( msg.sender == tokenURIAdmin || (msg.sender == guardian && newTokenURIAdmin == address(0)), "NOT_AUTHORIZED" ); tokenURIAdmin = newTokenURIAdmin; emit TokenURIAdminSet(newTokenURIAdmin); }
/** * @notice set the new tokenURIAdmin that can change the tokenURI * Can only be called by the current tokenURI admin. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3519, 3842 ] }
2,326
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
setRoyaltyAdmin
function setRoyaltyAdmin(address newRoyaltyAdmin) external { require( msg.sender == royaltyAdmin || (msg.sender == guardian && newRoyaltyAdmin == address(0)), "NOT_AUTHORIZED" ); royaltyAdmin = newRoyaltyAdmin; emit RoyaltyAdminSet(newRoyaltyAdmin); }
/** * @notice set the new royaltyAdmin that can change the royalties * Can only be called by the current royalty admin. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3986, 4301 ] }
2,327
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
setMinterAdmin
function setMinterAdmin(address newMinterAdmin) external { require( msg.sender == minterAdmin || (msg.sender == guardian && newMinterAdmin == address(0)), "NOT_AUTHORIZED" ); minterAdmin = newMinterAdmin; emit MinterAdminSet(newMinterAdmin); }
/** * @notice set the new minterAdmin that can set the minter for Bleeps * Can only be called by the current minter admin. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 4448, 4755 ] }
2,328
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
setGuardian
function setGuardian(address newGuardian) external { require(msg.sender == guardian, "NOT_AUTHORIZED"); guardian = newGuardian; emit GuardianSet(newGuardian); }
/** * @notice set the new guardian that can freeze the other admins (except owner). * Can only be called by the current guardian. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 4909, 5101 ] }
2,329
Bleeps
src/bleeps/BleepsRoles.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
BleepsRoles
contract BleepsRoles { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenURIAdminSet(address newTokenURIAdmin); event RoyaltyAdminSet(address newRoyaltyAdmin); event MinterAdminSet(address newMinterAdmin); event GuardianSet(address newGuardian); eve...
setMinter
function setMinter(address newMinter) external { require(msg.sender == minterAdmin, "NOT_AUTHORIZED"); minter = newMinter; emit MinterSet(newMinter); }
/** * @notice set the new minter that can mint Bleeps (up to 1024). * Can only be called by the minter admin. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 5235, 5418 ] }
2,330
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
BPESOToken
function BPESOToken() public payable { startTime = now; owner = msg.sender; balances[owner] = _totalSupply; }
// Constructor // @notice BPESOToken Contract // @return the transaction address
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 1097, 1246 ] }
2,331
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
function () public payable { tokensale(msg.sender); }
// Payable method // @notice Anyone can buy the tokens on tokensale by paying ether
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 1343, 1415 ] }
2,332
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
tokensale
function tokensale(address recipient) public payable { require(recipient != 0x0); uint256 weiAmount = msg.value; uint tokens = weiAmount.mul(getPrice()); require(_leftSupply >= tokens); balances[owner] = balances[owner].sub(tokens); balances[recipient] = balances[recipient].add(token...
// @notice tokensale // @param recipient The address of the recipient // @return the transaction address and send the event as Transfer
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 1569, 2046 ] }
2,333
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
totalSupply
function totalSupply() public constant returns (uint256) { return _totalSupply; }
// @return total tokens supplied
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 2087, 2187 ] }
2,334
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
balanceOf
function balanceOf(address who) public constant returns (uint256) { return balances[who]; }
// What is the balance of a particular account? // @param who The address of the particular account // @return the balanace the particular account
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 2352, 2462 ] }
2,335
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
sendBPESOToken
function sendBPESOToken(address to, uint256 value) public onlyOwner { require ( to != 0x0 && value > 0 && _leftSupply >= value ); balances[owner] = balances[owner].sub(value); balances[to] = balances[to].add(value); _leftSupply = _leftSupply.sub(value); Transfer(owner, to, value...
// Token distribution to founder, develoment team, partners, charity, and bounty
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 2551, 2913 ] }
2,336
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
transfer
function transfer(address to, uint256 value) public { require ( balances[msg.sender] >= value && value > 0 ); balances[msg.sender] = balances[msg.sender].sub(value); balances[to] = balances[to].add(value); Transfer(msg.sender, to, value); }
// @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 the transaction address and send the event as Transfer
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 3957, 4265 ] }
2,337
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
transferFrom
function transferFrom(address from, address to, uint256 value) public { require ( allowed[from][msg.sender] >= value && balances[from] >= value && value > 0 ); balances[from] = balances[from].sub(value); balances[to] = balances[to].add(value); allowed[from][msg.sender] = allowed[from][...
// @notice send `value` token to `to` from `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 the transaction address and send the event as Transfer
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 4546, 4961 ] }
2,338
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
approve
function approve(address spender, uint256 value) public { require ( balances[msg.sender] >= value && value > 0 ); allowed[msg.sender][spender] = value; Approval(msg.sender, spender, value); }
// Allow spender to withdraw from your account, multiple times, up to the value amount. // If this function is called again it overwrites the current allowance with value. // @param spender The address of the sender // @param value The amount to be approved // @return the transaction address and send the event as Appro...
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 5313, 5563 ] }
2,339
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
allowance
function allowance(address _owner, address spender) public constant returns (uint256) { return allowed[_owner][spender]; }
// Check the allowed value for the spender to withdraw from owner // @param owner The address of the owner // @param spender The address of the spender // @return the amount which spender is still allowed to withdraw from owner
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 5814, 5955 ] }
2,340
BPESOToken
BPESOToken.sol
0x57a00eda6b251d98b52ccdef777bfaf671c7d339
Solidity
BPESOToken
contract BPESOToken is IERC20 { using SafeMath for uint256; // Token properties string public name = "BitcoinPeso"; string public symbol = "BPESO"; uint public decimals = 18; uint public _totalSupply = 21000000e18; uint public _leftSupply = 21000000e18; // Balances for ea...
getPrice
function getPrice() public constant returns (uint result) { return PRICE; }
// Get current price of a Token // @return the price or token value for a ether
LineComment
v0.4.11+commit.68ef5810
bzzr://7ffd2ddcb8939a050c2078fd01408a7ba395304f1b508afb8309dc59c9c49d08
{ "func_code_index": [ 6048, 6142 ] }
2,341
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
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://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 399, 491 ] }
2,342
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
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://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 1050, 1149 ] }
2,343
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
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://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 1299, 1496 ] }
2,344
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
Solidity
DoodlesMutants
contract DoodlesMutants is ERC721Enumerable, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.03 ether; uint256 public maxSupply = 2222; uint256 public maxMintAmount = 20; bool public paused = false; bool public revealed = true...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 628, 733 ] }
2,345
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
Solidity
DoodlesMutants
contract DoodlesMutants is ERC721Enumerable, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.03 ether; uint256 public maxSupply = 2222; uint256 public maxMintAmount = 20; bool public paused = false; bool public revealed = true...
mint
function mint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); require(_mintAmount <= maxMintAmount); require(supply + _mintAmount <= maxSupply); if (msg.sender != owner()) { require(msg.value >= cost * _mintAmount); } for...
// public
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 749, 1185 ] }
2,346
DoodlesMutants
@openzeppelin/contracts/access/Ownable.sol
0xae84661681cf8c3a6a7db8f4a11fae0861d12cfb
Solidity
DoodlesMutants
contract DoodlesMutants is ERC721Enumerable, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; uint256 public cost = 0.03 ether; uint256 public maxSupply = 2222; uint256 public maxMintAmount = 20; bool public paused = false; bool public revealed = true...
reveal
function reveal() public onlyOwner { revealed = true; }
//only owner
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://c50bc2d26b624edc0f22cf714da12a6a93fcde1f3e544b1b656a4b05598d3125
{ "func_code_index": [ 2061, 2129 ] }
2,347
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
kill
function kill() external onlyOwner { address payable addr = msg.sender; selfdestruct(addr); }
/** * @dev Destroyes the contract. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 2620, 2729 ] }
2,348
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
pause
function pause() external onlyOwner { Pausable._pause(); }
/** * @dev Triggers stopped state. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 2842, 2911 ] }
2,349
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
createGame
function createGame(uint8 _guessCoinSide, address _referral) external payable whenNotPaused onlySingleGameCreated onlyCorrectBet { require(_guessCoinSide < 2, "Wrong guess coin side"); require(_referral != msg.sender, "Wrong referral"); addressBetTotal[msg.sender] = addressBetTotal[msg.sender].add(msg.value)...
/** * @dev Creates new game. * @param _guessCoinSide Сoin side (0 or 1). * @param _referral Address for referral. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 3101, 4092 ] }
2,350
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
joinAndPlayGame
function joinAndPlayGame(uint256 _id, address _referral) external payable onlyNotCreator(_id) onlyAllowedToPlay { Game storage game = games[_id]; require(game.creator != address(0), "No game with such id"); require(game.winner == address(0), "Game has winner"); require(game.bet == msg.value, "Wrong bet"); ...
/** * @dev Joins and plays game. * @param _id Game id to join. * @param _referral Address for referral. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 4239, 5655 ] }
2,351
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
withdrawGamePrizes
function withdrawGamePrizes(uint256 _maxLoop) external { require(_maxLoop > 0, "_maxLoop == 0"); uint256[] storage pendingGames = gamesWithPendingPrizeWithdrawalForAddress[msg.sender]; require(pendingGames.length > 0, "no pending"); require(_maxLoop <= pendingGames.length, "wrong _maxLoop"); ...
/** * @dev Withdraws prize for won game. * @param _maxLoop max loop. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 5795, 7407 ] }
2,352
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
withdrawReferralFees
function withdrawReferralFees() external { uint256 feeTmp = referralFeesPending[msg.sender]; require(feeTmp > 0, "No referral fee"); delete referralFeesPending[msg.sender]; referralFeesWithdrawn[msg.sender] = referralFeesWithdrawn[msg.sender].add(feeTmp); msg.sender.transfer(feeTmp); emit CF_GameR...
/** * @dev Withdraws referral fees. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 7476, 7845 ] }
2,353
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
withdrawDevFee
function withdrawDevFee() external onlyOwner { require(devFeePending > 0, "No dev fee"); uint256 fee = devFeePending; delete devFeePending; msg.sender.transfer(fee); }
/** * @dev Withdraws developer fees. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 7915, 8112 ] }
2,354
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
withdrawRafflePrizes
function withdrawRafflePrizes() external override { require(rafflePrizePendingForAddress[msg.sender] > 0, "No raffle prize"); uint256 prize = rafflePrizePendingForAddress[msg.sender]; delete rafflePrizePendingForAddress[msg.sender]; addressPrizeTotal[msg.sender] = addressPrizeTotal[msg.sender].add(p...
/** * GameRaffle * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 8159, 8890 ] }
2,355
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
allowedToPlay
function allowedToPlay() public view returns (bool) { return now.sub(lastPlayTimestamp[msg.sender]) > suspendedTimeDuration; }
/** * @dev Checks if player is allowed to play since last game played time. * @return Returns weather player is allowed to play. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 9087, 9224 ] }
2,356
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
addTopGame
function addTopGame(uint256 _id) external payable onlyCreator(_id) { require(msg.value == minBet, "Wrong fee"); require(topGames[0] != _id, "Top in TopGames"); uint256[5] memory topGamesTmp = [_id, 0, 0, 0, 0]; bool isIdPresent; for (uint8 i = 0; i < 4; i ++) { if (topGames[i] == _id && !i...
/** * @dev Adds game idx to the beginning of topGames. * @param _id Game idx to be added. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 9352, 10004 ] }
2,357
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
removeTopGame
function removeTopGame(uint256 _id) private { uint256[5] memory tmpArr; bool found; for(uint256 i = 0; i < 5; i ++) { if(topGames[i] == _id) { found = true; } else { if (found) { tmpArr[i-1] = topGames[i]; } else { tmpArr[i] = topGames[i]; } } ...
/** * @dev Removes game idx from topGames. * @param _id Game idx to be removed. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 10122, 10542 ] }
2,358
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
getTopGames
function getTopGames() external view returns (uint256[5] memory) { return topGames; }
/** * @dev Gets top games. * @return Returns list of top games. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 10644, 10740 ] }
2,359
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
isTopGame
function isTopGame(uint256 _id) public view returns (bool) { for (uint8 i = 0; i < 5; i++) { if (topGames[i] == _id) { return true; } } return false; }
/** * @dev Checks if game id is in top games. * @param _id Game id to check. * @return Whether game id is in top games. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 10903, 11100 ] }
2,360
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
getGamesWithPendingPrizeWithdrawalForAddress
function getGamesWithPendingPrizeWithdrawalForAddress(address _address) external view returns (uint256[] memory ids) { ids = gamesWithPendingPrizeWithdrawalForAddress[_address]; }
/** * @dev Returns game ids with pending withdrawal for address. * @param _address Player address. * @return ids Game ids. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 11266, 11457 ] }
2,361
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
increaseBetForGameBy
function increaseBetForGameBy(uint256 _id) whenNotPaused onlyCreator(_id) external payable { require(msg.value > 0, "increase must be > 0"); addressBetTotal[msg.sender] = addressBetTotal[msg.sender].add(msg.value); games[_id].bet = games[_id].bet.add(msg.value); totalUsedInGame = totalUsedInGame.add...
/** * @dev Updates bet for game. * @param _id Game index. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 11549, 11940 ] }
2,362
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
updateMinBet
function updateMinBet(uint256 _minBet) external onlyOwner { require(_minBet > 0, "Wrong bet"); minBet = _minBet; }
/** * @dev Updates minimum bet value. Can be 0 if no restrictions. * @param _minBet Min bet value. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 12077, 12207 ] }
2,363
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
updateSuspendedTimeDuration
function updateSuspendedTimeDuration(uint256 _duration) external onlyOwner { require(_duration > 0, "Wrong duration"); suspendedTimeDuration = _duration; }
/** * @dev Updates spended time duration. * @param _duration time duration value. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 12327, 12498 ] }
2,364
CoinFlipGame
localhost/game_coinflip/contracts/CoinFlipGame.sol
0xac40758917170f1f627f2c0e8d3e4880c5f1f9b5
Solidity
CoinFlipGame
contract CoinFlipGame is Pausable, Partnership, GameRaffle { struct Game { uint8 creatorGuessCoinSide; uint256 id; uint256 bet; address payable creator; address payable opponent; address payable winner; address creatorReferral; address opponentReferral; } uint256 priva...
/** * Testing: * update suspendedTimeDuration to 1 minute */
NatSpecMultiLine
getParticipatedGameIdxsForPlayer
function getParticipatedGameIdxsForPlayer(address _address) external view returns (uint256[] memory) { require(_address != address(0), "Cannt be 0x0"); return participatedGameIdxsForPlayer[_address]; }
/** * @dev Gets game indexes where player participated. Created and joined * @param _address Player address. * @return List of indexes. * TESTED */
NatSpecMultiLine
v0.6.0+commit.26b70077
None
ipfs://d13eff95979a921a49e0d4accb2a2f98a7531d1b71d10d7c220c32fa5a9010e0
{ "func_code_index": [ 12677, 12894 ] }
2,365
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
name
function name() public pure override returns (string memory) { return "Bleeps"; }
/// @notice A descriptive name for a collection of NFTs in this contract.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3019, 3116 ] }
2,366
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
symbol
function symbol() external pure returns (string memory) { return "BLEEP"; }
/// @notice An abbreviated name for NFTs in this contract.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3181, 3272 ] }
2,367
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
contractURI
function contractURI() external view returns (string memory) { return tokenURIContract.contractURI(_royalty.receiver, _royalty.per10Thousands); }
/// @notice Returns the Uniform Resource Identifier (URI) for the token collection.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3362, 3523 ] }
2,368
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
tokenURI
function tokenURI(uint256 id) external view returns (string memory) { return tokenURIContract.tokenURI(id); }
/// @notice Returns the Uniform Resource Identifier (URI) for token `id`.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3603, 3728 ] }
2,369
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
setTokenURIContract
function setTokenURIContract(ITokenURI newTokenURIContract) external { require(msg.sender == tokenURIAdmin, "NOT_AUTHORIZED"); tokenURIContract = newTokenURIContract; emit TokenURIContractSet(newTokenURIContract); }
/// @notice set a new tokenURI contract, that generate the metadata including the wav file, Can only be set by the `tokenURIAdmin`. /// @param newTokenURIContract The address of the new tokenURI contract.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 3943, 4190 ] }
2,370
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
owners
function owners(uint256[] calldata ids) external view returns (address[] memory addresses) { addresses = new address[](ids.length); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; addresses[i] = address(uint160(_owners[id])); } }
/// @notice give the list of owners for the list of ids given. /// @param ids The list if token ids to check. /// @return addresses The list of addresses, corresponding to the list of ids.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 4393, 4694 ] }
2,371
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override(ERC721Base, IERC721) returns (bool isOperator) { return super.isApprovedForAll(owner, operator) || _isOpenSeaProxy(owner, operator); }
/// @notice Check if the sender approved the operator. /// @param owner The address of the owner. /// @param operator The address of the operator. /// @return isOperator The status of the approval.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 4910, 5192 ] }
2,372
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
supportsInterface
function supportsInterface(bytes4 id) public pure virtual override(ERC721BaseWithERC4494Permit, IERC165) returns (bool) { return super.supportsInterface(id) || id == 0x2a55205a; /// 0x2a55205a is ERC2981 (royalty standard) }
/// @notice Check if the contract supports an interface. /// @param id The id of the interface. /// @return Whether the interface is supported.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 5350, 5634 ] }
2,373
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
royaltyInfo
function royaltyInfo(uint256 id, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = _royalty.receiver; royaltyAmount = (salePrice * uint256(_royalty.per10Thousands)) / 10000; }
/// @notice Called with the sale price to determine how much royalty is owed and to whom. /// @param id - the token queried for royalty information. /// @param salePrice - the sale price of the token specified by id. /// @return receiver - address of who should be sent the royalty payment. /// @return royaltyAmount - t...
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 6017, 6290 ] }
2,374
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
setRoyaltyParameters
function setRoyaltyParameters(address newReceiver, uint96 royaltyPer10Thousands) external { require(msg.sender == royaltyAdmin, "NOT_AUTHORIZED"); // require(royaltyPer10Thousands <= 50, "ROYALTY_TOO_HIGH"); ? _royalty.receiver = newReceiver; _royalty.per10Thousands = royaltyPer10Thousands; emit Roy...
/// @notice set a new royalty receiver and rate, Can only be set by the `royaltyAdmin`. /// @param newReceiver the address that should receive the royalty proceeds. /// @param royaltyPer10Thousands the share of the salePrice (in 1/10000) given to the receiver.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 6565, 6959 ] }
2,375
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
disableTheUseOfCheckpoints
function disableTheUseOfCheckpoints() external { require(msg.sender == checkpointingDisabler, "NOT_AUTHORIZED"); _useCheckpoints = false; checkpointingDisabler = address(0); emit CheckpointingDisablerSet(address(0)); emit CheckpointingDisabled(); }
/// @notice disable checkpointing overhead /// This can be used if the governance system can switch to use ownerAndLastTransferBlockNumberOf instead of checkpoints
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 7133, 7429 ] }
2,376
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
setCheckpointingDisabler
function setCheckpointingDisabler(address newCheckpointingDisabler) external { require(msg.sender == checkpointingDisabler, "NOT_AUTHORIZED"); checkpointingDisabler = newCheckpointingDisabler; emit CheckpointingDisablerSet(newCheckpointingDisabler); }
/// @notice update the address that can disable the use of checkpinting, can be used to disable it entirely. /// @param newCheckpointingDisabler new address that can disable the use of checkpointing. can be the zero address to remove the ability to change.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 7696, 7979 ] }
2,377
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
mint
function mint(uint16 id, address to) external { require(msg.sender == minter, "ONLY_MINTER_ALLOWED"); require(id < 1024, "INVALID_BLEEP"); require(to != address(0), "NOT_TO_ZEROADDRESS"); require(to != address(this), "NOT_TO_THIS"); address owner = _ownerOf(id); require(owner == address(0), "AL...
/// @notice mint one of bleep if not already minted. Can only be called by `minter`. /// @param id bleep id which represent a pair of (note, instrument). /// @param to address that will receive the Bleep.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 8198, 8619 ] }
2,378
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
multiMint
function multiMint(uint16[] calldata ids, address to) external { require(msg.sender == minter, "ONLY_MINTER_ALLOWED"); require(to != address(0), "NOT_TO_ZEROADDRESS"); require(to != address(this), "NOT_TO_THIS"); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; require(id...
/// @notice mint multiple bleeps if not already minted. Can only be called by `minter`. /// @param ids list of bleep id which represent each a pair of (note, instrument). /// @param to address that will receive the Bleeps.
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 8856, 9404 ] }
2,379
Bleeps
src/bleeps/Bleeps.sol
0xc72d6d47c64460e6ed9d9af9e01c2ab4f37bef78
Solidity
Bleeps
contract Bleeps is IERC721, WithSupportForOpenSeaProxies, ERC721Checkpointable, BleepsRoles { event RoyaltySet(address receiver, uint256 royaltyPer10Thousands); event TokenURIContractSet(ITokenURI newTokenURIContract); event CheckpointingDisablerSet(address newCheckpointingDisabler); event Checkpointing...
sound
function sound(uint256 id) external pure returns (uint8 note, uint8 instrument) { note = uint8(id & 0x3F); instrument = uint8(uint256(id >> 6) & 0x0F); }
/// @notice gives the note and instrument for a particular Bleep id. /// @param id bleep id which represent a pair of (note, instrument). /// @return note the note index (0 to 63) starting from C2 to D#7 /// @return instrument the instrument index (0 to 16). At launch there is only 9 instrument but the DAO could add mo...
NatSpecSingleLine
v0.8.9+commit.e5eed63a
MIT
{ "func_code_index": [ 9766, 9943 ] }
2,380
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
totalSupply
function totalSupply() constant returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 60, 124 ] }
2,381
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
balanceOf
function balanceOf(address _owner) constant returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 232, 309 ] }
2,382
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transfer
function transfer(address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 546, 623 ] }
2,383
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 946, 1042 ] }
2,384
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
approve
function approve(address _spender, uint256 _value) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 1326, 1407 ] }
2,385
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// ...
allowance
function allowance(address _owner, address _spender) constant 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.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 1615, 1712 ] }
2,386
BOXEX
BOXEX.sol
0x0f519343ebb8dec0521c01c5e4c849ac39d7883d
Solidity
BOXEX
contract BOXEX is StandardToken { function () { throw; } /* Public variables of the token */ string public name; uint8 public decimals; string public symbol; string public version = 'H1.0'; function BOXEX(...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually s...
/* Approves and then calls the receiving contract */
Comment
v0.4.24+commit.e67f0147
bzzr://6fff8352b70c7596a329562d9209a8a7253a419193568281a20ef0f6c18a6220
{ "func_code_index": [ 591, 1396 ] }
2,387
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
addLender
function addLender(address a) public onlyGovernance { IGenericLender n = IGenericLender(a); require(n.strategy() == address(this), "Undocked Lender"); for (uint256 i = 0; i < lenders.length; i++) { require(a != address(lenders[i]), "Already Added"); } lenders.push(n); }
//management functions //add lenders for the strategy to choose between // only governance to stop strategist adding dodgy lender
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 2519, 2859 ] }
2,388
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
safeRemoveLender
function safeRemoveLender(address a) public onlyAuthorized { _removeLender(a, false); }
//but strategist can remove for safety
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 2906, 3012 ] }
2,389
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
_removeLender
function _removeLender(address a, bool force) internal { for (uint256 i = 0; i < lenders.length; i++) { if (a == address(lenders[i])) { bool allWithdrawn = lenders[i].withdrawAll(); if (!force) { require(allWithdrawn, "WITHDRAW FAILED"); } ...
//force removes the lender even if it still has a balance
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 3187, 4148 ] }
2,390
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
lendStatuses
function lendStatuses() public view returns (lendStatus[] memory) { lendStatus[] memory statuses = new lendStatus[](lenders.length); for (uint256 i = 0; i < lenders.length; i++) { lendStatus memory s; s.name = lenders[i].lenderName(); s.add = address(lenders[i]); s.assets =...
//Returns the status of all lenders attached the strategy
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 4424, 4907 ] }
2,391
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
estimatedTotalAssets
function estimatedTotalAssets() public view override returns (uint256) { uint256 nav = lentTotalAssets(); nav = nav.add(want.balanceOf(address(this))); return nav; }
// lent assets plus loose assets
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 4948, 5152 ] }
2,392
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
estimatedAPR
function estimatedAPR() public view returns (uint256) { uint256 bal = estimatedTotalAssets(); if (bal == 0) { return 0; } uint256 weightedAPR = 0; for (uint256 i = 0; i < lenders.length; i++) { weightedAPR = weightedAPR.add(lenders[i].weightedApr()); } return w...
//the weighted apr of all lenders. sum(nav * apr)/totalNav
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 5319, 5707 ] }
2,393
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
_estimateDebtLimitIncrease
function _estimateDebtLimitIncrease(uint256 change) internal view returns (uint256) { uint256 highestAPR = 0; uint256 aprChoice = 0; uint256 assets = 0; for (uint256 i = 0; i < lenders.length; i++) { uint256 apr = lenders[i].aprAfterDeposit(change); if (apr > highestAPR) { ...
//Estimates the impact on APR if we add more money. It does not take into account adjusting position
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 5816, 6665 ] }
2,394
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
_estimateDebtLimitDecrease
function _estimateDebtLimitDecrease(uint256 change) internal view returns (uint256) { uint256 lowestApr = uint256(-1); uint256 aprChoice = 0; for (uint256 i = 0; i < lenders.length; i++) { uint256 apr = lenders[i].aprAfterDeposit(change); if (apr < lowestApr) { aprChoice ...
//Estimates debt limit decrease. It is not accurate and should only be used for very broad decision making
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 6780, 7813 ] }
2,395
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
estimateAdjustPosition
function estimateAdjustPosition() public view returns ( uint256 _lowest, uint256 _lowestApr, uint256 _highest, uint256 _potential ) { //all loose assets are to be invested uint256 looseAssets = want.balanceOf(address(this)); // our simple algo ...
//estimates highest and lowest apr lenders. Public for debugging purposes but not much use to general public
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 7930, 9391 ] }
2,396
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
estimatedFutureAPR
function estimatedFutureAPR(uint256 newDebtLimit) public view returns (uint256) { uint256 oldDebtLimit = vault.strategies(address(this)).totalDebt; uint256 change; if (oldDebtLimit < newDebtLimit) { change = newDebtLimit - oldDebtLimit; return _estimateDebtLimitIncrease(change); } ...
//gives estiomate of future APR with a change of debt limit. Useful for governance to decide debt limits
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 9504, 9984 ] }
2,397
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
lentTotalAssets
function lentTotalAssets() public view returns (uint256) { uint256 nav = 0; for (uint256 i = 0; i < lenders.length; i++) { nav = nav.add(lenders[i].nav()); } return nav; }
//cycle all lenders and collect balances
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 10033, 10263 ] }
2,398
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
prepareReturn
function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment ) { _profit = 0; _loss = 0; //for clarity _debtPayment = _debtOutstanding; uint256 lentAssets = lentTotalAssets(); ...
// we need to free up profit plus _debtOutstanding. // If _debtOutstanding is more than we can free we get as much as possible // should be no way for there to be a loss. we hope...
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 10463, 13221 ] }
2,399