file_name stringlengths 71 779k | comments stringlengths 20 182k | code_string stringlengths 20 36.9M | __index_level_0__ int64 0 17.2M | input_ids sequence | attention_mask sequence | labels sequence |
|---|---|---|---|---|---|---|
./full_match/5/0x747f47C2616Ead094c224b6626414f5F5b6969fC/sources/contracts/Contract.sol | * @dev Mint ERC20 rewards to the staker. Must override. @param _staker Address for which to calculated rewards. @param _rewards Amount of tokens to be given out as reward./ Mint or transfer reward-tokens here. e.g. OR Use a mintable ERC20, such as thirdweb's `TokenERC20.sol`TokenERC20(rewardToken).mintTo(_st... | function _mintRewards(address _staker, uint256 _rewards) internal virtual override {
IERC20(rewardToken).transfer(_staker, _rewards);
}
| 11,622,135 | [
1,
49,
474,
4232,
39,
3462,
283,
6397,
358,
326,
384,
6388,
18,
6753,
3849,
18,
282,
389,
334,
6388,
565,
5267,
364,
1492,
358,
8894,
283,
6397,
18,
282,
389,
266,
6397,
282,
16811,
434,
2430,
358,
506,
864,
596,
487,
19890,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
565,
445,
389,
81,
474,
17631,
14727,
12,
2867,
389,
334,
6388,
16,
2254,
5034,
389,
266,
6397,
13,
2713,
5024,
3849,
288,
203,
3639,
467,
654,
39,
3462,
12,
266,
2913,
1345,
2934,
13866,
24899,
334,
6388,
16,
389,
266,
6397,
1... |
// SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
import "./interfaces/ITokenFactory.sol";
import "./ERC1155ERC721Metadata.sol";
import "./ERC1155ERC721WithAdapter.sol";
import "./GSN/BaseRelayRecipient.sol";
contract TokenFactory is
ITokenFactory,
ERC1155ERC721Metadata,
ERC1155ERC721WithAdapter,
... | @notice A descriptive name for a collection of NFTs in this contract | function name()
external
pure
override
returns (string memory)
{
return "DigiQuick";
}
| 12,255,053 | [
1,
37,
302,
31812,
508,
364,
279,
1849,
434,
423,
4464,
87,
316,
333,
6835,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
565,
445,
508,
1435,
203,
3639,
3903,
203,
3639,
16618,
203,
3639,
3849,
203,
3639,
1135,
261,
1080,
3778,
13,
203,
565,
288,
203,
3639,
327,
315,
4907,
77,
13663,
14432,
203,
565,
289,
203,
203,
2,
-100,
-100,
-100,
-100,
-100,
... |
pragma solidity ^0.4.24;
// File: contracts/interface/DiviesInterface.sol
interface DiviesInterface {
function deposit() external payable;
}
// File: contracts/library/SafeMath.sol
/**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath li... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MODIFIERS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | modifier isHuman() {
address _addr = msg.sender;
require (_addr == tx.origin);
uint256 _codeLength;
require(_codeLength == 0, "sorry humans only");
_;
}
| 14,570,081 | [
1,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
66,
8663,
10591,
55,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
20254,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
565,
9606,
27803,
6925,
1435,
288,
203,
3639,
1758,
389,
4793,
273,
1234,
18,
15330,
31,
203,
3639,
2583,
261,
67,
4793,
422,
2229,
18,
10012,
1769,
203,
3639,
2254,
5034,
389,
710,
1782,
31,
203,
540,
203,
3639,
2583,
24899,
710... |
./partial_match/1/0x8dC9Ecb92CC5D56e146b59a141E33023804DE081/sources/EthicHubLending.sol | lendingInterestRate with 2 decimal | function investorInterest() public view returns(uint256){
return annualInterest.mul(interestBaseUint).mul(borrowerReturnDays).div(365).add(interestBasePercent);
}
| 4,127,406 | [
1,
80,
2846,
29281,
4727,
598,
576,
6970,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
565,
445,
2198,
395,
280,
29281,
1435,
1071,
1476,
1135,
12,
11890,
5034,
15329,
203,
3639,
327,
8226,
1462,
29281,
18,
16411,
12,
2761,
395,
2171,
5487,
2934,
16411,
12,
70,
15318,
264,
990,
9384,
2934,
2892,
12,
5718,
25,
2934,
... |
./full_match/1/0xc001160D7e90e8534Aa6d719d20F0E5425c25B40/sources/contracts/UsdbLendingCore.sol | @notice Remove currency @param _currency the currency of loan | function removeCurrency(address _currency) external onlyOwner {
require(availableCurrencies[_currency] == true, "CURRENCY_NOT_EXIST");
availableCurrencies[_currency] = false;
platformFees[_currency] = 0;
}
| 3,849,055 | [
1,
3288,
5462,
225,
389,
7095,
326,
5462,
434,
28183,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
565,
445,
1206,
7623,
12,
2867,
389,
7095,
13,
3903,
1338,
5541,
288,
203,
3639,
2583,
12,
5699,
2408,
14695,
63,
67,
7095,
65,
422,
638,
16,
315,
7509,
25231,
67,
4400,
67,
11838,
8863,
203,
3639,
2319,
2408,
14695,
63,
67,
70... |
pragma solidity ^0.5.1;
//TODO:
//
//test - contributions, reclaims, fallback function, multiple loans
//do we need a true start time?
// allow people to contribute more than 99 million on the app
// make it clear that 1 period is 60 seconds
// Add UCASH address to HTML
contract ERC20Basic {
function totalSupply() ... | re-arrange Array. Replace current element with last element, and delete last element. | uint currentArrayIndex = Loans[contributor].arrayIndex;
| 6,709,041 | [
1,
266,
17,
297,
3676,
1510,
18,
6910,
783,
930,
598,
1142,
930,
16,
471,
1430,
1142,
930,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
565,
2254,
783,
1076,
1016,
273,
3176,
634,
63,
591,
19293,
8009,
1126,
1016,
31,
203,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"// SPDX-License-Identifier: GPL-3.0\n\n/*\n This file is part of the Enzyme Protocol.\n\n (c)(...TRUNCATED) | " @notice Gets the request info of a user @param _requestOwner The address of the user that creates (...TRUNCATED) | " function getSharesRequestInfoForOwner(address _requestOwner)\n external\n view\n (...TRUNCATED) | 1,697,357 | [1,3002,326,590,1123,434,279,729,225,389,2293,5541,1021,1758,434,326,729,716,3414,326,590,327,30105,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED) | [1,565,445,1322,3395,455,23113,1290,5541,12,2867,389,2293,5541,13,203,3639,3903,203,3639,1476,203,36(...TRUNCATED) |
"./full_match/1/0x3Bd85DF9633eF0205206BB519E4dDee152Bb0005/sources/contracts/token/RewardsDistributo(...TRUNCATED) | "* PRIVILEGE FUNCTION Migrates by governance: (2 options) a) the whole garden or a user for all gard(...TRUNCATED) | " function migrateAddressToCheckpoints(address _address, bool _toMigrate) external override {\n (...TRUNCATED) | 3,050,066 | [1,7698,4136,900,7113,13690,490,2757,815,635,314,1643,82,1359,30,261,22,702,13,279,13,326,7339,314,2(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,565,445,13187,1887,18126,4139,12,2867,389,2867,16,1426,389,869,19594,13,3903,3849,288,203,3639,38(...TRUNCATED) |
"// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\npragma experimental ABIEncoderV2;\n\nimpo(...TRUNCATED) | bytes4(keccak256(bytes('approve(address,uint256)'))); | " function safeApprove(IERC20 token, address to, uint value) internal {\n (bool success, b(...TRUNCATED) | 1,741,100 | [1,3890,24,12,79,24410,581,5034,12,3890,2668,12908,537,12,2867,16,11890,5034,2506,3719,1769,2,0,0,0,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED) | [1,565,445,4183,12053,537,12,45,654,39,3462,1147,16,1758,358,16,2254,460,13,2713,288,203,3639,261,64(...TRUNCATED) |
"pragma solidity 0.6.3;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport './ICTok(...TRUNCATED) | represent an ERC20 token. | "contract Dex {\n \n struct Token {\n }\n \n bytes32[] public tokenList;\n \n mapping(bytes32(...TRUNCATED) | 13,140,415 | [1,28205,392,4232,39,3462,1147,18,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED) | [1,16351,463,338,288,203,21281,225,1958,3155,288,203,225,289,203,21281,225,1731,1578,8526,1071,1147,(...TRUNCATED) |
End of preview. Expand in Data Studio
- Downloads last month
- 251