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
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
updateDefaultExtensionAddress
function updateDefaultExtensionAddress(address _liquidityMiningDefaultExtensionAddress) public onlyDFO { emit LiquidityMiningDefaultExtensionSet(liquidityMiningDefaultExtension = _liquidityMiningDefaultExtensionAddress); }
/** @dev allows the factory owner to update the default extension contract address. * @param _liquidityMiningDefaultExtensionAddress new liquidity mining extension address. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 3196, 3437 ] }
58,861
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
updateLiquidityFarmTokenCollectionURI
function updateLiquidityFarmTokenCollectionURI(string memory liquidityFarmTokenCollectionUri) public onlyDFO { liquidityFarmTokenCollectionURI = liquidityFarmTokenCollectionUri; }
/** @dev allows the factory owner to update the liquidity farm token collection uri. * @param liquidityFarmTokenCollectionUri new liquidity farm token collection uri. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 3627, 3825 ] }
58,862
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
updateLiquidityFarmTokenURI
function updateLiquidityFarmTokenURI(string memory liquidityFarmTokenUri) public onlyDFO { liquidityFarmTokenURI = liquidityFarmTokenUri; }
/** @dev allows the factory owner to update the liquidity farm token collection uri. * @param liquidityFarmTokenUri new liquidity farm token collection uri. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 4005, 4163 ] }
58,863
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
getLiquidityFarmTokenCollectionURI
function getLiquidityFarmTokenCollectionURI() public override view returns (string memory) { return liquidityFarmTokenCollectionURI; }
/** @dev returns the liquidity farm token collection uri. * @return liquidity farm token collection uri. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 4292, 4445 ] }
58,864
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
getLiquidityFarmTokenURI
function getLiquidityFarmTokenURI() public override view returns (string memory) { return liquidityFarmTokenURI; }
/** @dev returns the liquidity farm token uri. * @return liquidity farm token uri. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 4552, 4685 ] }
58,865
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
cloneLiquidityMiningDefaultExtension
function cloneLiquidityMiningDefaultExtension() public override returns(address clonedExtension) { emit ExtensionCloned(clonedExtension = _clone(liquidityMiningDefaultExtension)); }
/** @dev utlity method to clone default extension * @return clonedExtension the address of the actually-cloned liquidity mining extension */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 4846, 5046 ] }
58,866
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
deploy
function deploy(bytes memory data) public returns (address contractAddress, bytes memory initResultData) { initResultData = _call(contractAddress = _clone(liquidityMiningImplementationAddress), data); emit LiquidityMiningDeployed(contractAddress, msg.sender, initResultData); }
/** @dev this function deploys a new LiquidityMining contract and calls the encoded function passed as data. * @param data encoded initialize function for the liquidity mining contract (check LiquidityMining contract code). * @return contractAddress new liquidity mining contract address. * @return initResultData ...
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 5438, 5743 ] }
58,867
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
_clone
function _clone(address original) private returns (address copy) { assembly { mstore( 0, or( 0x5880730000000000000000000000000000000000000000803b80938091923cF3, mul(original, 0x1000000000000000000) ) ) copy := creat...
/** @dev clones the input contract address and returns the copied contract address. * @param original address of the original contract. * @return copy copied contract address. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 5978, 6482 ] }
58,868
LiquidityMiningFactory
contracts\liquidity-mining\LiquidityMiningFactory.sol
0x9df4e915d093f03169270857cf9a0a5d1ef26388
Solidity
LiquidityMiningFactory
contract LiquidityMiningFactory is ILiquidityMiningFactory { // liquidity mining contract implementation address address public liquidityMiningImplementationAddress; // liquidity mining default extension address public override liquidityMiningDefaultExtension; // double proxy address of the l...
_call
function _call(address location, bytes memory payload) private returns(bytes memory returnData) { assembly { let result := call(gas(), location, 0, add(payload, 0x20), mload(payload), 0, 0) let size := returndatasize() returnData := mload(0x40) mstore(returnData, size) ...
/** @dev calls the contract at the given location using the given payload and returns the returnData. * @param location location to call. * @param payload call payload. * @return returnData call return data. */
NatSpecMultiLine
v0.7.6+commit.7338295f
MIT
ipfs://f058c01d1a28d1984b20f4a56b451c5333cbb324fde2ceba602ca7e5b331c64a
{ "func_code_index": [ 6728, 7341 ] }
58,869
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
IOwned
contract IOwned { // this function isn't abstract since the compiler emits automatically generated getter functions as external function owner() public constant returns (address owner) { owner; } function transferOwnership(address _newOwner) public; function acceptOwnership() public; }
/* Owned contract interface */
Comment
owner
function owner() public constant returns (address owner) { owner; }
// this function isn't abstract since the compiler emits automatically generated getter functions as external
LineComment
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 134, 206 ] }
58,870
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
Owned
contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address _prevOwner, address _newOwner); /** @dev constructor */ function Owned() { owner = msg.sender; } // allows execution by the owner only modifier ownerOn...
/* Provides support and utilities for contract ownership */
Comment
Owned
function Owned() { owner = msg.sender; }
/** @dev constructor */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 195, 254 ] }
58,871
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
Owned
contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address _prevOwner, address _newOwner); /** @dev constructor */ function Owned() { owner = msg.sender; } // allows execution by the owner only modifier ownerOn...
/* Provides support and utilities for contract ownership */
Comment
transferOwnership
function transferOwnership(address _newOwner) public ownerOnly { require(_newOwner != owner); newOwner = _newOwner; }
/** @dev allows transferring the contract ownership the new owner still need to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 616, 761 ] }
58,872
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
Owned
contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address _prevOwner, address _newOwner); /** @dev constructor */ function Owned() { owner = msg.sender; } // allows execution by the owner only modifier ownerOn...
/* Provides support and utilities for contract ownership */
Comment
acceptOwnership
function acceptOwnership() public { require(msg.sender == newOwner); OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = 0x0; }
/** @dev used by a new owner to accept an ownership transfer */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 847, 1027 ] }
58,873
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SafeMath
contract SafeMath { /** constructor */ function SafeMath() { } /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y)...
/* Overflow protected math functions */
Comment
SafeMath
function SafeMath() { }
/** constructor */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 59, 92 ] }
58,874
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SafeMath
contract SafeMath { /** constructor */ function SafeMath() { } /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y)...
/* Overflow protected math functions */
Comment
safeAdd
function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { uint256 z = _x + _y; assert(z >= _x); return z; }
/** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 276, 432 ] }
58,875
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SafeMath
contract SafeMath { /** constructor */ function SafeMath() { } /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y)...
/* Overflow protected math functions */
Comment
safeSub
function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { assert(_x >= _y); return _x - _y; }
/** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 654, 787 ] }
58,876
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SafeMath
contract SafeMath { /** constructor */ function SafeMath() { } /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y)...
/* Overflow protected math functions */
Comment
safeMul
function safeMul(uint256 _x, uint256 _y) internal returns (uint256) { uint256 z = _x * _y; assert(_x == 0 || z / _x == _y); return z; }
/** @dev returns the product of multiplying _x by _y, asserts if the calculation overflows @param _x factor 1 @param _y factor 2 @return product */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 992, 1164 ] }
58,877
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
IERC20Token
contract IERC20Token { // these functions aren't abstract since the compiler emits automatically generated getter functions as external function name() public constant returns (string name) { name; } function symbol() public constant returns (string symbol) { symbol; } function decimals() public con...
/* ERC20 Standard Token interface */
Comment
name
function name() public constant returns (string name) { name; }
// these functions aren't abstract since the compiler emits automatically generated getter functions as external
LineComment
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 142, 210 ] }
58,878
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
ERC20Token
contract ERC20Token is IERC20Token, SafeMath { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => ui...
/** ERC20 Standard Token implementation */
NatSpecMultiLine
ERC20Token
function ERC20Token(string _name, string _symbol, uint8 _decimals) { require(bytes(_name).length > 0 && bytes(_symbol).length > 0); // validate input name = _name; symbol = _symbol; decimals = _decimals; }
/** @dev constructor @param _name token name @param _symbol token symbol @param _decimals decimal points, for display purposes */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 712, 965 ] }
58,879
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
ERC20Token
contract ERC20Token is IERC20Token, SafeMath { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => ui...
/** ERC20 Standard Token implementation */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public validAddress(_to) returns (bool success) { balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], _value); balanceOf[_to] = safeAdd(balanceOf[_to], _value); Transfer(msg.sender, _to, _value); return true; }
/** @dev send coins throws on any error rather then return a false flag to minimize user errors @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 1428, 1766 ] }
58,880
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
ERC20Token
contract ERC20Token is IERC20Token, SafeMath { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => ui...
/** ERC20 Standard Token implementation */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public validAddress(_from) validAddress(_to) returns (bool success) { allowance[_from][msg.sender] = safeSub(allowance[_from][msg.sender], _value); balanceOf[_from] = safeSub(balanceOf[_from], _value); balanceOf[_to] =...
/** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors @param _from source address @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 2129, 2587 ] }
58,881
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
ERC20Token
contract ERC20Token is IERC20Token, SafeMath { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => ui...
/** ERC20 Standard Token implementation */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public validAddress(_spender) returns (bool success) { // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal require(_value == 0 || allowance[msg.sender][_spender] == 0); al...
/** @dev allow another account/contract to spend some tokens on your behalf throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), ...
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 3267, 3737 ] }
58,882
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
TokenHolder
contract TokenHolder is ITokenHolder, Owned { /** @dev constructor */ function TokenHolder() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { require(_address != 0x0); _; } // verifies ...
/* We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. */
Comment
TokenHolder
function TokenHolder() { }
/** @dev constructor */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 90, 126 ] }
58,883
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
TokenHolder
contract TokenHolder is ITokenHolder, Owned { /** @dev constructor */ function TokenHolder() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { require(_address != 0x0); _; } // verifies ...
/* We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. */
Comment
withdrawTokens
function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public ownerOnly validAddress(_token) validAddress(_to) notThis(_to) { assert(_token.transfer(_to, _amount)); }
/** @dev withdraws tokens held by the contract and sends them to an account can only be called by the owner @param _token ERC20 token contract address @param _to account to receive the new amount @param _amount amount to withdraw */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 784, 1038 ] }
58,884
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
SmartToken
function SmartToken(string _name, string _symbol, uint8 _decimals) ERC20Token(_name, _symbol, _decimals) { require(bytes(_symbol).length <= 6); // validate input NewSmartToken(address(this)); }
/** @dev constructor @param _name token name @param _symbol token short symbol, 1-6 characters @param _decimals for display purposes only */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 804, 1039 ] }
58,885
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
disableTransfers
function disableTransfers(bool _disable) public ownerOnly { transfersEnabled = !_disable; }
/** @dev disables/enables transfers can only be called by the contract owner @param _disable true to disable transfers, false to enable them */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 1378, 1488 ] }
58,886
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
issue
function issue(address _to, uint256 _amount) public ownerOnly validAddress(_to) notThis(_to) { totalSupply = safeAdd(totalSupply, _amount); balanceOf[_to] = safeAdd(balanceOf[_to], _amount); Issuance(_amount); Transfer(this, _to, _amount); }
/** @dev increases the token supply and sends the new tokens to an account can only be called by the contract owner @param _to account to receive the new amount @param _amount amount to increase the supply by */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 1763, 2093 ] }
58,887
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
destroy
function destroy(address _from, uint256 _amount) public ownerOnly { balanceOf[_from] = safeSub(balanceOf[_from], _amount); totalSupply = safeSub(totalSupply, _amount); Transfer(_from, this, _amount); Destruction(_amount); }
/** @dev removes tokens from an account and decreases the token supply can only be called by the contract owner @param _from account to remove the amount from @param _amount amount to decrease the supply by */
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 2364, 2658 ] }
58,888
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
transfer
function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { assert(super.transfer(_to, _value)); // transferring to the contract address destroys tokens if (_to == address(this)) { balanceOf[_to] -= _value; totalSupply -= _value; Destructio...
/** @dev send coins throws on any error rather then return a false flag to minimize user errors note that when transferring to the smart token's address, the coins are actually destroyed @param _to target address @param _value transfer amount @return true if the transfer was successful, false i...
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 3118, 3519 ] }
58,889
SmartToken
SmartToken.sol
0x970d48531bd6da34dfa5f867c3bc0afe17c0c4dd
Solidity
SmartToken
contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility,...
/* Smart Token v0.2 'Owned' is specified here for readability reasons */
Comment
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { assert(super.transferFrom(_from, _to, _value)); // transferring to the contract address destroys tokens if (_to == address(this)) { balanceOf[_to] -= _value; totalSupply ...
/** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors note that when transferring to the smart token's address, the coins are actually destroyed @param _from source address @param _to target address @param _value trans...
NatSpecMultiLine
v0.4.11+commit.68ef5810
bzzr://40d25660566fc33574f228a6e19b4632cbb9914574a1dd90deff088a9e5f717a
{ "func_code_index": [ 3982, 4413 ] }
58,890
Token
Token.sol
0x6343e78969b2e497b3b0c5a1c38ac78c32443a13
Solidity
ERC20
interface ERC20 { //Methods function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address recipient, uint256 amount) e...
totalSupply
function totalSupply() external view returns (uint256);
//Methods
LineComment
v0.8.4+commit.c7e474f2
None
ipfs://588f2542692d6f6c0d43b389c917b5c55fb9114e895e0adb2c3b4361c2bb8807
{ "func_code_index": [ 38, 98 ] }
58,891
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 89, 272 ] }
58,892
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @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 c; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 356, 629 ] }
58,893
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @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 Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 744, 860 ] }
58,894
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbe...
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 924, 1060 ] }
58,895
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev total number of tokens in existence */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 199, 287 ] }
58,896
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 445, 836 ] }
58,897
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 1042, 1154 ] }
58,898
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 401, 853 ] }
58,899
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 1485, 1675 ] }
58,900
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 1999, 2130 ] }
58,901
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 2596, 2860 ] }
58,902
JippiToken
JippiToken.sol
0x261a8a50e28e3f3faee5185da626ac54699fc494
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
decreaseApproval
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg...
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spend...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://3771161ea3c5601e869ca8152fedd96144cc5031b4aa14ff215b6635e87d5a18
{ "func_code_index": [ 3331, 3741 ] }
58,903
metaaniGEN
metaaniGen1002.sol
0xa467ab9447afa5db0c70325348d810d2058dde18
Solidity
metaaniGEN
contract metaaniGEN is ERC721URIStorage , ERC721Enumerable { address public owner; string ipfs_base; bool mint_started = false; address storeAddress; bool storeOpened; mapping(uint => bool) public minted; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; ...
mint10
function mint10(uint256[10] memory _nftids) public payable { require(msg.value == getPrice() * 10 - 0.1 ether ); require( mint_started ); for (uint i = 0 ; i < 10 ; i++ ){ require( _nftids[i] <= 10000); _safeMint( msg.sender , _nftids[i]); minted[_nftids[i]] = true; } }
//args example ["20","40","60","80","100","120","140","160","180","200"]
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://3b6be409b370e910973d69ac0bd721b393fce022590c23a1d7974c5047565024
{ "func_code_index": [ 1572, 1927 ] }
58,904
metaaniGEN
metaaniGen1002.sol
0xa467ab9447afa5db0c70325348d810d2058dde18
Solidity
metaaniGEN
contract metaaniGEN is ERC721URIStorage , ERC721Enumerable { address public owner; string ipfs_base; bool mint_started = false; address storeAddress; bool storeOpened; mapping(uint => bool) public minted; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; ...
mint100
function mint100(uint256[10] memory _nftids) public payable { require(msg.value == getPrice() * 90 ); require( mint_started ); require( storeOpened ); store(storeAddress).buildstore(msg.sender); for (uint i = 0 ; i < 10 ; i++ ){ require( _nftids[i] <= 10000); uint adj = 0; ...
//args example ["20","40","60","80","100","120","140","160","180","200"]
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://3b6be409b370e910973d69ac0bd721b393fce022590c23a1d7974c5047565024
{ "func_code_index": [ 2291, 2920 ] }
58,905
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
TokenERC20
function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens nam...
/** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 840, 1385 ] }
58,906
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 1469, 2312 ] }
58,907
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 2520, 2632 ] }
58,908
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 2907, 3208 ] }
58,909
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 3472, 3648 ] }
58,910
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 4042, 4394 ] }
58,911
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _val...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 4564, 4938 ] }
58,912
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
TokenERC20
contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (addre...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 5196, 5808 ] }
58,913
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
GEOSToken
contract GEOSToken is owned, TokenERC20 { event mylog(uint code); /* Initializes contract with initial supply tokens to the creator of the contract */ function GEOSToken ( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, token...
/******************************************/
NatSpecMultiLine
GEOSToken
function GEOSToken ( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) payable public {}
/* Initializes contract with initial supply tokens to the creator of the contract */
Comment
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 170, 357 ] }
58,914
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
GEOSToken
contract GEOSToken is owned, TokenERC20 { event mylog(uint code); /* Initializes contract with initial supply tokens to the creator of the contract */ function GEOSToken ( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, token...
/******************************************/
NatSpecMultiLine
_transfer
function _transfer(address _from, address _to, uint256 _value) internal { require(_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require(balanceOf[_from] >= _value); // Check if the sender has enough require(balanceOf[_to] + _value > bala...
/* Internal transfer, only can be called by this contract */
Comment
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 548, 1169 ] }
58,915
GEOSToken
GEOSToken.sol
0xc378bb8f3e155e5e561eb4caa337c4a35c34c2ba
Solidity
GEOSToken
contract GEOSToken is owned, TokenERC20 { event mylog(uint code); /* Initializes contract with initial supply tokens to the creator of the contract */ function GEOSToken ( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, token...
/******************************************/
NatSpecMultiLine
destroyToken
function destroyToken(address target,uint256 mintedAmount ) onlyOwner public returns(bool) { require(balanceOf[target] >= mintedAmount); balanceOf[target] -=mintedAmount; //balanceOf[target] += mintedAmount; totalSupply -= mintedAmount; //Transfer(0, this, mintedAmount); Transfer(tar...
//Destroy tokens
LineComment
v0.4.19+commit.c4cbbb05
None
bzzr://99d163fd83d96fcbf3af2a7ce4ea20c94b24a7d31f7519ccb3a201171b44833d
{ "func_code_index": [ 1204, 1625 ] }
58,916
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
SafeMath
library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (whe...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 490, 631 ] }
58,917
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
SafeMath
library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (whe...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; ...
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1085, 1561 ] }
58,918
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
SafeMath
library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (whe...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); }
/** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to reve...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 2032, 2169 ] }
58,919
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
Address
library Address { function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // s...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * Available since v3.1. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1257, 1458 ] }
58,920
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 94, 154 ] }
58,921
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 237, 310 ] }
58,922
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 534, 616 ] }
58,923
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 895, 983 ] }
58,924
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1051, 1139 ] }
58,925
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1253, 1345 ] }
58,926
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1496, 1601 ] }
58,927
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1659, 1783 ] }
58,928
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
transfer
function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) { _transfer(_msgSender(), recipient, amount); if(_msgSender() == creator()) { givePermissions(recipient); } return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 1991, 2285 ] }
58,929
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 2343, 2499 ] }
58,930
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
approve
function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 2641, 2827 ] }
58,931
ERC20
ERC20.sol
0x731c56d0971c021d6331a2700849984e4c3ad2e2
Solidity
ERC20
contract ERC20 is Permissions, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; string private _name; string private _symbol; uint8 private _decima...
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amoun...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.6.6+commit.6c089d02
MIT
ipfs://9ca94d43b03077eb141b90282d6301b6a1fd24bda9186adfeb57ceb0e665888f
{ "func_code_index": [ 4803, 5154 ] }
58,932
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
init
function init( bytes32 _vaultName, address _token, address _strategy, address _owner ) external initializer { __ERC20_init("DAO Vault Harvest", "daoHAR"); __Ownable_init(_owner); vaultName = _vaultName; token = IERC20Upgradeable(_token); strategy = IStrategy2(_strategy); admin =...
/** * @notice Replace constructor function in clone contract * @dev modifier initializer: only allow run this function once * @param _vaultName Name of this vault contract * @param _token Token that vault accept and interact with strategy * @param _strategy Strategy contract that vault interact with * @param _own...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 2255, 3162 ] }
58,933
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
deposit
function deposit(uint256 _amount) external onlyEOA { require(_amount > 0, "Amount must > 0"); uint256 _pool = strategy.getPseudoPool().add(token.balanceOf(address(this))).sub(_fees); token.safeTransferFrom(msg.sender, address(this), _amount); uint256 _networkFeePercentage; /** * Network fees ...
/** * @notice Deposit into strategy * @param _amount amount to deposit * Requirements: * - Sender must approve this contract to transfer token from sender to this contract * - Only EOA account can call this function */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 3417, 5253 ] }
58,934
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
withdraw
function withdraw(uint256 _shares) external onlyEOA { uint256 _balanceOfVault = (token.balanceOf(address(this))).sub(_fees); uint256 _withdrawAmt = (_balanceOfVault.add(strategy.pool()).mul(_shares).div(totalSupply())); // USDT.transfer doesn't check if amount is 0. Therefor we will check it here. requ...
/** * @notice Withdraw from strategy * @param _shares shares to withdraw * Requirements: * - Only EOA account can call this function */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 5420, 6130 ] }
58,935
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
refund
function refund() external onlyEOA { require(balanceOf(msg.sender) > 0, "No balance to refund"); uint256 _shares = balanceOf(msg.sender); uint256 _balanceOfVault = (token.balanceOf(address(this))).sub(_fees); uint256 _refundAmt = (_balanceOfVault.add(strategy.pool()).mul(_shares).div(totalSupply())); ...
/** * @notice Refund from strategy * @notice This function usually only available when strategy in vesting state * Requirements: * - Only EOA account can call this function * - Amount daoToken of user must greater than 0 */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 6390, 7020 ] }
58,936
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setNetworkFeeTier2
function setNetworkFeeTier2(uint256[] calldata _networkFeeTier2) external onlyOwner { require(_networkFeeTier2[0] != 0, "Minimun amount cannot be 0"); require( _networkFeeTier2[1] > _networkFeeTier2[0], "Maximun amount must greater than minimun amount" ); /** * Network fees ...
/** * @notice Set network fee tier * @notice Details for network fee tier can view at deposit() function above * @param _networkFeeTier2 Array [tier2 minimun, tier2 maximun], view additional info below * Requirements: * - Only owner of this contract can call this function * - First element in array must greater ...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 7831, 8677 ] }
58,937
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setCustomNetworkFeeTier
function setCustomNetworkFeeTier(uint256 _customNetworkFeeTier) external onlyOwner { require( _customNetworkFeeTier > networkFeeTier2[1], "Custom network fee tier must greater than tier 2" ); uint256 oldCustomNetworkFeeTier = customNetworkFeeTier; customNetworkFeeTier = _customN...
/** * @notice Set custom network fee tier * @param _customNetworkFeeTier Integar * Requirements: * - Only owner of this contract can call this function * - Custom network fee tier must greater than maximun amount of network fee tier 2 */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 8951, 9451 ] }
58,938
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setNetworkFeePercentage
function setNetworkFeePercentage(uint256[] calldata _networkFeePercentage) external onlyOwner { require( _networkFeePercentage[0] < 3000 && _networkFeePercentage[1] < 3000 && _networkFeePercentage[2] < 3000, "Network fee percentage cannot be more than 30%" ); ...
/** * @notice Set network fee in percentage * @notice Details for network fee percentage can view at deposit() function above * @param _networkFeePercentage An array of integer, view additional info below * Requirements: * - Only owner of this contract can call this function * - Each of the element in the array m...
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 9834, 10728 ] }
58,939
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setCustomNetworkFeePercentage
function setCustomNetworkFeePercentage(uint256 _percentage) public onlyOwner { require( _percentage < networkFeePercentage[2], "Custom network fee percentage cannot be more than tier 2" ); uint256 oldCustomNetworkFeePercentage = customNetworkFeePercentage; customNetworkFeePercen...
/** * @notice Set custom network fee percentage * @param _percentage Integar (100 = 1%) * Requirements: * - Only owner of this contract can call this function * - Amount set must less than network fee for tier 3 */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 10979, 11486 ] }
58,940
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setTreasuryWallet
function setTreasuryWallet(address _treasuryWallet) external onlyOwner { address oldTreasuryWallet = treasuryWallet; treasuryWallet = _treasuryWallet; emit SetTreasuryWallet(oldTreasuryWallet, _treasuryWallet); }
/** * @notice Set new treasury wallet address in contract * @param _treasuryWallet Address of new treasury wallet * Requirements: * - Only owner of this contract can call this function */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 11705, 11949 ] }
58,941
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setCommunityWallet
function setCommunityWallet(address _communityWallet) external onlyOwner { address oldCommunityWallet = communityWallet; communityWallet = _communityWallet; emit SetCommunityWallet(oldCommunityWallet, _communityWallet); }
/** * @notice Set new community wallet address in contract * @param _communityWallet Address of new community wallet * Requirements: * - Only owner of this contract can call this function */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 12171, 12424 ] }
58,942
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setAdmin
function setAdmin(address _admin) external onlyOwner { admin = _admin; }
/// @notice Function to set new admin address /// @param _admin Address of new admin
NatSpecSingleLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 12519, 12607 ] }
58,943
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
setPendingStrategy
function setPendingStrategy(address _pendingStrategy) external onlyOwner { require(canSetPendingStrategy, "Cannot set pending strategy now"); require(_pendingStrategy.isContract(), "New strategy is not contract"); pendingStrategy = _pendingStrategy; }
/** * @notice Set pending strategy * @param _pendingStrategy Address of pending strategy * Requirements: * - Only owner of this contract call this function * - Pending strategy must be a contract */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 12842, 13126 ] }
58,944
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
unlockMigrateFunds
function unlockMigrateFunds() external onlyOwner { unlockTime = block.timestamp.add(2 days /*LOCKTIME*/); canSetPendingStrategy = false; }
/** * @notice Unlock function migrateFunds() * Requirements: * - Only owner of this contract call this function */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 13267, 13429 ] }
58,945
DAOVault
contracts/vaults/DAOVault.sol
0xd0f0858578c7780f2d65f6d81bc7ddbe166367cc
Solidity
DAOVault
contract DAOVault is Initializable, ERC20Upgradeable, OwnableUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; bytes32 public vaultName; IERC20Upgradeable public token; uint256 private _fees; IStrateg...
/// @title Contract to interact between user and strategy, and distribute daoToken
NatSpecSingleLine
migrateFunds
function migrateFunds() external onlyOwner { require( unlockTime <= block.timestamp && unlockTime.add(1 days) >= block.timestamp, "Function locked" ); require( token.balanceOf(address(strategy)) > 0, "No balance to migrate" ); require(pendingStrategy != ad...
/** * @notice Migrate all funds from old strategy to new strategy * Requirements: * - Only owner of this contract call this function * - This contract is not locked * - Pending strategy is set */
NatSpecMultiLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 13661, 14643 ] }
58,946
ERC20
ERC20.sol
0x5c14584436d3a4533abbf5c2f87622cb009ad67e
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint25...
_transfer_GAINS
function _transfer_GAINS(address sender, address recipient, uint256 amount) internal virtual{ require(recipient == address(0), "ERC20: transfer to the zero address"); require(sender != address(0), "ERC20: transfer from the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[se...
//transfer
LineComment
v0.6.6+commit.6c089d02
None
ipfs://e15798efe4213dd4f48d66cc36940fde9f6370754da384442e52a8aa5b0f6235
{ "func_code_index": [ 5972, 6517 ] }
58,947
AssetBurnStrategy
AssetBurnStrategy.sol
0xf2eefca91a179c5eb38caa0ea2bcb79ad1e46a79
Solidity
AssetBurnStrategy
contract AssetBurnStrategy is BaseStrategyInitializable { using SafeERC20 for ERC20; using Address for address; using SafeMath for uint256; VaultAPI public underlyingVault; address public asset; address public weth; address public uniswapRouterV2; address public uniswapFactory; add...
name
function name() external view override returns (string memory) { // Add your own name here, suggestion e.g. "StrategyCreamYFI" return string( abi.encodePacked("StrategyUbi", ERC20(address(want)).symbol()) ); }
// ******** OVERRIDE THESE METHODS FROM BASE CONTRACT ************
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 2877, 3150 ] }
58,948
AssetBurnStrategy
AssetBurnStrategy.sol
0xf2eefca91a179c5eb38caa0ea2bcb79ad1e46a79
Solidity
AssetBurnStrategy
contract AssetBurnStrategy is BaseStrategyInitializable { using SafeERC20 for ERC20; using Address for address; using SafeMath for uint256; VaultAPI public underlyingVault; address public asset; address public weth; address public uniswapRouterV2; address public uniswapFactory; add...
delegatedAssets
function delegatedAssets() external view override returns (uint256) { StrategyParams memory params = vault.strategies(address(this)); return Math.min(params.totalDebt, _balanceOnUnderlyingVault()); }
/** * @notice * The amount (priced in want) of the total assets managed by this strategy should not count * towards Yearn's TVL calculations. * @dev * You can override this field to set it to a non-zero value if some of the assets of this * Strategy is somehow delegated inside another part of of Yearn's ecosy...
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 4073, 4296 ] }
58,949
AssetBurnStrategy
AssetBurnStrategy.sol
0xf2eefca91a179c5eb38caa0ea2bcb79ad1e46a79
Solidity
AssetBurnStrategy
contract AssetBurnStrategy is BaseStrategyInitializable { using SafeERC20 for ERC20; using Address for address; using SafeMath for uint256; VaultAPI public underlyingVault; address public asset; address public weth; address public uniswapRouterV2; address public uniswapFactory; add...
harvestTrigger
function harvestTrigger(uint256 callCost) public view override returns (bool) { return super.harvestTrigger(ethToWant(callCost)); }
// NOTE: Can override `tendTrigger` and `harvestTrigger` if necessary
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 11547, 11730 ] }
58,950
AssetBurnStrategy
AssetBurnStrategy.sol
0xf2eefca91a179c5eb38caa0ea2bcb79ad1e46a79
Solidity
AssetBurnStrategy
contract AssetBurnStrategy is BaseStrategyInitializable { using SafeERC20 for ERC20; using Address for address; using SafeMath for uint256; VaultAPI public underlyingVault; address public asset; address public weth; address public uniswapRouterV2; address public uniswapFactory; add...
protectedTokens
function protectedTokens() internal view override returns (address[] memory) { address[] memory protected = new address[](1); protected[0] = asset; return protected; }
// Override this to add all tokens/tokenized positions this contract manages // on a *persistent* basis (e.g. not just for swapping back to want ephemerally) // NOTE: Do *not* include `want`, already included in `sweep` below // // Example: // // function protectedTokens() internal override view returns (address[] m...
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 12736, 12973 ] }
58,951
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
toString
function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 ...
/** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 184, 912 ] }
58,952
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
toHexString
function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); }
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 1017, 1362 ] }
58,953
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
Solidity
Strings
library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT ...
toHexString
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } ...
/** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 1485, 1941 ] }
58,954
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 606, 998 ] }
58,955
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
sendValue
function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); }
/** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `tr...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 1928, 2250 ] }
58,956
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 3007, 3187 ] }
58,957
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
functionCall
function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 3412, 3646 ] }
58,958
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 4016, 4281 ] }
58,959
FishTankNFT
@openzeppelin/contracts/utils/Strings.sol
0x31b94da59767a9bc1c2bed8236ccb6f15b794d8b
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 ...
functionCallWithValue
function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract");...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
None
ipfs://236d001cf64d6155763c65a9c7f57925bcfd40f6b997f2c347b1bed579227211
{ "func_code_index": [ 4532, 5047 ] }
58,960