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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
KWWBoatsVoting | contracts/KWWBoatsVoting.sol | 0x8c41343b12c6dabbeab4773c462e916c62016b7c | Solidity | KWWBoatsVoting | contract KWWBoatsVoting is IBoatsVoting, Ownable {
address gameManager;
int8 public voteDay1 = 2;
int8 public voteDay2 = 3;
uint8 public durationHours = 24;
uint8 public daysBetweenVotes = 7;
//tokenId => BoatData
mapping(uint16 => BoatData) public boatsDetails;
//boatState =... | getBoatDetails | function getBoatDetails(uint16 idx) public override view returns(BoatData memory){
return boatsDetails[idx];
}
| /*
GETTERS
*/ | Comment | v0.8.4+commit.c7e474f2 | MIT | ipfs://8f707f7f8f9ebb3464f53a333bb3a80a6aaf6b2844d348c99cac0a09323e7b4c | {
"func_code_index": [
3673,
3802
]
} | 607 | ||
KWWBoatsVoting | contracts/KWWBoatsVoting.sol | 0x8c41343b12c6dabbeab4773c462e916c62016b7c | Solidity | KWWBoatsVoting | contract KWWBoatsVoting is IBoatsVoting, Ownable {
address gameManager;
int8 public voteDay1 = 2;
int8 public voteDay2 = 3;
uint8 public durationHours = 24;
uint8 public daysBetweenVotes = 7;
//tokenId => BoatData
mapping(uint16 => BoatData) public boatsDetails;
//boatState =... | setVoteDay1 | function setVoteDay1(uint8 newDay) public override onlyOwner {
voteDay1 = int8(newDay);
}
| /*
ONLY OWNER
*/ | Comment | v0.8.4+commit.c7e474f2 | MIT | ipfs://8f707f7f8f9ebb3464f53a333bb3a80a6aaf6b2844d348c99cac0a09323e7b4c | {
"func_code_index": [
6008,
6114
]
} | 608 | ||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Executor | interface Executor {
/// @dev Allows a Module to execute a transaction.
/// @param to Destination address of module transaction.
/// @param value Ether value of module transaction.
/// @param data Data payload of module transaction.
/// @param operation Operation type of module transaction.
func... | execTransactionFromModule | function execTransactionFromModule(address to, uint256 value, bytes calldata data, Enum.Operation operation)
external
returns (bool success);
| /// @dev Allows a Module to execute a transaction.
/// @param to Destination address of module transaction.
/// @param value Ether value of module transaction.
/// @param data Data payload of module transaction.
/// @param operation Operation type of module transaction. | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
312,
473
]
} | 609 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setQuestionTimeout | function setQuestionTimeout(uint32 timeout)
public
executorOnly()
{
require(timeout > 0, "Timeout has to be greater 0");
questionTimeout = timeout;
}
| /// @notice This can only be called by the executor | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2881,
3074
]
} | 610 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setQuestionCooldown | function setQuestionCooldown(uint32 cooldown)
public
executorOnly()
{
uint32 expiration = answerExpiration;
require(expiration == 0 || expiration - cooldown >= 60 , "There need to be at least 60s between end of cooldown and expiration");
questionCooldown = cooldown;
}
| /// @dev Sets the cooldown before an answer is usable.
/// @param cooldown Cooldown in seconds that should be required after a oracle provided answer
/// @notice This can only be called by the executor
/// @notice There need to be at least 60 seconds between end of cooldown and expiration | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3382,
3702
]
} | 611 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setAnswerExpiration | function setAnswerExpiration(uint32 expiration)
public
executorOnly()
{
require(expiration == 0 || expiration - questionCooldown >= 60 , "There need to be at least 60s between end of cooldown and expiration");
answerExpiration = expiration;
}
| /// @dev Sets the duration for which a positive answer is valid.
/// @param expiration Duration that a positive answer of the oracle is valid in seconds (or 0 if valid forever)
/// @notice A proposal with an expired answer is the same as a proposal that has been marked invalid
/// @notice There need to be at least 60 s... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4142,
4428
]
} | 612 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setArbitrator | function setArbitrator(address arbitrator)
public
executorOnly()
{
questionArbitrator = arbitrator;
}
| /// @dev Sets the question arbitrator that will be used for future questions.
/// @param arbitrator Address of the arbitrator
/// @notice This can only be called by the executor | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4620,
4757
]
} | 613 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setMinimumBond | function setMinimumBond(uint256 bond)
public
executorOnly()
{
minimumBond = bond;
}
| /// @dev Sets the minimum bond that is required for an answer to be accepted.
/// @param bond Minimum bond that is required for an answer to be accepted
/// @notice This can only be called by the executor | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
4976,
5095
]
} | 614 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | setTemplate | function setTemplate(uint256 templateId)
public
executorOnly()
{
template = templateId;
}
| /// @dev Sets the template that should be used for future questions.
/// @param templateId ID of the template that should be used for proposal questions
/// @notice Check https://github.com/realitio/realitio-dapp#structuring-and-fetching-information for more information
/// @notice This can only be called by the execut... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
5436,
5561
]
} | 615 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | addProposal | function addProposal(string memory proposalId, bytes32[] memory txHashes) public {
addProposalWithNonce(proposalId, txHashes, 0);
}
| /// @dev Function to add a proposal that should be considered for execution
/// @param proposalId Id that should identify the proposal uniquely
/// @param txHashes EIP-712 hashes of the transactions that should be executed
/// @notice The nonce used for the question by this function is always 0 | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
5875,
6022
]
} | 616 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | addProposalWithNonce | function addProposalWithNonce(string memory proposalId, bytes32[] memory txHashes, uint256 nonce) public {
// We load some storage variables into memory to save gas
uint256 templateId = template;
uint32 timeout = questionTimeout;
address arbitrator = questionArbitrator;
// We generate the question s... | /// @dev Function to add a proposal that should be considered for execution
/// @param proposalId Id that should identify the proposal uniquely
/// @param txHashes EIP-712 hashes of the transactions that should be executed
/// @param nonce Nonce that should be used when asking the question on the oracle | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
6345,
8036
]
} | 617 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | markProposalAsInvalid | function markProposalAsInvalid(string memory proposalId, bytes32[] memory txHashes)
public
// Executor only is checked in markProposalAsInvalidByHash(bytes32)
{
string memory question = buildQuestion(proposalId, txHashes);
bytes32 questionHash = keccak256(bytes(question));
markProposalAsInvalidByHas... | /// @dev Marks a proposal as invalid, preventing execution of the connected transactions
/// @param proposalId Id that should identify the proposal uniquely
/// @param txHashes EIP-712 hashes of the transactions that should be executed
/// @notice This can only be called by the executor | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
8342,
8712
]
} | 618 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | markProposalAsInvalidByHash | function markProposalAsInvalidByHash(bytes32 questionHash)
public
executorOnly()
{
questionIds[questionHash] = INVALIDATED;
}
| /// @dev Marks a question hash as invalid, preventing execution of the connected transactions
/// @param questionHash Question hash calculated based on the proposal id and txHashes
/// @notice This can only be called by the executor | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
8959,
9120
]
} | 619 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | markProposalWithExpiredAnswerAsInvalid | function markProposalWithExpiredAnswerAsInvalid(bytes32 questionHash)
public
{
uint32 expirationDuration = answerExpiration;
require(expirationDuration > 0, "Answers are valid forever");
bytes32 questionId = questionIds[questionHash];
require(questionId != INVALIDATED, "Proposal is already invalidat... | /// @dev Marks a proposal with an expired answer as invalid, preventing execution of the connected transactions
/// @param questionHash Question hash calculated based on the proposal id and txHashes | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
9329,
10099
]
} | 620 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | executeProposal | function executeProposal(string memory proposalId, bytes32[] memory txHashes, address to, uint256 value, bytes memory data, Enum.Operation operation) public {
executeProposalWithIndex(proposalId, txHashes, to, value, data, operation, 0);
}
| /// @dev Executes the transactions of a proposal via the executor if accepted
/// @param proposalId Id that should identify the proposal uniquely
/// @param txHashes EIP-712 hashes of the transactions that should be executed
/// @param to Target of the transaction that should be executed
/// @param value Wei value of t... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
10711,
10966
]
} | 621 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | executeProposalWithIndex | function executeProposalWithIndex(string memory proposalId, bytes32[] memory txHashes, address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 txIndex) public {
// We use the hash of the question to check the execution state, as the other parameters might change, but the question not
byt... | /// @dev Executes the transactions of a proposal via the executor if accepted
/// @param proposalId Id that should identify the proposal uniquely
/// @param txHashes EIP-712 hashes of the transactions that should be executed
/// @param to Target of the transaction that should be executed
/// @param value Wei value of t... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
11656,
13994
]
} | 622 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | buildQuestion | function buildQuestion(string memory proposalId, bytes32[] memory txHashes) public pure returns(string memory) {
string memory txsHash = bytes32ToAsciiString(keccak256(abi.encodePacked(txHashes)));
return string(abi.encodePacked(proposalId, bytes3(0xe2909f), txsHash));
}
| /// @dev Build the question by combining the proposalId and the hex string of the hash of the txHashes
/// @param proposalId Id of the proposal that proposes to execute the transactions represented by the txHashes
/// @param txHashes EIP-712 Hashes of the transactions that should be executed | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
14301,
14596
]
} | 623 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | getQuestionId | function getQuestionId(uint256 templateId, string memory question, address arbitrator, uint32 timeout, uint32 openingTs, uint256 nonce) public view returns(bytes32) {
bytes32 contentHash = keccak256(abi.encodePacked(templateId, openingTs, question));
return keccak256(abi.encodePacked(contentHash, arbitrator, ti... | /// @dev Generate the question id.
/// @notice It is required that this is the same as for the oracle implementation used. | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
14729,
15088
]
} | 624 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | getChainId | function getChainId() public view returns (uint256) {
uint256 id;
// solium-disable-next-line security/no-inline-assembly
assembly {
id := chainid()
}
return id;
}
| /// @dev Returns the chain id used by this contract. | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
15147,
15370
]
} | 625 | ||||
DaoModule | contracts/DaoModule.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | DaoModule | contract DaoModule {
bytes32 public constant INVALIDATED = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
bytes32 public constant DOMAIN_SEPARATOR_TYPEHASH = 0x47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218;
// keccak256(
// "EIP712Domain(uint256 chainId,addr... | generateTransactionHashData | function generateTransactionHashData(
address to,
uint256 value,
bytes memory data,
Enum.Operation operation,
uint256 nonce
) public view returns(bytes memory) {
uint256 chainId = getChainId();
bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, chainId, this));
byt... | /// @dev Generates the data for the module transaction hash (required for signing) | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
15459,
16055
]
} | 626 | ||||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | ERC721 | contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
functio... | approve | function approve(address _to, uint256 _tokenId) public;
| // Required methods | LineComment | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
42,
100
]
} | 627 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | WorldCupToken | contract WorldCupToken is ERC721 {
event Birth(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
/*** CONSTANTS ***/
string publi... | WorldCupToken | function WorldCupToken() public {
ceoAddress = msg.sender;
isStop=false;
_createTeam("Egypt", msg.sender, startingPrice);
teamIndexToName["0"]="Egypt";
_createTeam("Morocco", msg.sender, startingPrice);
teamIndexToName["1"]="Morocco";
_createTeam("Nigeria", msg.sender, startingPrice);
... | /*** CONSTRUCTOR ***/ | NatSpecMultiLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
1303,
4701
]
} | 628 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | WorldCupToken | contract WorldCupToken is ERC721 {
event Birth(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
/*** CONSTANTS ***/
string publi... | _owns | function _owns(address claimant, uint256 _tokenId) private view returns (bool) {
return claimant == teamIndexToOwner[_tokenId];
}
| /// Check for token ownership | NatSpecSingleLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
10378,
10518
]
} | 629 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | WorldCupToken | contract WorldCupToken is ERC721 {
event Birth(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
/*** CONSTANTS ***/
string publi... | _payout | function _payout(address _to) private {
if (_to == address(0)) {
ceoAddress.send(this.balance);
} else {
_to.send(this.balance);
}
}
| /// For paying out balance on contract | NatSpecSingleLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
10561,
10728
]
} | 630 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
87,
270
]
} | 631 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
352,
625
]
} | 632 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
738,
854
]
} | 633 | |||
WorldCupToken | WorldCupToken.sol | 0x2ee5054ee925a122976281e1dfea22dc873de96f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.22+commit.4cb486ee | bzzr://058e3374d1884d72b6c50821321b1d0aeec55b2933510d76af2ac7678fbb136a | {
"func_code_index": [
916,
1052
]
} | 634 | |||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
90,
149
]
} | 635 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
228,
300
]
} | 636 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | 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.5.17+commit.d19bba13 | {
"func_code_index": [
516,
597
]
} | 637 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | 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.5.17+commit.d19bba13 | {
"func_code_index": [
868,
955
]
} | 638 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | 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
* tra... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1604,
1682
]
} | 639 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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);
/**
* @de... | 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.5.17+commit.d19bba13 | {
"func_code_index": [
1985,
2086
]
} | 640 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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.5.17+commit.d19bba13 | {
"func_code_index": [
241,
421
]
} | 641 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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.5.17+commit.d19bba13 | {
"func_code_index": [
681,
819
]
} | 642 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1139,
1330
]
} | 643 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1566,
2029
]
} | 644 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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 revert (co... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2480,
2614
]
} | 645 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
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 invalid ... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3125,
3467
]
} | 646 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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 (consuming all... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3907,
4039
]
} | 647 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 (uint256) {
... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | 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 opcode to r... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
4539,
4706
]
} | 648 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | 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 codehash;
... | /**
* @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.5.17+commit.d19bba13 | {
"func_code_index": [
589,
1203
]
} | 649 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | toPayable | function toPayable(address account) internal pure returns (address payable) {
return address(uint160(account));
}
| /**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1408,
1537
]
} | 650 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: unable to send value, recipie... | /**
* @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 `transfer... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2490,
2859
]
} | 651 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from... | callOptionalReturn | function callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to ... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.enc... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
2088,
3187
]
} | 652 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | max | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| /**
* @dev Returns the largest of two numbers.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
79,
188
]
} | 653 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
| /**
* @dev Returns the smallest of two numbers.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
255,
363
]
} | 654 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
472,
666
]
} | 655 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | Context | contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address paya... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
... | Comment | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
259,
359
]
} | 656 | ||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 = _msgSender();
... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
480,
561
]
} | 657 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 = _msgSender();
... | isOwner | function isOwner() public view returns (bool) {
return _msgSender() == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
831,
927
]
} | 658 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 = _msgSender();
... | renounceOwnership | function renounceOwnership() public 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.5.17+commit.d19bba13 | {
"func_code_index": [
1265,
1406
]
} | 659 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 = _msgSender();
... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1551,
1662
]
} | 660 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | 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 = _msgSender();
... | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | {
"func_code_index": [
1759,
1988
]
} | 661 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | Uni | interface Uni {
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
// Balancer swap function
function swapExactAmountIn(
address tokenIn,
... | swapExactAmountIn | function swapExactAmountIn(
address tokenIn,
uint tokenAmountIn,
address tokenOut,
uint minAmountOut,
uint maxPrice
) external returns (uint tokenAmountOut, uint spotPriceAfter);
| // Balancer swap function | LineComment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
259,
485
]
} | 662 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | DFDComptroller | contract DFDComptroller is RewardDistributionRecipient, IDFDComptroller {
using SafeERC20 for IERC20;
using SafeMath for uint;
uint public constant DURATION = 7 days;
address public constant bal = address(0xD8E9690eFf99E21a2de25E0b148ffaf47F47C972);
IERC20 public constant dusd = IERC20(0x5BC25f649... | lastTimeRewardApplicable | function lastTimeRewardApplicable() public view returns (uint256) {
return Math.min(_timestamp(), periodFinish);
}
| /* ##### View ##### */ | Comment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3026,
3156
]
} | 663 | ||||
DFDComptroller | DFDComptroller.sol | 0xf5f850daddc393ce325d8ac395519224f498460f | Solidity | DFDComptroller | contract DFDComptroller is RewardDistributionRecipient, IDFDComptroller {
using SafeERC20 for IERC20;
using SafeMath for uint;
uint public constant DURATION = 7 days;
address public constant bal = address(0xD8E9690eFf99E21a2de25E0b148ffaf47F47C972);
IERC20 public constant dusd = IERC20(0x5BC25f649... | _updateReward | function _updateReward() internal {
uint _lastTimeRewardApplicable = lastTimeRewardApplicable();
rewardStored = rewardStored.add(
_lastTimeRewardApplicable
.sub(lastUpdateTime)
.mul(rewardRate)
);
lastUpdateTime = _lastTimeRewardApplicable;
}
| /* ##### Internal ##### */ | Comment | v0.5.17+commit.d19bba13 | {
"func_code_index": [
3421,
3747
]
} | 664 | ||||
LuckyBox | contracts/luckybox/LuckyBox.sol | 0xe19866986976e84b2c2691169c9f9b1baa433893 | Solidity | LuckyBox | contract LuckyBox is Pausable {
using SafeMath for *;
uint256 public goldBoxAmountForSale;
uint256 public silverBoxAmountForSale;
uint256 public goldBoxPrice; // amount of eth for each gold bag.
uint256 public silverBoxPrice;
address public wallet;
mapping (address => uint2... | claimTokens | function claimTokens(address _token) onlyOwner public {
if (_token == 0x0) {
owner.transfer(address(this).balance);
return;
}
ERC20 token = ERC20(_token);
uint balance = token.balanceOf(this);
token.transfer(owner, balance);
emit ClaimedTokens(_token, owner, balance);
}
| //////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://bd5baecaec99e2d28aacef94dd8f2c6af71c336f843a6eca11f988fcf3d10d30 | {
"func_code_index": [
3572,
3920
]
} | 665 | |||
Oracle | Oracle.sol | 0x9b8b9f6146b29cc32208f42b995e70f0eb2807f3 | Solidity | Oracle | contract Oracle is Manageable {
address[] private _calculations;
address public usdcAddress;
constructor(address _managementListAddress, address _usdcAddress)
Manageable(_managementListAddress)
{
usdcAddress = _usdcAddress;
}
/**
* The oracle supports an array o... | setCalculations | function setCalculations(address[] memory calculationAddresses)
public
onlyManagers
{
_calculations = calculationAddresses;
}
| /**
* The oracle supports an array of calculation contracts. Each calculation contract must implement getPriceUsdc().
* When setting calculation contracts all calculations must be set at the same time (we intentionally do not support for adding/removing calculations).
* The order of calculation contracts matters ... | NatSpecMultiLine | v0.8.2+commit.661d1103 | None | ipfs://55dab22b066012d3a361f6fbae7cceee9048d1267a233e4cce18b831087099c6 | {
"func_code_index": [
695,
862
]
} | 666 | ||
Oracle | Oracle.sol | 0x9b8b9f6146b29cc32208f42b995e70f0eb2807f3 | Solidity | Oracle | contract Oracle is Manageable {
address[] private _calculations;
address public usdcAddress;
constructor(address _managementListAddress, address _usdcAddress)
Manageable(_managementListAddress)
{
usdcAddress = _usdcAddress;
}
/**
* The oracle supports an array o... | /**
* Cascading fallback proxy
*
* Loop through all contracts in _calculations and attempt to forward the method call to each underlying contract.
* This allows users to call getPriceUsdc() on the oracle contract and the result of the first non-reverting contract that
* implements getPriceUsdc() will be retur... | NatSpecMultiLine | v0.8.2+commit.661d1103 | None | ipfs://55dab22b066012d3a361f6fbae7cceee9048d1267a233e4cce18b831087099c6 | {
"func_code_index": [
2011,
2753
]
} | 667 | ||||
Catlacs | contracts/Catlacs.sol | 0x60d32d3bdb7af2f221564f57fd9f4ef0cb4a2392 | Solidity | Catlacs | contract Catlacs is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
IERC1155 public gutterCatNFTAddress;
string private _baseTokenURI =
"https://raw.githubusercontent.com/nftinvesting/Catlacs/master/other/";
string private _contractURI =
"https://raw.githubusercontent.com/nftinvesting/... | action | function action(
uint256 _nftID,
uint256 _actionID,
string memory payload
) external payable {
require(ownerOf(_nftID) == msg.sender, "you must own this NFT");
emit Action(_nftID, msg.value, _actionID, payload);
}
| //a custom action that supports anything. | LineComment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
898,
1124
]
} | 668 | ||||
Catlacs | contracts/Catlacs.sol | 0x60d32d3bdb7af2f221564f57fd9f4ef0cb4a2392 | Solidity | Catlacs | contract Catlacs is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
IERC1155 public gutterCatNFTAddress;
string private _baseTokenURI =
"https://raw.githubusercontent.com/nftinvesting/Catlacs/master/other/";
string private _contractURI =
"https://raw.githubusercontent.com/nftinvesting/... | burn | function burn(uint256 tokenId) public virtual {
require(_isApprovedOrOwner(_msgSender(), tokenId), "caller is not owner nor approved");
_burn(tokenId);
}
| /*
* Non important functions
*/ | Comment | v0.8.4+commit.c7e474f2 | {
"func_code_index": [
1163,
1322
]
} | 669 | ||||
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Context | contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (addres... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | _msgSender | function _msgSender() internal view returns (address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
265,
368
]
} | 670 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | 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... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
497,
581
]
} | 671 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | 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... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | isOwner | function isOwner() public view returns (bool) {
return _msgSender() == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
863,
962
]
} | 672 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | 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... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public 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.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1308,
1453
]
} | 673 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | 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... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1603,
1717
]
} | 674 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | 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... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | _transferOwnership | function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1818,
2052
]
} | 675 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | _addToBlocklist | function _addToBlocklist(address account) private onlyNotInBlocklist(account) returns(bool) {
_userIndex[account] = _userList.length;
_userList.push(account);
emit addedToBlocklist(account, msg.sender);
return true;
}
| /**
* @dev Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1117,
1364
]
} | 676 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | batchAddToBlocklist | function batchAddToBlocklist(address[] calldata accounts) external onlyOwner {
for (uint256 i = 0; i < accounts.length; i++) {
require(_addToBlocklist(accounts[i]));
}
}
| /**
* @notice Adds many addresses to the blocklist at once
* @param accounts[] The list of addresses to add
* @dev Fails if at least one of the addresses was already blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1567,
1759
]
} | 677 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | addToBlocklist | function addToBlocklist(address account) external onlyOwner returns(bool) {
return _addToBlocklist(account);
}
| /**
* @notice Adds an address to the blocklist
* @param account The address to add
* @return true if the operation succeeded
* @dev Fails if the address was already blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
1965,
2086
]
} | 678 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | _removeFromBlocklist | function _removeFromBlocklist(address account) private onlyInBlocklist(account) returns(bool) {
uint rowToDelete = _userIndex[account];
address keyToMove = _userList[_userList.length-1];
_userList[rowToDelete] = keyToMove;
_userIndex[keyToMove] = rowToDelete;
_userList.length--;
emit removedFromBlo... | /**
* @dev Removes an address from the blocklist
* @param account The address to remove
* @return true if the operation succeeds
* @dev Fails if the address was not blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
2292,
2684
]
} | 679 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | batchRemoveFromBlocklist | function batchRemoveFromBlocklist(address[] calldata accounts) external onlyOwner {
for (uint256 i = 0; i < accounts.length; i++) {
require(_removeFromBlocklist(accounts[i]));
}
}
| /**
* @notice Removes many addresses from the blocklist at once
* @param accounts[] The list of addresses to remove
* @dev Fails if at least one of the addresses was not blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
2891,
3093
]
} | 680 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | removeFromBlocklist | function removeFromBlocklist(address account) external onlyOwner returns(bool) {
return _removeFromBlocklist(account);
}
| /**
* @notice Removes an address from the blocklist
* @param account The address to remove
* @dev Fails if the address was not blocklisted
* @return true if the operation succeeded
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
3303,
3434
]
} | 681 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | isBlocklisted | function isBlocklisted(address account) public view returns(bool) {
if(_userList.length == 0) return false;
// We don't want to throw when querying for an out-of-bounds index.
// It can happen when the list has been shrunk after a deletion.
if(_userIndex[account] >= _userList.length) return false;
re... | /**
* @notice Consults whether an address is blocklisted
* @param account The address to check
* @return bool True if the address is blocklisted
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
3604,
3989
]
} | 682 |
Blocklist | Blocklist.sol | 0x9c8a2011ccb697d7ede3c94f9fba5686a04deacb | Solidity | Blocklist | contract Blocklist is Ownable {
/**
* @dev The index of each user in the list
*/
mapping(address => uint256) private _userIndex;
/**
* @dev The list itself
*/
address[] private _userList;
/**
* @notice Event emitted when a user is added to the blocklist
*/
event addedToBloc... | /**
* @title Blocklist
* @dev This contract manages a list of addresses and has a simple CRUD
*/ | NatSpecMultiLine | getFullList | function getFullList() public view returns(address[] memory) {
return _userList;
}
| /**
* @notice Fetches the list of all blocklisted addresses
* @return array The list of currently blocklisted addresses
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | Apache-2.0 | bzzr://19d509ad781f8a222c98fb9abcd0929c32fa5b8a89791dd6ceac592aa6aa1db9 | {
"func_code_index": [
4130,
4223
]
} | 683 |
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
261,
321
]
} | 684 | |
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
644,
820
]
} | 685 | |
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | powerUpContract | function powerUpContract() external onlyOwner {
require(!contractPoweredUp);
// Contract should not be powered up previously
require(!salesActive);
// Contract should have enough Parsec credits
require(token.balanceOf(this) >= crowdSaleHardCap);
//check whet... | /**
* @dev Check if sale contract has enough tokens on its account balance
* to reward all possible participations within sale period
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
2598,
3166
]
} | 686 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | emergencyStop | function emergencyStop() public onlyOwner _saleActive{
salesActive = false;
saleEnded = true;
vault.close();
SaleStopped(msg.sender, now);
}
| //for Emergency stop of the sale | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
3211,
3401
]
} | 687 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | finalize | function finalize()public onlyOwner _saleActive{
require(saleTimeOver());
salesActive = false;
saleEnded = true;
vault.close();
Finalized(msg.sender, now);
}
| /**
* @dev Must be called after sale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
3553,
3765
]
} | 688 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | saleTimeOver | function saleTimeOver() public view returns (bool) {
if(noOfTiers==0){
//since no tiers has been provided yet, hence sales has not started to end
return false;
}
//If last tier has ended, it mean all tiers are finished
return now > tiers[noOfTiers-1].endTime;
}
| // @return true if all the tiers has been ended | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
3827,
4142
]
} | 689 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | withdrawFunds | function withdrawFunds() public onlyOwner _saleEnded{
vault.withdrawToWallet();
}
| //if crowdsales is over, the money rasied should be transferred to the wallet address | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
4238,
4336
]
} | 690 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | setTiersInfo | function setTiersInfo(uint8 _noOfTiers, uint256[] _startTimes, uint256[] _endTimes, uint256[] _hardCaps, uint256[] _rates, uint8[] _bonusPercentages)public onlyOwner tiersEmpty{
//Minimu number of tiers should be 1 and less than or equal to 5
require(_noOfTiers>=1 && _noOfTiers<=5);
//Each array sh... | /**
* @dev Can be called only once. The method to allow owner to set tier information
* @param _noOfTiers The integer to set number of tiers
* @param _startTimes The array containing start time of each tier
* @param _endTimes The array containing end time of each tier
* @param _hardCaps The array containing h... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
5070,
7238
]
} | 691 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | ownerWithdrawUnspentCredits | function ownerWithdrawUnspentCredits()public onlyOwner _saleEnded{
require(!unspentCreditsWithdrawn);
unspentCreditsWithdrawn = true;
token.transfer(owner, token.balanceOf(this));
}
| /**
* @dev Allows owner to transfer unsold tokens to his/her address
* This method should only be called once the sale has been stopped/ended
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
7410,
7626
]
} | 692 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | function()public payable{
buyTokens(msg.sender);
}
| //Fallback function used to buytokens | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
7674,
7740
]
} | 693 | ||||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | buyTokens | function buyTokens(address beneficiary)public _saleActive nonZeroEth nonZeroAddress(beneficiary) payable returns(bool){
int8 currentTierIndex = getCurrentlyRunningTier();
assert(currentTierIndex>=0);
TierInfo storage currentlyRunningTier = tiers[uint256(currentTierIndex)];
... | /**
* @dev Low level token purchase function
* @param beneficiary The address who will receive the tokens for this transaction
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
7892,
9150
]
} | 694 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | getCurrentlyRunningTier | function getCurrentlyRunningTier()public view returns(int8){
for(uint8 i=0;i<noOfTiers;i++){
if(now>=tiers[i].startTime && now<tiers[i].endTime){
return int8(i);
}
}
return -1;
}
| /**
* @dev returns the currently running tier index as per time
* Return -1 if no tier is running currently
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
9509,
9756
]
} | 695 | |||
TRANXCrowdsales | TRANXCrowdsales.sol | 0xaa18c6a2fd0891f3d2d7fd79b869d73a98ce9c7f | Solidity | TRANXCrowdsales | contract TRANXCrowdsales is Ownable{
using SafeMath for uint256;
//Token to be used for this sale
Token public token;
//All funds will go into this vault
Vault public vault;
//Total tokens which is on for sale
uint256 public crowdSaleHardCap;
... | getFundingInfoForUser | function getFundingInfoForUser(address _user)public view nonZeroAddress(_user) returns(uint256){
return vault.deposited(_user);
}
| /**
* @dev Get functing info of user/address. It will return how much funding the user has made in terms of wei
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://a61d079b4af507c07f7c44fedf8ca1257ec93b16eb7113ca166643b4852313ec | {
"func_code_index": [
9889,
10034
]
} | 696 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
89,
272
]
} | 697 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
356,
629
]
} | 698 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
744,
860
]
} | 699 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
924,
1060
]
} | 700 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
261,
321
]
} | 701 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
640,
816
]
} | 702 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
199,
287
]
} | 703 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
445,
836
]
} | 704 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
1042,
1154
]
} | 705 | |||
DetherToken | DetherToken.sol | 0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://31679c746f39dbdd5c090cd5514df308ef9098903284459826a5c4f30a8510bd | {
"func_code_index": [
401,
853
]
} | 706 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.