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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TokenTimelock | TokenTimelock.sol | 0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880 | Solidity | OtcEscrow | contract OtcEscrow {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address constant usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
address constant bBadger = 0x19D97D8fA813EE2f51aD4B4e04EA08bAf4DFfC28;
address constant badgerGovernance = 0xB65cef03b9B89f99517643226d76e286ee999e7... | /*
Simple OTC Escrow contract to transfer vested bBadger in exchange for specified USDC amount
*/ | Comment | swap | function swap() public onlyApprovedParties {
// Transfer expected USDC from beneficiary
IERC20(usdc).safeTransferFrom(beneficiary, address(this), usdcAmount);
// Create Vesting contract
TokenTimelock vesting = new TokenTimelock(
IERC20(bBadger),
beneficiary,
now + durati... | /// @dev Atomically trade specified amonut of USDC for control over bBadger in vesting contract
/// @dev Either counterparty may execute swap if sufficient token approval is given by recipient | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417 | {
"func_code_index": [
1154,
1818
]
} | 9,107 |
TokenTimelock | TokenTimelock.sol | 0xb6c9e9ba41291044cf5dadfb22d72d3fe9312880 | Solidity | OtcEscrow | contract OtcEscrow {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address constant usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
address constant bBadger = 0x19D97D8fA813EE2f51aD4B4e04EA08bAf4DFfC28;
address constant badgerGovernance = 0xB65cef03b9B89f99517643226d76e286ee999e7... | /*
Simple OTC Escrow contract to transfer vested bBadger in exchange for specified USDC amount
*/ | Comment | revoke | function revoke() external {
require(msg.sender == badgerGovernance, "onlyBadgerGovernance");
uint256 bBadgerBalance = IERC20(bBadger).balanceOf(address(this));
IERC20(bBadger).safeTransfer(badgerGovernance, bBadgerBalance);
}
| /// @dev Return bBadger to Badger Governance to revoke escrow deal | NatSpecSingleLine | v0.6.12+commit.27d51765 | MIT | ipfs://6c42c0ce91b677cd66c56245db75171d6854b508b029fdb657a32133e9702417 | {
"func_code_index": [
1893,
2156
]
} | 9,108 |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) public balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_va... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
289,
712
]
} | 9,109 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) public balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
928,
1048
]
} | 9,110 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | TokenTimelock | contract TokenTimelock {
using SafeERC20 for ERC20Basic;
// ERC20 basic token contract being held
ERC20Basic public token;
// beneficiary of tokens after they are released
address public beneficiary;
// timestamp when token release is enabled
uint64 public releaseTime;
fu... | /**
* @title TokenTimelock
* @dev TokenTimelock is a token holder contract that will allow a
* beneficiary to extract the tokens after a given release time
*/ | NatSpecMultiLine | release | function release() public {
require(uint64(block.timestamp) >= releaseTime);
uint256 amount = token.balanceOf(this);
require(amount > 0);
token.safeTransfer(beneficiary, amount);
}
| /**
* @notice Transfers tokens held by timelock to beneficiary.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
663,
893
]
} | 9,111 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
415,
903
]
} | 9,112 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
1555,
1761
]
} | 9,113 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
2097,
2246
]
} | 9,114 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
2503,
2792
]
} | 9,115 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | BurnableToken | contract BurnableToken is StandardToken {
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 {
require(_value > 0);
require(_valu... | /**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/ | NatSpecMultiLine | burn | function burn(uint256 _value) public {
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;
... | /**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/ | NatSpecMultiLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
225,
713
]
} | 9,116 | |
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | close | function close() public onlyOwner beforeEnd {
require(totalSupply <= HARD_CAP);
tokenSaleClosedTime = uint64(block.timestamp);
}
| /// @dev start the trading countdown | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
2302,
2458
]
} | 9,117 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | transferLocking | function transferLocking(address _to, uint256 _value, uint64 _releaseTime) public onlyOwner returns (bool) {
address timelockAddress = lockingContractAddresses[_to];
if(timelockAddress == address(0)) {
TokenTimelock timelock = new TokenTimelock(this, _to, _releaseTime);
timelockAddress = add... | /// @dev Transfer timelocked tokens; ignores _releaseTime if a timelock exists already | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
2553,
3048
]
} | 9,118 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | lockedBalanceOf | function lockedBalanceOf(address _owner) public view returns (uint256) {
return balances[lockingContractAddresses[_owner]];
}
| /// @dev check the locked balance of an owner | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
3102,
3246
]
} | 9,119 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | timelockOf | function timelockOf(address _owner) public view returns (address) {
return lockingContractAddresses[_owner];
}
| /// @dev get the TokenTimelock contract address for an owner | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
3315,
3444
]
} | 9,120 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | tradingOpen | function tradingOpen() public view returns (bool) {
return (tokenSaleClosedTime != 0 && block.timestamp > tokenSaleClosedTime + 60 * 60 * 24 * 21)
|| block.timestamp > date21Jun2018;
}
| /// @dev 21 days after the closing of the sale | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
3499,
3711
]
} | 9,121 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
if(tradingOpen() || msg.sender == owner || msg.sender == communityTokensAddress) {
return super.transferFrom(_from, _to, _value);
}
return false;
}
| /// @dev Trading limited - requires 3 weeks to have passed since the sale closed | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
3800,
4087
]
} | 9,122 | |||
HotelCoin | HotelCoin.sol | 0x7fbd92f49f6f9b4f9b3b4d18761b0deb7253a8bf | Solidity | HotelCoin | contract HotelCoin is BurnableToken, Owned {
string public constant name = "Hotel Coin";
string public constant symbol = "HCI";
uint8 public constant decimals = 8;
/// Maximum tokens to be allocated (350 million)
uint256 public constant HARD_CAP = 350000000 * 10**uint256(decimals);
///... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
if(tradingOpen() || msg.sender == owner || msg.sender == communityTokensAddress) {
return super.transfer(_to, _value);
}
return false;
}
| /// @dev Trading limited - requires 3 weeks to have passed since the sale closed | NatSpecSingleLine | v0.4.19+commit.c4cbbb05 | bzzr://cffb97395e6838d7fc80b625e39b41f839eb5db8700e3157cdae5a1574e86dbb | {
"func_code_index": [
4176,
4433
]
} | 9,123 | |||
CotiDime | contracts/CotiDime.sol | 0x9157c8359a1e349e599665bf83e22d32c69b9daf | Solidity | CotiDime | contract CotiDime is HasNoEther, Claimable, MintableToken {
string public constant name = "COTI-DIME";
string public constant symbol = "CPS";
uint8 public constant decimals = 18;
// This modifier will be used to disable ERC20 transfer functionalities during the minting process.
modifier isTra... | /// @title COTI-DIME token for COTI-ZERO platform | NatSpecSingleLine | transfer | function transfer(address _to, uint256 _value) public isTransferable returns (bool) {
return super.transfer(_to, _value);
}
| /// @dev Transfer token for a specified address
/// @param _to address The address to transfer to.
/// @param _value uint256 The amount to be transferred.
/// @return Calling super.transfer and returns true if successful. | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://1a67a45779cd5b60ddd5777515160ecaaaf66b024f6f88683b1690df07eb6a44 | {
"func_code_index": [
664,
806
]
} | 9,124 | |
CotiDime | contracts/CotiDime.sol | 0x9157c8359a1e349e599665bf83e22d32c69b9daf | Solidity | CotiDime | contract CotiDime is HasNoEther, Claimable, MintableToken {
string public constant name = "COTI-DIME";
string public constant symbol = "CPS";
uint8 public constant decimals = 18;
// This modifier will be used to disable ERC20 transfer functionalities during the minting process.
modifier isTra... | /// @title COTI-DIME token for COTI-ZERO platform | NatSpecSingleLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public isTransferable returns (bool) {
return super.transferFrom(_from, _to, _value);
}
| /// @dev Transfer tokens from one address to another.
/// @param _from address The address which you want to send tokens from.
/// @param _to address The address which you want to transfer to.
/// @param _value uint256 The amount of tokens to be transferred.
/// @return Calling super.transferFrom and returns true if su... | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://1a67a45779cd5b60ddd5777515160ecaaaf66b024f6f88683b1690df07eb6a44 | {
"func_code_index": [
1164,
1336
]
} | 9,125 | |
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | 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 () {
address msgSender = _msgSender();
... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
488,
572
]
} | 9,126 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | 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 () {
address msgSender = _msgSender();
... | 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.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
1130,
1283
]
} | 9,127 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | 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 () {
address msgSender = _msgSender();
... | 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.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
1433,
1682
]
} | 9,128 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | SafeERC20 | library SafeERC20 {
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... | 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'
require(
... | /**
* @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.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
791,
1412
]
} | 9,129 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | SafeERC20 | library SafeERC20 {
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... | _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.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
2628,
3349
]
} | 9,130 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | token | function token() public view returns (IERC20) {
return _token;
}
| /**
* @return the token being sold.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
2092,
2175
]
} | 9,131 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | wallet | function wallet() public view returns (address payable) {
return _wallet;
}
| /**
* @return the address where funds are collected.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
2252,
2346
]
} | 9,132 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | rate | function rate() public view returns (uint256) {
return _rate;
}
| /**
* @return the number of token units a buyer gets per wei.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
2432,
2514
]
} | 9,133 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | weiRaised | function weiRaised() public view returns (uint256) {
return _weiRaised;
}
| /**
* @return the amount of wei raised.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
2578,
2670
]
} | 9,134 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | buyTokens | function buyTokens(address beneficiary) public nonReentrant payable {
uint256 weiAmount = msg.value;
_preValidatePurchase(beneficiary, weiAmount);
// calculate token amount to be created
uint256 tokens = _getTokenAmount(weiAmount);
validatePurchase(beneficiary, tokens);
// update s... | /**
* @dev low level token purchase ***DO NOT OVERRIDE***
* This function has a non-reentrancy guard, so it shouldn't be called by
* another `nonReentrant` function.
* @param beneficiary Recipient of the token purchase
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
3408,
4142
]
} | 9,135 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _preValidatePurchase | function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address");
require(weiAmount != 0, "Crowdsale: weiAmount is 0");
this; // silence state mutability warning without generating bytecode - see https:/... | /**
* @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
* Use `super` in contracts that inherit from Crowdsale to extend their validations.
* Example from CappedCrowdsale.sol's _preValidatePurchase method:
* super._preValidatePurchase(beneficiary, w... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
5068,
5453
]
} | 9,136 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _postValidatePurchase | function _postValidatePurchase(address beneficiary, uint256 weiAmount) internal view {
// solhint-disable-previous-line no-empty-blocks
}
| /**
* @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid
* conditions are not met.
* @param beneficiary Address performing the token purchase
* @param weiAmount Value in wei involved in the purchase
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
5752,
5908
]
} | 9,137 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _deliverTokens | function _deliverTokens(address beneficiary, uint256 tokenAmount) internal {
_token.safeTransfer(beneficiary, tokenAmount);
}
| /**
* @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends
* its tokens.
* @param beneficiary Address performing the token purchase
* @param tokenAmount Number of tokens to be emitted
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
6192,
6336
]
} | 9,138 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _processPurchase | function _processPurchase(address beneficiary, uint256 tokenAmount) internal {
_deliverTokens(beneficiary, tokenAmount);
}
| /**
* @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send
* tokens.
* @param beneficiary Address receiving the tokens
* @param tokenAmount Number of tokens to be purchased
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
6606,
6747
]
} | 9,139 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _getTokenAmount | function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
return weiAmount.mul(_rate);
}
| /**
* @dev Override to extend the way in which ether is converted to tokens.
* @param weiAmount Value in wei to be converted into tokens
* @return Number of tokens that can be purchased with the specified _weiAmount
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
7457,
7584
]
} | 9,140 | ||
CSDCrowdsale | CSDCrowdsale.sol | 0xd895f38552ac9dd76e0926d65c8837a27c97b469 | Solidity | CSDCrowdsale | contract CSDCrowdsale is Context, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// The token being sold
IERC20 internal _token;
// Address where funds are collected
address payable internal _wallet;
// How many token units a buyer gets per... | _forwardFunds | function _forwardFunds() internal {
_wallet.transfer(msg.value);
}
| /**
* @dev Determines how ETH is stored/forwarded on purchases.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | ipfs://90b35e373c57766c7c9265b92a2b9f2bb38c81c6cda77fa1d00c6ab71b3641bf | {
"func_code_index": [
7672,
7757
]
} | 9,141 | ||
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
606,
1033
]
} | 9,142 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
1963,
2365
]
} | 9,143 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
3121,
3299
]
} | 9,144 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
3524,
3724
]
} | 9,145 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
4094,
4325
]
} | 9,146 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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");
require(isContract(target), "Address: call to non-contract");
// solhint-disa... | /**
* @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.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
4576,
5111
]
} | 9,147 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5291,
5495
]
} | 9,148 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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 | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.stat... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5682,
6109
]
} | 9,149 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
6291,
6496
]
} | 9,150 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | 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 | functionDelegateCall | function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.deleg... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
6685,
7113
]
} | 9,151 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
retur... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
908,
1327
]
} | 9,152 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element f... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
1498,
3047
]
} | 9,153 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
3128,
3262
]
} | 9,154 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
3343,
3457
]
} | 9,155 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
3796,
4005
]
} | 9,156 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
4254,
4402
]
} | 9,157 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
4573,
4727
]
} | 9,158 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
4808,
4971
]
} | 9,159 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5052,
5174
]
} | 9,160 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5513,
5667
]
} | 9,161 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5912,
6048
]
} | 9,162 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
6219,
6361
]
} | 9,163 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
6442,
6593
]
} | 9,164 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
6674,
6793
]
} | 9,165 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are ma... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
7132,
7274
]
} | 9,166 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | 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.
*/
constructor() public {
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
639,
820
]
} | 9,167 |
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | ConstantReturnStaking | contract ConstantReturnStaking is Ownable {
using Address for address;
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address indexed holder, uint amount);
event Reinvest(address indexed holder, uint amount);
// =============... | emergencyWithdraw | function emergencyWithdraw(uint amountToWithdraw) external noContractsAllowed {
require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw");
require(now.sub(depositTime[msg.sender]) > LOCKUP_TIME, "You recently staked, please wait before withdrawing.");
// s... | // emergency unstake without caring about pending earnings
// pending earnings will be lost / set to 0 if used emergency unstake | LineComment | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
5731,
6824
]
} | 9,168 | ||
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | ConstantReturnStaking | contract ConstantReturnStaking is Ownable {
using Address for address;
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address indexed holder, uint amount);
event Reinvest(address indexed holder, uint amount);
// =============... | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, address recipient, uint amount) external onlyOwner {
require (tokenAddress != TRUSTED_TOKEN_ADDRESS || now > contractStartTime.add(ADMIN_CAN_CLAIM_AFTER), "Cannot Transfer Out main tokens!");
require (Token(tokenAddress).transfer(recipient, amount), "Transf... | // function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
// Admin cannot transfer out reward tokens from this smart contract | LineComment | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
9082,
9435
]
} | 9,169 | ||
ConstantReturnStaking | ConstantReturnStaking.sol | 0x510bca78bf7d68d2420357847bd3547c1b55f74c | Solidity | ConstantReturnStaking | contract ConstantReturnStaking is Ownable {
using Address for address;
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address indexed holder, uint amount);
event Reinvest(address indexed holder, uint amount);
// =============... | transferAnyLegacyERC20Token | function transferAnyLegacyERC20Token(address tokenAddress, address recipient, uint amount) external onlyOwner {
require (tokenAddress != TRUSTED_TOKEN_ADDRESS || now > contractStartTime.add(ADMIN_CAN_CLAIM_AFTER), "Cannot Transfer Out main tokens!");
LegacyToken(tokenAddress).transfer(recipient, amount);
}
| // function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
// Admin cannot transfer out reward tokens from this smart contract | LineComment | v0.6.11+commit.5ef660b1 | BSD-3-Clause | ipfs://de1f6fe0a1e04db48cd6ffb6c87676bb81b7c72fb86b35208761ff17eba1caf8 | {
"func_code_index": [
9612,
9947
]
} | 9,170 | ||
SwapContractDateumtoPDATA | SwapContractDateumtoPDATA.sol | 0x8c85625d95d91c845bcf02d2b72b827e1a31b676 | Solidity | SwapContractDateumtoPDATA | contract SwapContractDateumtoPDATA {
//storage
address public owner;
CREDITS public company_token;
address public PartnerAccount;
uint public originalBalance;
uint public currentBalance;
uint public alreadyTransfered;
uint public startDateOfPayments;
uint public endDateOfP... | function()
public
payable
{
revert();
}
| /// @dev Fallback function: don't accept ETH | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://b2f5f027b272636f635b5af750e06c2455085febacb4473336e6016531024897 | {
"func_code_index": [
1474,
1555
]
} | 9,171 | ||||
YatagarasuToken | YatagarasuToken.sol | 0x3f4144c45a0775e7fc40271edc1e7421c44bc8c2 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier ... | /**
* Allows for contract ownership along with multi-address authorization
*/ | NatSpecMultiLine | authorize | function authorize(address adr) public onlyOwner {
authorizations[adr] = true;
}
| /**
* Authorize address. Owner only
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://b98358b8e9a0a8d718c67910c301f86e9fe6fabf51c7cd737b962b89730d8679 | {
"func_code_index": [
633,
732
]
} | 9,172 |
YatagarasuToken | YatagarasuToken.sol | 0x3f4144c45a0775e7fc40271edc1e7421c44bc8c2 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier ... | /**
* Allows for contract ownership along with multi-address authorization
*/ | NatSpecMultiLine | unauthorize | function unauthorize(address adr) public onlyOwner {
authorizations[adr] = false;
}
| /**
* Remove address' authorization. Owner only
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://b98358b8e9a0a8d718c67910c301f86e9fe6fabf51c7cd737b962b89730d8679 | {
"func_code_index": [
804,
906
]
} | 9,173 |
YatagarasuToken | YatagarasuToken.sol | 0x3f4144c45a0775e7fc40271edc1e7421c44bc8c2 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier ... | /**
* Allows for contract ownership along with multi-address authorization
*/ | NatSpecMultiLine | isOwner | function isOwner(address account) public view returns (bool) {
return account == owner;
}
| /**
* Check if address is owner
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://b98358b8e9a0a8d718c67910c301f86e9fe6fabf51c7cd737b962b89730d8679 | {
"func_code_index": [
962,
1070
]
} | 9,174 |
YatagarasuToken | YatagarasuToken.sol | 0x3f4144c45a0775e7fc40271edc1e7421c44bc8c2 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier ... | /**
* Allows for contract ownership along with multi-address authorization
*/ | NatSpecMultiLine | isAuthorized | function isAuthorized(address adr) public view returns (bool) {
return authorizations[adr];
}
| /**
* Return address' authorization status
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://b98358b8e9a0a8d718c67910c301f86e9fe6fabf51c7cd737b962b89730d8679 | {
"func_code_index": [
1137,
1249
]
} | 9,175 |
YatagarasuToken | YatagarasuToken.sol | 0x3f4144c45a0775e7fc40271edc1e7421c44bc8c2 | Solidity | Auth | abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
owner = _owner;
authorizations[_owner] = true;
}
/**
* Function modifier to require caller to be contract owner
*/
modifier ... | /**
* Allows for contract ownership along with multi-address authorization
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address payable adr) public onlyOwner {
owner = adr;
authorizations[adr] = true;
emit OwnershipTransferred(adr);
}
| /**
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
*/ | NatSpecMultiLine | v0.7.6+commit.7338295f | MIT | ipfs://b98358b8e9a0a8d718c67910c301f86e9fe6fabf51c7cd737b962b89730d8679 | {
"func_code_index": [
1364,
1542
]
} | 9,176 |
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
88,
146
]
} | 9,177 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
223,
294
]
} | 9,178 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
504,
584
]
} | 9,179 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
849,
950
]
} | 9,180 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1586,
1663
]
} | 9,181 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 Moves ... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1958,
2078
]
} | 9,182 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
239,
409
]
} | 9,183 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
667,
800
]
} | 9,184 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1078,
1279
]
} | 9,185 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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;
}
uint25... | /**
* @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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1513,
1947
]
} | 9,186 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
2394,
2523
]
} | 9,187 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
2990,
3273
]
} | 9,188 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
3709,
3836
]
} | 9,189 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 (uint256) {
uint2... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
4292,
4471
]
} | 9,190 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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 codehash;
b... | /**
* @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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
572,
1179
]
} | 9,191 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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,
'Addres... | /**
* @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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
2077,
2478
]
} | 9,192 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
3198,
3383
]
} | 9,193 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
3596,
3809
]
} | 9,194 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
4157,
4452
]
} | 9,195 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 return false for t... | 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, errorMe... | /**
* @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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
4691,
5046
]
} | 9,196 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 = _msgSender... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
479,
555
]
} | 9,197 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 = _msgSender... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1081,
1222
]
} | 9,198 | ||
JesusShiba | JesusShiba.sol | 0x5207370659826dd46c86dfcf185fa4d91796ddbf | 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 = _msgSender... | 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 | GNU GPLv2 | ipfs://0ac438c5aa3fef8a5306697f921f889e9251124034e378e5a6005bd3290d3254 | {
"func_code_index": [
1364,
1597
]
} | 9,199 | ||
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | Ownable | contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSende... | /**
* @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 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
496,
580
]
} | 9,200 |
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | Ownable | contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSende... | /**
* @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 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
1138,
1291
]
} | 9,201 |
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | Ownable | contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSende... | /**
* @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 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
1441,
1690
]
} | 9,202 |
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | CropsToken | contract CropsToken is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
event LogBurn(uint256 decayrate, uint256 totalSupply);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed sp... | _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 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
8141,
8238
]
} | 9,203 | ||
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | MasterChef | contract MasterChef 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.
uint256 otherRewar... | // MasterChef is the master of Crops. He can make Crops and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CROPS is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | add | function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
require(poolIsAdded[address(_lpToken)] == false, 'add: pool already added');
poolIsAdded[address(_lpToken)] = true;
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > s... | // Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
4237,
5002
]
} | 9,204 |
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | MasterChef | contract MasterChef 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.
uint256 otherRewar... | // MasterChef is the master of Crops. He can make Crops and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CROPS is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | addWithRestaking | function addWithRestaking(uint256 _allocPoint, bool _withUpdate, IStakingAdapter _adapter) public onlyOwner validAdapter(_adapter) {
IERC20 _lpToken = IERC20(_adapter.lpTokenAddress());
require(poolIsAdded[address(_lpToken)] == false, 'add: pool already added');
poolIsAdded[address(_lpToken)] = true;
... | // Add a new lp to the pool that uses restaking. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
5092,
5996
]
} | 9,205 |
MasterChef | @openzeppelin/contracts/access/Ownable.sol | 0x9cd44f132d3ce92c9a4cbfc34581e11f1424fd26 | Solidity | MasterChef | contract MasterChef 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.
uint256 otherRewar... | // MasterChef is the master of Crops. He can make Crops and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once CROPS is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun read... | LineComment | set | function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
poolInfo[_pid].allocPoint = _allocPoint;
}
| // Update the given pool's CROPS allocation point. Can only be called by the owner. | LineComment | v0.6.12+commit.27d51765 | None | ipfs://171f8ea33a77e533f4374f06d45af1917148d695e1f57cab9dd96fb435508be8 | {
"func_code_index": [
6088,
6397
]
} | 9,206 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.