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
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
removeAddressesFromWhitelist
function removeAddressesFromWhitelist(address[] _addresses) onlyOwnerOrCoOwner public returns (bool success) { uint length = _addresses.length; for (uint i = 0; i < length; i++) { if (removeAddressFromWhitelist(_addresses[i])) { success = true; } } }
/** * @dev remove addresses from the whitelist * @param _addresses addresses * @return true if at least one address was removed from the whitelist, * false if all addresses weren't in the whitelist in the first place */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 6803, 7133 ] }
17,000
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
setStop
function setStop() onlyOwnerOrCoOwner { isStopped = true; }
/** * Stop selling for bonus transfer * @notice Owner should release InvestmentDiscount smart contract before call this */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 7282, 7360 ] }
17,001
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
setReachCapped
function setReachCapped() public onlyOwnerOrCoOwner { isCapped = true; }
/** * @dev Set hardcap is reached * @notice Owner must release all sale smart contracts */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 7477, 7568 ] }
17,002
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
getCapInWei
function getCapInWei() public view returns (uint) { return totalCapInWei; }
/** * @dev Get total distribution in Wei */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 7632, 7726 ] }
17,003
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
getNoInvestor
function getNoInvestor() public view returns (uint) { return transferAddresses.length; }
/** * @dev Get no. investors */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 7778, 7885 ] }
17,004
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
getUnsoldToken
function getUnsoldToken() public view returns (uint) { uint unsold = balances[owner()]; for (uint j = 0; j < coOwnerList.length; j++) { unsold = unsold.add(balances[coOwnerList[j]]); } return unsold; }
/** * @dev Get unsold tokens */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 7937, 8199 ] }
17,005
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
getDistributedToken
function getDistributedToken() public view returns (uint) { return totalSupply_.sub(getUnsoldToken()); }
/** * @dev Get distributed tokens */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 8256, 8379 ] }
17,006
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
transfer
function transfer(address _to, uint _value) public returns (bool) { //required this contract has enough Mozo tokens //obsolete //if (msg.sender == owner()) { // require(parent.balanceOf(this) >= getDistributedToken().add(_value)); //} //we will check it when releasing smart contract ...
/** * @dev Override transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 8560, 9586 ] }
17,007
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
calculateNoToken
function calculateNoToken(uint _weiAmount) public view returns (uint) { return _weiAmount.div(rate); }
/** * @param _weiAmount Contribution in wei * */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 9662, 9783 ] }
17,008
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
transferByEth
function transferByEth(address _to, uint _weiAmount, uint _value) public onlyWhileOpen onlySameChain() returns (bool) { if (transfer(_to, _value)) { totalCapInWei = totalCapInWei.add(_weiAmount); return true; } return false; }
/** * @dev Override transfer token for a specified address * @param _to The address to transfer to. * @param _weiAmount The wei amount spent to by token */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 9971, 10285 ] }
17,009
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
release
function release() public onlyOwnerOrCoOwner { _release(); }
/** * @dev Release smart contract * @notice Owner must release all sale smart contracts */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 10402, 10481 ] }
17,010
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
claim
function claim() public isEnded { require(balances[msg.sender] > 0); uint investorBalance = balances[msg.sender]; balances[msg.sender] = 0; parent.transfer(msg.sender, investorBalance); }
/** * @dev Investor claim tokens */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 10537, 10772 ] }
17,011
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
bonusToken
function bonusToken(address[] _recipients, uint[] _amount) public onlyOwnerOrCoOwner onlyStopping { uint len = _recipients.length; uint len1 = _amount.length; require(len == len1); require(len <= MAX_TRANSFER); uint i; uint total = 0; for (i = 0; i < len; i++) { if (bonus_tra...
/** * @param _recipients list of repicients * @param _amount list of no. tokens */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 10880, 11589 ] }
17,012
MozoSaleToken
MozoSaleToken.sol
0x902d03103a59d9e855d2508bc7dc51bbe1fa5053
Solidity
MozoSaleToken
contract MozoSaleToken is BasicToken, Timeline, ChainCoOwner, ICO { using SafeMath for uint; //sale token name, use in ICO phase only string public constant name = "Mozo Sale Token"; //sale token symbol, use in ICO phase only string public constant symbol = "SMZO"; //token symbol ...
/** * @title Mozo sale token for ICO * @author Biglabs Pte. Ltd. */
NatSpecMultiLine
_release
function _release() internal { uint length = min(transferAddresses.length, transferredIndex + MAX_TRANSFER); uint i = transferredIndex; if (isCapped) { //Reach hardcap, burn all owner sale token for (; i < length; i++) { address ad = transferAddresses[i]; uin...
/** * @notice Only call after releasing all sale smart contracts, this smart contract must have enough Mozo tokens * @dev Release smart contract */
NatSpecMultiLine
v0.4.23+commit.124ca40d
bzzr://2adf467a4795fdaf42bae5f76c8d6410441a024d82d07fd1f08ae4baaca2aa3e
{ "func_code_index": [ 11868, 13585 ] }
17,013
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
addPair
function addPair( address _key, address _value ) external timeLockUpgrade { require( whitelist[_key] == address(0), "AddressToAddressWhiteList.addPair: Address pair already exists." ); require( _value != address(0), "AddressToAddressWhiteList.ad...
/** * Add an address to the whitelist * * @param _key Key type address to add to the whitelist * @param _value Value type address to add to the whitelist under _key */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 2391, 2922 ] }
17,014
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
removePair
function removePair( address _key ) external timeLockUpgrade { address valueToRemove = whitelist[_key]; require( valueToRemove != address(0), "AddressToAddressWhiteList.removePair: key type address is not current whitelisted." ); keys = keys.remove(_key); ...
/** * Remove a address to address pair from the whitelist * * @param _key Key type address to remove to the whitelist */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 3078, 3537 ] }
17,015
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
editPair
function editPair( address _key, address _value ) external timeLockUpgrade { require( whitelist[_key] != address(0), "AddressToAddressWhiteList.editPair: Address pair must exist." ); require( _value != address(0), "AddressToAddressWhiteList.edit...
/** * Edit value type address associated with a key * * @param _key Key type address to add to the whitelist * @param _value Value type address to add to the whitelist under _key */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 3767, 4468 ] }
17,016
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
validAddresses
function validAddresses() external view returns (address[] memory) { return keys; }
/** * Return array of all whitelisted addresses * * @return address[] Array of key type addresses */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 4606, 4740 ] }
17,017
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
getValues
function getValues( address[] calldata _key ) external view returns (address[] memory) { // Get length of passed array uint256 arrayLength = _key.length; // Instantiate value type addresses array address[] memory values = new address[](arrayLength); for (uint256 i = 0;...
/** * Return array of value type addresses based on passed in key type addresses * * @param _key Array of key type addresses to get value type addresses for * @return address[] Array of value type addresses */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 5014, 5598 ] }
17,018
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
getValue
function getValue( address _key ) public view returns (address) { // Require key to have matching value type address require( whitelist[_key] != address(0), "AddressToAddressWhiteList.getValue: No value for that address." ); // Return address associated with...
/** * Return value type address associated with a passed key type address * * @param _key Address of key type * @return address Address associated with _key */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 5822, 6239 ] }
17,019
AddressToAddressWhiteList
contracts/lib/AddressToAddressWhiteList.sol
0x5ba020a8835ed40936941562bdf42d66f65fc00f
Solidity
AddressToAddressWhiteList
contract AddressToAddressWhiteList is TimeLockUpgradeV2 { using AddressArrayUtils for address[]; /* ============ State Variables ============ */ address[] public keys; mapping(address => address) public whitelist; /* ============ Events ============ */ event PairAdded( ...
/** * @title AddressToAddressWhiteList * @author Set Protocol * * WhiteList that matches addresses to other addresses */
NatSpecMultiLine
areValidAddresses
function areValidAddresses( address[] calldata _keys ) external view returns (bool) { // Get length of passed array uint256 arrayLength = _keys.length; for (uint256 i = 0; i < arrayLength; i++) { // Return false if key type address doesn't have matching value type address...
/** * Verifies an array of addresses against the whitelist * * @param _keys Array of key type addresses to check if value exists * @return bool Whether all addresses in the list are whitelisted */
NatSpecMultiLine
v0.5.7+commit.6da8b019
Apache-2.0
bzzr://d5bc0527b22e8015f6b117810fa9636643f07edb958db09e19dae9fc43c349b4
{ "func_code_index": [ 6506, 7013 ] }
17,020
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; }
/** * @param _owner The address from which the balance will be retrieved * @return The balance */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 857, 965 ] }
17,021
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowances[_owner][_spender]; }
/** * @notice Allows `_spender` to spend no more than `_value` tokens in msg.sender behalf * @param _owner The address of the account owning tokens * @param _spender The address of the account able to transfer the tokens * @return Amount of remaining tokens allowed to spent */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 1264, 1404 ] }
17,022
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) { // Prevent transfer to 0x0 (empty) address, use burn() instead require(_to != 0x0); // Prevent empty transactions require(_value > 0); // Check if sender has enough require(balances[msg.sender] >= _value); // Subtract the...
/** * @notice send `_value` token to `_to` from `msg.sender` * @param _to The address of the recipient * @param _value The amount of token to be transferred * @return Whether the transfer was successful or not */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 1638, 2276 ] }
17,023
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { // Prevent transfer to 0x0 (empty) address require(_to != 0x0); // Prevent empty transactions require(_value > 0); // Check if sender is allowed to spend the amount require(allowances[_from][msg.sender] >= ...
/** * @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` * @param _from The address of the sender * @param _to The address of the recipient * @param _value The amount of token to be transferred * @return Whether the transfer was successful or not */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 2592, 3454 ] }
17,024
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { // The amount has to be bigger or equal to 0 require(_value >= 0); allowances[msg.sender][_spender] = _value; // Generate the public approval event and return success emit Approval(msg.sender, _spender, _value); return tr...
/** * @notice `msg.sender` approves `_spender` to spend `_value` tokens * @param _spender The address of the account able to transfer the tokens * @param _value The amount of tokens to be approved for transfer * @return Whether the approval was successful or not */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 3741, 4076 ] }
17,025
TetherToken
TetherToken.sol
0x746345bb9149930a3a9920f0035ad7d553b4fd15
Solidity
TetherToken
contract TetherToken is SafeMath { // Public variables of the token string public name = "Tether USD"; // Token name string public symbol = "USDT"; // Token symbol uint8 public decimals = 6; // Token amount of decimals uint256 public totalSupply = 24416147047969263; // Token su...
burn
function burn(uint256 _value) public returns (bool success) { // Check if value is less than 0 require(_value > 0); // Check if the owner has enough tokens require(balances[msg.sender] >= _value); // Subtract the value from the owner balances[msg.sender] = safeSub(balances[msg.sender], _value); // S...
/** * @notice Remove `_value` tokens from the system irreversibly * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.26+commit.4563c3fc
None
bzzr://b5871c0969d4cd347fb1eac5a4e45555fa771cb55cc5c4bd34059f3ae47ce478
{ "func_code_index": [ 4203, 4731 ] }
17,026
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 904, 992 ] }
17,027
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
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.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1106, 1198 ] }
17,028
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1831, 1919 ] }
17,029
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1979, 2084 ] }
17,030
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 2142, 2266 ] }
17,031
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); 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.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 2474, 2654 ] }
17,032
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 2712, 2868 ] }
17,033
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 3010, 3184 ] }
17,034
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amou...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 3653, 3979 ] }
17,035
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 4383, 4606 ] }
17,036
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 5104, 5378 ] }
17,037
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 5863, 6407 ] }
17,038
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfe...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 6683, 7066 ] }
17,039
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _to...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 7393, 7816 ] }
17,040
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_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 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 a...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 8249, 8600 ] }
17,041
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 8927, 9022 ] }
17,042
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
ERC20
contract ERC20 is Context, IERC20_1 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string privat...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * -...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 9620, 9717 ] }
17,043
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20_1 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20_1 token,...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
safeApprove
function safeApprove(IERC20_1 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-lin...
/** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 751, 1380 ] }
17,044
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
SafeERC20
library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20_1 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20_1 token,...
/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `...
NatSpecMultiLine
_callOptionalReturn
function _callOptionalReturn(IERC20_1 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target ...
/** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 2403, 3171 ] }
17,045
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
IJar
interface IJar is IERC20_1 { function token() external view returns (address); function claimInsurance() external; // NOTE: Only yDelegatedVault implements this function getRatio() external view returns (uint256); function depositAll() external; function deposit(uint256) external; ...
/* import "../lib/erc20.sol"; */
Comment
getRatio
function getRatio() external view returns (uint256);
// NOTE: Only yDelegatedVault implements this
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 176, 233 ] }
17,046
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
balanceOfWant
function balanceOfWant() public view returns (uint256) { return IERC20_1(want).balanceOf(address(this)); }
// **** Views **** //
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1963, 2088 ] }
17,047
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
setWithdrawalDevFundFee
function setWithdrawalDevFundFee(uint256 _withdrawalDevFundFee) external { require(msg.sender == timelock, "!timelock"); withdrawalDevFundFee = _withdrawalDevFundFee; }
// **** Setters **** //
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 2387, 2583 ] }
17,048
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
deposit
function deposit() public virtual;
// **** State mutations **** //
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 3870, 3909 ] }
17,049
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
withdraw
function withdraw(IERC20_1 _asset) external returns (uint256 balance) { require(msg.sender == controller, "!controller"); require(want != address(_asset), "want"); balance = _asset.balanceOf(address(this)); _asset.safeTransfer(controller, balance); }
// Controller only function for creating additional rewards from dust
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 3987, 4283 ] }
17,050
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
withdraw
function withdraw(uint256 _amount) external { require(msg.sender == controller, "!controller"); uint256 _balance = IERC20_1(want).balanceOf(address(this)); if (_balance < _amount) { _amount = _withdrawSome(_amount.sub(_balance)); _amount = _amount.add(_balance); } uint256 _f...
// Withdraw partial funds, normally used with a jar withdrawal
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 4354, 5389 ] }
17,051
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
withdrawForSwap
function withdrawForSwap(uint256 _amount) external returns (uint256 balance) { require(msg.sender == controller, "!controller"); _withdrawSome(_amount); balance = IERC20_1(want).balanceOf(address(this)); address _jar = IController(controller).jars(address(want)); require(_jar != ...
// Withdraw funds, used to swap between strategies
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 5448, 5885 ] }
17,052
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
withdrawAll
function withdrawAll() external returns (uint256 balance) { require(msg.sender == controller, "!controller"); _withdrawAll(); balance = IERC20_1(want).balanceOf(address(this)); address _jar = IController(controller).jars(address(want)); require(_jar != address(0), "!jar"); // additional pro...
// Withdraw all funds, normally used when migrating strategies
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 5956, 6395 ] }
17,053
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
execute
function execute(address _target, bytes memory _data) public payable returns (bytes memory response) { require(msg.sender == timelock, "!timelock"); require(_target != address(0), "!target"); // call contract in current context assembly { let succeeded := delegatecall( ...
// **** Emergency functions ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 6653, 7711 ] }
17,054
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyBase
abstract contract StrategyBase { using SafeERC20 for IERC20_1; using Address for address; using SafeMath for uint256; // Perfomance fees - start with 20% uint256 public performanceTreasuryFee = 2000; uint256 public constant performanceTreasuryMax = 10000; uint256 public performanc...
// Strategy Contract Basics
LineComment
_swapUniswap
function _swapUniswap( address _from, address _to, uint256 _amount ) internal { require(_to != address(0)); // Swap with uniswap IERC20_1(_from).safeApprove(univ2Router2, 0); IERC20_1(_from).safeApprove(univ2Router2, _amount); address[] memory path; if (_from == weth ...
// **** Internal functions ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 7751, 8579 ] }
17,055
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyStakingRewardsBase
abstract contract StrategyStakingRewardsBase is StrategyBase { address public rewards; // **** Getters **** constructor( address _rewards, address _want, address _governance, address _strategist, address _controller, address _timelock ) ...
// Base contract for SNX Staking rewards contract interfaces
LineComment
deposit
function deposit() public override { uint256 _want = IERC20_1(want).balanceOf(address(this)); if (_want > 0) { IERC20_1(want).safeApprove(rewards, 0); IERC20_1(want).safeApprove(rewards, _want); IStakingRewards(rewards).stake(_want); } }
// **** Setters ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 767, 1080 ] }
17,056
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyMithFarmBase
abstract contract StrategyMithFarmBase is StrategyStakingRewardsBase { // Token addresses address public mis = 0x4b4D2e899658FB59b1D518b68fe836B100ee8958; address public usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // USDT/<token1> pair address public token1; // How much MIS toke...
/* import "./strategy-staking-rewards-base.sol"; */
Comment
setKeepMIS
function setKeepMIS(uint256 _keepMIS) external { require(msg.sender == timelock, "!timelock"); keepMIS = _keepMIS; }
// **** Setters ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1253, 1397 ] }
17,057
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyMithFarmBase
abstract contract StrategyMithFarmBase is StrategyStakingRewardsBase { // Token addresses address public mis = 0x4b4D2e899658FB59b1D518b68fe836B100ee8958; address public usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; // USDT/<token1> pair address public token1; // How much MIS toke...
/* import "./strategy-staking-rewards-base.sol"; */
Comment
harvest
function harvest() public override onlyBenevolent { // Anyone can harvest it at any given time. // I understand the possibility of being frontrun // But ETH is a dark forest, and I wanna see how this plays out // i.e. will be be heavily frontrunned? // if so, a new strategy will be deploye...
// **** State Mutations ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 1436, 3714 ] }
17,058
StrategyMithMisUsdtLp
contracts/token/ERC20/ERC20.sol
0xe401b6ae4d00ea4b53f515b880170f6a72ac4745
Solidity
StrategyMithMisUsdtLp
contract StrategyMithMisUsdtLp is StrategyMithFarmBase { // Token addresses address public mith_rewards = 0x14E33e1D6Cc4D83D7476492C0A52b3d4F869d892; address public uni_mis_usdt_lp = 0x066F3A3B7C8Fa077c71B9184d862ed0A4D5cF3e0; constructor( address _governance, address _strategist...
/* import "../strategy-mith-farm-base.sol"; */
Comment
getName
function getName() external override pure returns (string memory) { return "StrategyMithMisUsdtLp"; }
// **** Views ****
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://40304710bd2ba04a1bd83818f3503cd9f4422fe12d6d23353ff5f46825b9eabb
{ "func_code_index": [ 657, 777 ] }
17,059
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
totalSupply
function totalSupply() public view returns (uint256 supply) {}
/// @return total amount of tokens
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 60, 127 ] }
17,060
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
balanceOf
function balanceOf(address _owner) public view returns (uint256 balance) {}
/// @param _owner The address from which the balance will be retrieved /// @return The balance
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 235, 315 ] }
17,061
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
transfer
function transfer(address _to, uint256 _value) public returns (bool success) {}
/// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 552, 636 ] }
17,062
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 959, 1062 ] }
17,063
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
approve
function approve(address _spender, uint256 _value) public returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 1346, 1434 ] }
17,064
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
Token
contract Token { /// @return total amount of tokens function totalSupply() public view returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance) {} ...
allowance
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {}
/// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent
NatSpecSingleLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 1642, 1742 ] }
17,065
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
HumanStandardToken
contract HumanStandardToken is StandardToken { function () external { //if ether is sent to this address, send it back. revert(); } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. Th...
/* This Token Contract implements the standard token functionality (https://github.com/ethereum/EIPs/issues/20) as well as the following OPTIONAL extras intended for use by humans. In other words. This is intended for deployment in something like a Token Factory or Mist wallet, and then used by humans. Imagine...
Comment
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, address(this), _extraData); return true; } ...
/* Approves and then calls the receiving contract */
Comment
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 1992, 2342 ] }
17,066
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
HumanStandardToken
contract HumanStandardToken is StandardToken { function () external { //if ether is sent to this address, send it back. revert(); } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. Th...
/* This Token Contract implements the standard token functionality (https://github.com/ethereum/EIPs/issues/20) as well as the following OPTIONAL extras intended for use by humans. In other words. This is intended for deployment in something like a Token Factory or Mist wallet, and then used by humans. Imagine...
Comment
burn
function burn(uint256 _value) public { require(msg.sender == owner); require(_value <= balances[msg.sender]); require(_value <= _totalSupply); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an asserti...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 2466, 2998 ] }
17,067
HumanStandardToken
HumanStandardToken.sol
0x5b4db3531f210e203f37d389fa355fc715dacfd2
Solidity
HumanStandardToken
contract HumanStandardToken is StandardToken { function () external { //if ether is sent to this address, send it back. revert(); } /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. Th...
/* This Token Contract implements the standard token functionality (https://github.com/ethereum/EIPs/issues/20) as well as the following OPTIONAL extras intended for use by humans. In other words. This is intended for deployment in something like a Token Factory or Mist wallet, and then used by humans. Imagine...
Comment
transferOwnership
function transferOwnership(address newOwner) public { require(msg.sender == owner); require(newOwner != address(0), "Cannot transfer control of the contract to zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.5.9+commit.e560f70d
None
bzzr://86519340cd407bd3eb4d6aa65ab2875c8ace307896d21d214e73fc7e48572fee
{ "func_code_index": [ 3143, 3428 ] }
17,068
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
ERC23BasicToken
contract ERC23BasicToken { using SafeMath for uint256; uint256 public totalSupply; mapping(address => uint256) balances; event Transfer(address indexed from, address indexed to, uint256 value); function tokenFallback(address _from, uint256 _value, bytes _data) external { throw; ...
//Basic ERC23 token, backward compatible with ERC20 transfer function. //Based in part on code by open-zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git
LineComment
isContract
function isContract(address _addr) returns (bool is_contract) { uint256 length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } if(length>0) { return true; } else { retu...
//assemble the given address bytecode. If bytecode exists then the _addr is a contract.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 1924, 2318 ] }
17,069
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
OpusToken
function OpusToken() { foundation = msg.sender; totalSupply = ecosystemTokenSupply.add(foundationTokenSupply); balances[foundation] = totalSupply; }
//Constructor: set multisig crowdsale recipient wallet address and fund the foundation //Initialize total supply and allocate ecosystem & foundation tokens
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 2575, 2758 ] }
17,070
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
function() payable { buy(); }
//Fallback function when receiving Ether.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 2808, 2856 ] }
17,071
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
halt
function halt() onlyFoundation { halted = true; Halt(); }
//Halt ICO in case of emergency.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 2899, 2984 ] }
17,072
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
buyRecipient
function buyRecipient(address recipient) public payable whenNotHalted { if(msg.value == 0) throw; if(!(preCrowdsaleOn()||crowdsaleOn())) throw;//only allows during presale/crowdsale if(contributions[recipient].add(msg.value)>perAddressCap()) throw;//per address cap uint256 tokens = msg.value.mul(ret...
//Allow addresses to buy token for another account
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 3210, 4424 ] }
17,073
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
burn
function burn(uint256 _value) external onlyFoundation returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); Transfer(msg.sender, address(0), _value); return true; }
//Burns the specified amount of tokens from the foundation //Used to burn unspent funds in foundation DAO
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 4543, 4812 ] }
17,074
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
proposeFoundationTransfer
function proposeFoundationTransfer(address newFoundation) external onlyFoundation { //propose new owner candidate = newFoundation; }
//2-phase ownership transfer; //prevent transferring ownership to non-existent addresses by accident.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 4927, 5087 ] }
17,075
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
setMultisig
function setMultisig(address addr) external onlyFoundation { if (addr == address(0)) throw; multisig = addr; }
//Allow to change the recipient multisig address
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 5482, 5618 ] }
17,076
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
returnRate
function returnRate() public constant returns(uint256) { if (block.number>=startBlock && block.number<=preEndBlock) return 8888; //Pre-crowdsale if (block.number>=phase1StartBlock && block.number<=phase1EndBlock) return 8000; //Crowdsale phase1 if (block.number>phase1EndBlock && block.number<=phase2EndBl...
//Return rate of token against ether.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 6132, 6598 ] }
17,077
OpusToken
OpusToken.sol
0x4355fc160f74328f9b383df2ec589bb3dfd82ba0
Solidity
OpusToken
contract OpusToken is ERC23StandardToken { string public constant name = "Opus Token"; string public constant symbol = "OPT"; uint256 public constant decimals = 18; address public multisig=address(0x1426c1f91b923043F7C5FbabC6e369e7cBaef3f0); //multisig wallet, to which all contributions will be sent...
// Based in part on code by Open-Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity.git // Based in part on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
LineComment
perAddressCap
function perAddressCap() public constant returns(uint256) { uint256 baseline = 1000 * (10**18); return baseline.add(presaleEtherRaised.div(100)); }
//per address cap in Wei: 1000 ether + 1% of ether received at the given time.
LineComment
v0.4.8+commit.60cc1668
bzzr://be2438a2c5e28c2f291e5de0431c85e1051363d4bbf7da1f0b10f176e5d9be65
{ "func_code_index": [ 6685, 6860 ] }
17,078
TulipsSaleAuction
contracts/TulipsSaleAuction.sol
0x6fd570c64568a05b9cf3afcd7d31aa5e3c9b8350
Solidity
TulipsSaleAuction
contract TulipsSaleAuction is TulipsRoles, TulipsSaleInterface { modifier onlyCoreContract() { require(msg.sender == address(coreContract)); _; } struct Auction { address seller; uint128 startingPrice; uint128 endingPrice; uint64 duration; ...
/* * @title Crypto Tulips SaleAuction * @dev . */
Comment
TulipsSaleAuction
function TulipsSaleAuction(address _tulipsCoreContract, uint256 _cut) TulipsRoles() public { require(_cut <= 10000); // cut as percentage between 0.00-100.00% ownerCut = _cut; coreContract = ERC721(_tulipsCoreContract); }
/* * @dev Constructor initialized with the reference to core Tulips contract * @param _tulipsCoreContract - core contract adress should be fixed * @param _cut - core contract adress should be fixed */
Comment
v0.4.18+commit.9cf6e910
bzzr://3090ad6f8e6b232d78b1f282651a5d59dcc27cab5b28f2a4a72155075fc89d93
{ "func_code_index": [ 1215, 1475 ] }
17,079
TulipsSaleAuction
contracts/TulipsSaleAuction.sol
0x6fd570c64568a05b9cf3afcd7d31aa5e3c9b8350
Solidity
TulipsSaleAuction
contract TulipsSaleAuction is TulipsRoles, TulipsSaleInterface { modifier onlyCoreContract() { require(msg.sender == address(coreContract)); _; } struct Auction { address seller; uint128 startingPrice; uint128 endingPrice; uint64 duration; ...
/* * @title Crypto Tulips SaleAuction * @dev . */
Comment
setDefaultAuctionPrices
function setDefaultAuctionPrices(uint256 _startPrice, uint256 _endPrice) external onlyFinancial { initialStartPrice = _startPrice; initialEndPrice = _endPrice; }
/* * @dev These are auction prices for initial tulip sales. */
Comment
v0.4.18+commit.9cf6e910
bzzr://3090ad6f8e6b232d78b1f282651a5d59dcc27cab5b28f2a4a72155075fc89d93
{ "func_code_index": [ 1555, 1744 ] }
17,080
TulipsSaleAuction
contracts/TulipsSaleAuction.sol
0x6fd570c64568a05b9cf3afcd7d31aa5e3c9b8350
Solidity
TulipsSaleAuction
contract TulipsSaleAuction is TulipsRoles, TulipsSaleInterface { modifier onlyCoreContract() { require(msg.sender == address(coreContract)); _; } struct Auction { address seller; uint128 startingPrice; uint128 endingPrice; uint64 duration; ...
/* * @title Crypto Tulips SaleAuction * @dev . */
Comment
putOnInitialSale
function putOnInitialSale(uint256 _tulipId) external onlyCoreContract { // !! Core contract must ensure the ownership _createAuction(_tulipId, initialStartPrice, initialEndPrice, initialSaleDuration, this); }
/* * @dev This function is called from core Contract to put tulip on initial sale. * This is a privilaged version that, recieves request from corecontract. * Core contract ensures that this contract already is the ownerof this tulip */
Comment
v0.4.18+commit.9cf6e910
bzzr://3090ad6f8e6b232d78b1f282651a5d59dcc27cab5b28f2a4a72155075fc89d93
{ "func_code_index": [ 2197, 2433 ] }
17,081
TulipsSaleAuction
contracts/TulipsSaleAuction.sol
0x6fd570c64568a05b9cf3afcd7d31aa5e3c9b8350
Solidity
TulipsSaleAuction
contract TulipsSaleAuction is TulipsRoles, TulipsSaleInterface { modifier onlyCoreContract() { require(msg.sender == address(coreContract)); _; } struct Auction { address seller; uint128 startingPrice; uint128 endingPrice; uint64 duration; ...
/* * @title Crypto Tulips SaleAuction * @dev . */
Comment
_createAuction
function _createAuction( uint256 _tulipId, uint256 _startingPrice, uint256 _endingPrice, uint256 _duration, address _seller ) internal { Auction memory auction = Auction( _seller, uint128(_startingPrice), uint128(_endingPrice), uint64(_duration)...
/// @param _tulipId - Id of the tulip to auction. /// @param _startingPrice - Starting price in wei. /// @param _endingPrice - Ending price in wei. /// @param _duration - Duration in seconds. /// @param _seller - Seller address
NatSpecSingleLine
v0.4.18+commit.9cf6e910
bzzr://3090ad6f8e6b232d78b1f282651a5d59dcc27cab5b28f2a4a72155075fc89d93
{ "func_code_index": [ 3627, 4296 ] }
17,082
TulipsSaleAuction
contracts/TulipsSaleAuction.sol
0x6fd570c64568a05b9cf3afcd7d31aa5e3c9b8350
Solidity
TulipsSaleAuction
contract TulipsSaleAuction is TulipsRoles, TulipsSaleInterface { modifier onlyCoreContract() { require(msg.sender == address(coreContract)); _; } struct Auction { address seller; uint128 startingPrice; uint128 endingPrice; uint64 duration; ...
/* * @title Crypto Tulips SaleAuction * @dev . */
Comment
cancelAuction
function cancelAuction(uint256 _tulipId) external { Auction storage auction = tokenIdToAuction[_tulipId]; require(auction.startedAt > 0); // Only seller can call this function address seller = auction.seller; require(msg.sender == seller); // Return the tulip to the owner co...
/* * @dev Cancel auction and return tulip to original owner. * @param _tulipId - ID of the tulip on auction */
Comment
v0.4.18+commit.9cf6e910
bzzr://3090ad6f8e6b232d78b1f282651a5d59dcc27cab5b28f2a4a72155075fc89d93
{ "func_code_index": [ 4432, 4963 ] }
17,083
StandardERC20
@beandao/contracts/interfaces/IERC173.sol
0xd1ac0b2a9be451e47c5a2bbab3dc22dc8abdd5dc
Solidity
IERC173
interface IERC173 { /** * @dev This emits when ownership of a contract changes. */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @notice Get the address of the owner * @return The address of the owner. */ function owner() external vi...
/** * @title ERC-173 Contract Ownership Standard * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md * Note: the ERC-165 identifier for this interface is 0x7f5828d0 */
NatSpecMultiLine
owner
function owner() external view returns (address);
/** * @notice Get the address of the owner * @return The address of the owner. */
NatSpecMultiLine
v0.8.11+commit.d7f03943
GNU LGPLv3
ipfs://d32d2b0a862a7434a55f3a4ff7330cb336b891cc17a965515b27480b5ea34b47
{ "func_code_index": [ 288, 341 ] }
17,084
StandardERC20
@beandao/contracts/interfaces/IERC173.sol
0xd1ac0b2a9be451e47c5a2bbab3dc22dc8abdd5dc
Solidity
IERC173
interface IERC173 { /** * @dev This emits when ownership of a contract changes. */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @notice Get the address of the owner * @return The address of the owner. */ function owner() external vi...
/** * @title ERC-173 Contract Ownership Standard * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md * Note: the ERC-165 identifier for this interface is 0x7f5828d0 */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) external;
/** * @notice Set the address of the new owner of the contract * @param newOwner The address of the new owner of the contract */
NatSpecMultiLine
v0.8.11+commit.d7f03943
GNU LGPLv3
ipfs://d32d2b0a862a7434a55f3a4ff7330cb336b891cc17a965515b27480b5ea34b47
{ "func_code_index": [ 491, 549 ] }
17,085
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 1911, 2187 ] }
17,086
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 2254, 2564 ] }
17,087
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
balanceOf
function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); }
/** * @dev See {IERC721-balanceOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 2623, 2834 ] }
17,088
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
ownershipOf
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != addres...
/** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 3461, 4549 ] }
17,089
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
ownerOf
function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; }
/** * @dev See {IERC721-ownerOf}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 4606, 4735 ] }
17,090
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev See {IERC721Metadata-name}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 4797, 4902 ] }
17,091
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev See {IERC721Metadata-symbol}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 4966, 5075 ] }
17,092
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; }
/** * @dev See {IERC721Metadata-tokenURI}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 5141, 5464 ] }
17,093
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
_baseURI
function _baseURI() internal view virtual returns (string memory) { return ''; }
/** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 5707, 5806 ] }
17,094
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
approve
function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(...
/** * @dev See {IERC721-approve}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 5863, 6239 ] }
17,095
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
getApproved
function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; }
/** * @dev See {IERC721-getApproved}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 6300, 6509 ] }
17,096
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
setApprovalForAll
function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); }
/** * @dev See {IERC721-setApprovalForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 6576, 6860 ] }
17,097
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
isApprovedForAll
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; }
/** * @dev See {IERC721-isApprovedForAll}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 6926, 7095 ] }
17,098
JungelTycoon
erc721a.sol
0xbca44d867c707080c504f286c35b237d2802b7e5
Solidity
ERC721A
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time...
/** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an o...
NatSpecMultiLine
transferFrom
function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); }
/** * @dev See {IERC721-transferFrom}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://b3a3f17c34ca1a75098b6b7db659ee7979fdd66c517bbeb013119f41b0ee7f7a
{ "func_code_index": [ 7157, 7332 ] }
17,099