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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | reserve | function reserve() public onlyOwner {
require(totalSupply() < reservable, "reserve would exceed reservable");
uint supply = totalSupply();
uint i;
for (i = 0; i < 55; i++) {
if (totalSupply() < reservable - team) {
_safeMint(reservee, supply + i);
} else if (totalSupply() < r... | /**
* reserve
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
991,
1435
]
} | 7,407 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setProvenance | function setProvenance(string memory _provenance) public onlyOwner {
provenance = _provenance;
}
| /**
* set provenance if needed
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
1484,
1596
]
} | 7,408 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setBaseURI | function setBaseURI(string memory baseURI) public onlyOwner {
_setBaseURI(baseURI);
}
| /*
* sets baseURI
*/ | Comment | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
1631,
1732
]
} | 7,409 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setContractURI | function setContractURI(string memory _contractURI) public onlyOwner {
contractURI = (_contractURI);
}
| /*
* set contractURI if needed
*/ | Comment | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
1780,
1898
]
} | 7,410 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | flipSaleState | function flipSaleState() public onlyOwner {
saleIsActive = !saleIsActive;
}
| /*
* Pause sale if active, make active if paused
*/ | Comment | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
1965,
2056
]
} | 7,411 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | setSaleStart | function setSaleStart(uint256 _saleStart) public onlyOwner {
saleStart = _saleStart;
}
| /*
* updates saleStart
*/ | Comment | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
2096,
2198
]
} | 7,412 | |
CryptoPimps | Pimps.sol | 0xb4c80c8df14ce0a1e7c500fdd4e2bda1644f89b6 | Solidity | CryptoPimps | contract CryptoPimps is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant maxSupply = 10000;
uint256 public constant price = 3*10**16;
uint256 public constant purchaseLimit = 50;
uint256 internal constant reservable = 240;
uint256 internal constant team = 40;
string inte... | /**
* @title NFT contract - forked from BAYC
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/ | NatSpecMultiLine | mint | function mint(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint");
require(block.timestamp >= saleStart, "Sale has not started yet, timestamp too low");
require(numberOfTokens <= purchaseLimit, "Purchase would exceed purchase limit");
require(totalSupply().add(numb... | /**
* mint
*/ | NatSpecMultiLine | v0.6.6+commit.6c089d02 | MIT | {
"func_code_index": [
2226,
2999
]
} | 7,413 | |
Operator | Operator.sol | 0xd6d1ad0cd1844c6ab7c8e50f56b31551cf162711 | Solidity | Operator | contract Operator is DSNote, Auth {
TrancheLike_3 public tranche;
RestrictedTokenLike public token;
constructor(address tranche_) public {
wards[msg.sender] = 1;
tranche = TrancheLike_3(tranche_);
}
/// sets the dependency to another contract
function depend(bytes32 contractNam... | depend | function depend(bytes32 contractName, address addr) public auth {
if (contractName == "tranche") { tranche = TrancheLike_3(addr); }
else if (contractName == "token") { token = RestrictedTokenLike(addr); }
else revert();
}
| /// sets the dependency to another contract | NatSpecSingleLine | v0.5.15+commit.6a57276f | {
"func_code_index": [
281,
534
]
} | 7,414 | ||||
Operator | Operator.sol | 0xd6d1ad0cd1844c6ab7c8e50f56b31551cf162711 | Solidity | Operator | contract Operator is DSNote, Auth {
TrancheLike_3 public tranche;
RestrictedTokenLike public token;
constructor(address tranche_) public {
wards[msg.sender] = 1;
tranche = TrancheLike_3(tranche_);
}
/// sets the dependency to another contract
function depend(bytes32 contractNam... | supplyOrder | function supplyOrder(uint amount) public note {
require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token");
tranche.supplyOrder(msg.sender, amount);
}
| /// only investors that are on the memberlist can submit supplyOrders | NatSpecSingleLine | v0.5.15+commit.6a57276f | {
"func_code_index": [
610,
806
]
} | 7,415 | ||||
Operator | Operator.sol | 0xd6d1ad0cd1844c6ab7c8e50f56b31551cf162711 | Solidity | Operator | contract Operator is DSNote, Auth {
TrancheLike_3 public tranche;
RestrictedTokenLike public token;
constructor(address tranche_) public {
wards[msg.sender] = 1;
tranche = TrancheLike_3(tranche_);
}
/// sets the dependency to another contract
function depend(bytes32 contractNam... | redeemOrder | function redeemOrder(uint amount) public note {
require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token");
token.hasMember(msg.sender);
tranche.redeemOrder(msg.sender, amount);
}
| /// only investors that are on the memberlist can submit redeemOrders | NatSpecSingleLine | v0.5.15+commit.6a57276f | {
"func_code_index": [
882,
1115
]
} | 7,416 | ||||
Operator | Operator.sol | 0xd6d1ad0cd1844c6ab7c8e50f56b31551cf162711 | Solidity | Operator | contract Operator is DSNote, Auth {
TrancheLike_3 public tranche;
RestrictedTokenLike public token;
constructor(address tranche_) public {
wards[msg.sender] = 1;
tranche = TrancheLike_3(tranche_);
}
/// sets the dependency to another contract
function depend(bytes32 contractNam... | disburse | function disburse() external
returns(uint payoutCurrencyAmount, uint payoutTokenAmount, uint remainingSupplyCurrency, uint remainingRedeemToken)
{
require((token.hasMember(msg.sender) == true), "user-not-allowed-to-hold-token");
return tranche.disburse(msg.sender);
}
| /// only investors that are on the memberlist can disburse | NatSpecSingleLine | v0.5.15+commit.6a57276f | {
"func_code_index": [
1180,
1484
]
} | 7,417 | ||||
Operator | Operator.sol | 0xd6d1ad0cd1844c6ab7c8e50f56b31551cf162711 | Solidity | Operator | contract Operator is DSNote, Auth {
TrancheLike_3 public tranche;
RestrictedTokenLike public token;
constructor(address tranche_) public {
wards[msg.sender] = 1;
tranche = TrancheLike_3(tranche_);
}
/// sets the dependency to another contract
function depend(bytes32 contractNam... | supplyOrderWithDaiPermit | function supplyOrderWithDaiPermit(uint amount, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public {
DaiPermitLike(tranche.currency()).permit(msg.sender, address(tranche), nonce, expiry, true, v, r, s);
supplyOrder(amount);
}
| // --- Permit Support --- | LineComment | v0.5.15+commit.6a57276f | {
"func_code_index": [
1845,
2105
]
} | 7,418 | ||||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
99,
536
]
} | 7,419 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
... | 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.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
632,
932
]
} | 7,420 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
... | 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.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
1054,
1182
]
} | 7,421 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
1254,
1406
]
} | 7,422 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed from, address indexed to);
/**
* Constructor assigns ownership to the address used to deploy the contract.
* */
function Ownable() public {
owner = msg.sender;
}
... | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* Constructor assigns ownership to the address used to deploy the contract.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
248,
316
]
} | 7,423 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed from, address indexed to);
/**
* Constructor assigns ownership to the address used to deploy the contract.
* */
function Ownable() public {
owner = msg.sender;
}
... | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
require(
_newOwner != address(0)
&& _newOwner != owner
);
OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* Allows for the transfer of ownership to another address;
*
* @param _newOwner The address to be assigned new ownership.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
887,
1143
]
} | 7,424 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | DappleAirdrops | function DappleAirdrops() public {
rate = 10000;
dropUnitPrice = 1e14;
bonus = 20;
maxDropsPerTx = 100;
maxTrialDrops = 100;
}
| /**
* Constructor sets the rate such that 1 ETH = 10,000 credits (i.e., 10,000 airdrop recipients)
* which equates to a unit price of 0.00001 ETH per airdrop recipient. The bonus percentage
* is set to 20% but is subject to change. Bonus credits will only be issued after once normal
* credits have been used (un... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
1744,
1926
]
} | 7,425 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | tokenHasFreeTrial | function tokenHasFreeTrial(address _addressOfToken) public view returns(bool) {
return trialDrops[_addressOfToken] < maxTrialDrops;
}
| /**
* Checks whether or not an ERC20 token has used its free trial of 100 drops. This is a constant
* function which does not alter the state of the contract and therefore does not require any gas
* or a signature to be executed.
*
* @param _addressOfToken The address of the token being queried.
*
* ... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
2413,
2565
]
} | 7,426 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getRemainingTrialDrops | function getRemainingTrialDrops(address _addressOfToken) public view returns(uint256) {
if(tokenHasFreeTrial(_addressOfToken)) {
return maxTrialDrops.sub(trialDrops[_addressOfToken]);
}
return 0;
}
| /**
* Checks how many remaining free trial drops a token has.
*
* @param _addressOfToken the address of the token being queried.
*
* @return the total remaining free trial drops of a token.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
2816,
3064
]
} | 7,427 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | setRate | function setRate(uint256 _newRate) public onlyOwner returns(bool) {
require(
_newRate != rate
&& _newRate > 0
);
RateChanged(rate, _newRate);
rate = _newRate;
uint256 eth = 1 ether;
dropUnitPrice = eth.div(rate);
return true;
}
| /**
* Allows for the price of drops to be changed by the owner of the contract. Any attempt made by
* any other account to invoke the function will result in a loss of gas and the price will remain
* untampered.
*
* @return true if function executes successfully, false otherwise.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
3407,
3734
]
} | 7,428 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getMaxDropsPerTx | function getMaxDropsPerTx() public view returns(uint256) {
return maxDropsPerTx;
}
| /**
* Allows for the maximum number of participants to be queried. This is a constant function
* which does not alter the state of the contract and therefore does not require any gas or a
* signature to be executed.
*
* @return the maximum number of recipients per transaction.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
4166,
4267
]
} | 7,429 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | setMaxDrops | function setMaxDrops(uint256 _maxDrops) public onlyOwner returns(bool) {
require(_maxDrops >= 100);
MaxDropsChanged(maxDropsPerTx, _maxDrops);
maxDropsPerTx = _maxDrops;
return true;
}
| /**
* Allows for the maximum number of recipients per transaction to be changed by the owner.
* Any attempt made by any other account to invoke the function will result in a loss of gas
* and the maximum number of recipients will remain untampered.
*
* @return true if function executes successfully, false ... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
4647,
4877
]
} | 7,430 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | setBonus | function setBonus(uint256 _newBonus) public onlyOwner returns(bool) {
require(bonus != _newBonus);
BonustChanged(bonus, _newBonus);
bonus = _newBonus;
}
| /**
* Allows for the bonus to be changed at any point in time by the owner of the contract. Any
* attempt made by any other account to invoke the function will result in a loss of gas and
* the bonus will remain untampered.
*
* @param _newBonus The value of the new bonus to be set.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
5215,
5404
]
} | 7,431 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | grantBonusDrops | function grantBonusDrops(address _addr, uint256 _bonusDrops) public onlyOwner returns(bool) {
require(
_addr != address(0)
&& _bonusDrops > 0
);
bonusDropsOf[_addr] = bonusDropsOf[_addr].add(_bonusDrops);
BonusCreditGranted(_addr, _bonusDrops);
return true;
}
| /**
* Allows for bonus drops to be granted to a recipient address by the owner of the contract.
* Any attempt made by any other account to invoke the function will result in a loss of gas
* and the bonus drops of the recipient will remain untampered.
*
* @param _addr The address which will receive bonus cr... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
5930,
6271
]
} | 7,432 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | revokeBonusCreditOf | function revokeBonusCreditOf(address _addr, uint256 _bonusDrops) public onlyOwner returns(bool) {
require(
_addr != address(0)
&& bonusDropsOf[_addr] >= _bonusDrops
);
bonusDropsOf[_addr] = bonusDropsOf[_addr].sub(_bonusDrops);
BonusCreditRevoked(_addr, _bonusDrops);
return t... | /**
* Allows for bonus drops of an address to be revoked by the owner of the contract. Any
* attempt made by any other account to invoke the function will result in a loss of gas
* and the bonus drops of the recipient will remain untampered.
*
* @param _addr The address to revoke bonus credits from.
* @pa... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
6783,
7147
]
} | 7,433 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getDropsOf | function getDropsOf(address _addr) public view returns(uint256) {
return (ethBalanceOf[_addr].mul(rate)).div(10 ** 18);
}
| /**
* Allows for the credit of an address to be queried. This is a constant function which
* does not alter the state of the contract and therefore does not require any gas or a
* signature to be executed.
*
* @param _addr The address of which to query the credit balance of.
*
* @return The total amou... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
7580,
7720
]
} | 7,434 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getBonusDropsOf | function getBonusDropsOf(address _addr) public view returns(uint256) {
return bonusDropsOf[_addr];
}
| /**
* Allows for the bonus credit of an address to be queried. This is a constant function
* which does not alter the state of the contract and therefore does not require any gas
* or a signature to be executed.
*
* @param _addr The address of which to query the bonus credits.
*
* @return The total ... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
8162,
8281
]
} | 7,435 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getTotalDropsOf | function getTotalDropsOf(address _addr) public view returns(uint256) {
return getDropsOf(_addr).add(getBonusDropsOf(_addr));
}
| /**
* Allows for the total credit (bonus + non-bonus) of an address to be queried. This is a
* constant function which does not alter the state of the contract and therefore does not
* require any gas or a signature to be executed.
*
* @param _addr The address of which to query the total credits.
*
... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
8740,
8885
]
} | 7,436 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getEthBalanceOf | function getEthBalanceOf(address _addr) public view returns(uint256) {
return ethBalanceOf[_addr];
}
| /**
* Allows for the total ETH balance of an address to be queried. This is a constant
* function which does not alter the state of the contract and therefore does not
* require any gas or a signature to be executed.
*
* @param _addr The address of which to query the total ETH balance.
*
* @return T... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
9310,
9429
]
} | 7,437 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | banToken | function banToken(address _tokenAddr) public onlyOwner returns(bool) {
require(!tokenIsBanned[_tokenAddr]);
tokenIsBanned[_tokenAddr] = true;
TokenBanned(_tokenAddr);
return true;
}
| /**
* Allows for suspected fraudulent ERC20 tokens to be banned from being airdropped by the
* owner of the contract. Any attempt made by any other account to invoke the function will
* result in a loss of gas and the token to remain unbanned.
*
* @param _tokenAddr The contract address of the ERC20 token t... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
9912,
10139
]
} | 7,438 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | unbanToken | function unbanToken(address _tokenAddr) public onlyOwner returns(bool) {
require(tokenIsBanned[_tokenAddr]);
tokenIsBanned[_tokenAddr] = false;
TokenUnbanned(_tokenAddr);
return true;
}
| /**
* Allows for previously suspected fraudulent ERC20 tokens to become unbanned by the owner
* of the contract. Any attempt made by any other account to invoke the function will
* result in a loss of gas and the token to remain banned.
*
* @param _tokenAddr The contract address of the ERC20 token to be ban... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
10617,
10848
]
} | 7,439 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | getTokenAllowance | function getTokenAllowance(address _addr, address _addressOfToken) public view returns(uint256) {
ERCInterface token = ERCInterface(_addressOfToken);
return token.allowance(_addr, address(this));
}
| /**
* Allows for the allowance of a token from its owner to this contract to be queried.
*
* As part of the ERC20 standard all tokens which fall under this category have an allowance
* function which enables owners of tokens to allow (or give permission) to another address
* to spend tokens on behalf of t... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
11905,
12130
]
} | 7,440 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | function() public payable {
ethBalanceOf[msg.sender] = ethBalanceOf[msg.sender].add(msg.value);
CreditPurchased(msg.sender, msg.value, msg.value.mul(rate));
}
| /**
* Allows users to buy and receive credits automatically when sending ETH to the contract address.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
12267,
12453
]
} | 7,441 | ||||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | withdrawEth | function withdrawEth(uint256 _eth) public returns(bool) {
require(
ethBalanceOf[msg.sender] >= _eth
&& _eth > 0
);
uint256 toTransfer = _eth;
ethBalanceOf[msg.sender] = ethBalanceOf[msg.sender].sub(_eth);
msg.sender.transfer(toTransfer);
EthWithdrawn(msg.sender, toTransf... | /**
* Allows users to withdraw their ETH for drops which they have bought and not used. This
* will result in the credit of the user being set back to 0. However, bonus credits will
* remain the same because they are granted when users use their drops.
*
* @param _eth The amount of ETH to withdraw
*
... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
12893,
13261
]
} | 7,442 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | issueRefunds | function issueRefunds(address[] _addrs) public onlyOwner returns(bool) {
require(_addrs.length <= maxDropsPerTx);
for(uint i = 0; i < _addrs.length; i++) {
if(_addrs[i] != address(0) && ethBalanceOf[_addrs[i]] > 0) {
uint256 toRefund = ethBalanceOf[_addrs[i]];
ethBalanceOf[_... | /**
* Allows for refunds to be made by the owner of the contract. Any attempt made by any other account
* to invoke the function will result in a loss of gas and no refunds will be made.
* */ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
13490,
13981
]
} | 7,443 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | singleValueAirdrop | function singleValueAirdrop(address _addressOfToken, address[] _recipients, uint256 _value) public returns(bool) {
ERCInterface token = ERCInterface(_addressOfToken);
require(
_recipients.length <= maxDropsPerTx
&& (
getTotalDropsOf(msg.sender)>= _recipients.length
... | /**
* Allows for the distribution of an ERC20 token to be transferred to up to 100 recipients at
* a time. This function only facilitates batch transfers of constant values (i.e., all recipients
* will receive the same amount of tokens).
*
* @param _addressOfToken The contract address of an ERC20 token.
*... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
14578,
15567
]
} | 7,444 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | multiValueAirdrop | function multiValueAirdrop(address _addressOfToken, address[] _recipients, uint256[] _values) public returns(bool) {
ERCInterface token = ERCInterface(_addressOfToken);
require(
_recipients.length <= maxDropsPerTx
&& _recipients.length == _values.length
&& (
getTotal... | /**
* Allows for the distribution of an ERC20 token to be transferred to up to 100 recipients at
* a time. This function facilitates batch transfers of differing values (i.e., all recipients
* can receive different amounts of tokens).
*
* @param _addressOfToken The contract address of an ERC20 token.
* @p... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
16184,
17250
]
} | 7,445 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | updateMsgSenderBonusDrops | function updateMsgSenderBonusDrops(uint256 _drops) internal {
if(_drops <= getDropsOf(msg.sender)) {
bonusDropsOf[msg.sender] = bonusDropsOf[msg.sender].add(_drops.mul(bonus).div(100));
ethBalanceOf[msg.sender] = ethBalanceOf[msg.sender].sub(_drops.mul(dropUnitPrice));
owner.transfer(_dr... | /**
* Invoked internally by the airdrop functions. The purpose of thie function is to grant bonus
* drops to users who spend their ETH airdropping tokens, and to remove bonus drops when users
* no longer have ETH in their account but do have some bonus drops when airdropping tokens.
*
* @param _drops The a... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
17679,
18517
]
} | 7,446 | |||
DappleAirdrops | DappleAirdrops.sol | 0xde185952bf44717e71405b11e331602450824e3a | Solidity | DappleAirdrops | contract DappleAirdrops is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public bonusDropsOf;
mapping (address => uint256) public ethBalanceOf;
mapping (address => bool) public tokenIsBanned;
mapping (address => uint256) public trialDrops;
uint256... | withdrawERC20Tokens | function withdrawERC20Tokens(address _addressOfToken, address _recipient, uint256 _value) public onlyOwner returns(bool){
require(
_addressOfToken != address(0)
&& _recipient != address(0)
&& _value > 0
);
ERCInterface token = ERCInterface(_addressOfToken);
token.transfer... | /**
* Allows for any ERC20 tokens which have been mistakenly sent to this contract to be returned
* to the original sender by the owner of the contract. Any attempt made by any other account
* to invoke the function will result in a loss of gas and no tokens will be transferred out.
*
* @param _addressOfT... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://06e1417b119892af49ef6779f7a9c0de1384fe4bdfa8889897826bea8fb41a33 | {
"func_code_index": [
19131,
19602
]
} | 7,447 | |||
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
94,
154
]
} | 7,448 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
237,
310
]
} | 7,449 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
534,
616
]
} | 7,450 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
895,
983
]
} | 7,451 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1647,
1726
]
} | 7,452 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2039,
2141
]
} | 7,453 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
259,
445
]
} | 7,454 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
723,
864
]
} | 7,455 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1162,
1359
]
} | 7,456 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1613,
2089
]
} | 7,457 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2560,
2697
]
} | 7,458 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3188,
3471
]
} | 7,459 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3931,
4066
]
} | 7,460 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
4546,
4717
]
} | 7,461 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
606,
1230
]
} | 7,462 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2160,
2562
]
} | 7,463 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3318,
3498
]
} | 7,464 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3723,
3924
]
} | 7,465 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
4294,
4525
]
} | 7,466 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
4776,
5097
]
} | 7,467 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
747,
1374
]
} | 7,468 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, add... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2393,
3159
]
} | 7,469 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
497,
581
]
} | 7,470 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1139,
1292
]
} | 7,471 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1442,
1691
]
} | 7,472 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
902,
990
]
} | 7,473 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1104,
1196
]
} | 7,474 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1829,
1917
]
} | 7,475 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
1977,
2082
]
} | 7,476 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2140,
2264
]
} | 7,477 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2472,
2652
]
} | 7,478 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
2710,
2866
]
} | 7,479 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3008,
3182
]
} | 7,480 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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 `amou... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
3651,
3977
]
} | 7,481 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
4381,
4604
]
} | 7,482 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | 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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
5102,
5376
]
} | 7,483 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sen... | /**
* @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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
5861,
6405
]
} | 7,484 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
6681,
7064
]
} | 7,485 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
7391,
7814
]
} | 7,486 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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 is 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... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
8249,
8600
]
} | 7,487 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
8927,
9022
]
} | 7,488 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | ERC20 | contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private ... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our... | NatSpecMultiLine | _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://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
9620,
9717
]
} | 7,489 |
SeoulCityToken | SeoulCityToken.sol | 0x24d48f26c5d00843d4b806e21bc219e5ebcb6b77 | Solidity | SeoulCityToken | contract SeoulCityToken is ERC20("SEOUL.cityswap.io", "SEOUL"), Ownable {
uint256 public constant MAX_SUPPLY = 10040000 * 10**18;
/**
* @notice Creates `_amount` token to `_to`. Must only be called by the owner (TravelAgency).
*/
function mint(address _to, uint256 _amount) pu... | // CityToken with Governance. | LineComment | mint | function mint(address _to, uint256 _amount) public onlyOwner {
uint256 _totalSupply = totalSupply();
if(_totalSupply.add(_amount) > MAX_SUPPLY) {
_amount = MAX_SUPPLY.sub(_totalSupply);
}
require(_totalSupply.add(_amount) <= MAX_SUPPLY);
_mint(_to, _amount);
}
| /**
* @notice Creates `_amount` token to `_to`. Must only be called by the owner (TravelAgency).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://cad9d3c4b7389020a3ee97addb4b7e0969ffd52f470d18ae174804f053da46a7 | {
"func_code_index": [
270,
620
]
} | 7,490 |
TokenFinder | TokenFinder.sol | 0x76889ae74c9acaaee4cc4dc9908f8b22308a8e21 | Solidity | TokenFinder | contract TokenFinder {
address public lexDAO;
mapping(string => address) public tokens;
modifier onlyLexDAO {
require(msg.sender == lexDAO, "not LexDAO");
_;
}
constructor() {
lexDAO = tx.origin;
}
function addToken(string calldata symbol_, addre... | updateLexDAO | function updateLexDAO(address _lexDAO) external onlyLexDAO {
lexDAO = _lexDAO;
}
| /// @notice Protocol for LexDAO to assign role.
/// @param _lexDAO Account to assign role to. | NatSpecSingleLine | v0.8.9+commit.e5eed63a | GNU GPLv3 | ipfs://d34b5563fe110ed922775d082aff6aab7075f57f9fee02657583657f2291e932 | {
"func_code_index": [
846,
945
]
} | 7,491 | ||
olty_6 | olty_6.sol | 0x9f4e0489756b86942512dd8ec3d7bb1964d5967c | Solidity | olty_6 | contract olty_6 {
event test_value(uint256 indexed value1);
address public owner;
// variables to store who needs to get what %
address public charity;
address public dividend;
address public maintain;
address public fuel;
address public winner;
// each ticket is 0.002 ether
uint constant uprice = 0.0... | olty_6 | function olty_6() {
owner = msg.sender;
charity = 0x889cbf08666fa94B2E74Dc6645059A60E25f9079;
dividend = 0xD942E1F5f0fACD4540896843087E1e937A399828;
maintain = 0x0e0146235236FC9E3f700991193E189f63eC4c32;
fuel = 0x7aC1BC1E05Fc374e287Df5537fd03e5ef40b7333;
winner = 0x6b730f4D92e236D0eC... | // constructor function | LineComment | v0.4.21+commit.dfe3193c | bzzr://4c53b4f38b7578ea34f155e7af7e4785edea18488f388929441835b3501ca253 | {
"func_code_index": [
460,
1012
]
} | 7,492 | |||
GenericAave | GenericAave.sol | 0xebd9ddb341386696fc68f0aca9c12e012c359cc1 | Solidity | GenericAave | contract GenericAave is GenericLenderBase {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IProtocolDataProvider public constant protocolDataProvider = IProtocolDataProvider(address(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d));
IAToken public aToken;
... | /********************
* A lender plugin for LenderYieldOptimiser for any erc20 asset on Aave (not eth)
* Made by SamPriestley.com
* https://github.com/Grandthrax/yearnv2/blob/master/contracts/GenericLender/GenericCream.sol
*
********************* */ | NatSpecMultiLine | emergencyWithdraw | function emergencyWithdraw(uint256 amount) external override management {
_lendingPool().withdraw(address(want), amount, address(this));
want.safeTransfer(vault.governance(), want.balanceOf(address(this)));
}
| //emergency withdraw. sends balance plus amount to governance | LineComment | v0.6.12+commit.27d51765 | Unknown | ipfs://ebcddfc25c53cff9a6cac31599b6c653e4c90129d2f6da9adcd831a942df6895 | {
"func_code_index": [
2270,
2508
]
} | 7,493 |
GenericAave | GenericAave.sol | 0xebd9ddb341386696fc68f0aca9c12e012c359cc1 | Solidity | GenericAave | contract GenericAave is GenericLenderBase {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IProtocolDataProvider public constant protocolDataProvider = IProtocolDataProvider(address(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d));
IAToken public aToken;
... | /********************
* A lender plugin for LenderYieldOptimiser for any erc20 asset on Aave (not eth)
* Made by SamPriestley.com
* https://github.com/Grandthrax/yearnv2/blob/master/contracts/GenericLender/GenericCream.sol
*
********************* */ | NatSpecMultiLine | _withdraw | function _withdraw(uint256 amount) internal returns (uint256) {
uint256 balanceUnderlying = aToken.balanceOf(address(this));
uint256 looseBalance = want.balanceOf(address(this));
uint256 total = balanceUnderlying.add(looseBalance);
if (amount > total) {
//cant withdraw more than we own
... | //withdraw an amount including any want balance | LineComment | v0.6.12+commit.27d51765 | Unknown | ipfs://ebcddfc25c53cff9a6cac31599b6c653e4c90129d2f6da9adcd831a942df6895 | {
"func_code_index": [
2564,
3787
]
} | 7,494 |
WLMCrowdsale | WLMCrowdsale.sol | 0xdc54aed35a1ccab9a5c09c5dfc5f78c422705ecf | Solidity | WLMCrowdsale | contract WLMCrowdsale {
using SafeMath for uint256;
address owner = msg.sender;
bool public purchasingAllowed = false;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalContribution = 0;
uint256 public totalBonusT... | function () external payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://7463dc3f7f33e27d8c1471ff5d4e4eb996c756841ac1c0f34e50fbe309600d1d | {
"func_code_index": [
1215,
1281
]
} | 7,495 | ||||
WLMCrowdsale | WLMCrowdsale.sol | 0xdc54aed35a1ccab9a5c09c5dfc5f78c422705ecf | Solidity | WLMCrowdsale | contract WLMCrowdsale {
using SafeMath for uint256;
address owner = msg.sender;
bool public purchasingAllowed = false;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalContribution = 0;
uint256 public totalBonusT... | buyTokens | function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0));
if (!purchasingAllowed) { throw; }
if (msg.value < 1 finney * MINfinney) { return; }
if (msg.value > 1 finney * MAXfinney) { return; }
// calculate token amount to be created
uint256 ... | // low level token purchase function | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://7463dc3f7f33e27d8c1471ff5d4e4eb996c756841ac1c0f34e50fbe309600d1d | {
"func_code_index": [
1324,
1930
]
} | 7,496 | |||
WLMCrowdsale | WLMCrowdsale.sol | 0xdc54aed35a1ccab9a5c09c5dfc5f78c422705ecf | Solidity | WLMCrowdsale | contract WLMCrowdsale {
using SafeMath for uint256;
address owner = msg.sender;
bool public purchasingAllowed = false;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalContribution = 0;
uint256 public totalBonusT... | forwardFunds | function forwardFunds() internal {
WLMWallet.transfer(msg.value);
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://7463dc3f7f33e27d8c1471ff5d4e4eb996c756841ac1c0f34e50fbe309600d1d | {
"func_code_index": [
2039,
2117
]
} | 7,497 | |||
GaugeMultiRewards | contracts/GaugeMultiRewards.sol | 0x3c310fc54c0534dc3c45312934508722284352d1 | Solidity | GaugeMultiRewards | contract GaugeMultiRewards is ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
address rewardsDistributor;
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
IER... | totalSupply | function totalSupply() external view returns (uint256) {
return _totalSupply;
}
| /* ========== VIEWS ========== */ | Comment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
1357,
1440
]
} | 7,498 | |||
GaugeMultiRewards | contracts/GaugeMultiRewards.sol | 0x3c310fc54c0534dc3c45312934508722284352d1 | Solidity | GaugeMultiRewards | contract GaugeMultiRewards is ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
address rewardsDistributor;
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
IER... | setRewardsDistributor | function setRewardsDistributor(address _rewardsToken, address _rewardsDistributor) external onlyGovernance {
rewardData[_rewardsToken].rewardsDistributor = _rewardsDistributor;
}
| /* ========== MUTATIVE FUNCTIONS ========== */ | Comment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
2719,
2901
]
} | 7,499 | |||
GaugeMultiRewards | contracts/GaugeMultiRewards.sol | 0x3c310fc54c0534dc3c45312934508722284352d1 | Solidity | GaugeMultiRewards | contract GaugeMultiRewards is ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
struct Reward {
address rewardsDistributor;
uint256 rewardsDuration;
uint256 periodFinish;
uint256 rewardRate;
uint256 lastUpdateTime;
uint256 rewardPerTokenStored;
}
IER... | setGovernance | function setGovernance(address _governance) public onlyGovernance {
governance = _governance;
}
| /* ========== RESTRICTED FUNCTIONS ========== */ | Comment | v0.8.2+commit.661d1103 | MIT | {
"func_code_index": [
4464,
4563
]
} | 7,500 | |||
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | totalSupply | function totalSupply() public override view returns (uint256){
return _totalSupply;
}
| /** ERC20Interface function's implementation **/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
1121,
1224
]
} | 7,501 |
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | balanceOf | function balanceOf(address tokenOwner) public override view returns (uint256 balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
1444,
1581
]
} | 7,502 |
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | transfer | function transfer(address to, uint256 tokens) public override returns (bool success) {
require(address(to) != address(0));
require(balances[msg.sender] >= tokens);
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sen... | // ------------------------------------------------------------------------
// 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.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
1925,
2316
]
} | 7,503 |
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | approve | function approve(address spender, uint256 tokens) public override 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.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
2596,
2838
]
} | 7,504 |
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | transferFrom | function transferFrom(address from, address to, uint256 tokens) public override returns (bool success){
require(tokens <= allowed[from][msg.sender]); //check allowance
require(balances[from] >= tokens);
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][... | // ------------------------------------------------------------------------
// 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 transfe... | LineComment | v0.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
3375,
3872
]
} | 7,505 |
polkaSecure | polkaSecure.sol | 0xed05bf1da9b6faab56511e183ef32088fc6dcd99 | Solidity | polkaSecure | contract polkaSecure is ERC20Interface, Owned {
using SafeMath for uint256;
string public constant symbol = "PLS";
string public constant name = "PolkaSecure";
uint256 public constant decimals = 18;
uint256 private _totalSupply = 1000000 * 10 ** (decimals);
mapping(address =... | // ----------------------------------------------------------------------------
// 'PolkaSecure' token contract
// Symbol : PLS
// Name : PolkaSecure
// Total supply: 1,000,000 (1 Million)
// Decimals : 18
// ----------------------------------------------------------------------------
// ----------------... | LineComment | allowance | function allowance(address tokenOwner, address spender) public override view returns (uint256 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.6.12+commit.27d51765 | Unlicense | ipfs://4372782a57c6a65e3291b8903fdaff2f350b767f645333dcabe49028241bcfcf | {
"func_code_index": [
4157,
4321
]
} | 7,506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.