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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | withdrawAllFunds | function withdrawAllFunds(address beneficiary) external onlyOwner {
if (beneficiary.send(address(this).balance)) {
lockedInBets = 0;
jackpotSize = 0;
emit AllFundsPayment(beneficiary, address(this).balance);
} else {
emit FailedPayment(beneficiary, address(this).balance);
... | //Recovery of funds | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
7671,
8036
]
} | 12,700 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | withdrawAlltokenFunds | function withdrawAlltokenFunds(address beneficiary) external onlyOwner {
ERC20(ERC20ContractAddres).transfer(beneficiary, ERC20(ERC20ContractAddres).balanceOf(address(this)));
lockedInBets = 0;
jackpotSize = 0;
emit AllTokenPayment(beneficiary, ERC20(ERC20ContractAddres).balanceOf(address(this)));
... | //Recovery of Token funds | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
8070,
8416
]
} | 12,701 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | kill | function kill() external onlyOwner {
require (lockedInBets == 0);
selfdestruct(owner);
}
| // Contract may be destroyed only when there are no ongoing bets,
// either settled or refunded. All funds are transferred to contract owner. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
8571,
8688
]
} | 12,702 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | placeBet | function placeBet(uint8 _rotateTime , uint8 _machineMode , uint _commitLastBlock, uint _commit, bytes32 r, bytes32 s ) external payable {
// Check that the bet is in 'clean' state.
Bet storage bet = bets[_commit];
require (bet.gambler == address(0));
//Check SecretSigner.
b... | //Bet by ether: Commits are signed with a block limit to ensure that they are used at most once. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
9766,
11435
]
} | 12,703 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | getPossibleWinPrize | function getPossibleWinPrize(uint bonusPercentage,uint senderValue)public pure returns (uint possibleWinAmount) {
//Win Amount
possibleWinAmount = ((senderValue.mul(bonusPercentage))).div(10000);
}
| //Get deductedBalance | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
21172,
21400
]
} | 12,704 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | getPossibleWinAmount | function getPossibleWinAmount(uint bonusPercentage,uint senderValue)public view returns (uint platformFee,uint jackpotFee,uint possibleWinAmount) {
//Platform Fee
uint prePlatformFee = (senderValue).mul(platformFeePercentage);
platformFee = (prePlatformFee).div(1000);
//Get jackpotFee
uint ... | //Get deductedBalance | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
21434,
22040
]
} | 12,705 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | refundBet | function refundBet(uint commit) external onlyRefunder{
// Check that bet is in 'active' state.
Bet storage bet = bets[commit];
uint amount = bet.amount;
uint8 machineMode = bet.machineMode;
require (amount != 0, "Bet should be in an 'active' state");
// Check that bet has alr... | // Refund transaction | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
23181,
23975
]
} | 12,706 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | clearStorage | function clearStorage(uint[] cleanCommits) external onlyRefunder {
uint length = cleanCommits.length;
for (uint i = 0; i < length; i++) {
clearProcessedBet(cleanCommits[i]);
}
}
| // A helper routine to bulk clean the storage. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
24907,
25136
]
} | 12,707 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | clearProcessedBet | function clearProcessedBet(uint commit) private {
Bet storage bet = bets[commit];
// Do not overwrite active bets with zeros
if (bet.amount != 0 || block.number <= bet.placeBlockNumber + BetExpirationBlocks) {
return;
}
// Zero out the remaining storage
bet.placeBlockNumber = ... | // Helper routine to move 'processed' bets into 'clean' state. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
25207,
25664
]
} | 12,708 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | sendFunds | function sendFunds(address receiver, uint amount ) private {
if (receiver.send(amount)) {
emit Payment(receiver, amount);
} else {
emit FailedPayment(receiver, amount);
}
}
| // Helper routine to process the payment. | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
25714,
25950
]
} | 12,709 | |||
Play0x_LottoBall | Play0x_LottoBall.sol | 0x892552275e5d68d889a33ad119af86b7ddf7c237 | Solidity | Play0x_LottoBall | contract Play0x_LottoBall {
using SafeMath for uint256;
using SafeMath for uint128;
using SafeMath for uint40;
using SafeMath for uint8;
uint public jackpotSize;
uint public MIN_BET;
uint public MAX_BET;
uint public MAX_AMOUNT;
uint constant MAX_MODULO = 15;
//A... | updateMIN_BET | function updateMIN_BET(uint _uintNumber)external onlyOwner {
MIN_BET = _uintNumber;
}
| //Update | LineComment | v0.4.24+commit.e67f0147 | bzzr://b654f22f57aa857a1fab23118d87f2f9641b8a0d78456353eeb05e0ca95fb071 | {
"func_code_index": [
26252,
26357
]
} | 12,710 | |||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
94,
154
]
} | 12,711 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
237,
310
]
} | 12,712 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
534,
616
]
} | 12,713 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
895,
983
]
} | 12,714 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
1647,
1726
]
} | 12,715 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
2039,
2141
]
} | 12,716 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | WanFarmErrorReporter | contract WanFarmErrorReporter {
enum Error {
NO_ERROR,
UNAUTHORIZED
}
enum FailureInfo {
ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
SET_PENDING_ADMIN_OWNER_CHECK,
SET_PENDING_IMPLEMENTATION_OWNER_CHECK
}
... | fail | function fail(Error err, FailureInfo info) internal returns (uint) {
emit Failure(uint(err), uint(info), 0);
return uint(err);
}
| /**
* @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
747,
905
]
} | 12,717 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | WanFarmErrorReporter | contract WanFarmErrorReporter {
enum Error {
NO_ERROR,
UNAUTHORIZED
}
enum FailureInfo {
ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
SET_PENDING_ADMIN_OWNER_CHECK,
SET_PENDING_IMPLEMENTATION_OWNER_CHECK
}
... | failOpaque | function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
emit Failure(uint(err), uint(info), opaqueError);
return uint(err);
}
| /**
* @dev use this when reporting an opaque error from an upgradeable collaborator contract
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
1023,
1215
]
} | 12,718 | ||
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | UniFarm | contract UniFarm is UniFarmAdminStorage, WanFarmErrorReporter {
/**
* @notice Emitted when pendingWanFarmImplementation is changed
*/
event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);
/**
* @notice Emitted when pendingWanFarmImple... | /**
* @title ComptrollerCore
* @dev Storage for the comptroller is at this address, while execution is delegated to the `wanFarmImplementation`.
* CTokens should reference this contract as their comptroller.
*/ | NatSpecMultiLine | _setPendingImplementation | function _setPendingImplementation(address newPendingImplementation) public returns (uint) {
if (msg.sender != admin) {
return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);
}
address oldPendingImplementation = pendingWanFarmImplementation;
pendingWanFar... | /*** Admin Functions ***/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
935,
1468
]
} | 12,719 |
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | UniFarm | contract UniFarm is UniFarmAdminStorage, WanFarmErrorReporter {
/**
* @notice Emitted when pendingWanFarmImplementation is changed
*/
event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);
/**
* @notice Emitted when pendingWanFarmImple... | /**
* @title ComptrollerCore
* @dev Storage for the comptroller is at this address, while execution is delegated to the `wanFarmImplementation`.
* CTokens should reference this contract as their comptroller.
*/ | NatSpecMultiLine | _acceptImplementation | function _acceptImplementation() public returns (uint) {
// Check caller is pendingImplementation and pendingImplementation ≠ address(0)
if (msg.sender != pendingWanFarmImplementation || pendingWanFarmImplementation == address(0)) {
return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENT... | /**
* @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation
* @dev Admin function for new implementation to accept it's role as implementation
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
1762,
2659
]
} | 12,720 |
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | UniFarm | contract UniFarm is UniFarmAdminStorage, WanFarmErrorReporter {
/**
* @notice Emitted when pendingWanFarmImplementation is changed
*/
event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);
/**
* @notice Emitted when pendingWanFarmImple... | /**
* @title ComptrollerCore
* @dev Storage for the comptroller is at this address, while execution is delegated to the `wanFarmImplementation`.
* CTokens should reference this contract as their comptroller.
*/ | NatSpecMultiLine | _setPendingAdmin | function _setPendingAdmin(address newPendingAdmin) public returns (uint) {
// Check caller = admin
if (msg.sender != admin) {
return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);
}
// Save current value, if any, for inclusion in log
address oldPendingAdmin = pe... | /**
* @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
* @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
* @param newPendingAdmin New pending admin.
* @return uint 0=success, other... | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
3070,
3712
]
} | 12,721 |
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | UniFarm | contract UniFarm is UniFarmAdminStorage, WanFarmErrorReporter {
/**
* @notice Emitted when pendingWanFarmImplementation is changed
*/
event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);
/**
* @notice Emitted when pendingWanFarmImple... | /**
* @title ComptrollerCore
* @dev Storage for the comptroller is at this address, while execution is delegated to the `wanFarmImplementation`.
* CTokens should reference this contract as their comptroller.
*/ | NatSpecMultiLine | _acceptAdmin | function _acceptAdmin() public returns (uint) {
// Check caller is pendingAdmin and pendingAdmin ≠ address(0)
if (msg.sender != pendingAdmin || msg.sender == address(0)) {
return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);
}
// Save current values for inclusion... | /**
* @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
* @dev Admin function for pending admin to accept role and update admin
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
3985,
4728
]
} | 12,722 |
UniFarm | UniFarm.sol | 0x3e460895ddeea50dd67f098f1bceffb03f36a04c | Solidity | UniFarm | contract UniFarm is UniFarmAdminStorage, WanFarmErrorReporter {
/**
* @notice Emitted when pendingWanFarmImplementation is changed
*/
event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);
/**
* @notice Emitted when pendingWanFarmImple... | /**
* @title ComptrollerCore
* @dev Storage for the comptroller is at this address, while execution is delegated to the `wanFarmImplementation`.
* CTokens should reference this contract as their comptroller.
*/ | NatSpecMultiLine | function () payable external {
// delegate all other functions to current implementation
(bool success, ) = wanFarmImplementation.delegatecall(msg.data);
assembly {
let free_mem_ptr := mload(0x40)
returndatacopy(free_mem_ptr, 0, returndatasize)
switch success
... | /**
* @dev Delegates execution to an implementation contract.
* It returns to the external caller whatever the implementation returns
* or forwards reverts.
*/ | NatSpecMultiLine | v0.5.16+commit.9c3226ce | MIT | bzzr://551eb6e8a67d3a2965fd243e7e2a25a81587914e8795350764745743efbca3ad | {
"func_code_index": [
4920,
5405
]
} | 12,723 | |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | SpreadswapFinance | function SpreadswapFinance() public {
symbol = "SSF";
name = "Spreadswap.Finance";
decimals = 18;
_totalSupply = 36000000000000000000000;
balances[0x4aaDefF6693FB4dc8FfaFfA6E69b0CB7aB4a458a] = _totalSupply;
Transfer(address(0), 0x4aaDefF6693FB4dc8FfaFfA6E69b0CB7aB4a458a, _totalSupply);
}
... | // ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
464,
816
]
} | 12,724 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
1004,
1125
]
} | 12,725 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
1345,
1474
]
} | 12,726 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
1818,
2095
]
} | 12,727 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
2603,
2811
]
} | 12,728 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
Transfer(from, to, tokens);
return... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
3342,
3700
]
} | 12,729 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
3983,
4139
]
} | 12,730 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
4494,
4811
]
} | 12,731 |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
5003,
5062
]
} | 12,732 | |
SpreadswapFinance | SpreadswapFinance.sol | 0x8b30b3e33fa704858fb58e7de70030d8bcfaaef7 | Solidity | SpreadswapFinance | contract SpreadswapFinance is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.23+commit.124ca40d | None | bzzr://0d3b274bf418717256907574afa6ac9694510a09a52c94b8657a6b7cc96d230b | {
"func_code_index": [
5295,
5484
]
} | 12,733 |
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
909,
997
]
} | 12,734 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
1111,
1203
]
} | 12,735 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
1836,
1924
]
} | 12,736 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
1984,
2089
]
} | 12,737 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
2147,
2271
]
} | 12,738 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
2479,
2659
]
} | 12,739 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
2717,
2873
]
} | 12,740 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
3015,
3189
]
} | 12,741 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
3666,
3992
]
} | 12,742 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
4396,
4619
]
} | 12,743 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` c... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
5117,
5391
]
} | 12,744 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
if(sender != owner() && recipient != owner())
require(amou... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
5876,
6578
]
} | 12,745 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfe... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
6855,
7238
]
} | 12,746 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _to... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
7566,
7989
]
} | 12,747 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amoun... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
8422,
8773
]
} | 12,748 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
9100,
9195
]
} | 12,749 | ||
ArbitrumDoge | ArbitrumDoge.sol | 0xc5f3b23460ae231ca0f6774c941aac28c748d1eb | Solidity | ArbitrumDoge | contract ArbitrumDoge is Ownable, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply = 0;
string private _name = 'ArbitrumDoge ';
string private _s... | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* -... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f7645 | {
"func_code_index": [
9797,
9894
]
} | 12,750 | ||
SingleStaking | @openzeppelin/contracts/utils/Multicall.sol | 0x6755630c583f12ffbd10568eb633c0319db34922 | Solidity | Multicall | abstract contract Multicall {
/**
* @dev Receives and executes a batch of function calls on this contract.
*/
function multicall(bytes[] calldata data) external returns (bytes[] memory results) {
results = new bytes[](data.length);
for (uint256 i = 0; i < data.length; i++) {
... | /**
* @dev Provides a function to batch together multiple calls in a single external call.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | multicall | function multicall(bytes[] calldata data) external returns (bytes[] memory results) {
results = new bytes[](data.length);
for (uint256 i = 0; i < data.length; i++) {
results[i] = Address.functionDelegateCall(address(this), data[i]);
}
return results;
}
| /**
* @dev Receives and executes a batch of function calls on this contract.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
124,
428
]
} | 12,751 | ||
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
978,
1099
]
} | 12,752 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
1319,
1448
]
} | 12,753 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
1792,
2074
]
} | 12,754 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
2360,
2573
]
} | 12,755 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
3104,
3467
]
} | 12,756 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
3750,
3906
]
} | 12,757 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
4261,
4583
]
} | 12,758 |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
4775,
4834
]
} | 12,759 | |
AntiDAI | AntiDAI.sol | 0xc42817e3fe8203bc5b874b374433dd2545bfd95f | Solidity | AntiDAI | contract AntiDAI is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// -----------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | None | bzzr://24863800f759b2cf044985920df2c448b1ba9de4e298655085be1ae3baf9a65f | {
"func_code_index": [
5067,
5256
]
} | 12,760 |
iColabRegistry | iColabRegistry.sol | 0x4e469b6a7b782a8e6e9c4d22e5e52806fd3410d5 | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = msg.sender;
emit Ow... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.8+commit.23d335f2 | MIT | bzzr://be9d2555bf70fc8705d417b818bf45d5e1321129bece5f1a5ee932a7c823ee72 | {
"func_code_index": [
443,
527
]
} | 12,761 | ||
iColabRegistry | iColabRegistry.sol | 0x4e469b6a7b782a8e6e9c4d22e5e52806fd3410d5 | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = msg.sender;
emit Ow... | isOwner | function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.5.8+commit.23d335f2 | MIT | bzzr://be9d2555bf70fc8705d417b818bf45d5e1321129bece5f1a5ee932a7c823ee72 | {
"func_code_index": [
809,
906
]
} | 12,762 | ||
iColabRegistry | iColabRegistry.sol | 0x4e469b6a7b782a8e6e9c4d22e5e52806fd3410d5 | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = msg.sender;
emit Ow... | 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.8+commit.23d335f2 | MIT | bzzr://be9d2555bf70fc8705d417b818bf45d5e1321129bece5f1a5ee932a7c823ee72 | {
"func_code_index": [
1254,
1399
]
} | 12,763 | ||
iColabRegistry | iColabRegistry.sol | 0x4e469b6a7b782a8e6e9c4d22e5e52806fd3410d5 | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = msg.sender;
emit Ow... | 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.8+commit.23d335f2 | MIT | bzzr://be9d2555bf70fc8705d417b818bf45d5e1321129bece5f1a5ee932a7c823ee72 | {
"func_code_index": [
1549,
1663
]
} | 12,764 | ||
iColabRegistry | iColabRegistry.sol | 0x4e469b6a7b782a8e6e9c4d22e5e52806fd3410d5 | Solidity | Ownable | contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = msg.sender;
emit Ow... | _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.8+commit.23d335f2 | MIT | bzzr://be9d2555bf70fc8705d417b818bf45d5e1321129bece5f1a5ee932a7c823ee72 | {
"func_code_index": [
1764,
1998
]
} | 12,765 | ||
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
89,
266
]
} | 12,766 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
350,
630
]
} | 12,767 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
744,
860
]
} | 12,768 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
924,
1054
]
} | 12,769 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
199,
287
]
} | 12,770 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
445,
777
]
} | 12,771 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
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.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
983,
1087
]
} | 12,772 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
401,
858
]
} | 12,773 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
1490,
1685
]
} | 12,774 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
2009,
2140
]
} | 12,775 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
2606,
2875
]
} | 12,776 | |
ARTIDToken | ARTIDToken.sol | 0xc23867dabd392da14c602a3a65bcca4960fd2545 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approva... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://9a31a38ecb46c139ea7d02323c17b8edca3f681d8fe324049468d6795980e5ed | {
"func_code_index": [
3346,
3761
]
} | 12,777 | |
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | TokenERC20 | function TokenERC20(uint256 initialSupply, string tokenName, string tokenSymbol) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // 供应的份额,份额跟最小的代币单位有关,份额 = 币数 * 10 ** decimals。
balanceOf[msg.sender] = totalSupply; // 创建者拥有所有的代币
name = tokenName; ... | /**
* 初始化构造
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
588,
1015
]
} | 12,778 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | _transfer | function _transfer(address _from, address _to, uint _value) internal {
// 确保目标地址不为0x0,因为0x0地址代表销毁
require(_to != 0x0);
// 检查发送者余额
require(balanceOf[_from] >= _value);
// 确保转移为正数个
require(balanceOf[_to] + _value > balanceOf[_to]);
// 以下用来检查交易,
uint previousBalances = balance... | /**
* 代币交易转移的内部实现
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
1060,
1747
]
} | 12,779 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | transfer | function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
| /**
* 代币交易转移
* 从自己(创建交易者)账号发送`_value`个代币到 `_to`账号
*
* @param _to 接收者地址
* @param _value 转移数额
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
1891,
2003
]
} | 12,780 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
| /**
* 账号之间代币交易转移
* @param _from 发送者地址
* @param _to 接收者地址
* @param _value 转移数额
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
2126,
2427
]
} | 12,781 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | approve | function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
| /**
* 设置某个地址(合约)可以创建交易者名义花费的代币数。
*
* 允许发送者`_spender` 花费不多于 `_value` 个代币
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
2654,
2830
]
} | 12,782 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
// 通知合约
spender.receiveApproval(msg.sender, _value, this, _extraData);
return tru... | /**
* 设置允许一个地址(合约)以我(创建交易者)的名义可最多花费的代币数。
*
* @param _spender 被授权的地址(合约)
* @param _value 最大可花费代币数
* @param _extraData 发送给合约的附加数据
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
3009,
3382
]
} | 12,783 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | burn | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _val... | /**
* 销毁我(创建交易者)账户中指定个代币
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
3434,
3808
]
} | 12,784 | ||
TokenERC20 | TokenERC20.sol | 0x0687f759b6a8940e6c984187e928875a767728b5 | Solidity | TokenERC20 | contract TokenERC20 {
string public name;
string public symbol;
uint8 public decimals = 18; // decimals 可以有的小数点个数,最小的代币单位。18 是建议的默认值
uint256 public totalSupply;
// 用mapping保存每个地址对应的余额
mapping (address => uint256) public balanceOf;
// 存储对账号的控制
mapping (address => mapping (a... | burnFrom | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Sub... | /**
* 销毁用户账户中指定个代币
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | None | bzzr://b8aaf66fc72be61462fa3721b19b60e95b7e1d18e90ff9bd02a98648c54a1d54 | {
"func_code_index": [
4049,
4660
]
} | 12,785 | ||
SidusPreSale | SidusPreSale.sol | 0x486a339e20c1349c95873c5d1c80416cbb3d10e4 | Solidity | SidusPreSale | contract SidusPreSale is Ownable {
using SafeERC20 for IERC20;
struct LimitItem {
uint256 tokenId;
uint256 limit;
}
struct CardsSupply {
uint256 maxTotalSupply;
uint256 currentSupply;
}
struct Price {
uint256 value;
uint256 decimals;
}
... | registerUserForPreSale | function registerUserForPreSale(address _erc20, LimitItem[] calldata _wanted, address _user) external onlyOwner {
uint256 currLimit;
for (uint256 i = 0; i < _wanted.length; i ++){
currLimit = _getUserLimitTotal(_user);
require(priceForCard[_erc20][_wanted[i].tokenId].value > 0,
"Can... | ///////////////////////////////////////////////////////////////////
///// Owners Functions ///////////////////////////////////////////
/////////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
2707,
3642
]
} | 12,786 | |||
SidusPreSale | SidusPreSale.sol | 0x486a339e20c1349c95873c5d1c80416cbb3d10e4 | Solidity | SidusPreSale | contract SidusPreSale is Ownable {
using SafeERC20 for IERC20;
struct LimitItem {
uint256 tokenId;
uint256 limit;
}
struct CardsSupply {
uint256 maxTotalSupply;
uint256 currentSupply;
}
struct Price {
uint256 value;
uint256 decimals;
}
... | getCardPrice | function getCardPrice(address _erc20, uint256 _tokenId) external view returns (Price memory) {
return priceForCard[_erc20][_tokenId];
}
| /////////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
4669,
4820
]
} | 12,787 | |||
SidusPreSale | SidusPreSale.sol | 0x486a339e20c1349c95873c5d1c80416cbb3d10e4 | Solidity | SidusPreSale | contract SidusPreSale is Ownable {
using SafeERC20 for IERC20;
struct LimitItem {
uint256 tokenId;
uint256 limit;
}
struct CardsSupply {
uint256 maxTotalSupply;
uint256 currentSupply;
}
struct Price {
uint256 value;
uint256 decimals;
}
... | _addLimitForCard | function _addLimitForCard(address _user, uint256 _tokenId, uint256 _increment)
internal
returns (uint256 increment)
{
for (uint256 i = 0; i < whiteList[_user].length; i ++){
if (whiteList[_user][i].tokenId == _tokenId) {
whiteList[_user][i].limit += _increment;
increment = ... | ///////////////////////////////////////////////////////////////////
///// Internal Functions /////////////////////////////////////////
/////////////////////////////////////////////////////////////////// | NatSpecSingleLine | v0.8.11+commit.d7f03943 | MIT | {
"func_code_index": [
5729,
6480
]
} | 12,788 | |||
WeiToken | WeiToken.sol | 0x14654cc00fce33b50de832781fd730ec1e9f2b29 | Solidity | WeiToken | contract WeiToken is StandardToken, Pausable {
string public constant name = "WeiToken";
string public constant symbol = "YOUNG";
uint256 public constant decimals = 18;
string public version = "1.0";
uint256 public constant total = 65 * (10**8) * 10**decimals; // 20 *10^8 HNC total
function WeiT... | WeiToken | function WeiToken() public {
balances[msg.sender] = total;
Transfer(0x0, msg.sender, total);
}
| // 20 *10^8 HNC total | LineComment | v0.4.20+commit.3155dd80 | bzzr://400b98547b5c6d7de276c7b5a34eea6c3c68eaccf77a7c5fa7867f5e6bbfd30d | {
"func_code_index": [
305,
415
]
} | 12,789 | |||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | Strings | library Strings {
/**
* @dev Converts a `uint256` to its ASCII `string` representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b06... | /**
* @dev String operations.
*/ | NatSpecMultiLine | toString | function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 ... | /**
* @dev Converts a `uint256` to its ASCII `string` representation.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
109,
858
]
} | 12,790 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _set | function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) { // Equivalent to !contains(map, key)
map._entries.push(MapEnt... | /**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1091,
1788
]
} | 12,791 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _remove | function _remove(Map storage map, bytes32 key) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex != 0) { // Equivalent to contains(map, key)
// To delete a key-value pair from th... | /**
* @dev Removes a key-value pair from a map. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
1958,
3512
]
} | 12,792 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _contains | function _contains(Map storage map, bytes32 key) private view returns (bool) {
return map._indexes[key] != 0;
}
| /**
* @dev Returns true if the key is in the map. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3591,
3721
]
} | 12,793 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _length | function _length(Map storage map) private view returns (uint256) {
return map._entries.length;
}
| /**
* @dev Returns the number of key-value pairs in the map. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
3811,
3926
]
} | 12,794 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _at | function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
require(map._entries.length > index, "EnumerableMap: index out of bounds");
MapEntry storage entry = map._entries[index];
return (entry._key, entry._value);
}
| /**
* @dev Returns the key-value pair stored at position `index` in the map. O(1).
*
* Note that there are no guarantees on the ordering of entries inside the
* array, and it may change when more entries are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4276,
4560
]
} | 12,795 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _get | function _get(Map storage map, bytes32 key) private view returns (bytes32) {
return _get(map, key, "EnumerableMap: nonexistent key");
}
| /**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4716,
4870
]
} | 12,796 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | _get | function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value; // All indexes are 1-based
}
| /**
* @dev Same as {_get}, with a custom error message when `key` is not in the map.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
4978,
5302
]
} | 12,797 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | set | function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
return _set(map._inner, bytes32(key), bytes32(uint256(value)));
}
| /**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5621,
5802
]
} | 12,798 | ||
NFTeGG_Burner | NFTeGG_Burner.sol | 0x8409a26de50daad783ac7ac1cf91159c1e8fdf21 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint25... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enu... | NatSpecMultiLine | remove | function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
return _remove(map._inner, bytes32(key));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | {
"func_code_index": [
5963,
6110
]
} | 12,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.