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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | balanceOf | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
581,
689
]
} | 1,607 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
1016,
1149
]
} | 1,608 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | transfer | function transfer(address to, uint256 value) public returns (bool) {
_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.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
1309,
1450
]
} | 1,609 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | approve | function approve(address spender, uint256 value) public returns (bool) {
require(spender != address(0));
_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
* race con... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
2082,
2324
]
} | 1,610 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
emit Approval(from, msg.sender, _allowed[from][msg.sender]);
return true;
}
| /**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The ... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
2783,
3081
]
} | 1,611 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
require(spender != address(0));
_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
* Emits an Approval even... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
3580,
3901
]
} | 1,612 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue);
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
}
| /**
* @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
* Emits an Approval even... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
4405,
4736
]
} | 1,613 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | _transfer | function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
| /**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
4946,
5206
]
} | 1,614 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | _mint | function _mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
| /**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
5545,
5812
]
} | 1,615 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | _burn | function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
6034,
6301
]
} | 1,616 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20 | contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public vie... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
* Originally based on code by FirstBlood:
* https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*
* This implementation emits addi... | NatSpecMultiLine | _burnFrom | function _burnFrom(address account, uint256 value) internal {
_allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value);
_burn(account, value);
emit Approval(account, msg.sender, _allowed[account][msg.sender]);
}
| /**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The ... | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
6686,
6945
]
} | 1,617 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name ... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @return the name of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
342,
427
]
} | 1,618 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name ... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @return the symbol of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
485,
574
]
} | 1,619 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Detailed | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
/**
* @return the name ... | /**
* @title ERC20Detailed token
* @dev The decimals are only for visualization purposes.
* All the operations are done using the smallest and indivisible token unit,
* just as on Ethereum all the operations are done in wei.
*/ | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @return the number of decimals of the token.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
644,
729
]
} | 1,620 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] =... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | add | function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
| /**
* @dev give an account access to this role
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
147,
332
]
} | 1,621 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] =... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address account) internal {
require(account != address(0));
require(has(role, account));
role.bearer[account] = false;
}
| /**
* @dev remove an account's access to this role
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
402,
590
]
} | 1,622 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | Roles | library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] =... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0));
return role.bearer[account];
}
| /**
* @dev check if an account has this role
* @return bool
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
674,
840
]
} | 1,623 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Mintable | contract ERC20Mintable is ERC20, MinterRole {
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uin... | /**
* @title ERC20Mintable
* @dev ERC20 minting logic
*/ | NatSpecMultiLine | mint | function mint(address to, uint256 value) public onlyMinter returns (bool) {
_mint(to, value);
return true;
}
| /**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
287,
419
]
} | 1,624 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target address and decr... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 value) public {
_burn(msg.sender, value);
}
| /**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
151,
232
]
} | 1,625 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | ERC20Burnable | contract ERC20Burnable is ERC20 {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target address and decr... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burnFrom | function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
}
| /**
* @dev Burns a specific amount of tokens from the target address and decrements allowance
* @param from address The address which you want to send tokens from
* @param value uint256 The amount of token to be burned
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
480,
577
]
} | 1,626 | |
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | Token | contract Token is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable {
string private _creator_name = 'SIMEX Inc.';
string private _creator_website = 'simex.global';
constructor (string memory token_name, string memory token_symbol, uint8 token_decimals) public ERC20Detailed(token_name, token_symbol, token_de... | creatorName | function creatorName() public view returns(string memory) {
return _creator_name;
}
| /**
* @return the creator's name.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
448,
535
]
} | 1,627 | |||
Token | Token.sol | 0x19efbaaf375ce83da88a7c6ae54d4a9b0c3b55f1 | Solidity | Token | contract Token is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable {
string private _creator_name = 'SIMEX Inc.';
string private _creator_website = 'simex.global';
constructor (string memory token_name, string memory token_symbol, uint8 token_decimals) public ERC20Detailed(token_name, token_symbol, token_de... | creatorWebsite | function creatorWebsite() public view returns(string memory) {
return _creator_website;
}
| /**
* @return the creator's website.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | bzzr://c02f3dc7ef11935f1160135a98da384a1f450f5bca739e32af35b21556ca156a | {
"func_code_index": [
588,
681
]
} | 1,628 | |||
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | IMigratorChef | interface IMigratorChef {
// Perform LP token migration from legacy UniswapV2 to CCSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have ... | migrate | function migrate(IERC20 token) external returns (IERC20);
| // Perform LP token migration from legacy UniswapV2 to CCSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// CCSwap must ... | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
536,
598
]
} | 1,629 | ||
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
3078,
3623
]
} | 1,630 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's CC allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
3712,
4021
]
} | 1,631 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | setMigrator | function setMigrator(IMigratorChef _migrator) public onlyOwner {
migrator = _migrator;
}
| // Set the migrator contract. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
4092,
4199
]
} | 1,632 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | migrate | function migrate(uint256 _pid) public notPause {
require(address(migrator) != address(0), "migrate: no migrator");
PoolInfo storage pool = poolInfo[_pid];
IERC20 lpToken = pool.lpToken;
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
IERC20 newL... | // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
4317,
4822
]
} | 1,633 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | getMultiplier | function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
if (_to <= bonusEndBlock) {
return _to.sub(_from).mul(BONUS_MULTIPLIER);
} else if (_from >= bonusEndBlock) {
return _to.sub(_from);
} else {
return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER)... | // Return reward multiplier over the given _from to _to block. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
4893,
5321
]
} | 1,634 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | pendingCC | function pendingCC(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accCCPerShare = pool.accCCPerShare;
uint256 lpSupply = pool.totalAmount;
if (block.number > pool.lastRewardBlock && lp... | // View function to see pending CCs on frontend. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
5378,
6103
]
} | 1,635 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | massUpdatePools | function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
| // Update reward vairables for all pools. Be careful of gas spending! | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
6181,
6366
]
} | 1,636 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | updatePool | function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.totalAmount;
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
uint256 multipli... | // Update reward variables of the given pool to be up-to-date. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
6437,
7139
]
} | 1,637 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | deposit | function deposit(uint256 _pid, uint256 _amount) public notPause {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user.amount.mul(pool.accCCPerShare).div(1e12).sub(user.rewardDebt);
... | // Deposit LP tokens to MasterChef for CC allocation. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
7201,
7924
]
} | 1,638 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | withdraw | function withdraw(uint256 _pid, uint256 _amount) public notPause {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accCCPerShare).div(1e12)... | // Withdraw LP tokens from MasterChef. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
7971,
8690
]
} | 1,639 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | emergencyWithdraw | function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.totalAmount = pool.totalAmount.sub(amount);
pool.lpToken.safeTransfer(... | // Withdraw without caring about rewards. EMERGENCY ONLY. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
8756,
9223
]
} | 1,640 |
MasterChef | contracts/main/MasterChefV2.sol | 0x66bb15df3f9b4b68109799ab5d89bc42d07113f2 | Solidity | MasterChef | contract MasterChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We ... | // MasterChef is the master of CC. He can make CC and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CC is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. H... | LineComment | safeCCTransfer | function safeCCTransfer(address _to, uint256 _amount) internal {
uint256 ccBal = cc.balanceOf(address(this));
if (_amount > ccBal) {
cc.transfer(_to, ccBal);
} else {
cc.transfer(_to, _amount);
}
}
| // Safe cc transfer function, just in case if rounding error causes pool to not have enough CCs. | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://53a04232d99b20a0c9a14b85f7c3fc538a744d484f0fe3ceeeb3ab11dfdb4d58 | {
"func_code_index": [
9328,
9597
]
} | 1,641 |
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | setApprovedToken | function setApprovedToken(address tokenAddress) external {
require(msg.sender == admin, "Not authorized");
require(setApprovedTokenOnce == false, "Can only set the approved token once.");
setApprovedTokenOnce = true;
approvedToken[tokenAddress] = true;
}
| /** @dev Allows admin to add an approved token, once
* @param tokenAddress Address of the new contract owner
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
2256,
2556
]
} | 1,642 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | buy | function buy(uint256 minTokensRequested) external override payable {
require(approvedToken[msg.sender] == true, "Address not authorized to mint tokens");
uint256 originalBalance = address(this).balance - msg.value;
uint256 costTokens = quotePriceForTokens(minTokensRequested, originalBalance);
... | /** @dev Buy tokens through minting. Assumes the buyer is the Quadron contract owner.
*
* @param minTokensRequested The minimum amount of quadrons to mint. If this
* minimum amount of tokens can't be minted, the function reverts
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
2831,
3646
]
} | 1,643 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | sell | function sell(uint256 amount) external override {
require(contractPhase == 3, "The token cannot be sold until the blackout period has expired.");
require(balanceOf(msg.sender) >= amount, "Cannot sell more than it owns");
uint256 startSupply = totalSupply();
_burn(msg.sender, amount);
if(add... | /** @dev Sell tokens. The amount of Ether the seller receivers is based on the amount of
* tokens sent with the sell() method. The amount of Ether received (target) is based on
* the total supply of the quadrons (_supply), the balance of Ether in the quadron
* (_reserveBalance), the reserve ratio (_reserv... | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
4237,
5091
]
} | 1,644 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | quoteEffectivePrice | function quoteEffectivePrice() public view returns (uint256 effectivePrice) {
if(contractPhase == 3) {
// In phase 3
uint256 _effectivePrice = 0;
if(totalSupply() > 0) {
_effectivePrice = address(this).balance * (1e18 * 1e6 / WEIGHT) / totalSupply... | /** @dev Calculates the effective price (wei) of the Quadron
*
* @return effectivePrice Approximately the mid-price in wei for one token
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
5260,
5901
]
} | 1,645 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | quoteAvgPriceForTokens | function quoteAvgPriceForTokens(uint256 amount) external view override returns (uint256 avgPriceForTokens) {
require(amount > 0, "The amount must be greater than zero.");
if(contractPhase == 3) {
// In phase 3
uint256 numberTokens = purchaseTargetAmount(totalSupply(), address(this)... | /** @dev Calculates the average price (in wei) per Quadron issued for some
* some amount of Ethers.
* @param amount Amount of Ethers (in wei)
* @return avgPriceForTokens Average price per Quadron (in wei)
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
6145,
6826
]
} | 1,646 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | quotePriceForTokens | function quotePriceForTokens(uint256 amount, uint256 originalBalance) internal view returns (uint256 price) {
require(amount > 0, "The amount must be greater than zero.");
if(contractPhase == 3) {
// In phase 3
uint256 _price = quoteTargetAmount(totalSupply(), originalBalance, WEIG... | /** @dev Calculates the cost (in Wei) to buy some amount of Quadron
* @param amount Amount of Quadrons
* @param originalBalance The amount of ethers in this contract with msg.value subtracted
* @return price Price total price to purchase (amount) of Quadrons
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
7126,
7783
]
} | 1,647 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | updatePhase | function updatePhase() public override {
if((block.timestamp >= (tokenEpoch + PHASE_2_DURATION) ||
totalSupply() >= PHASE_3_START_SUPPLY) && contractPhase < 3) {
// In phase 3
contractPhase = 3;
} else if((block.timestamp >= (tokenEpoch + PHASE_1_DURATION) ||
... | /** @dev Updates the contract's phase
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
7838,
8340
]
} | 1,648 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | getPhase | function getPhase() external view override returns (uint8 phase) {
return contractPhase;
}
| /** @dev Getter method for the contractPhase variable
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
8411,
8520
]
} | 1,649 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | mintBonus | function mintBonus() external override {
require(approvedToken[msg.sender] == true, "Not authorized.");
require(mintedBonus == false, "Bonus already minted.");
mintedBonus = true;
_mint(msg.sender, 15e6 * 1e18); // Mint 15M tokens as the early buyer bonus
}
| /** @dev Mints bonus Quadrons
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
8567,
8871
]
} | 1,650 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | phase1Transfer | function phase1Transfer(uint256 newTokens, uint256 costTokens) internal {
if(contractPhase == 1) {
if(totalSupply() + newTokens <= PHASE_1_END_SUPPLY) {
// the value of all newTokens should be transferred to wallet
(bool success,) = wallet01.call{ value: (costTokens) }("");
... | /** @dev Transfer phase 1 funds to wallet
* @param newTokens The amount of new tokens to be minted
* @param costTokens The cost (in wei) of the new tokens to be minted
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
9070,
9909
]
} | 1,651 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | addApprovedToken | function addApprovedToken(address newTokenAddress) external override {
require(approvedToken[msg.sender] == true, "Only approved token can approve new tokens");
approvedToken[newTokenAddress] = true;
}
| /** @dev Allows an approved token to add a new approved token
* @param newTokenAddress The address of the new approved token
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
10058,
10287
]
} | 1,652 | ||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | /** @dev Fallback function that executes when no data is sent
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
10370,
10410
]
} | 1,653 | ||||
Quadron | contracts/Quadron.sol | 0x14b3fe5772e973b7cd410d0c1549a18414f5f6db | Solidity | Quadron | contract Quadron is IQuadron, ERC20, ReserveFormula {
// Declare state variables
mapping(address => bool) private approvedToken; // Only parent contract may buy Quadrons
bool private setApprovedTokenOnce = false; // Admin can only set the approved token once
address private admin; // Contract adm... | /** @dev Fallback is a fallback function that executes when no other method matches
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://89a6d9a677525a75903ac3296c5e382c04eb8884d8d9338cbb657072499d9f1b | {
"func_code_index": [
10520,
10561
]
} | 1,654 | ||||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | withdraw | function withdraw() external onlyOwner {
uint256 totalBalance = address(this).balance;
payable(msg.sender).transfer(totalBalance);
}
| /**
* @dev Allows to withdraw the Ether in the contract to the address of the owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
1541,
1697
]
} | 1,655 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | setBaseTokenURI | function setBaseTokenURI(string memory _uri) external onlyOwner {
baseURI = _uri;
}
| /**
* @dev Sets the base URI for the API that provides the NFT data.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
1785,
1884
]
} | 1,656 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | setHorsePrice | function setHorsePrice(uint256 _horsePrice) external onlyOwner {
horsePrice = _horsePrice;
}
| /**
* @dev Sets the mint price for each horse
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
1949,
2057
]
} | 1,657 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | addAvailableHorses | function addAvailableHorses()
internal
onlyOwner
{
for (uint16 i = 0; i <= 9999; i++) {
availableHorses.push(i);
}
}
| /**
* @dev Adds all horses to the available list.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
2126,
2298
]
} | 1,658 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | allocateSpecificHorsesForGiveaways | function allocateSpecificHorsesForGiveaways(uint256[] memory tokenIds)
internal
{
require(availableHorses.length == 0, "Available horses are already set");
_batchMint(msg.sender, tokenIds);
totalMintedHorses += tokenIds.length;
}
| /**
* @dev Handpick horses for promised giveaways.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
2368,
2643
]
} | 1,659 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | premintHorses | function premintHorses()
external
onlyOwner
{
require(
!premintingComplete,
"You can only premint the horses once"
);
require(
availableHorses.length >= premintCount,
"No horses left to be claimed"
);
totalMintedHorses += premintCount;
for (uint256 i;... | /**
* @dev Prem
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
2678,
3184
]
} | 1,660 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | mintHorses | function mintHorses(uint256 amount)
external
payable
callerNotAContract
mintingStarted
{
require(
msg.value >= horsePrice * amount,
"Not enough Ether to claim the horses"
);
require(
claimedHorsesPerWallet[msg.sender] + amount <= maxHorsesPerWallet,
"You cann... | /**
* @dev Claim up to 10 horses at once
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
3277,
4069
]
} | 1,661 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | tokenByIndex | function tokenByIndex(uint256 tokenId) external view returns (uint256) {
require(
_exists(tokenId),
"ERC721: operator query for nonexistent token"
);
return tokenId;
}
| /**
* @dev Returns the tokenId by index
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
4128,
4352
]
} | 1,662 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | baseTokenURI | function baseTokenURI() external view returns (string memory) {
return baseURI;
}
| /**
* @dev Returns the base URI for the tokens API.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
4423,
4520
]
} | 1,663 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | getAvailableHorses | function getAvailableHorses() external view returns (uint256) {
return availableHorses.length;
}
| /**
* @dev Returns how many horses are still available to be claimed
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
4608,
4720
]
} | 1,664 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | gethorsePrice | function gethorsePrice() external view returns (uint256) {
return horsePrice;
}
| /**
* @dev Returns the claim price
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
4774,
4869
]
} | 1,665 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | getMintingStartDate | function getMintingStartDate() external view returns (uint256) {
return startMintDate;
}
| /**
* @dev Returns the minting start date
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
4930,
5034
]
} | 1,666 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | totalSupply | function totalSupply() external view virtual returns (uint256) {
return totalMintedHorses;
}
| /**
* @dev Returns the total supply
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
5089,
5197
]
} | 1,667 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | getHorseToBeClaimed | function getHorseToBeClaimed() private returns (uint256) {
uint256 random = _getRandomNumber(availableHorses.length);
uint256 tokenId = uint256(availableHorses[random]);
availableHorses[random] = availableHorses[availableHorses.length - 1];
availableHorses.pop();
return tokenId;
}
| /**
* @dev Returns a random available horse to be claimed
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
5313,
5644
]
} | 1,668 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | _getRandomNumber | function _getRandomNumber(uint256 _upper) private view returns (uint256) {
uint256 random = uint256(
keccak256(
abi.encodePacked(
availableHorses.length,
blockhash(block.number - 1),
block.coinbase,
block.difficulty,
... | /**
* @dev Generates a pseudo-random number.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
5708,
6157
]
} | 1,669 | ||
GlueFactoryShow | GlueFactoryShow.sol | 0x15c2b137e59620552bd0d712fe7279cf1f47468d | Solidity | GlueFactoryShow | contract GlueFactoryShow is ERC721 {
event Mint(address indexed from, uint256 indexed tokenId);
modifier mintingStarted() {
require(
startMintDate != 0 && startMintDate <= block.timestamp,
"You are too early"
);
_;
}
modifier callerNotAContract() {
... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| /**
* @dev See {ERC721}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://e5e0377b85607cbdcf54f75998c3ff9c8d7c7cdadf52b630703939219ad4eff8 | {
"func_code_index": [
6201,
6311
]
} | 1,670 | ||
SPKI | SPKI.sol | 0x0f3debf94483beecbfd20167c946a61ea62d000f | Solidity | SPKI | contract SPKI is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress = payable(0x8451B11c95cecA3567135199F2f5544F8717ABA6); // Marketing Address
address payable public charityAddress = payable(0x4451Ec36C367BC3fDd285281a8F29... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.7+commit.e28d00a7 | None | ipfs://77695a2a57f3aaf33e943b2611f994313578658a14fea5c6fbedc6d08fb6039c | {
"func_code_index": [
24667,
24701
]
} | 1,671 | ||||
SacredPsy | Strings.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = ... | /**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
178,
885
]
} | 1,672 |
SacredPsy | Strings.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
| /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
986,
1319
]
} | 1,673 |
SacredPsy | Strings.sol | 0x8bc9c8b29d257302c36631bdf71fbc1733b75e88 | Solidity | Strings | library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toHexString | function toHexString(uint256 value, uint256 length)
internal
pure
returns (string memory)
{
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
... | /**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://2bdd194141c58646facf58480212e14844ff7f779c037364c5f78a62e80d4ff5 | {
"func_code_index": [
1438,
1911
]
} | 1,674 |
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | SafeMath | contract SafeMath {
/* function assert(bool assertion) internal { */
/* if (!assertion) { */
/* throw; */
/* } */
/* } // assert no longer needed once solidity is on 0.4.10 */
function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
uint256 z = x + y;... | // copyright contact@Etheremon.com | LineComment | safeAdd | function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
uint256 z = x + y;
assert((z >= x) && (z >= y));
return z;
}
| /* } // assert no longer needed once solidity is on 0.4.10 */ | Comment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
219,
382
]
} | 1,675 | |
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | EtheremonDataBase | contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
uint64 public totalMonster;
uint32 public totalClass;
// write
function withdrawEther(address _sendTo, uint _amount) onlyOwner public returns(ResultCode);
function addElementToArrayType(ArrayType _type, uint... | withdrawEther | function withdrawEther(address _sendTo, uint _amount) onlyOwner public returns(ResultCode);
| // write | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
167,
263
]
} | 1,676 | |||
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | EtheremonDataBase | contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
uint64 public totalMonster;
uint32 public totalClass;
// write
function withdrawEther(address _sendTo, uint _amount) onlyOwner public returns(ResultCode);
function addElementToArrayType(ArrayType _type, uint... | getSizeArrayType | function getSizeArrayType(ArrayType _type, uint64 _id) constant public returns(uint);
| // read | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
1917,
2007
]
} | 1,677 | |||
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | EtheremonPayment | contract EtheremonPayment is EtheremonEnum, BasicAccessControl, SafeMath {
uint8 constant public STAT_COUNT = 6;
uint8 constant public STAT_MAX = 32;
uint8 constant public GEN0_NO = 24;
struct MonsterClassAcc {
uint32 classId;
uint256 price;
uint256 returnPrice;
... | getRandom | function getRandom(uint8 maxRan, uint8 index, address priAddress) constant public returns(uint8) {
uint256 genNum = uint256(block.blockhash(block.number-1)) + uint256(priAddress);
for (uint8 i = 0; i < index && i < 6; i ++) {
genNum /= 256;
}
return uint8(genNum % maxRan);
}
| // helper | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
1682,
2016
]
} | 1,678 | |||
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | EtheremonPayment | contract EtheremonPayment is EtheremonEnum, BasicAccessControl, SafeMath {
uint8 constant public STAT_COUNT = 6;
uint8 constant public STAT_MAX = 32;
uint8 constant public GEN0_NO = 24;
struct MonsterClassAcc {
uint32 classId;
uint256 price;
uint256 returnPrice;
... | withdrawToken | function withdrawToken(address _sendTo, uint _amount) onlyModerators requireTokenContract external {
ERC20Interface token = ERC20Interface(tokenContract);
if (_amount > token.balanceOf(address(this))) {
revert();
}
token.transfer(_sendTo, _amount);
}
| // admin | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
2037,
2346
]
} | 1,679 | |||
EtheremonPayment | EtheremonPayment.sol | 0x721da477f68c71788a262d58853fe6977d86535e | Solidity | EtheremonPayment | contract EtheremonPayment is EtheremonEnum, BasicAccessControl, SafeMath {
uint8 constant public STAT_COUNT = 6;
uint8 constant public STAT_MAX = 32;
uint8 constant public GEN0_NO = 24;
struct MonsterClassAcc {
uint32 classId;
uint256 price;
uint256 returnPrice;
... | giveBattleBonus | function giveBattleBonus(address _trainer, uint _amount) isActive requireBattleContract requireTokenContract public {
if (msg.sender != battleContract)
revert();
ERC20Interface token = ERC20Interface(tokenContract);
token.transfer(_trainer, _amount);
}
| // battle | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://21a18babc6acd4088a5680a0807f92d61d365e75c65d3803c5f54ffddffa88c6 | {
"func_code_index": [
2850,
3152
]
} | 1,680 | |||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
94,
154
]
} | 1,681 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
237,
310
]
} | 1,682 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
534,
616
]
} | 1,683 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
895,
983
]
} | 1,684 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
1647,
1726
]
} | 1,685 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | 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);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
2039,
2141
]
} | 1,686 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
259,
445
]
} | 1,687 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
723,
864
]
} | 1,688 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
1162,
1359
]
} | 1,689 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: mult... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
1613,
2016
]
} | 1,690 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
2487,
2624
]
} | 1,691 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
3115,
3398
]
} | 1,692 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
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.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
3858,
3993
]
} | 1,693 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
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.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
4473,
4644
]
} | 1,694 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
606,
1230
]
} | 1,695 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
2160,
2562
]
} | 1,696 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
3318,
3496
]
} | 1,697 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
3721,
3922
]
} | 1,698 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
4292,
4523
]
} | 1,699 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
4774,
5095
]
} | 1,700 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
497,
581
]
} | 1,701 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
1139,
1292
]
} | 1,702 | ||
BART | BART.sol | 0x21fb4dd8c500be1a9ba27f827217e477217d6225 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://a856637f610dd4369d266ff8eceb3ba909d34e57986b6f8a02e61a177d695707 | {
"func_code_index": [
1442,
1691
]
} | 1,703 | ||
FastInvestTokenCrowdsale | FastInvestTokenCrowdsale.sol | 0xb8dc951ee4044ed7a8e2b1d45f6a1857895a4e81 | Solidity | FastInvestTokenCrowdsale | contract FastInvestTokenCrowdsale {
using SafeMath for uint256;
address public owner;
// The token being sold
token public tokenReward;
// Tokens will be transfered from this address
address internal tokenOwner;
// Address where funds are collected
address internal wallet... | /**
* @title FastInvestTokenCrowdsale
*
* Crowdsale have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/ | NatSpecMultiLine | function () external payable {
buyTokens(msg.sender);
}
| // Fallback function can be used to buy tokens | LineComment | v0.4.18+commit.9cf6e910 | bzzr://481dd405532cab9d997687bbd965ef48a7fa35c3864d02a40dc9a22151f62ad2 | {
"func_code_index": [
2080,
2154
]
} | 1,704 | ||
FastInvestTokenCrowdsale | FastInvestTokenCrowdsale.sol | 0xb8dc951ee4044ed7a8e2b1d45f6a1857895a4e81 | Solidity | FastInvestTokenCrowdsale | contract FastInvestTokenCrowdsale {
using SafeMath for uint256;
address public owner;
// The token being sold
token public tokenReward;
// Tokens will be transfered from this address
address internal tokenOwner;
// Address where funds are collected
address internal wallet... | /**
* @title FastInvestTokenCrowdsale
*
* Crowdsale have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/ | NatSpecMultiLine | buyTokens | function buyTokens(address beneficiary) public payable {
require(beneficiary != 0x0);
require(validPurchase());
uint256 weiAmount = msg.value;
uint256 tokens = 0;
// Calculate token amount
if (tokensSold < SOFT_CAP) {
tokens = weiAmount.mul(RATE_SOFT);
if (tokensSol... | // Low level token purchase function | LineComment | v0.4.18+commit.9cf6e910 | bzzr://481dd405532cab9d997687bbd965ef48a7fa35c3864d02a40dc9a22151f62ad2 | {
"func_code_index": [
2199,
3350
]
} | 1,705 | |
FastInvestTokenCrowdsale | FastInvestTokenCrowdsale.sol | 0xb8dc951ee4044ed7a8e2b1d45f6a1857895a4e81 | Solidity | FastInvestTokenCrowdsale | contract FastInvestTokenCrowdsale {
using SafeMath for uint256;
address public owner;
// The token being sold
token public tokenReward;
// Tokens will be transfered from this address
address internal tokenOwner;
// Address where funds are collected
address internal wallet... | /**
* @title FastInvestTokenCrowdsale
*
* Crowdsale have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/ | NatSpecMultiLine | forwardFunds | function forwardFunds() internal {
wallet.transfer(msg.value);
}
| // Send ether to the fund collection wallet | LineComment | v0.4.18+commit.9cf6e910 | bzzr://481dd405532cab9d997687bbd965ef48a7fa35c3864d02a40dc9a22151f62ad2 | {
"func_code_index": [
3402,
3485
]
} | 1,706 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.