Unnamed: 0
int64
0
7.36k
comments
stringlengths
3
35.2k
code_string
stringlengths
1
527k
code
stringlengths
1
527k
__index_level_0__
int64
0
88.6k
6
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); }
if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); }
13,537
101
// [ERC1400Raw INTERFACE (8/13)] Remove the right of the operator address to be an operator for 'msg.sender'and to transfer and redeem tokens on its behalf. operator Address to rescind as an operator for 'msg.sender'. /
function revokeOperator(address operator) external { require(operator != msg.sender); _authorizedOperator[operator][msg.sender] = false; emit RevokedOperator(operator, msg.sender); }
function revokeOperator(address operator) external { require(operator != msg.sender); _authorizedOperator[operator][msg.sender] = false; emit RevokedOperator(operator, msg.sender); }
4,071
55
// excess goes to next rounds pot
pot_ = _pot; payedOut_ = true;
pot_ = _pot; payedOut_ = true;
14,254
1
// for OpenSea
function contractURI() public pure returns (string memory) { return "https://www.dynastripes.com/storefront-metadata"; }
function contractURI() public pure returns (string memory) { return "https://www.dynastripes.com/storefront-metadata"; }
77,076
0
// Offer id counter. Current value represents last existing offer id.
uint256 public offerId;
uint256 public offerId;
41,413
21
// Notifies the controller about a token transfer allowing the controller to react if desired./_from The origin of the transfer./_to The destination of the transfer./_amount The amount of the transfer./ return False if the controller does not authorize the transfer.
function onTransfer(address _from, address _to, uint _amount) public returns(bool){ return true; }
function onTransfer(address _from, address _to, uint _amount) public returns(bool){ return true; }
9,207
9
// Construct_tokenAddress The address of the token contact _beneficiary The address of the beneficiary _creator The address of the tech team _marketing The address of the marketing team _bounty The address of the bounty wallet _start The timestamp of the start date /
function CoinoorCrowdsale(address _tokenAddress, address _beneficiary, address _creator, address _marketing, address _bounty, uint256 _start) { token = IToken(_tokenAddress); beneficiary = _beneficiary; creator = _creator; marketing = _marketing; bounty = _bounty; start = _start; end = start + rateLastWeekEnd; }
function CoinoorCrowdsale(address _tokenAddress, address _beneficiary, address _creator, address _marketing, address _bounty, uint256 _start) { token = IToken(_tokenAddress); beneficiary = _beneficiary; creator = _creator; marketing = _marketing; bounty = _bounty; start = _start; end = start + rateLastWeekEnd; }
3,787
148
// burn all of it's balance
IBasisAsset(gold).burn(IERC20(gold).balanceOf(address(this)));
IBasisAsset(gold).burn(IERC20(gold).balanceOf(address(this)));
15,203
7
// Revokes a set of statuses as `statusCombinationId` from `account` Must unset each status id contained by `statusCombinationId` from the `account` Status combination id is a single number that combines statuses through assigning orunassigning bits in a uint256 value by index of bit. The statusId of each status being assignedrepresents the bit index. /
function revokeStatuses(address account, uint256 statusCombinationId) external;
function revokeStatuses(address account, uint256 statusCombinationId) external;
37,705
15
// Sets the address of the owner /
function _setUpgradeabilityOwner(address _newProxyOwner) internal
function _setUpgradeabilityOwner(address _newProxyOwner) internal
12,936
12
// Issue tokens to all stakers
for (uint256 stakersIndex = 0;stakersIndex < stakers.length;stakersIndex++) { address recipient = stakers[stakersIndex]; dappToken.transfer(recipient, getUserTotalValue(recipient)); }
for (uint256 stakersIndex = 0;stakersIndex < stakers.length;stakersIndex++) { address recipient = stakers[stakersIndex]; dappToken.transfer(recipient, getUserTotalValue(recipient)); }
26,440
375
// pay 3% out to community rewards
uint256 _p1 = _eth / 100; uint256 _com = _eth / 50; _com = _com.add(_p1); uint256 _p3d; if (!address(admin).call.value(_com)()) {
uint256 _p1 = _eth / 100; uint256 _com = _eth / 50; _com = _com.add(_p1); uint256 _p3d; if (!address(admin).call.value(_com)()) {
54,027
58
// calculate -b value and sig -b = (1-k)Q1-kQ0^2/Q1+ideltaB
uint256 kQ02Q1 = DecimalMath.mulFloor(k, Q0).mul(Q0).div(Q1); // kQ0^2/Q1 uint256 b = DecimalMath.mulFloor(DecimalMath.ONE.sub(k), Q1); // (1-k)Q1 bool minusbSig = true; if (deltaBSig) { b = b.add(ideltaB); // (1-k)Q1+i*deltaB } else {
uint256 kQ02Q1 = DecimalMath.mulFloor(k, Q0).mul(Q0).div(Q1); // kQ0^2/Q1 uint256 b = DecimalMath.mulFloor(DecimalMath.ONE.sub(k), Q1); // (1-k)Q1 bool minusbSig = true; if (deltaBSig) { b = b.add(ideltaB); // (1-k)Q1+i*deltaB } else {
15,772
1
// Throws if called by any account other than a minter /
modifier onlyMinters() { require(minters[msg.sender], "FiatToken: caller is not a minter"); _; }
modifier onlyMinters() { require(minters[msg.sender], "FiatToken: caller is not a minter"); _; }
26,703
22
// Calculate the factor by which the invariant will increase after minting BPTAmountOut
uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply); _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);
uint256 invariantRatio = bptTotalSupply.add(bptAmountOut).divUp(bptTotalSupply); _require(invariantRatio <= _MAX_INVARIANT_RATIO, Errors.MAX_OUT_BPT_FOR_TOKEN_IN);
26,408
152
// Approve spender to transfer tokens and then execute a callback on recipient. spender The address allowed to transfer to. amount The amount allowed to be transferred. data Additional data with no specified format.return A boolean that indicates if the operation was successful. /
function approveAndCall(address spender, uint256 amount, bytes memory data) public virtual override returns (bool) { approve(spender, amount); require(_checkAndCallApprove(spender, amount, data), "ERC1363: _checkAndCallApprove reverts"); return true; }
function approveAndCall(address spender, uint256 amount, bytes memory data) public virtual override returns (bool) { approve(spender, amount); require(_checkAndCallApprove(spender, amount, data), "ERC1363: _checkAndCallApprove reverts"); return true; }
37,325
37
// prevents from deleting the last admin (can be multisig smart contract) by itself:
require(msg.sender != _oldAdmin); isAdmin[_oldAdmin] = false; emit AdminRemoved(msg.sender, _oldAdmin); return true;
require(msg.sender != _oldAdmin); isAdmin[_oldAdmin] = false; emit AdminRemoved(msg.sender, _oldAdmin); return true;
27,518
28
// Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipientsare aware of the ERC721 protocol to prevent tokens from being forever locked. Requirements: - `from` cannot be the zero address.- `to` cannot be the zero address.- `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
99
16
// Set gToken new implementation gToken The gToken address implementation The new implementation becomeImplementationData The payload data /
function _setImplementation( address gToken, address implementation, bool allowResign, bytes calldata becomeImplementationData
function _setImplementation( address gToken, address implementation, bool allowResign, bytes calldata becomeImplementationData
37,890
78
// Validate that address and string array lengths match. Validate address array is not emptyand contains no duplicate elements.A Array of addresses B Array of strings /
function validatePairsWithArray(address[] memory A, string[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); }
function validatePairsWithArray(address[] memory A, string[] memory B) internal pure { require(A.length == B.length, "Array length mismatch"); _validateLengthAndUniqueness(A); }
38,950
15
// Issue rewards
function issueTokens() public { // require the owner to issue tokens only require(msg.sender == owner, 'caller must be the owner'); for (uint i=0; i< stakers.length; i++){ address recipient = stakers[i]; uint balance = stakingBalance[recipient]* 1/9; /// Divide by 9 to create % incentive if(balance > 0){ rwd.transfer(recipient, balance); } } }
function issueTokens() public { // require the owner to issue tokens only require(msg.sender == owner, 'caller must be the owner'); for (uint i=0; i< stakers.length; i++){ address recipient = stakers[i]; uint balance = stakingBalance[recipient]* 1/9; /// Divide by 9 to create % incentive if(balance > 0){ rwd.transfer(recipient, balance); } } }
30,069
13
// Sister function to payPreviousOwner(): Addresses wallet-to-wallet payment totality
function transactionFee(address, uint256 currentValue) private { ceoAddress.transfer(currentValue); }
function transactionFee(address, uint256 currentValue) private { ceoAddress.transfer(currentValue); }
36,170
117
// Calculate new allowance by applying modification to current allowance.
uint256 currentAllowance = _allowances[owner][spender]; uint256 newAllowance = ( increase ? currentAllowance.add(value) : currentAllowance.sub(value) );
uint256 currentAllowance = _allowances[owner][spender]; uint256 newAllowance = ( increase ? currentAllowance.add(value) : currentAllowance.sub(value) );
67,205
234
// Due to reason error bloat, internal functions are used to reduce bytecode size Module must be initialized on the SetToken and enabled by the controller /
function _validateOnlyModule() internal view { require( moduleStates[msg.sender] == ISetToken.ModuleState.INITIALIZED, "Only the module can call" ); require( controller.isModule(msg.sender), "Module must be enabled on controller" ); }
function _validateOnlyModule() internal view { require( moduleStates[msg.sender] == ISetToken.ModuleState.INITIALIZED, "Only the module can call" ); require( controller.isModule(msg.sender), "Module must be enabled on controller" ); }
39,769
41
// after a {IERC721-safeTransferFrom}. This function MUST return the function selector,otherwise the caller will revert the transaction. The selector to bereturned can be obtained as `this.onERC721Received.selector`. Thisfunction MAY throw to revert and reject the transfer.Note: the ERC721 contract address is always the message sender. operator The address which called `safeTransferFrom` function from The address which previously owned the token tokenId The NFT identifier which is being transferred data Additional data with no specified formatreturn bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` /
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4);
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4);
2,395
64
// Subtracts one unsigned 60.18-decimal fixed-point number from another one, returning a new unsigned 60.18-decimal/ fixed-point number./x The minuend as an unsigned 60.18-decimal fixed-point number./y The subtrahend as an unsigned 60.18-decimal fixed-point number./result The difference as an unsigned 60.18 decimal fixed-point number.
function sub(PRBMath.UD60x18 memory x, PRBMath.UD60x18 memory y) internal pure returns (PRBMath.UD60x18 memory result)
function sub(PRBMath.UD60x18 memory x, PRBMath.UD60x18 memory y) internal pure returns (PRBMath.UD60x18 memory result)
41,418
7
// indicates if the stake was created as a yield reward
bool isYield;
bool isYield;
67,997
121
// CHIP Token will be used like USD and therefore have 2 decimals.
return(2);
return(2);
78,382
106
// Price threshold below which taxes will get burned
uint256 public burnThreshold = 1.10e18;
uint256 public burnThreshold = 1.10e18;
60,018
54
// Allows for easier retrieval of holder by array index
function getHolder(uint256 _index) public constant returns (address _holder)
function getHolder(uint256 _index) public constant returns (address _holder)
18,658
40
// get the amount of tokens that a wallet can withdraw right now _user --> walletreturn tokens amount /
function canWithdraw(address _user) external view returns (uint256) { uint256 canWithdrawAmount = _canWithdraw(_user); uint256 amountWithdrawn = withdrawn[_user]; return canWithdrawAmount - amountWithdrawn; }
function canWithdraw(address _user) external view returns (uint256) { uint256 canWithdrawAmount = _canWithdraw(_user); uint256 amountWithdrawn = withdrawn[_user]; return canWithdrawAmount - amountWithdrawn; }
64,070
5
// Set default operators
_defaultOperatorsArray = defaultOperators; for (uint i = 0; i < _defaultOperatorsArray.length; i++) { _defaultOperators[_defaultOperatorsArray[i]] = true; }
_defaultOperatorsArray = defaultOperators; for (uint i = 0; i < _defaultOperatorsArray.length; i++) { _defaultOperators[_defaultOperatorsArray[i]] = true; }
2,702
81
// return 1 for ether to ether
if (src == dest) return (reserves[bestReserve], PRECISION); address[] memory reserveArr; reserveArr = src == ETH_TOKEN_ADDRESS ? reservesPerTokenDest[dest] : reservesPerTokenSrc[src]; if (reserveArr.length == 0) return (reserves[bestReserve], bestRate); uint[] memory rates = new uint[](reserveArr.length); uint[] memory reserveCandidates = new uint[](reserveArr.length);
if (src == dest) return (reserves[bestReserve], PRECISION); address[] memory reserveArr; reserveArr = src == ETH_TOKEN_ADDRESS ? reservesPerTokenDest[dest] : reservesPerTokenSrc[src]; if (reserveArr.length == 0) return (reserves[bestReserve], bestRate); uint[] memory rates = new uint[](reserveArr.length); uint[] memory reserveCandidates = new uint[](reserveArr.length);
19,134
98
// This should always be the same as `GoaldToken.getGovernanceStage()`. /
function getGovernanceStage() external view returns (uint256) { return _governanceStage; }
function getGovernanceStage() external view returns (uint256) { return _governanceStage; }
7,432
4
// ็†ไบ‹ๆœƒๆˆๅ“กๆ•ธ้‡ไธŠ้™
uint256 memberNumLimit;
uint256 memberNumLimit;
19,449
123
// Burn some rewards for mushrooms if desired
if (mushroomsToGrow > 0) { uint256 totalCost = mushroomFactory.costPerMushroom().mul(mushroomsToGrow); require(reward >= totalCost, "Not enough rewards to grow the number of mushrooms specified"); toDev = totalCost.mul(devRewardPercentage).div(MAX_PERCENTAGE); if (toDev > 0) { mission.sendSpores(devRewardAddress, toDev); emit DevRewardPaid(devRewardAddress, toDev);
if (mushroomsToGrow > 0) { uint256 totalCost = mushroomFactory.costPerMushroom().mul(mushroomsToGrow); require(reward >= totalCost, "Not enough rewards to grow the number of mushrooms specified"); toDev = totalCost.mul(devRewardPercentage).div(MAX_PERCENTAGE); if (toDev > 0) { mission.sendSpores(devRewardAddress, toDev); emit DevRewardPaid(devRewardAddress, toDev);
79,348
6
// 93%
uint WinnerRate = 9300;
uint WinnerRate = 9300;
7,231
57
// The "revert reason helper" contains a collection of revert reason strings.
RevertReasonHelperInterface internal constant _REVERT_REASON_HELPER = ( RevertReasonHelperInterface(0x9C0ccB765D3f5035f8b5Dd30fE375d5F4997D8E4) );
RevertReasonHelperInterface internal constant _REVERT_REASON_HELPER = ( RevertReasonHelperInterface(0x9C0ccB765D3f5035f8b5Dd30fE375d5F4997D8E4) );
16,692
46
// Emitted when `newAdminRole` is set as ``role``'s admin role `ROOT` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes4 indexed role, bytes4 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. */ event RoleGranted(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Give msg.sender the ROOT role and create a LOCK role with itself as the admin role and no members. * Calling setRoleAdmin(msg.sig, LOCK) means no one can grant that msg.sig role anymore. */ constructor () { _grantRole(ROOT, msg.sender); // Grant ROOT to msg.sender _setRoleAdmin(LOCK, LOCK); // Create the LOCK role by setting itself as its own admin, creating an independent role tree }
* {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes4 indexed role, bytes4 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call. */ event RoleGranted(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes4 indexed role, address indexed account, address indexed sender); /** * @dev Give msg.sender the ROOT role and create a LOCK role with itself as the admin role and no members. * Calling setRoleAdmin(msg.sig, LOCK) means no one can grant that msg.sig role anymore. */ constructor () { _grantRole(ROOT, msg.sender); // Grant ROOT to msg.sender _setRoleAdmin(LOCK, LOCK); // Create the LOCK role by setting itself as its own admin, creating an independent role tree }
20,061
68
// Disable default function.
function () payable public
function () payable public
36,420
11
// special processing for first time vesting setting
if (vestingSchedule.amount == 0) {
if (vestingSchedule.amount == 0) {
4,690
2
// ํŽ€๋”ฉ๋œ ๊ธˆ์•ก์„ ์บ ํŽ˜์ธ ์ƒ์„ฑ์ž๊ฐ€ ๋ฐ›์•˜์Œ์„ ๋กœ๊น…ํ•˜๋Š” ์ด๋ฒคํŠธ _id ํ•ด๋‹น ์บ ํŽ˜์ธ์˜ id. _creator ํ•ด๋‹น ์บ ํŽ˜์ธ ์ƒ์„ฑ์ž. _pledgedFund ํŽ€๋”ฉ ๋ฐ›์€ ๊ธˆ์•ก. _closed ์บ ํŽ˜์ธ์ด ๋งˆ๊ฐ๋˜์—ˆ๋Š”์ง€ ์—ฌ๋ถ€. /
event FundTransfer(
event FundTransfer(
37,626
20
// send funds to team
_allocate(TEAM, 1303625 );
_allocate(TEAM, 1303625 );
35,178
141
// Check if the pool has a limit per user
if (_poolInformation[_pid].limitPerUserInPaymentTokens > 0) {
if (_poolInformation[_pid].limitPerUserInPaymentTokens > 0) {
19,228
25
// Matching bonus event
event MatchBonus(address indexed from, address indexed to, uint value, uint time);
event MatchBonus(address indexed from, address indexed to, uint value, uint time);
28,441
11
// Create new collateral set with passed components, units, and collateralNaturalUnit
address nextSetAddress = core.createSet( setTokenFactory, nextSetComponents, nextSetUnits, collateralNaturalUnit, collateralName, collateralSymbol, "" );
address nextSetAddress = core.createSet( setTokenFactory, nextSetComponents, nextSetUnits, collateralNaturalUnit, collateralName, collateralSymbol, "" );
21,668
51
// p1ยฒ + p2ยณ
uint p3 = _sqrt((p1 * p1) + (p2 * p2 * p2)); unchecked { uint d_ = _cbrt(p1 + p3); if (p3 > p1) { d_ -= _cbrt(p3 - p1); } else {
uint p3 = _sqrt((p1 * p1) + (p2 * p2 * p2)); unchecked { uint d_ = _cbrt(p1 + p3); if (p3 > p1) { d_ -= _cbrt(p3 - p1); } else {
36,925
33
// can later be changed with {transferOwnership}. /Initializes the contract setting the deployer as the initial owner./
constructor() { _transferOwnership(_msgSender()); }
constructor() { _transferOwnership(_msgSender()); }
35,860
3
// Set holding whitelisted addresses for creating original tokens
EnumerableSet.AddressSet private _whitelist;
EnumerableSet.AddressSet private _whitelist;
3,263
166
// Math.ceil(totalPrice / actualSize);
collection.averagePrice = collection.totalPrice.add(actualSize.sub(1)).div(actualSize); collection.publishedAt = now;
collection.averagePrice = collection.totalPrice.add(actualSize.sub(1)).div(actualSize); collection.publishedAt = now;
20,181
113
// Since we cannot be sure which direction the BPT price of the token has moved, we must check both the lower and upper bounds.
_checkCircuitBreaker(BoundCheckKind.BOTH, tokens[i], actualSupply, finalBalance, normalizedWeights[i]);
_checkCircuitBreaker(BoundCheckKind.BOTH, tokens[i], actualSupply, finalBalance, normalizedWeights[i]);
8,966
14
// The version parameter for the EIP712 domain. NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costsare a concern. /
function _EIP712Version() internal virtual view returns (string memory) { return _version; }
function _EIP712Version() internal virtual view returns (string memory) { return _version; }
21,312
42
// RefundableCrowdsale Extension of Crowdsale contract that adds a funding goal, andthe possibility of users getting a refund if goal is not met.Uses a RefundVault as the crowdsale's vault. /
contract RefundableCrowdsale is FinalizableCrowdsale { using SafeMath for uint256; // minimum amount of funds to be raised in weis uint256 public goal; mapping (address => bool) refunded; mapping (address => uint256) saleBalances; mapping (address => bool) claimed; event Refunded(address indexed holder, uint256 amount); function RefundableCrowdsale(uint256 _goal) public { goal = _goal * 1 ether; } // if crowdsale is unsuccessful, investors can claim refunds here function claimRefund() public { require(isFinalized); require(!goalReached()); require(!refunded[msg.sender]); require(saleBalances[msg.sender] != 0); uint refund = saleBalances[msg.sender]; require (msg.sender.send(refund)); refunded[msg.sender] = true; Refunded(msg.sender, refund); } function goalReached() public view returns (bool) { return weiRaised >= goal; } }
contract RefundableCrowdsale is FinalizableCrowdsale { using SafeMath for uint256; // minimum amount of funds to be raised in weis uint256 public goal; mapping (address => bool) refunded; mapping (address => uint256) saleBalances; mapping (address => bool) claimed; event Refunded(address indexed holder, uint256 amount); function RefundableCrowdsale(uint256 _goal) public { goal = _goal * 1 ether; } // if crowdsale is unsuccessful, investors can claim refunds here function claimRefund() public { require(isFinalized); require(!goalReached()); require(!refunded[msg.sender]); require(saleBalances[msg.sender] != 0); uint refund = saleBalances[msg.sender]; require (msg.sender.send(refund)); refunded[msg.sender] = true; Refunded(msg.sender, refund); } function goalReached() public view returns (bool) { return weiRaised >= goal; } }
7,372
143
// See {IGovernor-hashProposal}. The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` arrayand the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal idcan be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed inadvance, before the proposal is submitted. Note that the chainId and the governor address are not part of the proposal id computation. Consequently, thesame proposal (with same operation and same description) will have the same id if submitted on multiple governorsaccross multiple networks. This also means
function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); }
function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); }
10,926
55
// staking fee percent
uint public stakingFeeRate = 0;
uint public stakingFeeRate = 0;
39,579
368
// Getter for the amount of payee's releasable Ether. /
function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); }
function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); }
19,656
169
// declaring required variables and they are understandble by the name
using Strings for uint256; string NFT_URI; string public extension = ".json"; string public hidden_URI; uint256 public cost = 0.075 ether; // Cost per NFT uint32 public maximum_supply = 10000; // Max number of NFTs uint32 public maximum_mint = 20; // Max mint amount per transaction bool public pause = false; // Paused or not bool public reveal = false; // Revealed or not
using Strings for uint256; string NFT_URI; string public extension = ".json"; string public hidden_URI; uint256 public cost = 0.075 ether; // Cost per NFT uint32 public maximum_supply = 10000; // Max number of NFTs uint32 public maximum_mint = 20; // Max mint amount per transaction bool public pause = false; // Paused or not bool public reveal = false; // Revealed or not
28,529
242
// Function to simply retrieve block timestamp This exists mainly for inheriting test contracts to stub this result. /
function getBlockTimestamp() internal view returns (uint256) { return block.timestamp; }
function getBlockTimestamp() internal view returns (uint256) { return block.timestamp; }
33,141
1,472
// 737
entry "ungrated" : ENG_ADJECTIVE
entry "ungrated" : ENG_ADJECTIVE
17,349
9
// Copy the returned data.
returndatacopy(0, 0, returndatasize()) switch result
returndatacopy(0, 0, returndatasize()) switch result
5,364
10
// update period can only be called once per cycle (1 week)
function update_period() external returns (uint) { uint _period = active_period; if (block.timestamp >= _period + week && initializer == address(0)) { // only trigger if new week _period = block.timestamp / week * week; active_period = _period; weekly = weekly_emission(); uint _growth = calculate_growth(weekly); uint _teamEmissions = (teamRate * (_growth + weekly)) / 1000; uint _required = _growth + weekly + _teamEmissions; uint _balanceOf = _token.balanceOf(address(this)); if (_balanceOf < _required) { _token.mint(address(this), _required - _balanceOf); } require(_token.transfer(team, _teamEmissions)); require(_token.transfer(address(_ve_dist), _growth)); _ve_dist.checkpoint_token(); // checkpoint token balance that was just minted in ve_dist _ve_dist.checkpoint_total_supply(); // checkpoint supply _token.approve(address(_voter), weekly); _voter.notifyRewardAmount(weekly); emit Mint(msg.sender, weekly, circulating_supply(), circulating_emission()); } return _period; }
function update_period() external returns (uint) { uint _period = active_period; if (block.timestamp >= _period + week && initializer == address(0)) { // only trigger if new week _period = block.timestamp / week * week; active_period = _period; weekly = weekly_emission(); uint _growth = calculate_growth(weekly); uint _teamEmissions = (teamRate * (_growth + weekly)) / 1000; uint _required = _growth + weekly + _teamEmissions; uint _balanceOf = _token.balanceOf(address(this)); if (_balanceOf < _required) { _token.mint(address(this), _required - _balanceOf); } require(_token.transfer(team, _teamEmissions)); require(_token.transfer(address(_ve_dist), _growth)); _ve_dist.checkpoint_token(); // checkpoint token balance that was just minted in ve_dist _ve_dist.checkpoint_total_supply(); // checkpoint supply _token.approve(address(_voter), weekly); _voter.notifyRewardAmount(weekly); emit Mint(msg.sender, weekly, circulating_supply(), circulating_emission()); } return _period; }
24,956
19
// In case it needs to proxy later in the future
function approve(ERC20Interface erc20, address spender, uint tokens) public returns (bool success) { require(owner == msg.sender); require(erc20.approve(spender, tokens)); return true; }
function approve(ERC20Interface erc20, address spender, uint tokens) public returns (bool success) { require(owner == msg.sender); require(erc20.approve(spender, tokens)); return true; }
48,196
54
// Called by the bridge node processes on startup/ to determine early whether the address pointing to the main/ bridge contract is misconfigured./ so we can provide a helpful error message instead of the very/ unhelpful errors encountered otherwise.
function isMainBridgeContract() public pure returns (bool) { return true; }
function isMainBridgeContract() public pure returns (bool) { return true; }
34,715
83
// See {IERC721-ownerOf}. /
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; }
32,919
78
// Deposit maintenance stake
function depositMaintenanceStake(uint256 amount) external { require( amount + stakes[msg.sender] >= maintenanceStakePerBlock, "Insufficient stake to call even one block" ); _stake(msg.sender, amount); if (nextMaintenanceStaker[msg.sender] == address(0)) { nextMaintenanceStaker[msg.sender] = getUpdatedCurrentStaker(); nextMaintenanceStaker[prevMaintenanceStaker] = msg.sender; } }
function depositMaintenanceStake(uint256 amount) external { require( amount + stakes[msg.sender] >= maintenanceStakePerBlock, "Insufficient stake to call even one block" ); _stake(msg.sender, amount); if (nextMaintenanceStaker[msg.sender] == address(0)) { nextMaintenanceStaker[msg.sender] = getUpdatedCurrentStaker(); nextMaintenanceStaker[prevMaintenanceStaker] = msg.sender; } }
79,192
5
// Standard ERC223 function that will handle incoming token transfers._fromToken sender address. _value Amount of tokens. _dataTransaction metadata. /
function tokenFallback(address _from, uint _value, bytes _data) public;
function tokenFallback(address _from, uint _value, bytes _data) public;
17,144
13
// only highestBidder or the moderator can call. Also callable if no one has bidded
if ((msg.sender == highestBidder) || (msg.sender == escrowModerator) || (highestBidder == address(0))) { _; }
if ((msg.sender == highestBidder) || (msg.sender == escrowModerator) || (highestBidder == address(0))) { _; }
10,785
393
// Accounting function preparing the reporting to the vault taking into acccount the standing debt _debtOutstanding, Debt still left to pay to the vaultreturn _profit, the amount of profits the strategy may have produced until nowreturn _loss, the amount of losses the strategy may have produced until nowreturn _debtPayment, the amount the strategy has been able to pay back to the vault /
function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment )
function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment )
2,310
5
// zero prefix to prevent collisions
return keccak256(abi.encodePacked(uint(0), _key));
return keccak256(abi.encodePacked(uint(0), _key));
9,713
10
// add a bet to the betList
bets.push(Bet(msg.sender, winningTeam, losingTeam, gameTime, msg.value, State.Pending));
bets.push(Bet(msg.sender, winningTeam, losingTeam, gameTime, msg.value, State.Pending));
5,897
445
// Internal function to withdraw funds from the specified pool. pool The index of the pool. amount The amount of tokens to be withdrawn. /
function _withdrawFromPool(uint8 pool, uint256 amount) internal { if (pool == 0) DydxPoolController.withdraw(amount); else if (pool == 1) CompoundPoolController.withdraw(amount); else if (pool == 2) KeeperDaoPoolController.withdraw(amount); else if (pool == 3) AavePoolController.withdraw(amount); else if (pool == 4) AlphaPoolController.withdraw(amount); else if (pool == 5) EnzymePoolController.withdraw(_enzymeComptroller, amount); else revert("Invalid pool index."); emit PoolAllocation(PoolAllocationAction.Withdraw, LiquidityPool(pool), amount); }
function _withdrawFromPool(uint8 pool, uint256 amount) internal { if (pool == 0) DydxPoolController.withdraw(amount); else if (pool == 1) CompoundPoolController.withdraw(amount); else if (pool == 2) KeeperDaoPoolController.withdraw(amount); else if (pool == 3) AavePoolController.withdraw(amount); else if (pool == 4) AlphaPoolController.withdraw(amount); else if (pool == 5) EnzymePoolController.withdraw(_enzymeComptroller, amount); else revert("Invalid pool index."); emit PoolAllocation(PoolAllocationAction.Withdraw, LiquidityPool(pool), amount); }
64,865
28
// public transfer depot, for internal use in same proxy/from address of owner/to address of receiver/tokenContractAddress address of token contract/tokenId uint256 id of token/amount uint256 number of token/data bytes additional data for transfer
function internalTransferDepot_V2( address from, address to, address tokenContractAddress, uint256 tokenId, uint256 amount, bytes memory data
function internalTransferDepot_V2( address from, address to, address tokenContractAddress, uint256 tokenId, uint256 amount, bytes memory data
17,161
22
// transfer erc1155 to seller
IERC1155(token).safeTransferFrom(address(this), seller, id, 1, new bytes(0x0)); ended = true;
IERC1155(token).safeTransferFrom(address(this), seller, id, 1, new bytes(0x0)); ended = true;
28,411
88
// ๆฏ”็އ่ฝ‰ๆ›-็™ฝ้‡‘ๅนฃๆ›็™ฝ้‡‘
function convert2Platinum(uint256 _amount) constant returns (uint256) { return _amount.div(rate); }
function convert2Platinum(uint256 _amount) constant returns (uint256) { return _amount.div(rate); }
42,851
3
// Kenshi This is a basic implementation of the ERC20 protocol.It includes an ownable feature, which allows for a recovery mechanismfor tokens that are accidentally sent to the contract address.Only the owner of the contract can retrieve these tokens to preventunauthorized access. /
contract Kenshi is ERC20, Ownable { using SafeERC20 for IERC20; /** * @notice Constructor to deploy the Kenshi token with `totalSupply` * tokens minted. * @dev Mints the total supply of tokens and assigns them to the owner of * the contract. Token name is "Kenshi" and token symbol is "KNS". * @param totalSupply The number of tokens to initially mint. */ constructor(uint256 totalSupply) ERC20("Kenshi", "KNS") { _mint(msg.sender, totalSupply); } /** * @dev Sends `amount` of ERC20 `token` from contract address * to `recipient` * * Useful if someone sent ERC20 tokens to the contract address by mistake. * * @param token The address of the ERC20 token contract. * @param recipient The address to which the tokens should be transferred. * @param amount The amount of tokens to transfer. */ function recoverERC20( address token, address recipient, uint256 amount ) external onlyOwner { IERC20(token).safeTransfer(recipient, amount); } }
contract Kenshi is ERC20, Ownable { using SafeERC20 for IERC20; /** * @notice Constructor to deploy the Kenshi token with `totalSupply` * tokens minted. * @dev Mints the total supply of tokens and assigns them to the owner of * the contract. Token name is "Kenshi" and token symbol is "KNS". * @param totalSupply The number of tokens to initially mint. */ constructor(uint256 totalSupply) ERC20("Kenshi", "KNS") { _mint(msg.sender, totalSupply); } /** * @dev Sends `amount` of ERC20 `token` from contract address * to `recipient` * * Useful if someone sent ERC20 tokens to the contract address by mistake. * * @param token The address of the ERC20 token contract. * @param recipient The address to which the tokens should be transferred. * @param amount The amount of tokens to transfer. */ function recoverERC20( address token, address recipient, uint256 amount ) external onlyOwner { IERC20(token).safeTransfer(recipient, amount); } }
39,805
190
// check claim by token
function checkClaimedByEdition(uint256 tokenId, uint edition) public view returns (bool) { return claimTrackerByEdition[edition][tokenId]; }
function checkClaimedByEdition(uint256 tokenId, uint edition) public view returns (bool) { return claimTrackerByEdition[edition][tokenId]; }
64,194
67
// store amount sold at each stage of sale
uint256 public totalWeiRaisedDuringPreICO; uint256 public totalWeiRaisedDuringICO1; uint256 public totalWeiRaisedDuringICO2; uint256 public totalWeiRaisedDuringICO3; uint256 public totalWeiRaisedDuringICO4; uint256 public totalWeiRaised;
uint256 public totalWeiRaisedDuringPreICO; uint256 public totalWeiRaisedDuringICO1; uint256 public totalWeiRaisedDuringICO2; uint256 public totalWeiRaisedDuringICO3; uint256 public totalWeiRaisedDuringICO4; uint256 public totalWeiRaised;
31,601
134
// set insurancefund feeratio only owner can call insuranceFundFeeRatio new insurance fund ratio in 18 digits /
function setInsuranceFundFeeRatio(Decimal.decimal memory insuranceFundFeeRatio) public onlyOwner { _insuranceFundFeeRatio = insuranceFundFeeRatio; emit InsuranceFundFeeRatioChanged(_insuranceFundFeeRatio.toUint()); }
function setInsuranceFundFeeRatio(Decimal.decimal memory insuranceFundFeeRatio) public onlyOwner { _insuranceFundFeeRatio = insuranceFundFeeRatio; emit InsuranceFundFeeRatioChanged(_insuranceFundFeeRatio.toUint()); }
7,003
6
// Calculate the Y position from the X position for this equation.
function calculate(Node[] storage self, uint256 xValue) external view returns (uint256)
function calculate(Node[] storage self, uint256 xValue) external view returns (uint256)
6,914
20
// Price for member sales
uint256 membersSalePrice;
uint256 membersSalePrice;
6,449
193
// Update the max free supply. Can only be called by the current owner./
function setFreeSupply(uint256 max) public onlyOwner{ _freeSupply = max; }
function setFreeSupply(uint256 max) public onlyOwner{ _freeSupply = max; }
22,237
29
// then transfer collateral native currency to the vault, manage collateral from there.
require(IWETH(WETH).transfer(vlt, weth));
require(IWETH(WETH).transfer(vlt, weth));
16,501
213
// delete the token
delete tokens[_tokenId];
delete tokens[_tokenId];
9,557
12
// Compute the amount/weight of the tokenId
uint256 computedAmount = computeAmount(tokenIds[i]);
uint256 computedAmount = computeAmount(tokenIds[i]);
39,035
23
// Safe transfer of ownership in 2 steps. Once called, a newOwner needs to call claimOwnership() to prove ownership.
function transferOwnership(address newOwner) onlyOwner { pendingOwner = newOwner; }
function transferOwnership(address newOwner) onlyOwner { pendingOwner = newOwner; }
17,457
45
// BASE = 10^18
uint constant BASE = 1000000000000000000;
uint constant BASE = 1000000000000000000;
4,736
70
// Used to convert a price answer to an 18-digit precision uint.
function TARGET_DIGITS() external view returns (uint256);
function TARGET_DIGITS() external view returns (uint256);
17,659
17
// Query if a contract implements an interface/interfaceID The interface identifier, as specified in ERC-165/Interface identification is specified in ERC-165. This function/uses less than 30,000 gas./ return `true` if the contract implements `interfaceID` and/`interfaceID` is not 0xffffffff, `false` otherwise
function supportsInterface(bytes4 interfaceID) external view returns (bool) { return supportedInterfaces[interfaceID] && (interfaceID != 0xffffffff); }
function supportsInterface(bytes4 interfaceID) external view returns (bool) { return supportedInterfaces[interfaceID] && (interfaceID != 0xffffffff); }
6,841
59
// initial variables/
address constant DUMMY_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
address constant DUMMY_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
28,175
6
// See {IERC20-totalSupply}. /
function totalSupply() public view override returns (uint256) { return _totalSupply; }
function totalSupply() public view override returns (uint256) { return _totalSupply; }
951
1
// --- Init ---
constructor(uint _totalSupply) public { totalSupply = _totalSupply; balanceOf[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); }
constructor(uint _totalSupply) public { totalSupply = _totalSupply; balanceOf[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); }
28,052
30
// Get all rolegroups that are assigners for the given role. _role The role.return list of rolegroups /
function getAssigners(bytes32 _role) external view returns (bytes32[] memory);
function getAssigners(bytes32 _role) external view returns (bytes32[] memory);
7,023
48
// recesive2 genes 10%
if (randomNumber > (100 - RECESIVE_2_GENES_PROBABILITY)) { return _recesive1Gen; }
if (randomNumber > (100 - RECESIVE_2_GENES_PROBABILITY)) { return _recesive1Gen; }
20,076
3
// Allow anyone to purchase cupcakes
function purchase(uint amount) public payable { require(msg.value >= amount * 1 ether, "You must pay at least 1 ETH per cupcake"); require(cupcakeBalances[address(this)] >= amount, "Not enough cupcakes in stock to complete this purchase"); cupcakeBalances[address(this)] -= amount; cupcakeBalances[msg.sender] += amount; }
function purchase(uint amount) public payable { require(msg.value >= amount * 1 ether, "You must pay at least 1 ETH per cupcake"); require(cupcakeBalances[address(this)] >= amount, "Not enough cupcakes in stock to complete this purchase"); cupcakeBalances[address(this)] -= amount; cupcakeBalances[msg.sender] += amount; }
27,642
48
// _tokenAddress Address of token used to pay for licenses (SNT) _price Amount of token needed to buy a license _burnAddress Burn address where the price of the license is sent /
constructor(address _tokenAddress, uint256 _price, address _burnAddress) License(_tokenAddress, _price, _burnAddress)
constructor(address _tokenAddress, uint256 _price, address _burnAddress) License(_tokenAddress, _price, _burnAddress)
13,673
75
// Variable Block - once enabled, can never be turned off
function enableTrading(uint256 Bblock) external onlyOwner { tradingActive = true; _launchTime = block.timestamp.add(Bblock); }
function enableTrading(uint256 Bblock) external onlyOwner { tradingActive = true; _launchTime = block.timestamp.add(Bblock); }
59,995
22
// WhitelistedRole Whitelisted accounts have been approved by a WhitelistAdmin to perform certain actions (e.g. participate in acrowdsale). This role is special in that the only accounts that can add it are WhitelistAdmins (who can also removeit), and not Whitelisteds themselves. /
contract WhitelistedRole is WhitelistAdminRole { using Roles for Roles.Role; event WhitelistedAdded(address indexed account); event WhitelistedRemoved(address indexed account); Roles.Role private _whitelisteds; modifier onlyWhitelisted() { require(isWhitelisted(msg.sender), "WhitelistedRole: caller does not have the Whitelisted role"); _; } function isWhitelisted(address account) public view returns (bool) { return _whitelisteds.has(account); } function addWhitelisted(address account) public onlyWhitelistAdmin { _addWhitelisted(account); } function removeWhitelisted(address account) public onlyWhitelistAdmin { _removeWhitelisted(account); } function renounceWhitelisted() public { _removeWhitelisted(msg.sender); } function _addWhitelisted(address account) internal { _whitelisteds.add(account); emit WhitelistedAdded(account); } function _removeWhitelisted(address account) internal { _whitelisteds.remove(account); emit WhitelistedRemoved(account); } }
contract WhitelistedRole is WhitelistAdminRole { using Roles for Roles.Role; event WhitelistedAdded(address indexed account); event WhitelistedRemoved(address indexed account); Roles.Role private _whitelisteds; modifier onlyWhitelisted() { require(isWhitelisted(msg.sender), "WhitelistedRole: caller does not have the Whitelisted role"); _; } function isWhitelisted(address account) public view returns (bool) { return _whitelisteds.has(account); } function addWhitelisted(address account) public onlyWhitelistAdmin { _addWhitelisted(account); } function removeWhitelisted(address account) public onlyWhitelistAdmin { _removeWhitelisted(account); } function renounceWhitelisted() public { _removeWhitelisted(msg.sender); } function _addWhitelisted(address account) internal { _whitelisteds.add(account); emit WhitelistedAdded(account); } function _removeWhitelisted(address account) internal { _whitelisteds.remove(account); emit WhitelistedRemoved(account); } }
3,688
3
// 18 decimals
function decimals() public pure override returns (uint8) { return 18; }
function decimals() public pure override returns (uint8) { return 18; }
19,526
65
// An event emitted when a vault handler is removed
event VaultHandlerRemoved( address indexed _owner, address indexed _tokenHandler );
event VaultHandlerRemoved( address indexed _owner, address indexed _tokenHandler );
5,146
14
// address public Factory = 0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac; sushiswap
address public WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
32,058