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
BlackPanther
BlackPanther.sol
0xd0652e2c3e7127c20625503a73fdacfe1e20e1cf
Solidity
Ownable
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as th...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
None
ipfs://823172c38c56ea9c99922a75e4911f8275e6d42f1f21efd14114af73108cc2f2
{ "func_code_index": [ 581, 665 ] }
25,500
BlackPanther
BlackPanther.sol
0xd0652e2c3e7127c20625503a73fdacfe1e20e1cf
Solidity
BlackPanther
contract BlackPanther is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => b...
//to recieve ETH from uniswapV2Router when swaping
LineComment
v0.8.9+commit.e5eed63a
None
ipfs://823172c38c56ea9c99922a75e4911f8275e6d42f1f21efd14114af73108cc2f2
{ "func_code_index": [ 9903, 9937 ] }
25,501
BlackPanther
BlackPanther.sol
0xd0652e2c3e7127c20625503a73fdacfe1e20e1cf
Solidity
BlackPanther
contract BlackPanther is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => b...
_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.9+commit.e5eed63a
None
ipfs://823172c38c56ea9c99922a75e4911f8275e6d42f1f21efd14114af73108cc2f2
{ "func_code_index": [ 19739, 20582 ] }
25,502
SUPRPrintRegistry
contracts/CustomERC721Metadata.sol
0x47ae3241e116aaffdf5c0eba84dd944fc356a78d
Solidity
CustomERC721Metadata
contract CustomERC721Metadata is ERC165, ERC721, ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ ...
/** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */
NatSpecMultiLine
name
function name() external view returns (string memory) { return _name; }
/** * @dev Gets the token name * @return string representing the token name */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
None
bzzr://4adf9f9346dad528a13ed153b1c1c0cdd95b9092b858938a5d5619a8f4f0fb90
{ "func_code_index": [ 846, 936 ] }
25,503
SUPRPrintRegistry
contracts/CustomERC721Metadata.sol
0x47ae3241e116aaffdf5c0eba84dd944fc356a78d
Solidity
CustomERC721Metadata
contract CustomERC721Metadata is ERC165, ERC721, ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * 0x5b5e139f === * bytes4(keccak256('name()')) ^ ...
/** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory) { return _symbol; }
/** * @dev Gets the token symbol * @return string representing the token symbol */
NatSpecMultiLine
v0.5.0+commit.1d4f565a
None
bzzr://4adf9f9346dad528a13ed153b1c1c0cdd95b9092b858938a5d5619a8f4f0fb90
{ "func_code_index": [ 1045, 1139 ] }
25,504
multiSend
multiSend.sol
0xa01cf557573d87fd0cd5f4e479c61e469ef9d3f3
Solidity
Ownable
contract Ownable { address public owner = msg.sender; /// @notice check if the caller is the owner of the contract modifier onlyOwner { if (msg.sender != owner) throw; _; } /// @notice change the owner of the contract /// @param _newOwner the address of the new owner of the contract. ...
changeOwner
function changeOwner(address _newOwner) onlyOwner { if(_newOwner == 0x0) throw; owner = _newOwner; }
/// @notice change the owner of the contract /// @param _newOwner the address of the new owner of the contract.
NatSpecSingleLine
v0.4.19+commit.c4cbbb05
bzzr://5ddbc6433181c54f1609558a0c4f61614aa633ffd90fdb5a284381b16f6f52d9
{ "func_code_index": [ 318, 440 ] }
25,505
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
ERC20StandardToken
contract ERC20StandardToken is ERC20Basic,Owned{ using SafeMath for uint256; uint currentTotalSupply = 0; // 已经空投数量 uint airdropNum = 0 ether; // 单个账户空投数量(TODO 原来是1) /* This creates an array with all balances */ mapping(address => uint256) public balances; mapping(address => ...
/** * @title ERC20 Standard Token * @dev Basic version of StandardToken, with transferable. */
NatSpecMultiLine
_transfer
function _transfer(address _from,address _to, uint256 _value) internal { require(_to != 0x0); uint256 previousBalances = balances[_from].safeAdd(balances[_to]); balances[_from] = balances[_from].safeSub(_value); balances[_to] = balances[_to].safeAdd(_value); emit Transfer(_from,_to,_value); assert(balan...
// function balanceOf(address _owner) public view returns (uint256 balance){ // if (!touched[_owner] && currentTotalSupply < totalSupply) { // touched[_owner] = true; // currentTotalSupply += airdropNum; // balances[_owner] += airdropNum; // } // return balanceOf[_owner]; // }
LineComment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 759, 1162 ] }
25,506
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
ERC20StandardToken
contract ERC20StandardToken is ERC20Basic,Owned{ using SafeMath for uint256; uint currentTotalSupply = 0; // 已经空投数量 uint airdropNum = 0 ether; // 单个账户空投数量(TODO 原来是1) /* This creates an array with all balances */ mapping(address => uint256) public balances; mapping(address => ...
/** * @title ERC20 Standard Token * @dev Basic version of StandardToken, with transferable. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool success){ _transfer(msg.sender,_to,_value); return true; }
/* Send coins */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 1185, 1327 ] }
25,507
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
ERC20StandardToken
contract ERC20StandardToken is ERC20Basic,Owned{ using SafeMath for uint256; uint currentTotalSupply = 0; // 已经空投数量 uint airdropNum = 0 ether; // 单个账户空投数量(TODO 原来是1) /* This creates an array with all balances */ mapping(address => uint256) public balances; mapping(address => ...
/** * @title ERC20 Standard Token * @dev Basic version of StandardToken, with transferable. */
NatSpecMultiLine
transferFrom
function transferFrom(address _from,address _to,uint256 _value) public returns (bool success){ require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] = allowance[_from][msg.sender].safeSub(_value); _transfer(_from,_to,_value); return true; }
/* A contract attempts to get the coins */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 1377, 1675 ] }
25,508
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
ERC20StandardToken
contract ERC20StandardToken is ERC20Basic,Owned{ using SafeMath for uint256; uint currentTotalSupply = 0; // 已经空投数量 uint airdropNum = 0 ether; // 单个账户空投数量(TODO 原来是1) /* This creates an array with all balances */ mapping(address => uint256) public balances; mapping(address => ...
/** * @title ERC20 Standard Token * @dev Basic version of StandardToken, with transferable. */
NatSpecMultiLine
approve
function approve(address _spender,uint256 _value) public returns (bool success){ require(_value > 0); require(_spender != 0x0); allowance[msg.sender][_spender] = _value; emit Approval(msg.sender,_spender,_value); return true; }
/* Allow another contract to spend some tokens in your behalf */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 1746, 2005 ] }
25,509
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
SLifeToken
contract SLifeToken is ERC20StandardToken{ string public name; string public symbol; uint8 public decimals; uint public totalSupply; /* This notifies clients about the amount burnt */ event Burn(address indexed _from, uint256 _value); /* Initializes contract with initial supply tokens...
totalSupply
function totalSupply() public view returns (uint256){ return totalSupply; }
/* This return total supply token */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 1424, 1511 ] }
25,510
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
SLifeToken
contract SLifeToken is ERC20StandardToken{ string public name; string public symbol; uint8 public decimals; uint public totalSupply; /* This notifies clients about the amount burnt */ event Burn(address indexed _from, uint256 _value); /* Initializes contract with initial supply tokens...
mintToken
function mintToken(address _to,uint256 mintedAmount) onlyOwner public returns(bool success){ require(_to != 0x0); balances[_to] = balances[_to].safeAdd(mintedAmount); totalSupply = totalSupply.safeAdd(mintedAmount); emit Transfer(0,address(this),mintedAmount); emit Transfer(address(this),_to,mintedAmount...
/* Mint token to one address */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 1792, 2150 ] }
25,511
SLifeToken
SLifeToken.sol
0xebf4f25d56085d9f4b00e50842ac9244c7ea35e9
Solidity
SLifeToken
contract SLifeToken is ERC20StandardToken{ string public name; string public symbol; uint8 public decimals; uint public totalSupply; /* This notifies clients about the amount burnt */ event Burn(address indexed _from, uint256 _value); /* Initializes contract with initial supply tokens...
burn
function burn(uint256 _value) onlyOwner public returns (bool success){ require(balances[msg.sender] >= _value); balances[msg.sender] = balances[msg.sender].safeSub(_value); totalSupply = totalSupply.safeSub(_value); emit Burn(msg.sender,_value); return true; }
/* Burn token */
Comment
v0.4.26+commit.4563c3fc
MIT
bzzr://bb304dc5db84940d39fff006a9f3364d77ce48ec5125ed7dbc13509063de1078
{ "func_code_index": [ 2174, 2465 ] }
25,512
HuiTongVouchers
HuiTongVouchers.sol
0x07cc9f7ca5224938f25d080dd4bff84f6a54b974
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint; address public owner; /// This is a switch to control the liquidity bool public transferable = true; mapping(address => uint) balances; //The frozen accounts mapping (address => bool) public frozenAccount; modifier o...
freezeAccount
function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target]=freeze; emit FrozenFunds(target, freeze); }
///@notice `freeze? Prevent | Allow` `target` from sending & receiving TOKEN preconditions ///@param target Address to be frozen ///@param freeze To freeze the target account or not
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
None
bzzr://04beaa2591a4526534f329a97eb6b46940692ef4671733587fcf0f0d77fd260c
{ "func_code_index": [ 2223, 2381 ] }
25,513
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint capacity) internal constant { if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data buf.capacity = capacity; ...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
append
function append(buffer memory buf, bytes data) internal constant returns(buffer memory) { if(data.length + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, data.length) * 2); } uint dest; uint src; uint len = data.length; assembly { // Memory address of th...
/** * @dev Appends a byte array to the end of the buffer. Reverts if doing so * would exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 1070, 2368 ] }
25,514
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint capacity) internal constant { if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data buf.capacity = capacity; ...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
append
function append(buffer memory buf, uint8 data) internal constant { if(buf.buf.length + 1 > buf.capacity) { resize(buf, buf.capacity * 2); } assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen ...
/** * @dev Appends a byte to the end of the buffer. Reverts if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 2633, 3273 ] }
25,515
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
Buffer
library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint capacity) internal constant { if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data buf.capacity = capacity; ...
/* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de...
Comment
appendInt
function appendInt(buffer memory buf, uint data, uint len) internal constant returns(buffer memory) { if(len + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, len) * 2); } uint mask = 256 ** len - 1; assembly { // Memory address of the buffer data let bufp...
/** * @dev Appends a byte to the end of the buffer. Reverts if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 3538, 4324 ] }
25,516
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
/* End solidity-cborutils */
Comment
parseInt
function parseInt(string _a) internal returns (uint) { return parseInt(_a, 0); }
// parseInt
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 27456, 27555 ] }
25,517
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
/* End solidity-cborutils */
Comment
parseInt
function parseInt(string _a, uint _b) internal returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; ...
// parseInt(parseFloat*10^_b)
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 27593, 28202 ] }
25,518
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
/* End solidity-cborutils */
Comment
copyBytes
function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal returns (bytes) { uint minLength = length + toOffset; if (to.length < minLength) { // Buffer too small throw; // Should be a better way? } // NOTE: the offset 32 is added to skip the ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 38591, 39308 ] }
25,519
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
/* End solidity-cborutils */
Comment
safer_ecrecover
function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) { // We do our own memory management here. Solidity uses memory offset // 0x40 to store the current end of memory. We write past it (as // writes are memory extensions), but don't update the offset so ...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license // Duplicate Solidity's ecrecover, but catching the CALL return value
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 39505, 40508 ] }
25,520
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
usingOraclize
contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Android = 0x20; byte constant proofType_Ledger = 0x30; ...
/* End solidity-cborutils */
Comment
ecrecovery
function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) { bytes32 r; bytes32 s; uint8 v; if (sig.length != 65) return (false, 0); // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded t...
// the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 40630, 42056 ] }
25,521
GladiethersOraclize
GladiethersOraclize.sol
0x68e0348f1fb9d62046e93c4e61451e2a76fb6fcf
Solidity
GladiethersOraclize
contract GladiethersOraclize is usingOraclize { address public m_Owner; AbstractGladiethers m_Gladiethers = AbstractGladiethers(0xfca7d75cf8cad941a48ab9b5e1af0ae571923378); mapping (bytes32 => address) public queryIdToGladiator; mapping (bytes32 => bool) public queryIdToIsEthPrice; uint ...
__callback
function __callback(bytes32 _queryId, string _result, bytes _proof) { // if we reach this point successfully, it means that the attached authenticity proof has passed! if (msg.sender != oraclize_cbAddress()) throw; if(queryIdToIsEthPrice[_queryId]){ eth_price = parseInt(_result)*1000; }el...
// the callback function is called by Oraclize when the result is ready // the oraclize_randomDS_proofVerify modifier prevents an invalid proof to execute this function code: // the proof validity is fully verified on-chain
LineComment
v0.4.20+commit.3155dd80
bzzr://13a144ede47f82bfddb2422a938728fb6b9dc2eb2433a7a8cda88739ab4f4174
{ "func_code_index": [ 2279, 2737 ] }
25,522
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
ResolverClient
contract ResolverClient { /// The address of the resolver contract for this project address public resolver; bytes32 public key; /// Make our own address available to us as a constant address public CONTRACT_ADDRESS; /// Function modifier to check if msg.sender corresponds to the resolved addres...
init
function init(bytes32 _key, address _resolver) internal returns (bool _success) { bool _is_locked = ContractResolver(_resolver).locked_forever(); if (_is_locked == false) { CONTRACT_ADDRESS = address(this); resolver = _resolver; key = _key; require(ContractResolver(resolve...
/// @dev Initialize new contract /// @param _key the resolver key for this contract /// @return _success if the initialization is successful
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1425, 1892 ] }
25,523
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
ResolverClient
contract ResolverClient { /// The address of the resolver contract for this project address public resolver; bytes32 public key; /// Make our own address available to us as a constant address public CONTRACT_ADDRESS; /// Function modifier to check if msg.sender corresponds to the resolved addres...
is_locked
function is_locked() private view returns (bool _locked) { _locked = ContractResolver(resolver).locked_forever(); }
/// @dev Check if resolver is locked /// @return _locked if the resolver is currently locked
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1994, 2159 ] }
25,524
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
ResolverClient
contract ResolverClient { /// The address of the resolver contract for this project address public resolver; bytes32 public key; /// Make our own address available to us as a constant address public CONTRACT_ADDRESS; /// Function modifier to check if msg.sender corresponds to the resolved addres...
get_contract
function get_contract(bytes32 _key) public view returns (address _contract) { _contract = ContractResolver(resolver).get_contract(_key); }
/// @dev Get the address of a contract /// @param _key the resolver key to look up /// @return _contract the address of the contract
NatSpecSingleLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 2304, 2492 ] }
25,525
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://git...
mul
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } c ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 89, 483 ] }
25,526
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://git...
div
function div(uint256 _a, uint256 _b) internal pure returns (uint256) { // assert(_b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return _a / _b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 567, 858 ] }
25,527
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://git...
sub
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { assert(_b <= _a); return _a - _b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 972, 1094 ] }
25,528
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://git...
add
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) { c = _a + _b; assert(c >= _a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1158, 1293 ] }
25,529
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoWhitelistingCommon
contract DaoWhitelistingCommon is ResolverClient, DaoConstants { function daoWhitelistingStorage() internal view returns (DaoWhitelistingStorage _contract) { _contract = DaoWhitelistingStorage(get_contract(CONTRACT_STORAGE_DAO_WHITELISTING)); } /** @notic...
senderIsAllowedToRead
function senderIsAllowedToRead() internal view returns (bool _senderIsAllowedToRead) { // msg.sender is allowed to read only if its an EOA or a whitelisted contract _senderIsAllowedToRead = (msg.sender == tx.origin) || daoWhitelistingStorage().whitelist(msg.sender); }
/** @notice Check if a certain address is whitelisted to read sensitive information in the storage layer @dev if the address is an account, it is allowed to read. If the address is a contract, it has to be in the whitelist */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 547, 875 ] }
25,530
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
isDaoNotReplaced
function isDaoNotReplaced() public view returns (bool _isNotReplaced) { _isNotReplaced = !daoUpgradeStorage().isReplacedByNewDao(); }
/** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 282, 466 ] }
25,531
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
isLockingPhase
function isLockingPhase() public view returns (bool _isLockingPhase) { _isLockingPhase = currentTimeInQuarter() < getUintConfig(CONFIG_LOCKING_PHASE_DURATION); }
/** @notice Check if it is currently in the locking phase @dev No governance activities can happen in the locking phase. The locking phase is from t=0 to t=CONFIG_LOCKING_PHASE_DURATION-1 @return _isLockingPhase true if it is in the locking phase */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 744, 956 ] }
25,532
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
isMainPhase
function isMainPhase() public view returns (bool _isMainPhase) { _isMainPhase = isDaoNotReplaced() && currentTimeInQuarter() >= getUintConfig(CONFIG_LOCKING_PHASE_DURATION); }
/** @notice Check if it is currently in a main phase. @dev The main phase is where all the governance activities could take plase. If the DAO is replaced, there can never be any more main phase. @return _isMainPhase true if it is in a main phase */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1233, 1485 ] }
25,533
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
requireInPhase
function requireInPhase(uint256 _startingPoint, uint256 _relativePhaseStart, uint256 _relativePhaseEnd) internal view { require(_startingPoint > 0); require(now < _startingPoint.add(_relativePhaseEnd)); require(now >= _startingPoint.add(_relativePhaseStart)); }
/** @notice require that it is currently during a phase, which is within _relativePhaseStart and _relativePhaseEnd seconds, after the _startingPoint */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 2098, 2419 ] }
25,534
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
currentQuarterNumber
function currentQuarterNumber() public view returns(uint256 _quarterNumber) { _quarterNumber = getQuarterNumber(now); }
/** @notice Get the current quarter index @dev Quarter indexes starts from 1 @return _quarterNumber the current quarter index */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 2576, 2746 ] }
25,535
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
getQuarterNumber
function getQuarterNumber(uint256 _time) internal view returns (uint256 _index) { require(startOfFirstQuarterIsSet()); _index = _time.sub(daoUpgradeStorage().startOfFirstQuarter()) .div(getUintConfig(CONFIG_QUARTER_DURATION)) .add(1); }
/** @notice Get the quarter index of a timestamp @dev Quarter indexes starts from 1 @return _index the quarter index */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 2894, 3229 ] }
25,536
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
timeInQuarter
function timeInQuarter(uint256 _time) internal view returns (uint256 _timeInQuarter) { require(startOfFirstQuarterIsSet()); // must be already set _timeInQuarter = _time.sub(daoUpgradeStorage().startOfFirstQuarter()) % getUintConfig(CONFIG_QUARTER_DURATION); }
/** @notice Get the relative time in quarter of a timestamp @dev For example, the timeInQuarter of the first second of any quarter n-th is always 1 */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 3403, 3749 ] }
25,537
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
startOfFirstQuarterIsSet
function startOfFirstQuarterIsSet() internal view returns (bool _isSet) { _isSet = daoUpgradeStorage().startOfFirstQuarter() != 0; }
/** @notice Check if the start of first quarter is already set @return _isSet true if start of first quarter is already set */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 3899, 4082 ] }
25,538
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
currentTimeInQuarter
function currentTimeInQuarter() public view returns (uint256 _currentT) { _currentT = timeInQuarter(now); }
/** @notice Get the current relative time in the quarter @dev For example: the currentTimeInQuarter of the first second of any quarter is 1 @return _currentT the current relative time in the quarter */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 4312, 4470 ] }
25,539
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommonMini
contract DaoCommonMini is IdentityCommon { using MathHelper for MathHelper; /** @notice Check if the DAO contracts have been replaced by a new set of contracts @return _isNotReplaced true if it is not replaced, false if it has already been replaced */ function isDaoNotReplaced() ...
getTimeLeftInQuarter
function getTimeLeftInQuarter(uint256 _time) internal view returns (uint256 _timeLeftInQuarter) { _timeLeftInQuarter = getUintConfig(CONFIG_QUARTER_DURATION).sub(timeInQuarter(_time)); }
/** @notice Get the time remaining in the quarter */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 4541, 4778 ] }
25,540
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
isFromProposer
function isFromProposer(bytes32 _proposalId) internal view returns (bool _isFromProposer) { _isFromProposer = msg.sender == daoStorage().readProposalProposer(_proposalId); }
/** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 240, 464 ] }
25,541
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
isEditable
function isEditable(bytes32 _proposalId) internal view returns (bool _isEditable) { bytes32 _finalVersion; (,,,,,,,_finalVersion,,) = daoStorage().readProposal(_proposalId); _isEditable = _finalVersion == EMPTY_BYTES; }
/** @notice Check if the proposal can still be "editted", or in other words, added more versions @dev Once the proposal is finalized, it can no longer be editted. The proposer will still be able to add docs and change fundings though. @return _isEditable true if the proposal is editable */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 783, 1071 ] }
25,542
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
weiInDao
function weiInDao() internal view returns (uint256 _wei) { _wei = get_contract(CONTRACT_DAO_FUNDING_MANAGER).balance; }
/** @notice returns the balance of DaoFundingManager, which is the wei in DigixDAO */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1175, 1345 ] }
25,543
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
isParticipant
function isParticipant(address _user) public view returns (bool _is) { _is = (daoRewardsStorage().lastParticipatedQuarter(_user) == currentQuarterNumber()) && (daoStakeStorage().lockedDGDStake(_user) >= getUintConfig(CONFIG_MINIMUM_LOCKED_DGD)); }
/** @notice Check if a user is a participant in the current quarter */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 6084, 6408 ] }
25,544
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
isModerator
function isModerator(address _user) public view returns (bool _is) { _is = (daoRewardsStorage().lastParticipatedQuarter(_user) == currentQuarterNumber()) && (daoStakeStorage().lockedDGDStake(_user) >= getUintConfig(CONFIG_MINIMUM_DGD_FOR_MODERATOR)) && (daoPointsStorage()...
/** @notice Check if a user is a moderator in the current quarter */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 6495, 6940 ] }
25,545
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
startOfMilestone
function startOfMilestone(bytes32 _proposalId, uint256 _milestoneIndex) internal view returns (uint256 _milestoneStart) { uint256 _startOfPrecedingVotingRound = daoStorage().readProposalVotingTime(_proposalId, _milestoneIndex); require(_startOfPrecedingVotingRound > 0); // the preceding v...
/** @notice Calculate the start of a specific milestone of a specific proposal. @dev This is calculated from the voting start of the voting round preceding the milestone This would throw if the voting start is 0 (the voting round has not started yet) Note that if the milestoneIndex is exactly the same as the nu...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 7384, 8254 ] }
25,546
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
getTimelineForNextVote
function getTimelineForNextVote( uint256 _index, uint256 _tentativeVotingStart ) internal view returns (uint256 _actualVotingStart) { uint256 _timeLeftInQuarter = getTimeLeftInQuarter(_tentativeVotingStart); uint256 _votingDuration = getUintConfig(_index == 0 ? CONFIG_VOTING_PHASE_T...
/** @notice Calculate the actual voting start for a voting round, given the tentative start @dev The tentative start is the ideal start. For example, when a proposer finish a milestone, it should be now However, sometimes the tentative start is too close to the end of the quarter, hence, the actual voting start s...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 8640, 9790 ] }
25,547
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
checkNonDigixProposalLimit
function checkNonDigixProposalLimit(bytes32 _proposalId) internal view { require(isNonDigixProposalsWithinLimit(_proposalId)); }
/** @notice Check if we can add another non-Digix proposal in this quarter @dev There is a max cap to the number of non-Digix proposals CONFIG_NON_DIGIX_PROPOSAL_CAP_PER_QUARTER */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 9994, 10164 ] }
25,548
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
checkNonDigixFundings
function checkNonDigixFundings(uint256[] _milestonesFundings, uint256 _finalReward) internal view { if (!is_founder()) { require(_milestonesFundings.length <= getUintConfig(CONFIG_MAX_MILESTONES_FOR_NON_DIGIX)); require(MathHelper.sumNumbers(_milestonesFundings).add(_finalReward) <= ge...
/** @notice If its a non-Digix proposal, check if the fundings are within limit @dev There is a max cap to the fundings and number of milestones for non-Digix proposals */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 10859, 11273 ] }
25,549
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
DaoCommon
contract DaoCommon is DaoCommonMini { using MathHelper for MathHelper; /** @notice Check if the transaction is called by the proposer of a proposal @return _isFromProposer true if the caller is the proposer */ function isFromProposer(bytes32 _proposalId) internal view...
senderCanDoProposerOperations
function senderCanDoProposerOperations() internal view { require(isMainPhase()); require(isParticipant(msg.sender)); require(identity_storage().is_kyc_approved(msg.sender)); }
/** @notice Check if msg.sender can do operations as a proposer @dev Note that this function does not check if he is the proposer of the proposal */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 11445, 11680 ] }
25,550
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
setNewDaoContracts
function setNewDaoContracts( address _newDaoContract, address _newDaoFundingManager, address _newDaoRewardsManager ) public if_root() { require(daoUpgradeStorage().isReplacedByNewDao() == false); daoUpgradeStorage().setNewContractAddresses( _newDaoContract, _newDao...
/** @notice Set addresses for the new Dao and DaoFundingManager contracts @dev This is the first step of the 2-step migration @param _newDaoContract Address of the new Dao contract @param _newDaoFundingManager Address of the new DaoFundingManager contract @param _newDaoRewardsManager Address of the new daoRew...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 1819, 2257 ] }
25,551
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
migrateToNewDao
function migrateToNewDao( address _newDaoContract, address _newDaoFundingManager, address _newDaoRewardsManager ) public if_root() ifGlobalRewardsSet(currentQuarterNumber()) { require(isLockingPhase()); require(daoUpgradeStorage().isReplacedByNewDao() == false); require( ...
/** @notice Migrate this DAO to a new DAO contract @dev This is the second step of the 2-step migration Migration can only be done during the locking phase, after the global rewards for current quarter are set. This is to make sure that there is no rewards calculation pending before the DAO is migrated to new c...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 3135, 4047 ] }
25,552
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
setStartOfFirstQuarter
function setStartOfFirstQuarter(uint256 _start) public if_founder() { require(daoUpgradeStorage().startOfFirstQuarter() == 0); require(_start > now); daoUpgradeStorage().setStartOfFirstQuarter(_start); }
/** @notice Call this function to mark the start of the DAO's first quarter. This can only be done once, by a founder @param _start Start time of the first quarter in the DAO */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 4248, 4488 ] }
25,553
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
submitPreproposal
function submitPreproposal( bytes32 _docIpfsHash, uint256[] _milestonesFundings, uint256 _finalReward ) external payable { senderCanDoProposerOperations(); bool _isFounder = is_founder(); require(MathHelper.sumNumbers(_milestonesFundings).add(_finalReward) <= weiInDao()); ...
/** @notice Submit a new preliminary idea / Pre-proposal @dev The proposer has to send in a collateral == getUintConfig(CONFIG_PREPROPOSAL_COLLATERAL) which he could claim back in these scenarios: - Before the proposal is finalized, by calling closeProposal() - After all milestones are done and the final voti...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 5151, 6084 ] }
25,554
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
modifyProposal
function modifyProposal( bytes32 _proposalId, bytes32 _docIpfsHash, uint256[] _milestonesFundings, uint256 _finalReward ) external { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); require(isEditable(_proposalId)); bytes32 _currentState; (,,,_...
/** @notice Modify a proposal (this can be done only before setting the final version) @param _proposalId Proposal ID (hash of IPFS doc of the first version of the proposal) @param _docIpfsHash Hash of IPFS doc of the modified version of the proposal @param _milestonesFundings Array of fundings of the modified ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 6591, 7375 ] }
25,555
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
changeFundings
function changeFundings( bytes32 _proposalId, uint256[] _milestonesFundings, uint256 _finalReward, uint256 _currentMilestone ) external { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); checkNonDigixFundings(_milestonesFundings, _finalReward); ui...
/** @notice Function to change the funding structure for a proposal @dev Proposers can only change fundings for the subsequent milestones, during the duration of an on-going milestone (so, cannot be before proposal finalization or during any voting phase) @param _proposalId ID of the proposal @param _mileston...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 7922, 9616 ] }
25,556
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
finalizeProposal
function finalizeProposal(bytes32 _proposalId) public { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); require(isEditable(_proposalId)); checkNonDigixProposalLimit(_proposalId); // make sure we have reasonably enough time left in the quarter to conduct the Draft ...
/** @notice Finalize a proposal @dev After finalizing a proposal, no more proposal version can be added. Proposer will only be able to change fundings and add more docs Right after finalizing a proposal, the draft voting round starts. The proposer would also not be able to closeProposal() anymore (hence, cannot...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 10090, 11003 ] }
25,557
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
finishMilestone
function finishMilestone(bytes32 _proposalId, uint256 _milestoneIndex) public { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); uint256[] memory _currentFundings; (_currentFundings,) = daoStorage().readProposalFunding(_proposalId); // If there are N milestones, ...
/** @notice Function to set milestone to be completed @dev This can only be called in the Main Phase of DigixDAO by the proposer. It sets the voting time for the next milestone, which is immediately, for most of the times. If there is not enough time left in the current quarter, then the next voting is postpone...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 11533, 12917 ] }
25,558
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
addProposalDoc
function addProposalDoc(bytes32 _proposalId, bytes32 _newDoc) public { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); bytes32 _finalVersion; (,,,,,,,_finalVersion,,) = daoStorage().readProposal(_proposalId); require(_finalVersion != EMPTY_BYTES); daoStorage()....
/** @notice Add IPFS docs to a proposal @dev This is allowed only after a proposal is finalized. Before finalizing a proposal, proposer can modifyProposal and basically create a different ProposalVersion. After the proposal is finalized, they can only allProposalDoc to the final version of that proposal @para...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 13356, 13811 ] }
25,559
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
endorseProposal
function endorseProposal(bytes32 _proposalId) public isProposalState(_proposalId, PROPOSAL_STATE_PREPROPOSAL) { require(isMainPhase()); require(isModerator(msg.sender)); daoStorage().updateProposalEndorse(_proposalId, msg.sender); }
/** @notice Function to endorse a pre-proposal (can be called only by DAO Moderator) @param _proposalId ID of the proposal (hash of IPFS doc of the first version of the proposal) */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 14016, 14308 ] }
25,560
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
updatePRL
function updatePRL( bytes32 _proposalId, uint256 _action, bytes32 _doc ) public if_prl() { require(_action == PRL_ACTION_STOP || _action == PRL_ACTION_PAUSE || _action == PRL_ACTION_UNPAUSE); daoStorage().updateProposalPRL(_proposalId, _action, _doc, now); emit PRLAction(_pro...
/** @notice Function to update the PRL (regulatory status) status of a proposal @dev if a proposal is paused or stopped, the proposer wont be able to withdraw the funding @param _proposalId ID of the proposal @param _doc hash of IPFS uploaded document, containing details of PRL Action */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 14630, 15026 ] }
25,561
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
closeProposal
function closeProposal(bytes32 _proposalId) public { senderCanDoProposerOperations(); require(isFromProposer(_proposalId)); bytes32 _finalVersion; bytes32 _status; (,,,_status,,,,_finalVersion,,) = daoStorage().readProposal(_proposalId); require(_finalVersion == EMPTY_BYTES); re...
/** @notice Function to close proposal (also get back collateral) @dev Can only be closed if the proposal has not been finalized yet @param _proposalId ID of the proposal */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 15228, 16006 ] }
25,562
Dao
Dao.sol
0xede450cc438bdde0afe38f1488e8e5c8cc9f2bdb
Solidity
Dao
contract Dao is DaoCommon { event NewProposal(bytes32 indexed _proposalId, address _proposer); event ModifyProposal(bytes32 indexed _proposalId, bytes32 _newDoc); event ChangeProposalFunding(bytes32 indexed _proposalId); event FinalizeProposal(bytes32 indexed _proposalId); event FinishMilesto...
/** @title Interactive DAO contract for creating/modifying/endorsing proposals @author Digix Holdings */
NatSpecMultiLine
founderCloseProposals
function founderCloseProposals(bytes32[] _proposalIds) external if_founder() { uint256 _length = _proposalIds.length; uint256 _timeCreated; bytes32 _finalVersion; bytes32 _currentState; for (uint256 _i = 0; _i < _length; _i++) { (,,,_currentState,_timeCreated,,,_finalVersion...
/** @notice Function for founders to close all the dead proposals @dev Dead proposals = all proposals who are not yet finalized, and been there for more than the threshold time The proposers of dead proposals will not get the collateral back @param _proposalIds Array of proposal IDs */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://dd0c57f140058b89f28e8c2b8a475ca4c80623f62711ab50a0c546a8dc2750a1
{ "func_code_index": [ 16331, 17175 ] }
25,563
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 374, 455 ] }
25,564
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) external view returns (uint256 balance);
/** * @dev Returns the number of tokens in ``owner``'s account. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 719, 798 ] }
25,565
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) external view returns (address owner);
/** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 944, 1021 ] }
25,566
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token mus...
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1733, 1850 ] }
25,567
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) external;
/** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If th...
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2376, 2489 ] }
25,568
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) external;
/** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token...
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2962, 3022 ] }
25,569
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) external view returns (address operator);
/** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 3176, 3260 ] }
25,570
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool _approved) external;
/** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 3587, 3662 ] }
25,571
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) external view returns (bool);
/** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 3813, 3906 ] }
25,572
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721
interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ ...
/** * @dev Required interface of an ERC721 compliant contract. */
NatSpecMultiLine
safeTransferFrom
function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external;
/** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {appro...
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 4483, 4630 ] }
25,573
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721Receiver
interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other valu...
/** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */
NatSpecMultiLine
onERC721Received
function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4);
/** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by ...
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 528, 698 ] }
25,574
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the token collection name. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 106, 165 ] }
25,575
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the token collection symbol. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 236, 297 ] }
25,576
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
IERC721Metadata
interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev...
/** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) external view returns (string memory);
/** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 398, 476 ] }
25,577
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; }
/** * @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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1004, 1335 ] }
25,578
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2265, 2587 ] }
25,579
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 3344, 3524 ] }
25,580
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 3749, 3983 ] }
25,581
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 4353, 4618 ] }
25,582
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 4869, 5384 ] }
25,583
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 5564, 5768 ] }
25,584
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 5955, 6355 ] }
25,585
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 6537, 6742 ] }
25,586
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 6931, 7332 ] }
25,587
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
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.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 7555, 8272 ] }
25,588
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toString
function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 ...
/** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 184, 912 ] }
25,589
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); }
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1017, 1362 ] }
25,590
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
/** * @dev String operations. */
NatSpecMultiLine
toHexString
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } ...
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1485, 1941 ] }
25,591
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 103, 265 ] }
25,592
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 971, 1281 ] }
25,593
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1340, 1553 ] }
25,594
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1610, 1854 ] }
25,595
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 1916, 2021 ] }
25,596
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2085, 2194 ] }
25,597
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2260, 2599 ] }
25,598
BPNFT
BPNFT.sol
0xc9089047281bd9c8609db63803d220723b018540
Solidity
ERC721
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _ow...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ""; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.10+commit.fc410830
GNU GPLv3
ipfs://2bcbf4f2763adce71a5a3758a51df1c734c607fcf0a031be07b3e1bc3459daa6
{ "func_code_index": [ 2842, 2941 ] }
25,599