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
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 1056, 1195 ] }
58,061
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
transfer
function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Transfer token to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 1365, 1510 ] }
58,062
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 2152, 2305 ] }
58,063
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
transferFrom
function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowances[from][msg.sender].sub(value)); return true; }
/** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 2773, 3009 ] }
58,064
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Em...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 3533, 3744 ] }
58,065
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Em...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 4273, 4494 ] }
58,066
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_transfer
function _transfer(address from, address to, uint256 value) internal { require(to != address(0), "ERC20: transfer to the zero address"); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Transfer token for a specified addresses. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 4717, 5023 ] }
58,067
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_mint
function _mint(address account, uint256 value) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 5370, 5679 ] }
58,068
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_burn
function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 5908, 6219 ] }
58,069
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Approve an address to spend another addresses' tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 6487, 6827 ] }
58,070
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalS...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approva...
NatSpecMultiLine
_burnFrom
function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowances[account][msg.sender].sub(value)); }
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param valu...
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 7221, 7411 ] }
58,071
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
owner
function owner() public view returns (address) { return _owner; }
/** * @return the address of the owner. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 457, 541 ] }
58,072
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
isOwner
function isOwner() public view returns (bool) { return msg.sender == _owner; }
/** * @return true if `msg.sender` is the owner of the contract. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 828, 925 ] }
58,073
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner....
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 1283, 1428 ] }
58,074
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 1600, 1714 ] }
58,075
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = m...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 1859, 2093 ] }
58,076
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @return the name of the token. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 356, 444 ] }
58,077
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @return the symbol of the token. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 506, 598 ] }
58,078
ERC20Token
ERC20Token.sol
0x9611fd98881473d2adadbc49e6567df6192dec29
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @retu...
/** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @return the number of decimals of the token. */
NatSpecMultiLine
v0.5.10+commit.5a6ea5b1
OSL-3.0
bzzr://74a9a6e00aed31693f8140f1aedf6b445ae60c30769fcc70b6da4aaaf75f1daa
{ "func_code_index": [ 672, 760 ] }
58,079
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
_baseURI
function _baseURI() internal view virtual override returns (string memory) { return baseURI; }
// internal
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 1518, 1623 ] }
58,080
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
supportsInterface
function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { return interfaceId == 0xe8a3d485 /* contractURI() */ || interfaceId == 0x2a55205a /* ERC-2981 royaltyInfo() */ || super.supportsInterface(interfaceId); }
// public
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 1637, 1910 ] }
58,081
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
mintAt
function mintAt(address to, uint256 tokenId) public { require(isCreatorRole[msg.sender], "Only creator allowed"); require(!_exists(tokenId), "Tokenid already exist"); //mint currentSupply++; _safeMint(to, tokenId); }
//for future breeding/NFT bridging function
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 3191, 3438 ] }
58,082
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
royaltyInfo
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount){ return (royaltyAddr, _salePrice * royaltyBasis / 10000); }
//ERC-2981
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 4908, 5105 ] }
58,083
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
setBaseURI
function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; }
//only owner functions ---
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 5136, 5237 ] }
58,084
Beanterra
contracts/Beanterra.sol
0xdd97c0b7ed3dc93d09a681de0e7228b5dfeae463
Solidity
Beanterra
contract Beanterra is ERC721, Ownable { using Strings for uint256; using ECDSA for bytes32; //NFT params string public baseURI; string public defaultURI; string public mycontractURI; uint256 private currentSupply; //mint parameters uint256 nextId; mapping(uint8 => uint256) public stagePric...
withdrawFund
function withdrawFund(address _to) public onlyOwner { _withdraw(_to, address(this).balance); }
//fund withdraw functions ---
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://1ba8fe404eee727a689dccb64c1f45a70c5d58b9afef711e06361b963dec9559
{ "func_code_index": [ 6682, 6787 ] }
58,085
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 867, 996 ] }
58,086
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 1166, 1282 ] }
58,087
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 1425, 1619 ] }
58,088
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
EFMAPlatform
contract EFMAPlatform is EscapeMmmEvents, Ownable { using SafeMath for *; //=========================================================... // _ _ _ |`. _ _ _ . // (_(_)| |~|~|(_||_|| (/_ . system settings //==============_|========================================= string c...
//=========================================================... // |\/| _ . _ /~` _ _ _|_ _ _ __|_ . // | |(_||| | \_,(_)| | | | (_|(_ | . Main Contract //=========================================================
LineComment
function() isHuman() public payable { FMAPDatasets.OfferInfo memory offerInfo = packageOfferInfo(address(0), msg.value); offerCore(offerInfo, false); }
/** * offer help directly */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 3677, 3856 ] }
58,089
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
EFMAPlatform
contract EFMAPlatform is EscapeMmmEvents, Ownable { using SafeMath for *; //=========================================================... // _ _ _ |`. _ _ _ . // (_(_)| |~|~|(_||_|| (/_ . system settings //==============_|========================================= string c...
//=========================================================... // |\/| _ . _ /~` _ _ _|_ _ _ __|_ . // | |(_||| | \_,(_)| | | | (_|(_ | . Main Contract //=========================================================
LineComment
getCanAcceptAmount
function getCanAcceptAmount(address playerAddr) public view returns (uint256 canAccept, uint256 earliest) { (canAccept, earliest) = calcCanAcceptAmount(playerAddr, true, 0); return (canAccept, earliest); }
//=========================================================... // . _ |` _ __|_. _ _ _ . // \/|(/_VV ~|~|_|| |(_ | |(_)| |_\ . view functions //=========================================================
LineComment
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 7110, 7343 ] }
58,090
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
EFMAPlatform
contract EFMAPlatform is EscapeMmmEvents, Ownable { using SafeMath for *; //=========================================================... // _ _ _ |`. _ _ _ . // (_(_)| |~|~|(_||_|| (/_ . system settings //==============_|========================================= string c...
//=========================================================... // |\/| _ . _ /~` _ _ _|_ _ _ __|_ . // | |(_||| | \_,(_)| | | | (_|(_ | . Main Contract //=========================================================
LineComment
packageOfferInfo
function packageOfferInfo(address siteOwner, uint256 amount) private view returns (FMAPDatasets.OfferInfo) { FMAPDatasets.OfferInfo memory offerInfo; offerInfo.playerAddress = msg.sender; offerInfo.offerAmount = amount; offerInfo.affiliateAddress = players_[msg.sender].lastAffiliate; offerInfo....
//=========================================================... // _ _. _ _|_ _ |` _ __|_. _ _ _ . // |_)| |\/(_| | (/_ ~|~|_|| |(_ | |(_)| |_\ . private functions //=|=======================================================
LineComment
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 8769, 9259 ] }
58,091
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
EFMAPlatform
contract EFMAPlatform is EscapeMmmEvents, Ownable { using SafeMath for *; //=========================================================... // _ _ _ |`. _ _ _ . // (_(_)| |~|~|(_||_|| (/_ . system settings //==============_|========================================= string c...
//=========================================================... // |\/| _ . _ /~` _ _ _|_ _ _ __|_ . // | |(_||| | \_,(_)| | | | (_|(_ | . Main Contract //=========================================================
LineComment
offerCore
function offerCore(FMAPDatasets.OfferInfo memory offerInfo, bool updateAff) private { uint256 _fee = (offerInfo.offerAmount).mul(feePercent_).div(100); // 1% for fee uint256 _aff = (offerInfo.offerAmount).mul(affPercent_).div(100); // 5% for affiliate uint256 _sit = (offerInfo.offerAmount).mul(sitePercen...
//=========================================================... // _ _ _ _ |` _ __|_. _ _ _ . // (_(_)| (/_ ~|~|_|| |(_ | |(_)| |_\ . core functions //=========================================================
LineComment
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 9505, 13171 ] }
58,092
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
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. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 95, 524 ] }
58,093
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
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. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 614, 914 ] }
58,094
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
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. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 1034, 1162 ] }
58,095
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
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. /...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 1232, 1378 ] }
58,096
EFMAPlatform
EFMAPlatform.sol
0x4d31f5a4ea035872d11efb4ff2d6ed9bb3a58e81
Solidity
AddressUtils
library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return wheth...
/** * Utility library of inline functions on addresses */
NatSpecMultiLine
isContract
function isContract(address addr) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details...
/** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://7d7e36237fc3ac0e69ce863022a527e06c54efa096884e658d7bd91ae3cfd846
{ "func_code_index": [ 365, 999 ] }
58,097
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_protocolName
function _protocolName() internal view virtual override returns (string memory) { return "Compound"; }
/* ========== Internal Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 504, 614 ] }
58,098
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
availableLiquidity
function availableLiquidity() public view override returns (uint256) { return address(token).balance; }
/* ========== Metadata ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 654, 765 ] }
58,099
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
toUnderlyingAmount
function toUnderlyingAmount(uint256 tokenAmount) public view override returns (uint256) { return ( tokenAmount .mul(C1TokenParams.currentExchangeRate(token)) / uint256(1e18) ); }
/* ========== Conversion Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 815, 1023 ] }
58,100
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
getRewardsAPR
function getRewardsAPR( ICToken cToken, uint256 _totalLiquidity ) internal view returns (uint256) { IPriceOracle oracle = comptroller.oracle(); uint256 compPrice = oracle.getUnderlyingPrice(cComp); uint256 tokenPrice = oracle.getUnderlyingPrice(address(cToken)); if (compPrice == 0 || tokenPrice == 0) return...
/* ========== Performance Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 1268, 1778 ] }
58,101
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
balanceUnderlying
function balanceUnderlying() external view virtual override returns (uint256) { return toUnderlyingAmount(ICToken(token).balanceOf(msg.sender)); }
/* ========== Caller Balance Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4650, 4804 ] }
58,102
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_afterReceiveETH
function _afterReceiveETH(uint256 amount) internal virtual override {}
// Convert to WETH if contract takes WETH
LineComment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4905, 4977 ] }
58,103
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_afterReceiveWETH
function _afterReceiveWETH(uint256 amount) internal virtual override { IWETH(underlying).withdraw(amount); }
// Convert to WETH if contract takes ETH
LineComment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 5022, 5138 ] }
58,104
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_beforeSendETH
function _beforeSendETH(uint256 amount) internal virtual override {}
// Convert to ETH if contract returns WETH
LineComment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 5185, 5255 ] }
58,105
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_beforeSendWETH
function _beforeSendWETH(uint256 amount) internal virtual override { IWETH(underlying).deposit{value: amount}(); }
// Convert to WETH if contract returns ETH
LineComment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 5302, 5424 ] }
58,106
CompoundProtocolAdapter
contracts/adapters/compound/CEtherAdapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
CEtherAdapter
contract CEtherAdapter is AbstractEtherAdapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address internal con...
_claimRewardsIfAny
function _claimRewardsIfAny(address account) internal { address[] memory holders = new address[](1); address[] memory cTokens = new address[](1); holders[0] = account; cTokens[0] = token; comptroller.claimComp(holders, cTokens, false, true); }
/* ========== Internal Actions ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 5472, 5739 ] }
58,107
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
_protocolName
function _protocolName() internal view virtual override returns (string memory) { return "Compound"; }
/* ========== Internal Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 514, 624 ] }
58,108
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
availableLiquidity
function availableLiquidity() public view override returns (uint256) { return IERC20(underlying).balanceOf(token); }
/* ========== Metadata ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 664, 788 ] }
58,109
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
toUnderlyingAmount
function toUnderlyingAmount(uint256 tokenAmount) public view override returns (uint256) { return ( tokenAmount .mul(C1TokenParams.currentExchangeRate(token)) / uint256(1e18) ); }
/* ========== Conversion Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 838, 1046 ] }
58,110
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
getRewardsAPR
function getRewardsAPR( ICToken cToken, uint256 _totalLiquidity ) internal view returns (uint256) { IPriceOracle oracle = comptroller.oracle(); uint256 compPrice = oracle.getUnderlyingPrice(cComp); uint256 tokenPrice = oracle.getUnderlyingPrice(address(cToken)); if (compPrice == 0 || tokenPrice == 0) return...
/* ========== Performance Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 1291, 1801 ] }
58,111
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
balanceUnderlying
function balanceUnderlying() external view virtual override returns (uint256) { return toUnderlyingAmount(ICToken(token).balanceOf(msg.sender)); }
/* ========== Caller Balance Queries ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4673, 4827 ] }
58,112
CompoundProtocolAdapter
contracts/adapters/compound/C1Erc20Adapter.sol
0x7f77389b868718b5351433d8031d49921cd72ace
Solidity
C1Erc20Adapter
contract C1Erc20Adapter is AbstractErc20Adapter() { using MinimalSignedMath for uint256; using LowGasSafeMath for uint256; using TransferHelper for address; /* ========== Constants ========== */ IComptroller internal constant comptroller = IComptroller(0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B); address in...
_claimRewardsIfAny
function _claimRewardsIfAny(address account) internal { address[] memory holders = new address[](1); address[] memory cTokens = new address[](1); holders[0] = account; cTokens[0] = token; comptroller.claimComp(holders, cTokens, false, true); }
/* ========== Internal Actions ========== */
Comment
v0.7.6+commit.7338295f
MIT
{ "func_code_index": [ 4875, 5142 ] }
58,113
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will ...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 606, 998 ] }
58,114
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 1928, 2250 ] }
58,115
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 3007, 3187 ] }
58,116
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 3412, 3646 ] }
58,117
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 4016, 4281 ] }
58,118
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 4532, 5047 ] }
58,119
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 5227, 5431 ] }
58,120
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 5618, 6018 ] }
58,121
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 6200, 6405 ] }
58,122
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 6594, 6995 ] }
58,123
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
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.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 7218, 7935 ] }
58,124
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { // _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 526, 618 ] }
58,125
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { // _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 1177, 1276 ] }
58,126
ETHBridge
ETHBridge.sol
0xa4c5f00622e2958a10bf82d461a48ba78eb32580
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { // _setOwner(_msgSender()); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.0+commit.c7dfd78e
MIT
ipfs://42db2a8916a02faf04194b8e326e8dfecc8a70a5ab8e4f19f32cb11d62392ab8
{ "func_code_index": [ 1426, 1623 ] }
58,127
Kn0wbot
/contracts/Kn0wbot.sol
0xc8c6e3e3d13ad492fa66cb77e082f6b9db55c08f
Solidity
Kn0wbot
contract Kn0wbot is ContextMixin, NativeMetaTransaction, ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { using Counters for Counters.Counter; address public proxyRegistryAddress; string public baseURI = "ipfs://QmYyiYyvA5k7RCWPny6LE2zaFNLa9dYMh1hse3CQT6pS...
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view override returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return tr...
/** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 1860, 2296 ] }
58,128
Kn0wbot
/contracts/Kn0wbot.sol
0xc8c6e3e3d13ad492fa66cb77e082f6b9db55c08f
Solidity
Kn0wbot
contract Kn0wbot is ContextMixin, NativeMetaTransaction, ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { using Counters for Counters.Counter; address public proxyRegistryAddress; string public baseURI = "ipfs://QmYyiYyvA5k7RCWPny6LE2zaFNLa9dYMh1hse3CQT6pS...
_msgSender
function _msgSender() internal view override returns (address sender) { return ContextMixin.msgSender(); }
/** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 2431, 2553 ] }
58,129
Kn0wbot
/contracts/Kn0wbot.sol
0xc8c6e3e3d13ad492fa66cb77e082f6b9db55c08f
Solidity
Kn0wbot
contract Kn0wbot is ContextMixin, NativeMetaTransaction, ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { using Counters for Counters.Counter; address public proxyRegistryAddress; string public baseURI = "ipfs://QmYyiYyvA5k7RCWPny6LE2zaFNLa9dYMh1hse3CQT6pS...
_burn
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); }
// The following functions are overrides required by Solidity.
LineComment
v0.8.9+commit.e5eed63a
{ "func_code_index": [ 2852, 2989 ] }
58,130
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
EIP20Interface
contract EIP20Interface{ //获取_owner地址的余额 function balanceOf(address _owner) public view returns (uint256 balance); //转账:从自己账户向_to地址转入_value个Token function transfer(address _to, uint256 _value)public returns (bool success); //转账:从_from向_to转_value个Token function transferFrom(address _from,...
//pragma solidity ^0.5.1;
LineComment
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance);
//获取_owner地址的余额
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 47, 125 ] }
58,131
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
EIP20Interface
contract EIP20Interface{ //获取_owner地址的余额 function balanceOf(address _owner) public view returns (uint256 balance); //转账:从自己账户向_to地址转入_value个Token function transfer(address _to, uint256 _value)public returns (bool success); //转账:从_from向_to转_value个Token function transferFrom(address _from,...
//pragma solidity ^0.5.1;
LineComment
transfer
function transfer(address _to, uint256 _value)public returns (bool success);
//转账:从自己账户向_to地址转入_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 162, 243 ] }
58,132
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
EIP20Interface
contract EIP20Interface{ //获取_owner地址的余额 function balanceOf(address _owner) public view returns (uint256 balance); //转账:从自己账户向_to地址转入_value个Token function transfer(address _to, uint256 _value)public returns (bool success); //转账:从_from向_to转_value个Token function transferFrom(address _from,...
//pragma solidity ^0.5.1;
LineComment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
//转账:从_from向_to转_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 280, 381 ] }
58,133
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
EIP20Interface
contract EIP20Interface{ //获取_owner地址的余额 function balanceOf(address _owner) public view returns (uint256 balance); //转账:从自己账户向_to地址转入_value个Token function transfer(address _to, uint256 _value)public returns (bool success); //转账:从_from向_to转_value个Token function transferFrom(address _from,...
//pragma solidity ^0.5.1;
LineComment
approve
function approve(address _spender, uint256 _value) public returns (bool success);
//允许_spender从自己(调用方)账户转走_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 424, 510 ] }
58,134
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
EIP20Interface
contract EIP20Interface{ //获取_owner地址的余额 function balanceOf(address _owner) public view returns (uint256 balance); //转账:从自己账户向_to地址转入_value个Token function transfer(address _to, uint256 _value)public returns (bool success); //转账:从_from向_to转_value个Token function transferFrom(address _from,...
//pragma solidity ^0.5.1;
LineComment
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
//自己_owner查询__spender地址可以转走自己多少个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 554, 652 ] }
58,135
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
LBRToken
contract LBRToken is EIP20Interface { //1.获取token名字,比如"BruceFeng Coin" string public name; //2.获取Token简称,比如"BFC" string public symbol; //3.获取小数位,比如以太坊的decimals为18 uint8 public decimals; //4.获取token发布的总量,比如HT 5亿 uint256 public totalSupply; mapping(address=>uint256) balanc...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance){ return balances[_owner]; }
//获取_owner地址的余额
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 667, 786 ] }
58,136
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
LBRToken
contract LBRToken is EIP20Interface { //1.获取token名字,比如"BruceFeng Coin" string public name; //2.获取Token简称,比如"BFC" string public symbol; //3.获取小数位,比如以太坊的decimals为18 uint8 public decimals; //4.获取token发布的总量,比如HT 5亿 uint256 public totalSupply; mapping(address=>uint256) balanc...
transfer
function transfer(address _to, uint256 _value)public returns (bool success){ require(_value >0 && balances[_to] + _value > balances[_to] && balances[msg.sender] > _value); balances[_to] += _value; balances[msg.sender] -= _value; emit Transfer(msg.sender, _to,_value); return true; }
//转账:从自己账户向_to地址转入_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 823, 1163 ] }
58,137
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
LBRToken
contract LBRToken is EIP20Interface { //1.获取token名字,比如"BruceFeng Coin" string public name; //2.获取Token简称,比如"BFC" string public symbol; //3.获取小数位,比如以太坊的decimals为18 uint8 public decimals; //4.获取token发布的总量,比如HT 5亿 uint256 public totalSupply; mapping(address=>uint256) balanc...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success){ uint256 allowan = allowances[_from][_to]; require(allowan > _value && balances[_from] >= _value && _to == msg.sender && balances[_to] + _value>balances[_to]); allowances[_from][_to] -= _value; balances[_...
//转账:从_from向_to转_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 1200, 1662 ] }
58,138
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
LBRToken
contract LBRToken is EIP20Interface { //1.获取token名字,比如"BruceFeng Coin" string public name; //2.获取Token简称,比如"BFC" string public symbol; //3.获取小数位,比如以太坊的decimals为18 uint8 public decimals; //4.获取token发布的总量,比如HT 5亿 uint256 public totalSupply; mapping(address=>uint256) balanc...
approve
function approve(address _spender, uint256 _value) public returns (bool success){ require(_value >0 && balances[msg.sender] > _value); allowances[msg.sender][_spender] = _value; emit Approval(msg.sender,_spender,_value); return true; }
//允许_spender从自己(调用方)账户转走_value个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 1705, 1994 ] }
58,139
LBRToken
LBRToken.sol
0x8ae033ee46884c5c86a8e4f617342c3d2521ee53
Solidity
LBRToken
contract LBRToken is EIP20Interface { //1.获取token名字,比如"BruceFeng Coin" string public name; //2.获取Token简称,比如"BFC" string public symbol; //3.获取小数位,比如以太坊的decimals为18 uint8 public decimals; //4.获取token发布的总量,比如HT 5亿 uint256 public totalSupply; mapping(address=>uint256) balanc...
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining){ return allowances[_owner][_spender]; }
//自己_owner查询_spender地址可以转走自己多少个Token
LineComment
v0.4.24+commit.e67f0147
None
bzzr://89d61a59b33bd0921be51d462a71e0de5362d73334792d88a12e3cb5b5029cfb
{ "func_code_index": [ 2037, 2188 ] }
58,140
GoodDollar
contracts/dao/schemes/SchemeGuard.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
SchemeGuard
contract SchemeGuard is Ownable { Avatar avatar; ControllerInterface internal controller = ControllerInterface(0); /** @dev Constructor. only sets controller if given avatar is not null. * @param _avatar The avatar of the DAO. */ constructor(Avatar _avatar) public { avatar = _...
/* @dev abstract contract for ensuring that schemes have been registered properly * Allows setting zero Avatar in situations where the Avatar hasn't been created yet */
Comment
setAvatar
function setAvatar(Avatar _avatar) public onlyOwner { avatar = _avatar; controller = ControllerInterface(avatar.owner()); }
/** @dev Function to set a new avatar and controller for scheme * can only be done by owner of scheme */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1354, 1505 ] }
58,141
GoodDollar
contracts/dao/schemes/SchemeGuard.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
SchemeGuard
contract SchemeGuard is Ownable { Avatar avatar; ControllerInterface internal controller = ControllerInterface(0); /** @dev Constructor. only sets controller if given avatar is not null. * @param _avatar The avatar of the DAO. */ constructor(Avatar _avatar) public { avatar = _...
/* @dev abstract contract for ensuring that schemes have been registered properly * Allows setting zero Avatar in situations where the Avatar hasn't been created yet */
Comment
isRegistered
function isRegistered() public view returns (bool) { return isRegistered(address(this)); }
/** @dev function to see if an avatar has been set and if this scheme is registered * @return true if scheme is registered */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1651, 1760 ] }
58,142
GoodDollar
contracts/dao/schemes/SchemeGuard.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
SchemeGuard
contract SchemeGuard is Ownable { Avatar avatar; ControllerInterface internal controller = ControllerInterface(0); /** @dev Constructor. only sets controller if given avatar is not null. * @param _avatar The avatar of the DAO. */ constructor(Avatar _avatar) public { avatar = _...
/* @dev abstract contract for ensuring that schemes have been registered properly * Allows setting zero Avatar in situations where the Avatar hasn't been created yet */
Comment
isRegistered
function isRegistered(address scheme) public view returns (bool) { require(avatar != Avatar(0), "Avatar is not set"); if (!(controller.isSchemeRegistered(scheme, address(avatar)))) { return false; } return true; }
/** @dev function to see if an avatar has been set and if this scheme is registered * @return true if scheme is registered */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1906, 2180 ] }
58,143
GoodDollar
contracts/dao/schemes/FeeFormula.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
FeeFormula
contract FeeFormula is AbstractFees { using SafeMath for uint256; uint256 public percentage; bool public constant senderPays = false; /** * @dev Constructor. Requires the given percentage parameter * to be less than 100. * @param _percentage the percentage to calculate fees of ...
/** * @title Fee formula contract * contract that provides a function to calculate * fees as a percentage of any given value */
NatSpecMultiLine
getTxFees
function getTxFees( uint256 _value, address _sender, address _recipient ) public view returns (uint256, bool) { return (_value.mul(percentage).div(100), senderPays); }
/** @dev calculates the fee of given value. * @param _value the value of the transaction to calculate fees from * @param _sender address sending. * @param _recipient address receiving. * @return the transactional fee for given value */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 760, 978 ] }
58,144
GoodDollar
contracts/dao/schemes/FormulaHolder.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
FormulaHolder
contract FormulaHolder is Ownable { AbstractFees public formula; /* @dev Constructor. Requires that given formula is a valid contract. * @param _formula The fee formula contract. */ constructor(AbstractFees _formula) public { require(_formula != AbstractFees(0), "Supplied formula i...
/* @title Contract in charge of setting registered fee formula schemes to contract */
Comment
setFormula
function setFormula(AbstractFees _formula) public onlyOwner { _formula.isRegistered(); formula = _formula; }
/* @dev Sets the given fee formula contract. Is only callable by owner. * Reverts if formula has not been registered by DAO. * @param _formula the new fee formula scheme */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 565, 701 ] }
58,145
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
isIdentityAdmin
function isIdentityAdmin(address account) public view returns (bool) { return IdentityAdmins.has(account); }
/** * @dev Checks if account is identity admin * @param account Account to check * @return Boolean indicating if account is identity admin */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 730, 857 ] }
58,146
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
addIdentityAdmin
function addIdentityAdmin(address account) public onlyOwner returns (bool) { _addIdentityAdmin(account); return true; }
/** * @dev Adds a identity admin account. Is only callable by owner. * @param account Address to be added * @return true if successful */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1027, 1174 ] }
58,147
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
removeIdentityAdmin
function removeIdentityAdmin(address account) public onlyOwner returns (bool) { _removeIdentityAdmin(account); return true; }
/** * @dev Removes a identity admin account. Is only callable by owner. * @param account Address to be removed * @return true if successful */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1349, 1502 ] }
58,148
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
renounceIdentityAdmin
function renounceIdentityAdmin() public { _removeIdentityAdmin(msg.sender); }
/** * @dev Allows an admin to renounce their role */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1575, 1671 ] }
58,149
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
_addIdentityAdmin
function _addIdentityAdmin(address account) internal { IdentityAdmins.add(account); emit IdentityAdminAdded(account); }
/** * @dev Internal implementation of addIdentityAdmin */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1749, 1896 ] }
58,150
GoodDollar
contracts/identity/IdentityAdminRole.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
IdentityAdminRole
contract IdentityAdminRole is Ownable { using Roles for Roles.Role; event IdentityAdminAdded(address indexed account); event IdentityAdminRemoved(address indexed account); Roles.Role private IdentityAdmins; /* @dev constructor. Adds caller as an admin */ constructor() internal ...
/** * @title Contract managing the identity admin role */
NatSpecMultiLine
_removeIdentityAdmin
function _removeIdentityAdmin(address account) internal { IdentityAdmins.remove(account); emit IdentityAdminRemoved(account); }
/** * @dev Internal implementation of removeIdentityAdmin */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1977, 2132 ] }
58,151
GoodDollar
contracts/token/ERC677Token.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
ERC677Token
contract ERC677Token is ERC677, DAOToken, ERC20Pausable { constructor( string memory _name, string memory _symbol, uint256 _cap ) public DAOToken(_name, _symbol, _cap) {} /** * @dev transfer token to a contract address with additional data if the recipient is a contact....
/* @title ERC677Token contract. */
Comment
_transferAndCall
function _transferAndCall( address _to, uint256 _value, bytes memory _data ) internal whenNotPaused returns (bool) { bool res = super.transfer(_to, _value); emit Transfer(msg.sender, _to, _value, _data); if (isContract(_to)) { require(contractFallback(_to, _value, _data), "Cont...
/** * @dev transfer token to a contract address with additional data if the recipient is a contact. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _data The extra data to be passed to the receiving contract. * @return true if transfer is successful */
NatSpecMultiLine
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 553, 972 ] }
58,152
GoodDollar
contracts/token/ERC677Token.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
ERC677Token
contract ERC677Token is ERC677, DAOToken, ERC20Pausable { constructor( string memory _name, string memory _symbol, uint256 _cap ) public DAOToken(_name, _symbol, _cap) {} /** * @dev transfer token to a contract address with additional data if the recipient is a contact....
/* @title ERC677Token contract. */
Comment
contractFallback
function contractFallback( address _to, uint256 _value, bytes memory _data ) private returns (bool) { ERC677Receiver receiver = ERC677Receiver(_to); require( receiver.onTokenTransfer(msg.sender, _value, _data), "Contract Fallback failed" ); return true; }
/* @dev Contract fallback function. Is called if transferAndCall is called * to a contract */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1086, 1445 ] }
58,153
GoodDollar
contracts/token/ERC677Token.sol
0x67c5870b4a41d4ebef24d2456547a03f1f3e094b
Solidity
ERC677Token
contract ERC677Token is ERC677, DAOToken, ERC20Pausable { constructor( string memory _name, string memory _symbol, uint256 _cap ) public DAOToken(_name, _symbol, _cap) {} /** * @dev transfer token to a contract address with additional data if the recipient is a contact....
/* @title ERC677Token contract. */
Comment
isContract
function isContract(address _addr) internal view returns (bool) { uint256 length; assembly { length := extcodesize(_addr) } return length > 0; }
/* @dev Function to check if given address is a contract * @param _addr Address to check * @return true if given address is a contract */
Comment
v0.5.16+commit.9c3226ce
MIT
bzzr://377577b98803c2210dfa17f6feaf68d6a856726073543a35d4a8526c1f78cc9f
{ "func_code_index": [ 1611, 1814 ] }
58,154
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
mint
function mint(uint256 quantity) external payable { require(saleActive, "Sale inactive"); require(quantity <= maxMintsPerTx, "Too many mints per txn"); require(nextTokenId + quantity <= maxTokens, "Exceeds max supply"); require(msg.value >= price * quantity, "Not enough ether"); require(msg.sender ==...
/** * @dev Public mint. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 1058, 1551 ] }
58,155
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
tokenURI
function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "URI query for nonexistent token"); if (descriptor == address(0)) { return string(abi.encodePacked(baseURI, tokenId.toString())); } else { return IDescriptor(descriptor).tokenURI(toke...
/** * @dev Return tokenURI directly or via alternative `descriptor` contract */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 1647, 2021 ] }
58,156
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
totalSupply
function totalSupply() external view returns (uint256) { return nextTokenId; }
/** * @dev Simplified version of ERC721Enumberable's `totalSupply` */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 2107, 2201 ] }
58,157
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
setDescriptor
function setDescriptor(address _descriptor) external onlyOwner { descriptor = _descriptor; }
/** * @dev Set `descriptor` contract address to route `tokenURI` */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 2285, 2393 ] }
58,158
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
setBattleContract
function setBattleContract(address _contract) external onlyOwner { battleContract = _contract; }
/** * @dev Set `battleContract` address to start disabling transfers during * battles. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 2504, 2616 ] }
58,159
Finiliar
contracts/Finiliar.sol
0x5a0121a0a21232ec0d024dab9017314509026480
Solidity
Finiliar
contract Finiliar is Ownable, ERC721, PaymentSplitter, IToken { using Strings for uint256; // Sale details uint256 public maxTokens = 1210; // presale amount uint256 public maxMintsPerTx = 20; uint256 public price = .06 ether; // presale price bool public saleActive; // When set, diverts t...
setBaseURI
function setBaseURI(string memory _baseURI) external onlyOwner { baseURI = _baseURI; }
/** * @dev Set the `baseURI` used to construct `tokenURI`. */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 2694, 2796 ] }
58,160