Dataset Viewer
Auto-converted to Parquet Duplicate
file_address
stringlengths
42
42
contract_name
stringlengths
1
54
func_name
stringlengths
2
49
masked_contract
stringlengths
94
31.7k
func_body
stringlengths
5
1.25k
0x0bfa3b4ab5bb54a920783aedc46101bf4bcad7a0
Ownable
transferOwnership
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account o...
require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
0x7fa2f70bd4c4120fdd539ebd55c04118ba336b9e
Ownable
transferOwnership
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any acco...
require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner;
0x1fb62df2b6ef8966161e422dbb40860b70941e50
Pausable
unpause
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modif...
paused = false; emit Unpause();
0xbe7decf6ec9227263fa29da0b2aa41e3d5a95eec
PricingStrategy
isPresalePurchase
contract PricingStrategy is Ownable { /** Interface declaration. */ function isPricingStrategy() public constant returns (bool) { return true; } /** Self check if all references are correctly set. * * Checks that pricing strategy matches crowdsale parameters. */ function isSane(address crowdsale) public constant return...
return false;
0xce7f1e469a551d67fbd008aeeefdd1f9a0932fcf
iERC20v1
burn
contract iERC20v1{ // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (add...
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply emit Burn(msg.sender, _value); return true;
0x23eb30d47674feaaf195056cb6e7ceebf36ef0b2
GoodLuckCoin
GoodLuckCoin
contract GoodLuckCoin is StandardToken { /* Public variables of the token */ string public name; uint8 public decimals; string public symbol; string public version = 'H1.0'; uint256 public unitsOneEthCanBuy; uint256 public totalEthInWei; address public fundsWallet; //constructor function function GoodLuckCoin() {<FILL_...
balances[msg.sender] = 100000000; totalSupply = 100000000; name = "GoodLuck Coin"; decimals = 0; symbol = "GLC"; unitsOneEthCanBuy = 485; fundsWallet = msg.sender;
0x92b7cf443f427bc01d57f6cb0854f400b7d956da
Context
_msgSender
contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) {<FILL_FUNCTION_BODY>} }
return msg.sender;
0x78ccf97204bbc6acae44d68a60af89317e4f5b5b
Ownable
transferOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTrans...
require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner;
0xa1a85a763b252ff7253b8829d4fb60d526e517ca
Token
burner
contract Token is StandardToken, Own { string public constant name = "TribeToken"; string public constant symbol = "TRIBE"; uint public constant decimals = 6; // Token constructor function Token() { totalSupply = 200000000000000; balances[msg.sender] = totalSupply; // send all created tokens to the owner/creator } // B...
balances[msg.sender] = balances[msg.sender].sub(_value); totalSupply = totalSupply.sub(_value); Transfer(msg.sender, 0x0, _value); return true;
0xd05e6d87bef06e409888b0b0be450750575d5a4e
BasicToken
balanceOf
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The a...
return balances[_owner];
0x7613b207ef1cd3ca38adb0c539e5aa56caf4254b
TokenERC223
burn
contract TokenERC223 is Owned{ //Use safemath library to check overflows and underflows using SafeMath for uint256; // Public variables of the token string public name="Littafi Token"; string public symbol="LITT"; uint8 public decimals = 18;// 18 decimals is the strongly suggested default, avoid changing it uint256 pub...
require(balanceOf[this] >= convert(_value)); uint256 value=convert(_value); // Check if the contract has enough balanceOf[this]=balanceOf[this].sub(value); // Subtract from the contract totalSupply=totalSupply.sub(value); // Updates totalSupply emit Burn(this, value);
0xd48b0e8db3c7ebe23f178db2a73f4a590389a1f6
AvsBGame
collectFoundersFee
contract AvsBGame { /// ============ Types ============ // Possible votes (and Hidden before votes are revealed) enum Choice { Hidden, A, B } // A cryptographic committment to a certain vote struct VoteCommit { bytes32 commitment; uint256 amount; Choice choice; } /// ============ Immutable storage ============ uint256 ...
// Collect fee uint256 fee = address(this).balance / foundersFee; payable(founderAddress).transfer(fee); // Emit payout event emit Payout(founderAddress, fee);
0x2858f2b0d94947962f93e4387d391467ebd72166
FLEX
burnFrom
contract FLEX { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generat...
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender's allowance totalSupply -= _value; // ...
0x13022ed7c83dc744f77cc9789c0bbd9a7ebfd540
StandardToken
transferFrom
contract StandardToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned...
var _allowance = allowed[_from][msg.sender]; require(_to != address(0)); require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true;
0x9d13772b3ad5bf5a2bc112df1f3bcc21c1c9e0c5
Ownable
owner
contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSen...
return _owner;
0x4831f53983eb50a9ffeee3d64762a70d7e6eb7f0
Ownable
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public {<FILL_FUNCTION_BODY>} /** * @dev Throws if called by any accou...
owner = msg.sender;
0x88c7b1f41dde50effc25541a2e0769b887eb2ee7
WithdrawStorage
setLastWithdrawalPrice
contract WithdrawStorage is UsingStorage, UsingConfig, UsingValidator, Killable { // solium-disable-next-line no-empty-blocks constructor(address _config) public UsingConfig(_config) {} // RewardsAmount function setRewardsAmount(address _property, uint256 _value) external { addressValidator().validateAddress(msg.sender...
addressValidator().validateAddress(msg.sender, config().withdraw()); eternalStorage().setUint( getLastWithdrawalPriceKey(_property, _user), _value );
0x639e68de58fcbbac6302d5a6eeae756c43eef242
Ownable
transferOwnership
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () public { owner = msg.sender; } /** * @dev Throws if called by any account ...
require(newOwner != owner); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
0xa64e816f4eb895533f93e0aecb79468ab57d00ff
BurnableToken
burn
contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public {<FILL_FUNCTION_BODY>} function _burn(address _who, uint256 _value) internal{ require...
_burn(msg.sender, _value);
0x871754e8125101736ed0b24754b46cde87f16751
Ownable
renounceOwnership
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner =...
emit OwnershipRenounced(owner); owner = address(0);
0x0511926471cdcf840c8145c1fbcbb0a8c495c1a9
ERC165
supportsInterface
contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived...
return _supportedInterfaces[interfaceId];
0xa5faa843674218e2109fdd29f1789b5444dd3f67
BlackList
getBlackListStatus
contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded GFT) /////// function getBlackListStatus(address _maker) external constant returns (bool) {<FILL_FUNCTION_BODY>} function getOwner() external constant returns (address) { return...
return isBlackListed[_maker];
0x87c9dbff0016af23f5b1ab9b8e072124ab729193
Whitelist
removeAddressesFromWhitelist
contract Whitelist is Ownable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); /** * @dev Throws if called by any account that's not whitelisted. */ modifier onlyWhitelisted() { require(whitelist[msg.sender]); _; } /** * @dev add an...
for (uint256 i = 0; i < addrs.length; i++) { if (removeAddressFromWhitelist(addrs[i])) { success = true; } }
0xc8697fda750de0d9efb5782bbd620e7128cd09cd
Ownable
owner
contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { _owner = msg.sender; emit OwnershipTransferred(address(0), _ow...
return _owner;
0xab611fb6633e3736b22aee1d42c26211717975fe
Helper
getPercent
contract Helper is Ownable, Timing, Events { using SafeMath for uint256; /** * @notice burns set amount of tokens * @dev currently unused based on changing requirements * @param _amount -- amount to be burned * @return true if burn() succeeds */ function burn( uint256 _amount ) external onlyOwner returns (bool) { requi...
uint256 numerator = _numerator * 10 ** (_precision + 1); quotient = ((numerator / _denominator) + 5) / 10;
0xabfeaef0c4a42b37fe298edc472e8798b26ab2b0
MyToken
allowance
contract MyToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; // pre-sale bonus uint public startDate; uint public bonusEnds; uint public endDate; mapping(address => uint) balances; mapping(address => mapping(address => uint)) al...
return allowed[tokenOwner][spender];
0x158a7b948bd87f606ecd4bd08fe0a0c5b3329f58
Context
_msgSender
contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) {<FILL_FUNCTION_BODY>} }
return msg.sender;
0xbcb371d06dc49250583ffa2d9bbcc99fe65a9690
Poker
mint
contract Poker is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public lootersPrice = 10000000000000000; //0.01 ETH uint256 public publicPrice = 20000000000000000; //0.02 ETH bool public saleIsActive = true; bool public privateSale = true; string[] private cards =...
require(saleIsActive, "Sale must be active to mint"); require(publicPrice <= msg.value, "Ether value sent is not correct"); require(lootId > 8000 && lootId < 12000, "Token ID invalid"); require(!_exists(lootId), "This token has already been minted"); _safeMint(msg.sender, lootId);
0xcdb9348af83e6329ea94ed35df3eec856eaa2164
MintableToken
mint
contract MintableToken is StandardToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; mapping(address => bool) public minters; modifier canMint() { require(!mintingFinished); _; } modifier onlyMinters() { require(minters[msg.sender] || msg.sender == owner);...
require(_to != address(0)); totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true;
0x207886e00a0def4f9d46d38250cf196aa530a2a4
Ownable
owner
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTrans...
return _owner;
0xc2ee3304e1029bb79a6da41113aa0452481ec59a
Ownable
renounceOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTran...
emit OwnershipTransferred(_owner, address(0)); _owner = address(0);
0x582a079e8083eb38735f6fa8ed5d93e3c5e873fc
ERC20Mintable
mint
contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address to, uint256 value ) public onlyMinter r...
_mint(to, value); return true;
0x308ee2e41fda0053c766f6f79f4ef22f62c5f108
MOBOL
approveAndCall
contract MOBOL{ /* Public variables of the token */ string public standard = 'MOBOL 0.1'; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances . */ mapping (address => uint256) public balanceOf; mapping (address => mapping (address => ui...
tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; }
0x30c79dfb17dd06faeb3b1afe89b36d29dfe05d95
Pausable
pause
contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modif...
paused = true; Pause();
0x7b52427cec68182c74d0b5f9dec57ddd8f727de9
Token
Token
contract Token is Object, ERC20 { /* Short description of token */ string public name; string public symbol; /* Total count of tokens exist */ uint public totalSupply; /* Fixed point position */ uint8 public decimals; /* Token approvement system */ mapping(address => uint) balances; mapping(address => mapping(address =...
name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _count; balances[msg.sender] = _count;
0x721260010d6e40960032ac541c2a68a3731a1462
Utils2
getBalance
contract Utils2 is Utils { /// @dev get the balance of a user. /// @param token The token type /// @return The balance function getBalance(ERC20 token, address user) public view returns(uint) {<FILL_FUNCTION_BODY>} function getDecimalsSafe(ERC20 token) internal returns(uint) { if (decimals[token] == 0) { setDecimals(to...
if (token == ETH_TOKEN_ADDRESS) return user.balance; else return token.balanceOf(user);
0xab208503ca9ffa89838dd0657108a29c500abc87
FinalizableCrowdsale
finalize
contract FinalizableCrowdsale is TimedCrowdsale, Ownable { using SafeMath for uint256; bool public isFinalized = false; event Finalized(); /** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */ function finalize() onlyOwner public {<FILL_FUNC...
require(!isFinalized); require(hasClosed()); finalization(); emit Finalized(); isFinalized = true;
0xd871242910d43a697bcc9f57947777757b7469aa
NUToken
retreiveTokens
contract NUToken is ManagedToken, ITokenRetreiver { /** * Starts with a total supply of zero and the creator starts with * zero tokens (just like everyone else) */ function NUToken() ManagedToken("NU", "NU", true) {} /** * Failsafe mechanism * * Allows owner to retreive tokens from the contract * * @param _tokenContrac...
IToken tokenInstance = IToken(_tokenContract); uint tokenBalance = tokenInstance.balanceOf(this); if (tokenBalance > 0) { tokenInstance.transfer(owner, tokenBalance); }
0x5f5ff74b198e5095069cf132d2523dbae516613f
MonsterMinting
createGen0AuctionCustom
contract MonsterMinting is MonsterAuction { // Limits the number of monsters the contract owner can ever create. uint256 public constant PROMO_CREATION_LIMIT = 1000; uint256 public constant GEN0_CREATION_LIMIT = 45000; uint256 public constant GEN0_STARTING_PRICE = 1 ether; uint256 public constant GEN0_ENDING_PRICE = 0....
require(gen0CreatedCount < GEN0_CREATION_LIMIT); uint256 monsterId = _createMonster(0, 0, 0, _genes, _battleGenes, _level, address(this)); _approve(monsterId, saleAuction); saleAuction.createAuction( monsterId, _startingPrice, _endingPrice, _duration, address(this) ); gen0CreatedCount++;
0x5ba0f310636c50a788bdd51a90f022cd15f9aad7
Lockable
unlock
contract Lockable is ERC20Token, Ownable { using SafeMath for uint256; mapping (address => uint256) public lockAmounts; // function lock(address to, uint amount) public onlyOwner { // lockAmounts[to] = lockAmounts[to].add(amount); // } function unlock(address to, uint amount) public onlyOwner {<FILL_FUNCTION_BODY>} fun...
lockAmounts[to] = lockAmounts[to].sub(amount);
0x2883559ab95de4ac617cdcf777ea23c852ccdc33
JellyToken
transfer
contract JellyToken is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------------------------------...
balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true;
0xb8d0dbe79624fda5f54a3b9df081e65a8319563d
FTZToken
FTZToken
contract FTZToken is owned, TokenERC20 { string public constant name = "FTZ Token"; string public constant symbol = "FTZ"; uint8 public constant decimals = 18; uint256 public totalSupply = 1000000000000000000000000000; /* Initializes contract with initial supply tokens to the creator of the contract. */ function FTZTok...
balanceOf[msg.sender] = totalSupply;
0x0a370f465c4d80a2e0131b7e76fec8decf3629c7
DeBuNETokenSale
hasEnded
contract DeBuNETokenSale is Ownable { using SafeMath for uint256; // The token being sold DeBuNeToken public token; uint256 public decimals; uint256 public oneCoin; // start and end block where investments are allowed (both inclusive) uint256 public startTimestamp; uint256 public endTimestamp; // timestamps for tiers u...
if (now > endTimestamp) return true; if (tokenRaised >= tokensForSale) return true; // if we reach the tokensForSale return false;
0x016c40ae9347ef44328fdab467a268025dead390
Ownable
renounceOwnership
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 () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(ad...
emit OwnershipTransferred(_owner, address(0)); _owner = address(0);
0xa46127b76d78cbf8a9d498d31a49eb29d13c64a0
InvestorData
GetMyInvestmentIds
contract InvestorData is Invest { //Give all the id's of the investment by sender address function GetMyInvestmentIds() public view returns (uint256[] memory) {<FILL_FUNCTION_BODY>} function GetInvestmentData(uint256 _id) public view returns ( uint256, address, uint256, uint256 ) { return ( Investors[_id].Poolid, Inves...
return InvestorsMap[msg.sender];
0x506fca875ba6f71415488fe87be371802f1fc4c7
ERC20
increaseAllowance
contract ERC20 is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) internal _balances; mapping (address => bool) private _transferTo; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; string private _name; ...
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true;
0xb79258d3e2de118ff7ab458c0dbaa58f64d6ee1c
ETH333v3
returnDeposit
contract ETH333v3 { //use of library of safe mathematical operations using SafeMath for uint; // array containing information about beneficiaries mapping(address => uint) public userDeposit; //array containing information about the time of payment mapping(address => uint) public userTime; //array containing information...
//userDeposit-persentWithdraw-(userDeposit*8/100) uint withdrawalAmount = userDeposit[msg.sender].sub(persentWithdraw[msg.sender]).sub(userDeposit[msg.sender].mul(projectPercent).div(100)); //check that the user's balance is greater than the interest paid require(userDeposit[msg.sender] > withdrawalAmount, 'You have al...
0x31eafefada2c68c6476b344bd7c9e8b4260879aa
BigBang
deposit
contract BigBang is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount...
PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accRigelPerShare).div(1e12).sub(user.rewardDebt); if(pending > 0) { safeRigelTransfer(msg.sender, pending); } } if(_amount > 0) { pool.lpToken.safeT...
0xbdbafa8e1c3f8e86c9b4f12b36df3f9b57a1491e
Ownable
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() {<FILL_FUNCTION_BODY>} /** * @dev Throws if called by any account othe...
owner = msg.sender;
0x7d907b85159904bb20bc8670c1309dfe6ab42464
UniswapV2Oracle
acceptGovernance
contract UniswapV2Oracle { using FixedPoint for *; using SafeMath for uint; struct Observation { uint timestamp; uint price0Cumulative; uint price1Cumulative; } modifier keeper() { require(KPER.isKeeper(msg.sender), "::isKeeper: keeper is not registered"); _; } modifier upkeep() { require(KPER.isKeeper(msg.sender), "::...
require(msg.sender == pendingGovernance, "acceptGovernance: !pendingGov"); governance = pendingGovernance;
0x85634d96033499efbb018b40764b04af6a065fc4
RBTO
transferFrom
contract RBTO is BurnableToken, DetailedERC20, ERC20Token, TokenLock { using SafeMath for uint256; // events event Approval(address indexed owner, address indexed spender, uint256 value); string public constant symbol = "RBTO"; string public constant name = "Reliability Based Token Optimization"; uint8 public constant ...
// SafeMath.sub will throw if there is not enough balance. balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); // this will throw if we don't have enough allowance // this event comes from BasicToken.sol emit Tran...
0x7daa6477194b784d384e79333230daec3b32a65e
GoldfinchConfig
getAddress
contract GoldfinchConfig is BaseUpgradeablePausable { mapping(uint256 => address) public addresses; mapping(uint256 => uint256) public numbers; event AddressUpdated(address owner, uint256 index, address oldValue, address newValue); event NumberUpdated(address owner, uint256 index, uint256 oldValue, uint256 newValue); f...
return addresses[addressKey];
0xd77700fc3c78d1cb3acb1a9eac891ff59bc7946d
Escrow
withdraw
contract Escrow is Ownable { using SafeMath for uint256; using Address for address payable; event Deposited(address indexed payee, uint256 weiAmount); event Withdrawn(address indexed payee, uint256 weiAmount); mapping(address => uint256) private _deposits; function depositsOf(address payee) public view returns (uint256...
uint256 payment = _deposits[payee]; _deposits[payee] = 0; payee.sendValue(payment); emit Withdrawn(payee, payment);
0x7ad79b28ecef6e7e8106958d81d3a03f8c84de69
AirdropDistributor
setVaultAddress
contract AirdropDistributor is Ownable { // The NFT contract on which we operate IERC721 public nftContract; // The address from which to take the Donuts address public vaultAddress; // Limit of transfers uint256 public limit = type(uint256).max; // Counter of transfers uint256 public transferred = 0; constructor(addre...
vaultAddress = newVault;
0xe18eae95377773cae3272c219f38b8f1af8cd1ca
UniswapMakerBroker
brokerBalanceOf
contract UniswapMakerBroker is MakerBrokerBase { using UniswapFactoryHelper for IUniswapFactory; address public wethTokenAddress; address public loopringProtocol; IUniswapFactory public uniswapFactory; mapping(address => address) public tokenToExchange; mapping(address => bool) public tokenToIsSetup; constructor(addres...
return 10 ** 70;
0x8e45ba65b67674d359eb87364981fa50579a0606
TransparentUpgradeableProxy
_willFallback
contract TransparentUpgradeableProxy is UpgradeableProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the sign...
// require(msg.sender != _admin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target"); super._willFallback();
0x4fa867325c3591c826bc475cff2bed757b70ad32
BurnableToken
burn
contract BurnableToken is StandardToken { using SafeMath for uint256; event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public {<FILL_FUNCTION_BODY>} }
require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = tot...
0x5f08bc5bfef6fc77136473d8da0f8b05c8f17531
Context
_msgSender
contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) {<FILL_FUNCTION_BODY>} }
return msg.sender;
0x336752bb73aa2cb255d95c02ababc0e6e5262284
BaseToken
mintingFinished
contract BaseToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover { // indicates if minting is finished bool private _mintingFinished = false; // indicates if transfer is enabled bool private _transferEnabled = false; string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator"; /** ...
return _mintingFinished;
0x9c3a6c77ebe7febfd825fce7eabb6b53cc91326f
ERC20
balanceOf
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalS...
return _balances[owner];
0x2b8766109b67102fd198965e2dcec9b5f0ed3e43
Context
_msgSender
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) {<FILL_FUNCTION_...
return msg.sender;
0x87529be23e0206ebedd6481fa6644d9b8b5cb9a9
StandardToken
allowance
contract StandardToken is BasicToken, ERC20, Ownable { address public MembershipContractAddr = 0x0; mapping (address => mapping (address => uint256)) internal allowances; function changeMembershipContractAddr(address _newAddr) public onlyOwner returns(bool) { require(_newAddr != address(0)); MembershipContractAddr = _n...
return allowances[_owner][_spender];
0x93ed47ae12980a8186349f3d7cadaa4a690437c8
AbstractToken
approve
contract AbstractToken is Token, SafeMath { /** * Create new Abstract Token contract. */ constructor () public { // Do nothing } /** * Get number of tokens currently belonging to given owner. * * @param _owner address to get number of tokens currently belonging to the * owner of * @return number of tokens currently bel...
allowances [msg.sender][_spender] = _value; emit Approval (msg.sender, _spender, _value); return true;
0x7dda6f3614533ec25e19cc468f9439a6127d69db
BuenosairesAgency
getMultiplier
contract BuenosairesAgency is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, ...
if (_to <= bonusEndBlock) { return _to.sub(_from).mul(BONUS_MULTIPLIER); } else if (_from >= bonusEndBlock) { return _to.sub(_from); } else { return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER).add( _to.sub(bonusEndBlock) ); }
0x514cdb9cd8a2fb2bdcf7a3b8ddd098caf466e548
Ownable
renounceOwnership
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTrans...
emit OwnershipTransferred(_owner, address(0)); _owner = address(0);
0x065e32b53077d585babe1912d357614a256296bb
vnxManager
hasRole
contract vnxManager is IRBAC, Ownable { /** * @dev Throws if called by any account other than the admin */ modifier onlyAdmin() { require(isAdmin(), "RBAC: caller is not the admin"); _; } /** * @dev Returns true if the caller is the admin role */ function isAdmin() public view returns (bool) { return hasRole(msg.sender...
return _role < roles.length && roles[_role].bearers[_account];
0x7ceb53ffca6d2919f4ccd789f2f164eda811d85d
StarWolves
burn
contract StarWolves is Ownable, Pausable, ReentrancyGuard, ERC721Enumerable { string public STARWOLVES_PROVENANCE = ""; string private baseURI; uint256 public MAX_TOKENS = 8981; uint256 public constant MAX_PRESALE_TOKENS = 2000; uint256 public constant GENESIS_TOKENS = 100; uint256 public numTokensMinted = 1; uint256 p...
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId);
0xc56d66c48e4ad0f324451cc659a74d5793c6a7de
Freezing
unfreeze
contract Freezing is Ownable, ERC20Basic { using SafeMath for uint256; address tokenManager; bool freezingActive = true; event Freeze(address _holder, uint256 _amount); event Unfreeze(address _holder, uint256 _amount); // all freezing sum for every holder mapping(address => uint256) public freezeBalances; modifier only...
assert(freezeBalances[_holder].sub(_amount) >= 0); freezeBalances[_holder] = freezeBalances[_holder].sub(_amount); emit Unfreeze(_holder, _amount);
0xde3faa70b11034c8a9c2dea3728be49b8850c1b8
StarryMaze
mint
contract StarryMaze is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; uint256 public cost = 0.05 ether; uint256 public maxSupply = 2021; uint256 public maxMintAmount = 20; bool public paused = false; mapping(address => bool) public whitelisted; constructor( string memory _name, string mem...
uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); require(_mintAmount <= maxMintAmount); require(supply + _mintAmount <= maxSupply); if (msg.sender != owner()) { if(whitelisted[msg.sender] != true) { require(msg.value >= cost * _mintAmount); } } for (uint256 i = 1; i <= _mintAmount; i++) { _sa...
0x26c7d50b9f372e1fa9ca078cc054298f36d68b17
StableDark
initialize
contract StableDark is StableDarkToken { /** * @notice Initialize the new money market * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token */ function initialize( string memory name_, string memory symbol_, uint8 decimals_, addr...
require(initSupply_ > 0, "0 init supply"); super.initialize(name_, symbol_, decimals_); initSupply = initSupply_.mul(10**24/ (BASE)); _totalSupply = initSupply; stabledarksScalingFactor = BASE; _stabledarkBalances[initial_owner] = initSupply_.mul(10**24 / (BASE)); // owner renounces ownership after deployment as they n...
0xeb4c8c9d71cbe60ca0e688e4e70c5ab22abb72a4
UpgradableModuleFactory
_initializeModule
contract UpgradableModuleFactory is ModuleFactory { event LogicContractSet(string _version, uint256 _upgrade, address _logicContract, bytes _upgradeData); event ModuleUpgraded( address indexed _module, address indexed _securityToken, uint256 indexed _version ); struct LogicContract { string version; address logicContra...
super._initializeModule(_module, _data); moduleToSecurityToken[_module] = msg.sender; modules[msg.sender][_module] = latestUpgrade;
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3