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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint64 a, uint64 b) internal pure returns (uint64) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
3922,
4054
]
} | 56,861 |
SatoshiAllotment | contracts/dependencies/SafeMath64.sol | 0x30d72534c2d80736c66a535d657acf7328b965ca | Solidity | SafeMath64 | library SafeMath64 {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint64 a, uint64 b) internal pure returns (uint64)... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint64 a, uint64 b, string memory errorMessage) internal pure returns (uint64) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Unknown | bzzr://c9c4ee1b8720b1046f03191ba2378241876574b2524c7789219aad9afa6c239a | {
"func_code_index": [
4526,
4694
]
} | 56,862 |
MASTERDILL | MASTERDILL.sol | 0x9175757101d31317b16013570dda50403b00b0e2 | Solidity | MASTERDILL | contract MASTERDILL is Ownable{
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public whitelist;
string public name = "Master DILL";
string public symbol = "mDILL";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000... | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... | NatSpecSingleLine | numberRedeemed | function numberRedeemed(uint256 amount)
public
view
returns (uint256 profit) {
uint256 numerator = amount.mul(totalPooled);
uint256 denominator = totalSupply.sub(totalPooled);
return numerator.div(denominator);
}
| // VIEWS
// Get the number of tokens to be redeemed from the pool | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f6abef39fc9e0e6c7b2519a4fa38924d289d26f15a90ff89e648cb97867cc95b | {
"func_code_index": [
1509,
1792
]
} | 56,863 |
MASTERDILL | MASTERDILL.sol | 0x9175757101d31317b16013570dda50403b00b0e2 | Solidity | MASTERDILL | contract MASTERDILL is Ownable{
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public whitelist;
string public name = "Master DILL";
string public symbol = "mDILL";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000... | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... | NatSpecSingleLine | is_profitable | function is_profitable()
public
view
returns (bool _profitable) {
return totalPooled > totalSupply.sub(totalPooled);
}
| // Check if more than 50% of the token is pooled | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f6abef39fc9e0e6c7b2519a4fa38924d289d26f15a90ff89e648cb97867cc95b | {
"func_code_index": [
1853,
2020
]
} | 56,864 |
MASTERDILL | MASTERDILL.sol | 0x9175757101d31317b16013570dda50403b00b0e2 | Solidity | MASTERDILL | contract MASTERDILL is Ownable{
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public whitelist;
string public name = "Master DILL";
string public symbol = "mDILL";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000... | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... | NatSpecSingleLine | addToWhitelist | function addToWhitelist(address _addr)
public
onlyOwner {
whitelist[_addr] = true;
}
| // SETTERS | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f6abef39fc9e0e6c7b2519a4fa38924d289d26f15a90ff89e648cb97867cc95b | {
"func_code_index": [
2043,
2166
]
} | 56,865 |
MASTERDILL | MASTERDILL.sol | 0x9175757101d31317b16013570dda50403b00b0e2 | Solidity | MASTERDILL | contract MASTERDILL is Ownable{
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public whitelist;
string public name = "Master DILL";
string public symbol = "mDILL";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000... | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... | NatSpecSingleLine | transfer | function transfer(address to, uint256 value)
public
returns (bool success) {
require(balanceOf[msg.sender] >= value);
if(whitelist[msg.sender]) return regular_transfer(to, value);
else return burn_transfer(to, value);
}
| // TRANSFER FUNCTIONS
// BOA-TOKEN <- Sell taxed
// TOKEN-BOA <- Buy (not taxed) | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f6abef39fc9e0e6c7b2519a4fa38924d289d26f15a90ff89e648cb97867cc95b | {
"func_code_index": [
2418,
2704
]
} | 56,866 |
MASTERDILL | MASTERDILL.sol | 0x9175757101d31317b16013570dda50403b00b0e2 | Solidity | MASTERDILL | contract MASTERDILL is Ownable{
using SafeMath for uint256;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public whitelist;
string public name = "Master DILL";
string public symbol = "mDILL";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000... | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... | NatSpecSingleLine | redeem | function redeem(uint256 amount)
public
profitable
returns (bool success) {
// the amount must be less than the total amount pooled
require(amount <= balanceOf[msg.sender]);
require(totalPooled >= amount);
uint256 num_redeemed = numberRedeemed(amount);
// make sure t... | // REDEEM AND BURN FUNCTIONS
// amount = number of tokens to burn | LineComment | v0.6.12+commit.27d51765 | None | ipfs://f6abef39fc9e0e6c7b2519a4fa38924d289d26f15a90ff89e648cb97867cc95b | {
"func_code_index": [
5608,
6356
]
} | 56,867 |
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
89,
266
]
} | 56,868 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
350,
630
]
} | 56,869 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
744,
860
]
} | 56,870 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
924,
1054
]
} | 56,871 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
261,
321
]
} | 56,872 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
640,
821
]
} | 56,873 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | BITVesting | contract BITVesting is Ownable {
BITToken public token;
uint256 public releaseDate;
function BITVesting (
BITToken _token,
address _beneficiary,
uint256 _releaseDate
) public {
token = _token;
releaseDate = _releaseDate;
owner = _benefi... | claim | function claim (
address _recipient,
bytes _data
) external onlyOwner returns (bool success) {
require(_recipient != address(0));
require(block.timestamp > releaseDate);
uint256 funds = token.balanceOf(this);
require(token.transfer(_recipient, funds));
// require(token.transfer... | /* After vesting period, this function transfers all available tokens
* from it's account to `_recipient` address. This address could either be
* a wallet or another smart contract. If the transfer was successful, it
* selfdestructs the contract.
*/ | Comment | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
616,
1093
]
} | 56,874 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | BITVesting | contract BITVesting is Ownable {
BITToken public token;
uint256 public releaseDate;
function BITVesting (
BITToken _token,
address _beneficiary,
uint256 _releaseDate
) public {
token = _token;
releaseDate = _releaseDate;
owner = _benefi... | tokenFallback | function tokenFallback(
address _from,
uint _value,
bytes _data
) external view {
require(msg.sender == address(token));
}
| /* From: https://github.com/ethereum/EIPs/issues/223
*
* A function for handling token transfers, which is called from the token
* contract, when a token holder sends tokens. `_from` is the address of the
* sender of the token, `_value` is the amount of incoming tokens, and
* `_data` is attached data similar ... | Comment | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
1593,
1772
]
} | 56,875 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
513,
609
]
} | 56,876 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
693,
791
]
} | 56,877 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
199,
287
]
} | 56,878 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev 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://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
445,
777
]
} | 56,879 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
983,
1095
]
} | 56,880 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
401,
858
]
} | 56,881 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
1490,
1685
]
} | 56,882 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
2009,
2140
]
} | 56,883 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
2606,
2875
]
} | 56,884 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approva... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
3346,
3761
]
} | 56,885 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | mint | function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply_ = totalSupply_.add(_amount);
balances[_to] = balances[_to].add(_amount);
emit Mint(_to, _amount);
emit Transfer(address(0), _to, _amount);
return true;
}
| /**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
483,
766
]
} | 56,886 | |||
BITToken | BITToken.sol | 0x1dc75212ca6489dd26f8dedb9411f230a4e493cc | Solidity | MintableToken | contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that ... | finishMinting | function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
emit MintFinished();
return true;
}
| /**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ddcb99bea43b8e49530322b245d9f7bdae76db57a79dc0f106c0e6cc04fe0e4c | {
"func_code_index": [
883,
1030
]
} | 56,887 | |||
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Strings | library Strings {
// via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol
function strConcat(string _a, string _b, string _c, string _d, string _e) internal pure returns (string) {
bytes memory _ba = bytes(_a);
bytes memory _bb = bytes(_b);
bytes memory _bc =... | strConcat | function strConcat(string _a, string _b, string _c, string _d, string _e) internal pure returns (string) {
bytes memory _ba = bytes(_a);
bytes memory _bb = bytes(_b);
bytes memory _bc = bytes(_c);
bytes memory _bd = bytes(_d);
bytes memory _be = bytes(_e);
string memory abcde = new string(... | // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol | LineComment | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
104,
947
]
} | 56,888 | |||
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | _owns | function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
return kydyIndexToOwner[_tokenId] == _claimant;
}
| /**
* @dev Checks if a given address is the current owner of this Kydy.
* @param _claimant the address which we want to query the ownership of the Kydy ID.
* @param _tokenId Kydy id, only valid when > 0
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2318,
2469
]
} | 56,889 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | _approve | function _approve(uint256 _tokenId, address _approved) internal {
kydyIndexToApproved[_tokenId] = _approved;
}
| /**
* @dev Grants an approval to the given address for safeTransferFrom(), overwriting any
* previous approval. Setting _approved to address(0) clears all transfer approval.
* Note that _approve() does NOT emit the Approval event. This is intentional because
* _approve() and safeTransferFrom() are used toget... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2942,
3071
]
} | 56,890 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | rescueLostKydy | function rescueLostKydy(uint256 _kydyId, address _recipient) external onlyCOO whenNotPaused {
require(_owns(this, _kydyId));
_transfer(this, _recipient, _kydyId);
}
| /**
* @dev Transfers a Kydy owned by this contract to the specified address.
* Used to rescue lost Kydys. (There is no "proper" flow where this contract
* should be the owner of any Kydy. This function exists for us to reassign
* the ownership of Kydys that users may have accidentally sent to our address.)
... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3520,
3712
]
} | 56,891 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
require(_owner != address(0));
return ownershipTokenCount[_owner];
}
| /**
* @dev Gets the number of Kydys owned by the given address.
* Required for ERC-721 compliance.
* @param _owner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3971,
4134
]
} | 56,892 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external whenNotPaused {
address owner = ownerOf(tokenId);
require(to != owner);
// Owner or approved operator by owner can approve the another address
// to transfer the Kydy.
require(msg.sender == owner || isApprovedForAll(owner, msg.sender));
... | /**
* @dev Approves another address to transfer the given Kydy ID.
* The zero address indicates that there is no approved address.
* There can only be one approved address per Kydy at a given time.
* Can only be called by the Kydy owner or an approved operator.
* Required for ERC-721 compliance.
* @para... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4606,
5112
]
} | 56,893 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused {
// Checks the caller is the owner or approved one or an operator.
require(_isApprovedOrOwner(msg.sender, tokenId));
// Safety check to prevent from transferring Kydy to 0x0 address.
require(to != address(0));
... | /**
* @dev Transfers the ownership of the Kydy to another address.
* Usage of this function is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg sender to be the owner, approved, or operator.
* Required for ERC-721 compliance.
* @param from current owner of the Kydy
* @param to ad... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5589,
6328
]
} | 56,894 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId) public {
// solium-disable-next-line arg-overflow
safeTransferFrom(from, to, tokenId, "");
}
| /**
* @dev Safely transfers the ownership of a given Kydy to another address.
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`;
* Otherwis... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
7011,
7200
]
} | 56,895 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) public {
transferFrom(from, to, tokenId);
// solium-disable-next-line arg-overflow
require(_checkOnERC721Received(from, to, tokenId, _data));
}
| /**
* @dev Safely transfers the ownership of a given Kydy to another address.
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`;
* Otherwis... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
7956,
8218
]
} | 56,896 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | _checkOnERC721Received | function _checkOnERC721Received(address _from, address _to, uint256 _tokenId, bytes _data) internal returns (bool) {
if (!_to.isContract()) {
return true;
}
bytes4 retval = ERC721TokenReceiver(_to).onERC721Received(msg.sender, _from, _tokenId, _data);
return (retval == _ERC721_RECEIVED);
... | /**
* @dev Internal function to invoke `onERC721Received` on a target address.
* This function is not executed if the target address is not a contract.
* @param _from address representing the previous owner of the given Kydy ID
* @param _to target address that will receive the Kydys
* @param _tokenId uint256... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
8755,
9106
]
} | 56,897 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | name | function name() external view returns (string) {
return _name;
}
| /**
* @dev Gets the token name.
* Required for ERC721Metadata compliance.
* @return string representing the token name
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
9265,
9348
]
} | 56,898 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string) {
return _symbol;
}
| /**
* @dev Gets the token symbol.
* Required for ERC721Metadata compliance.
* @return string representing the token symbol
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
9507,
9594
]
} | 56,899 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) external view returns (string) {
require(_exists(tokenId));
return Strings.strConcat(
tokenURIBase,
Strings.uint2str(tokenId)
);
}
| /**
* @dev Returns an URI for a given Kydy ID.
* Throws if the token ID does not exist. May return an empty string.
* Required for ERC721Metadata compliance.
* @param tokenId uint256 ID of the token to query
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
9845,
10073
]
} | 56,900 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return kydys.length - 1;
}
| /**
* @dev Gets the total amount of Kydys stored in the contract
* @return uint256 representing the total amount of Kydys
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
10224,
10324
]
} | 56,901 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyOwnership | contract KydyOwnership is KydyBase {
using Strings for string;
/// @notice Name and symbol of the non fungible token, as defined in ERC721.
string public constant _name = "Dyverse";
string public constant _symbol = "KYDY";
// Base Server Address for Token MetaData URI
string internal t... | /**
* @title Part of the KydyCore contract that manages ownership, ERC-721 compliant.
* @author VREX Lab Co., Ltd
* @dev Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
* See the KydyCore contract documentation to understand how the various contracts are arranged.
*/ | NatSpecMultiLine | tokensOfOwner | function tokensOfOwner(address _owner) external view returns(uint256[] ownerTokens) {
uint256 tokenCount = balanceOf(_owner);
if (tokenCount == 0) {
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](tokenCount);
uint25... | /**
* @notice Returns a list of all Kydy IDs assigned to an address.
* @param _owner The owner whose Kydys we are interested in.
* @dev This function MUST NEVER be called by smart contract code. It's pretty
* expensive (it looks into the entire Kydy array looking for Kydys belonging to owner),
* and it also... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
10792,
11641
]
} | 56,902 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | setGeneSynthesisAddress | function setGeneSynthesisAddress(address _address) external onlyCEO {
GeneSynthesisInterface candidateContract = GeneSynthesisInterface(_address);
// Verifies that the contract is valid.
require(candidateContract.isGeneSynthesis());
// Sets the new GeneSynthesis contract address.
geneSynthe... | /**
* @dev Updates the address of the genetic contract. Only CEO may call this function.
* @param _address An address of the new GeneSynthesis contract instance.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
992,
1368
]
} | 56,903 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _isReadyToSynthesize | function _isReadyToSynthesize(Kydy _kyd) internal view returns (bool) {
// Double-checking if there is any pending creation event.
return (_kyd.synthesizingWithId == 0) && (_kyd.rechargeEndBlock <= uint64(block.number));
}
| /**
* @dev Checks that the Kydy is able to synthesize.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1447,
1698
]
} | 56,904 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _isSynthesizingAllowed | function _isSynthesizingAllowed(uint256 _yangId, uint256 _yinId) internal view returns (bool) {
address yinOwner = kydyIndexToOwner[_yinId];
address yangOwner = kydyIndexToOwner[_yangId];
return (yinOwner == yangOwner || synthesizeAllowedToAddress[_yangId] == yinOwner);
}
| /**
* @dev Checks if a yang Kydy has been approved to synthesize with this yin Kydy.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1806,
2117
]
} | 56,905 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _triggerRecharge | function _triggerRecharge(Kydy storage _kyd) internal {
// Computes the approximation of the end of recharge time in blocks (based on current rechargeIndex).
_kyd.rechargeEndBlock = uint64((recharges[_kyd.rechargeIndex] / secondsPerBlock) + block.number);
// Increases this Kydy's synthesizing count, an... | /**
* @dev Sets the rechargeEndTime for the given Kydy, based on its current rechargeIndex.
* The rechargeIndex increases until it hits the cap.
* @param _kyd A reference to the Kydy that needs its timer to be started.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2372,
2830
]
} | 56,906 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | approveSynthesizing | function approveSynthesizing(address _address, uint256 _yangId)
external
whenNotPaused
{
require(_owns(msg.sender, _yangId));
synthesizeAllowedToAddress[_yangId] = _address;
}
| /**
* @notice Grants approval to another user to synthesize with one of your Kydys.
* @param _address The approved address of the yin Kydy that can synthesize with your yang Kydy.
* @param _yangId Your kydy that _address can now synthesize with.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3112,
3338
]
} | 56,907 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | setAutoCreationFee | function setAutoCreationFee(uint256 value) external onlyCOO {
autoCreationFee = value;
}
| /**
* @dev Updates the minimum payment required for calling bringKydyHome(). Only COO
* can call this function.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3481,
3588
]
} | 56,908 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _isReadyToBringKydyHome | function _isReadyToBringKydyHome(Kydy _yin) private view returns (bool) {
return (_yin.synthesizingWithId != 0) && (_yin.rechargeEndBlock <= uint64(block.number));
}
| /// @dev Checks if this Kydy is creating and if the creation period is complete. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3678,
3862
]
} | 56,909 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | isReadyToSynthesize | function isReadyToSynthesize(uint256 _kydyId)
public
view
returns (bool)
{
require(_kydyId > 0);
Kydy storage kyd = kydys[_kydyId];
return _isReadyToSynthesize(kyd);
}
| /**
* @notice Checks if this Kydy is able to synthesize
* @param _kydyId reference the ID of the Kydy
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3994,
4230
]
} | 56,910 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | isCreating | function isCreating(uint256 _kydyId)
public
view
returns (bool)
{
require(_kydyId > 0);
return kydys[_kydyId].synthesizingWithId != 0;
}
| /**
* @dev Checks if the Kydy is currently creating.
* @param _kydyId reference the ID of the Kydy
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4358,
4556
]
} | 56,911 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _isValidCouple | function _isValidCouple(
Kydy storage _yin,
uint256 _yinId,
Kydy storage _yang,
uint256 _yangId
)
private
view
returns(bool)
{
// Kydy can't synthesize with itself.
if (_yinId == _yangId) {
return false;
}
// Kydys can't synthesize with their parents.
... | /**
* @dev Internal check to see if these yang and yin are a valid couple.
* @param _yin A reference to the Kydy struct of the potential yin.
* @param _yinId The yin's ID.
* @param _yang A reference to the Kydy struct of the potential yang.
* @param _yangId The yang's ID
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4876,
5908
]
} | 56,912 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _canSynthesizeWithViaAuction | function _canSynthesizeWithViaAuction(uint256 _yinId, uint256 _yangId)
internal
view
returns (bool)
{
Kydy storage yin = kydys[_yinId];
Kydy storage yang = kydys[_yangId];
return _isValidCouple(yin, _yinId, yang, _yangId);
}
| /**
* @dev Internal check to see if these yang and yin Kydys, connected via market, are a valid couple for synthesis.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
6050,
6343
]
} | 56,913 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | canSynthesizeWith | function canSynthesizeWith(uint256 _yinId, uint256 _yangId)
external
view
returns(bool)
{
require(_yinId > 0);
require(_yangId > 0);
Kydy storage yin = kydys[_yinId];
Kydy storage yang = kydys[_yangId];
return _isValidCouple(yin, _yinId, yang, _yangId) &&
_isSynthesizin... | /**
* @dev Checks if the two Kydys can synthesize together, including checks for ownership and synthesizing approvals.
* @param _yinId ID of the yin Kydy
* @param _yangId ID of the yang Kydy
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
6570,
6968
]
} | 56,914 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | _synthesizeWith | function _synthesizeWith(uint256 _yinId, uint256 _yangId) internal {
Kydy storage yang = kydys[_yangId];
Kydy storage yin = kydys[_yinId];
// Marks this yin as creating, and make note of who the yang Kydy is.
yin.synthesizingWithId = uint32(_yangId);
// Triggers the recharge for both parent... | /**
* @dev Internal function to start synthesizing, when all the conditions are met
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
7075,
7901
]
} | 56,915 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | synthesizeWithAuto | function synthesizeWithAuto(uint256 _yinId, uint256 _yangId)
external
payable
whenNotPaused
{
// Checks for pre-payment.
require(msg.value >= autoCreationFee);
// Caller must be the yin's owner.
require(_owns(msg.sender, _yinId));
// Checks if the caller has valid authority ... | /**
* @dev Synthesis between two approved Kydys. Requires a pre-payment of the fee to the first caller of bringKydyHome().
* @param _yinId ID of the Kydy which will be a yin (will start creation if successful)
* @param _yangId ID of the Kydy which will be a yang (will begin its synthesizing cooldown if successful... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
8252,
9405
]
} | 56,916 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydySynthesis | contract KydySynthesis is KydyOwnership {
/**
* @dev The Creating event is emitted when two Kydys synthesize and the creation
* timer begins by the yin.
*/
event Creating(address owner, uint256 yinId, uint256 yangId, uint256 rechargeEndBlock);
/**
* @notice The minimum paymen... | /**
* @title This manages synthesis and creation of Kydys.
* @author VREX Lab Co., Ltd
* @dev Please reference the KydyCore contract for details.
*/ | NatSpecMultiLine | bringKydyHome | function bringKydyHome(uint256 _yinId)
external
whenNotPaused
returns(uint256)
{
// Gets a reference of the yin from storage.
Kydy storage yin = kydys[_yinId];
// Checks that the yin is a valid Kydy.
require(yin.createdTime != 0);
// Checks that the yin is in creation mode, ... | /**
* @notice Let's bring the new Kydy to it's home!
* @param _yinId A Kydy which is ready to bring the newly created Kydy to home.
* @return The Kydy ID of the newly created Kydy.
* @dev The newly created Kydy is transferred to the owner of the yin Kydy. Anyone is welcome to call this function.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
9743,
11279
]
} | 56,917 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | function() external {}
| /// @dev Disables sending funds to this contract. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
964,
991
]
} | 56,918 | ||
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _owns | function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
return (nonFungibleContract.ownerOf(_tokenId) == _claimant);
}
| /**
* @dev Returns true if the claimant owns the token.
* @param _claimant An address which to query the ownership of the token.
* @param _tokenId ID of the token to query the owner of.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1593,
1757
]
} | 56,919 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _escrow | function _escrow(address _owner, uint256 _tokenId) internal {
nonFungibleContract.safeTransferFrom(_owner, this, _tokenId);
}
| /**
* @dev Escrows the NFT. Grants the ownership of the NFT to this contract safely.
* Throws if the escrow fails.
* @param _owner Current owner of the token.
* @param _tokenId ID of the token to escrow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2003,
2147
]
} | 56,920 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _transfer | function _transfer(address _receiver, uint256 _tokenId) internal {
nonFungibleContract.safeTransferFrom(this, _receiver, _tokenId);
}
| /**
* @dev Transfers an NFT owned by this contract to another address safely.
* @param _receiver The receiving address of NFT.
* @param _tokenId ID of the token to transfer.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2356,
2508
]
} | 56,921 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _addAuction | function _addAuction(uint256 _tokenId, Auction _auction) internal {
tokenIdToAuction[_tokenId] = _auction;
emit AuctionCreated(
uint256(_tokenId),
uint256(_auction.price)
);
}
| /**
* @dev Adds an auction to the list of open auctions.
* @param _tokenId ID of the token to be put on auction.
* @param _auction Auction information of this token to open.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2718,
2958
]
} | 56,922 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _cancelAuction | function _cancelAuction(uint256 _tokenId, address _seller) internal {
_removeAuction(_tokenId);
_transfer(_seller, _tokenId);
emit AuctionCanceled(_tokenId);
}
| /// @dev Cancels the auction which the _seller wants. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3020,
3216
]
} | 56,923 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _bid | function _bid(uint256 _tokenId, uint256 _bidAmount)
internal
returns (uint256)
{
// Gets a reference of the token from auction storage.
Auction storage auction = tokenIdToAuction[_tokenId];
// Checks that this auction is currently open
require(_isOnAuction(auction));
// Checks th... | /**
* @dev Computes the price and sends it to the seller.
* Note that this does NOT transfer the ownership of the token.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3367,
4731
]
} | 56,924 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _removeAuction | function _removeAuction(uint256 _tokenId) internal {
delete tokenIdToAuction[_tokenId];
}
| /**
* @dev Removes an auction from the list of open auctions.
* @param _tokenId ID of the NFT on auction to be removed.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4880,
4988
]
} | 56,925 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _isOnAuction | function _isOnAuction(Auction storage _auction) internal view returns (bool) {
return (_auction.startedAt > 0);
}
| /**
* @dev Returns true if the NFT is on auction.
* @param _auction An auction to check if it exists.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5119,
5251
]
} | 56,926 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _currentPrice | function _currentPrice(Auction storage _auction)
internal
view
returns (uint256)
{
return _auction.price;
}
| /// @dev Returns the current price of an NFT on auction. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5316,
5474
]
} | 56,927 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | AuctionBase | contract AuctionBase is ERC721Holder {
using SafeMath for uint256;
// Represents an auction on an NFT
struct Auction {
// Current owner of NFT
address seller;
// Price (in wei) of NFT
uint128 price;
// Time when the auction started
// NOTE: 0 if thi... | /**
* @title Base auction contract of the Dyverse
* @author VREX Lab Co., Ltd
* @dev Contains necessary functions and variables for the auction.
* Inherits `ERC721Holder` contract which is the implementation of the `ERC721TokenReceiver`.
* This is to accept safe transfers.
*/ | NatSpecMultiLine | _computeCut | function _computeCut(uint256 _price) internal view returns (uint256) {
return _price * ownerCut / 10000;
}
| /**
* @dev Computes the owner's receiving amount from the sale.
* @param _price Sale price of the NFT.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5606,
5731
]
} | 56,928 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | withdrawBalance | function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == nftAddress
);
nftAddress.transfer(address(this).balance);
}
| /**
* @dev Removes all Ether from the contract to the NFT contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
135,
403
]
} | 56,929 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createAuction | function createAuction(
uint256 _tokenId,
uint256 _price,
address _seller
)
external
whenNotPaused
canBeStoredWith128Bits(_price)
{
require(_owns(msg.sender, _tokenId));
_escrow(msg.sender, _tokenId);
Auction memory auction = Auction(
_seller,
uint128(_pr... | /**
* @dev Creates and begins a new auction.
* @param _tokenId ID of the token to creat an auction, caller must be it's owner.
* @param _price Price of the token (in wei).
* @param _seller Seller of this token.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
655,
1122
]
} | 56,930 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | bid | function bid(uint256 _tokenId)
external
payable
whenNotPaused
{
_bid(_tokenId, msg.value);
_transfer(msg.sender, _tokenId);
}
| /**
* @dev Bids on an open auction, completing the auction and transferring
* ownership of the NFT if enough Ether is supplied.
* @param _tokenId - ID of token to bid on.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1329,
1514
]
} | 56,931 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | cancelAuction | function cancelAuction(uint256 _tokenId, address _seller)
external
{
// Requires that this function should only be called from the
// `cancelSaleAuction()` of NFT ownership contract. This function gets
// the _seller directly from it's arguments, so if this check doesn't
// exist, then anyone ... | /**
* @dev Cancels an auction and returns the NFT to the current owner.
* @param _tokenId ID of the token on auction to cancel.
* @param _seller The seller's address.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1716,
2388
]
} | 56,932 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | cancelAuctionWhenPaused | function cancelAuctionWhenPaused(uint256 _tokenId)
external
whenPaused
onlyOwner
{
Auction storage auction = tokenIdToAuction[_tokenId];
require(_isOnAuction(auction));
_cancelAuction(_tokenId, auction.seller);
}
| /**
* @dev Cancels an auction when the contract is paused.
* Only the owner may do this, and NFTs are returned to the seller.
* @param _tokenId ID of the token on auction to cancel.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2606,
2887
]
} | 56,933 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | getAuction | function getAuction(uint256 _tokenId)
external
view
returns
(
address seller,
uint256 price,
uint256 startedAt
) {
Auction storage auction = tokenIdToAuction[_tokenId];
require(_isOnAuction(auction));
return (
auction.seller,
auction.price,
aucti... | /**
* @dev Returns the auction information for an NFT
* @param _tokenId ID of the NFT on auction
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3013,
3425
]
} | 56,934 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | Auction | contract Auction is Pausable, AuctionBase {
/**
* @dev Removes all Ether from the contract to the NFT contract.
*/
function withdrawBalance() external {
address nftAddress = address(nonFungibleContract);
require(
msg.sender == owner ||
msg.sender == ... | /**
* @title Auction for NFT.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | getCurrentPrice | function getCurrentPrice(uint256 _tokenId)
external
view
returns (uint256)
{
Auction storage auction = tokenIdToAuction[_tokenId];
require(_isOnAuction(auction));
return _currentPrice(auction);
}
| /**
* @dev Returns the current price of the token on auction.
* @param _tokenId ID of the token
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3550,
3814
]
} | 56,935 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | SynthesizingAuction | contract SynthesizingAuction is Auction {
/**
* @dev Sanity check that allows us to ensure that we are pointing to the
* right auction in our `setSynthesizingAuctionAddress()` call.
*/
bool public isSynthesizingAuction = true;
/**
* @dev Creates a reference to the NFT ownersh... | /**
* @title Auction for synthesizing
* @author VREX Lab Co., Ltd
* @notice Reset fallback function to prevent accidental fund sending to this contract.
*/ | NatSpecMultiLine | createAuction | function createAuction(
uint256 _tokenId,
uint256 _price,
address _seller
)
external
canBeStoredWith128Bits(_price)
{
require(msg.sender == address(nonFungibleContract));
_escrow(_seller, _tokenId);
Auction memory auction = Auction(
_seller,
uint128(_price),
... | /**
* @dev Creates and begins a new auction. Since this function is wrapped,
* requires the caller to be KydyCore contract.
* @param _tokenId ID of token to auction, sender must be it's owner.
* @param _price Price of the token (in wei).
* @param _seller Seller of this token.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1107,
1563
]
} | 56,936 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | SynthesizingAuction | contract SynthesizingAuction is Auction {
/**
* @dev Sanity check that allows us to ensure that we are pointing to the
* right auction in our `setSynthesizingAuctionAddress()` call.
*/
bool public isSynthesizingAuction = true;
/**
* @dev Creates a reference to the NFT ownersh... | /**
* @title Auction for synthesizing
* @author VREX Lab Co., Ltd
* @notice Reset fallback function to prevent accidental fund sending to this contract.
*/ | NatSpecMultiLine | bid | function bid(uint256 _tokenId)
external
payable
{
require(msg.sender == address(nonFungibleContract));
address seller = tokenIdToAuction[_tokenId].seller;
// _bid() checks that the token ID is valid and will throw if bid fails
_bid(_tokenId, msg.value);
// Transfers the Kydy back to ... | /**
* @dev Places a bid for synthesizing. Requires the caller
* is the KydyCore contract because all bid functions
* should be wrapped. Also returns the Kydy to the
* seller rather than the bidder.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1805,
2269
]
} | 56,937 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | SaleAuction | contract SaleAuction is Auction {
/**
* @dev To make sure we are addressing to the right auction.
*/
bool public isSaleAuction = true;
// Last 5 sale price of Generation 0 Kydys.
uint256[5] public lastGen0SalePrices;
// Total number of Generation 0 Kydys sold.
uint25... | /**
* @title Auction for sale of Kydys.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createAuction | function createAuction(
uint256 _tokenId,
uint256 _price,
address _seller
)
external
canBeStoredWith128Bits(_price)
{
require(msg.sender == address(nonFungibleContract));
_escrow(_seller, _tokenId);
Auction memory auction = Auction(
_seller,
uint128(_price),
... | /**
* @dev Creates and begins a new auction.
* @param _tokenId ID of token to auction, sender must be it's owner.
* @param _price Price of the token (in wei).
* @param _seller Seller of this token.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1107,
1563
]
} | 56,938 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | SaleAuction | contract SaleAuction is Auction {
/**
* @dev To make sure we are addressing to the right auction.
*/
bool public isSaleAuction = true;
// Last 5 sale price of Generation 0 Kydys.
uint256[5] public lastGen0SalePrices;
// Total number of Generation 0 Kydys sold.
uint25... | /**
* @title Auction for sale of Kydys.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | bid | function bid(uint256 _tokenId)
external
payable
{
// _bid verifies token ID
address seller = tokenIdToAuction[_tokenId].seller;
uint256 price = _bid(_tokenId, msg.value);
_transfer(msg.sender, _tokenId);
// If the last sale was not Generation 0 Kydy's, the lastSalePrice doesn't cha... | /**
* @dev Updates lastSalePrice only if the seller is nonFungibleContract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1663,
2237
]
} | 56,939 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | SaleAuction | contract SaleAuction is Auction {
/**
* @dev To make sure we are addressing to the right auction.
*/
bool public isSaleAuction = true;
// Last 5 sale price of Generation 0 Kydys.
uint256[5] public lastGen0SalePrices;
// Total number of Generation 0 Kydys sold.
uint25... | /**
* @title Auction for sale of Kydys.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | averageGen0SalePrice | function averageGen0SalePrice() external view returns (uint256) {
uint256 sum = 0;
for (uint256 i = 0; i < 5; i++) {
sum = sum.add(lastGen0SalePrices[i]);
}
return sum / 5;
}
| /// @dev Gives the new average Generation 0 sale price after each Generation 0 Kydy sale. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2335,
2568
]
} | 56,940 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | setSaleAuctionAddress | function setSaleAuctionAddress(address _address) external onlyCEO {
SaleAuction candidateContract = SaleAuction(_address);
// Verifies that the contract is correct
require(candidateContract.isSaleAuction());
// Sets the new sale auction contract address.
saleAuction = candidateContract;
}
... | /**
* @dev Sets the address for the sales auction. Only CEO may call this function.
* @param _address The address of the sale contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
546,
894
]
} | 56,941 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | setSynthesizingAuctionAddress | function setSynthesizingAuctionAddress(address _address) external onlyCEO {
SynthesizingAuction candidateContract = SynthesizingAuction(_address);
require(candidateContract.isSynthesizingAuction());
synthesizingAuction = candidateContract;
}
| /**
* @dev Sets the address to the synthesis auction. Only CEO may call this function.
* @param _address The address of the synthesis contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1067,
1349
]
} | 56,942 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createSaleAuction | function createSaleAuction(
uint256 _kydyId,
uint256 _price
)
external
whenNotPaused
{
require(_owns(msg.sender, _kydyId));
require(!isCreating(_kydyId));
_approve(_kydyId, saleAuction);
saleAuction.createAuction(
_kydyId,
_price,
msg.sender
)... | /**
* @dev Creates a Kydy sale.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1404,
1793
]
} | 56,943 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createSynthesizingAuction | function createSynthesizingAuction(
uint256 _kydyId,
uint256 _price
)
external
whenNotPaused
{
require(_owns(msg.sender, _kydyId));
require(isReadyToSynthesize(_kydyId));
_approve(_kydyId, synthesizingAuction);
synthesizingAuction.createAuction(
_kydyId,
_pr... | /**
* @dev Creates a synthesis auction.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1857,
2277
]
} | 56,944 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | bidOnSynthesizingAuction | function bidOnSynthesizingAuction(
uint256 _yangId,
uint256 _yinId
)
external
payable
whenNotPaused
{
require(_owns(msg.sender, _yinId));
require(isReadyToSynthesize(_yinId));
require(_canSynthesizeWithViaAuction(_yinId, _yangId));
uint256 currentPrice = synthesizingAuct... | /**
* @dev After bidding for a synthesis auction is accepted, this starts the actual synthesis process.
* @param _yangId ID of the yang Kydy on the synthesis auction.
* @param _yinId ID of the yin Kydy owned by the bidder.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2535,
3147
]
} | 56,945 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | cancelSaleAuction | function cancelSaleAuction(
uint256 _kydyId
)
external
whenNotPaused
{
// Checks if the Kydy is in auction.
require(_owns(saleAuction, _kydyId));
// Gets the seller of the Kydy.
(address seller,,) = saleAuction.getAuction(_kydyId);
// Checks that the caller is the real seller.... | /**
* @dev Cancels a sale and returns the Kydy back to the owner.
* @param _kydyId ID of the Kydy on sale that the owner wishes to cancel.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3315,
3860
]
} | 56,946 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | cancelSynthesizingAuction | function cancelSynthesizingAuction(
uint256 _kydyId
)
external
whenNotPaused
{
require(_owns(synthesizingAuction, _kydyId));
(address seller,,) = synthesizingAuction.getAuction(_kydyId);
require(msg.sender == seller);
synthesizingAuction.cancelAuction(_kydyId, msg.sender);
}
| /**
* @dev Cancels an synthesis auction.
* @param _kydyId ID of the Kydy on the synthesis auction.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
3990,
4348
]
} | 56,947 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyAuction | contract KydyAuction is KydySynthesis {
/**
* @dev The address of the Auction contract which handles ALL sales of Kydys, both user-generated and Generation 0.
*/
SaleAuction public saleAuction;
/**
* @dev The address of another Auction contract which handles synthesis auctions.
... | /**
* @title This contract defines how sales and synthesis auctions for Kydys are created.
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | withdrawAuctionBalances | function withdrawAuctionBalances() external onlyCLevel {
saleAuction.withdrawBalance();
synthesizingAuction.withdrawBalance();
}
| /**
* @dev Transfers the balance.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4406,
4562
]
} | 56,948 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyMinting | contract KydyMinting is KydyAuction {
// Limits of the number of Kydys that COO can create.
uint256 public constant promoCreationLimit = 888;
uint256 public constant gen0CreationLimit = 8888;
uint256 public constant gen0StartingPrice = 10 finney;
// Counts the number of Kydys that COO has... | /**
* @title All functions related to creating Kydys
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createPromoKydy | function createPromoKydy(uint256 _genes, address _owner) external onlyCOO {
address kydyOwner = _owner;
if (kydyOwner == address(0)) {
kydyOwner = cooAddress;
}
require(promoCreatedCount < promoCreationLimit);
promoCreatedCount++;
_createKydy(0, 0, 0, _genes, kydyOwner);
}
| /**
* @dev Creates promo Kydys, up to a limit. Only COO can call this function.
* @param _genes Encoded genes of the Kydy to be created.
* @param _owner Future owner of the created Kydys. COO is the default owner.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
656,
1008
]
} | 56,949 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyMinting | contract KydyMinting is KydyAuction {
// Limits of the number of Kydys that COO can create.
uint256 public constant promoCreationLimit = 888;
uint256 public constant gen0CreationLimit = 8888;
uint256 public constant gen0StartingPrice = 10 finney;
// Counts the number of Kydys that COO has... | /**
* @title All functions related to creating Kydys
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | createGen0Auction | function createGen0Auction(uint256 _genes) external onlyCOO {
require(gen0CreatedCount < gen0CreationLimit);
uint256 kydyId = _createKydy(0, 0, 0, _genes, address(this));
_approve(kydyId, saleAuction);
saleAuction.createAuction(
kydyId,
_computeNextGen0Price(),
address... | /**
* @dev Creates a new gen0 Kydy with the given genes and
* creates an sale auction of it.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1131,
1540
]
} | 56,950 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyMinting | contract KydyMinting is KydyAuction {
// Limits of the number of Kydys that COO can create.
uint256 public constant promoCreationLimit = 888;
uint256 public constant gen0CreationLimit = 8888;
uint256 public constant gen0StartingPrice = 10 finney;
// Counts the number of Kydys that COO has... | /**
* @title All functions related to creating Kydys
* @author VREX Lab Co., Ltd
*/ | NatSpecMultiLine | _computeNextGen0Price | function _computeNextGen0Price() internal view returns (uint256) {
uint256 averagePrice = saleAuction.averageGen0SalePrice();
// Sanity check to ensure not to overflow arithmetic.
require(averagePrice == uint256(uint128(averagePrice)));
uint256 nextPrice = averagePrice.add(averagePrice / 2);
... | /**
* @dev Computes the next gen0 auction price. It will be
* the average of the past 5 prices + 50%.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
1672,
2244
]
} | 56,951 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | setNewAddress | function setNewAddress(address _v2Address) external onlyCEO whenPaused {
// We'll announce if the upgrade is needed.
newContractAddress = _v2Address;
emit ContractUpgrade(_v2Address);
}
| /**
* @dev Used to mark the smart contract as upgraded when an upgrade happens.
* @param _v2Address Upgraded version of the core contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2294,
2516
]
} | 56,952 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | function() external payable {
require(
msg.sender == address(saleAuction) ||
msg.sender == address(synthesizingAuction)
);
}
| /**
* @dev Rejects all Ether being sent from unregistered addresses, so that users don't accidentally end us Ether.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2655,
2833
]
} | 56,953 | ||
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | getKydy | function getKydy(uint256 _id)
external
view
returns (
bool isCreating,
bool isReady,
uint256 rechargeIndex,
uint256 nextActionAt,
uint256 synthesizingWithId,
uint256 createdTime,
uint256 yinId,
uint256 yangId,
uint256 generation,
uint256 genes
) {
K... | /**
* @notice Returns all info about a given Kydy.
* @param _id ID of the Kydy you are enquiring about.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
2968,
3941
]
} | 56,954 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | unpause | function unpause() public onlyCEO whenPaused {
require(saleAuction != address(0));
require(synthesizingAuction != address(0));
require(geneSynthesis != address(0));
require(newContractAddress == address(0));
// Now the contract actually unpauses.
super.unpause();
}
| /**
* @dev Overrides unpause() to make sure that all external contract addresses are set before unpause.
* @notice This should be public rather than external.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4130,
4461
]
} | 56,955 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | withdrawBalance | function withdrawBalance() external onlyCFO {
uint256 balance = address(this).balance;
// Subtracts all creation fees needed to be given to the bringKydyHome() callers,
// and plus 1 of margin.
uint256 subtractFees = (creatingKydys + 1) * autoCreationFee;
if (balance > subtractFees) {
... | /// @dev CFO can withdraw the balance available from the contract. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
4536,
4951
]
} | 56,956 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | setNewTokenURI | function setNewTokenURI(string _newTokenURI) external onlyCLevel {
tokenURIBase = _newTokenURI;
}
| /// @dev Sets new tokenURI API for token metadata. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5010,
5126
]
} | 56,957 | |
KydyCore | contracts/lib/Strings.sol | 0xd90f5ebc01914bbd357b754956aafb199f4d1624 | Solidity | KydyCore | contract KydyCore is KydyMinting {
// This is the main Kydy contract. To keep the code upgradable and secure, we broke up the code in two different ways.
// First, we separated auction and gene combination functions into several sibling contracts. This allows us to securely
// fix bugs and upgrade c... | /**
* @title The Dyverse : A decentralized universe of Kydys, the unique 3D characters and avatars on the Blockchain.
* @author VREX Lab Co., Ltd
* @dev This is the main KydyCore contract. It keeps track of the kydys over the blockchain, and manages
* general operation of the contracts, metadata and important ... | NatSpecMultiLine | setTravelCore | function setTravelCore(address _newTravelCore) external onlyCEO whenPaused {
travelCore = KydyTravelInterface(_newTravelCore);
}
| /**
* @dev Adds the Kydy Travel Plugin contract to the Kydy Core contract.
* @notice We have a plan to add some fun features to the Dyverse.
* Your Kydy will travel all over our world while you carry on with your life.
* During their travel, they will earn some valuable coins which will then be given to you.... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://984728e95ce5f0c01a687d1e7a73daa4abbc56d2875bd49459d0d51c1a244805 | {
"func_code_index": [
5596,
5743
]
} | 56,958 | |
DHOOKSTEAD | DHOOKSTEAD.sol | 0x4f9c68bc906f3c9dd059e4bcc55c0b5528d7407b | Solidity | DHOOKSTEAD | contract DHOOKSTEAD is ERC20Detailed {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply = 10000000000 * 1e18;
uint256 public basePercent = 320;
constructor... | totalSupply | function totalSupply() public view returns(uint256) {
return _totalSupply;
}
| /// @return Total number of tokens in circulation | NatSpecSingleLine | v0.5.17+commit.d19bba13 | None | bzzr://6672ebe7cf7e5d89fff9e0ee3956256948f79aafa2372e548f210923bc33bc97 | {
"func_code_index": [
493,
588
]
} | 56,959 | ||
PluralMoon | PluralMoon.sol | 0xc2870a99f278c8885deba9d50388daf737f03669 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fe3ab263a58412d5e5c0b7e4e8f233a36e230fdaed5105efb348857a4b7015f1 | {
"func_code_index": [
94,
154
]
} | 56,960 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.