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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Einstein | Einstein.sol | 0x35e921ab360e1500516b065f6802943122b9b8bc | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | None | ipfs://86fef7a34ca1ce6193266c91f8c259551c3d8cdb159e828587f0532538f2117a | {
"func_code_index": [
2109,
2352
]
} | 19,600 | ||
Einstein | Einstein.sol | 0x35e921ab360e1500516b065f6802943122b9b8bc | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the ... | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | None | ipfs://86fef7a34ca1ce6193266c91f8c259551c3d8cdb159e828587f0532538f2117a | {
"func_code_index": [
2431,
2753
]
} | 19,601 | ||
Einstein | Einstein.sol | 0x35e921ab360e1500516b065f6802943122b9b8bc | Solidity | Einstein | contract Einstein is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
... | // Contract implementation | LineComment | manualSwap | function manualSwap() external onlyOwner() {
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
| // We are exposing these functions to be able to manual swap and send
// in case the token is highly valued and 5M becomes too much | LineComment | v0.6.12+commit.27d51765 | None | ipfs://86fef7a34ca1ce6193266c91f8c259551c3d8cdb159e828587f0532538f2117a | {
"func_code_index": [
11671,
11848
]
} | 19,602 |
Einstein | Einstein.sol | 0x35e921ab360e1500516b065f6802943122b9b8bc | Solidity | Einstein | contract Einstein is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
... | // Contract implementation | LineComment | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | None | ipfs://86fef7a34ca1ce6193266c91f8c259551c3d8cdb159e828587f0532538f2117a | {
"func_code_index": [
16133,
16171
]
} | 19,603 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | transferOwnership | function transferOwnership(address _owner) external onlyOwner {
owner = _owner;
}
| /// @notice Transfer contract ownership
/// @param _owner The new owner address | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
951,
1048
]
} | 19,604 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | migrateSource | function migrateSource(address _pools, uint _poolId) external onlyOwner {
// Withdraw ALCX
bumpExchangeRate();
uint poolBalance = pools.getStakeTotalDeposited(address(this), poolId);
pools.withdraw(poolId, poolBalance);
// Update staking pool address and id
pools = IALCXSource(_pools);
pool... | /// @notice Set a new staking pool address and migrate funds there
/// @param _pools The new pool address
/// @param _poolId The new pool id | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1203,
1713
]
} | 19,605 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | reApprove | function reApprove() public {
bool success = alcx.approve(address(pools), type(uint).max);
}
| /// @notice Approve the staking pool to move funds in this address, can be called by anyone | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1811,
1919
]
} | 19,606 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | bumpExchangeRate | function bumpExchangeRate() public {
// Claim from pool
pools.claim(poolId);
// Bump exchange rate
uint balance = alcx.balanceOf(address(this));
if (balance > 0) {
exchangeRate += (balance * exchangeRatePrecision) / totalSupply;
emit ExchangeRateChange(exchangeRate);
// Rest... | /// @notice Claim and autocompound rewards | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
1993,
2412
]
} | 19,607 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | stake | function stake(uint amount) external {
// Get current exchange rate between ALCX and gALCX
bumpExchangeRate();
// Then receive new deposits
bool success = alcx.transferFrom(msg.sender, address(this), amount);
require(success, "Transfer failed");
pools.deposit(poolId, amount);
// gAmount alwa... | /// @notice Deposit new funds into the staking pool
/// @param amount The amount of ALCX to deposit | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
2522,
3047
]
} | 19,608 | ||
gALCX | contracts/gALCX.sol | 0x93dede06ae3b5590af1d4c111bc54c3f717e4b35 | Solidity | gALCX | contract gALCX is ERC20 {
IERC20 public alcx = IERC20(0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF);
IALCXSource public pools = IALCXSource(0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa);
uint public poolId = 1;
uint public constant exchangeRatePrecision = 1e18;
uint public exchangeRate = exchangeRatePr... | /// @title A wrapper for single-sided ALCX staking | NatSpecSingleLine | unstake | function unstake(uint gAmount) external {
bumpExchangeRate();
uint amount = gAmount * exchangeRate / exchangeRatePrecision;
_burn(msg.sender, gAmount);
// Withdraw ALCX and send to user
pools.withdraw(poolId, amount);
bool success = alcx.transfer(msg.sender, amount); // Should return true or rev... | /// @notice Withdraw funds from the staking pool
/// @param gAmount the amount of gALCX to withdraw | NatSpecSingleLine | v0.8.11+commit.d7f03943 | {
"func_code_index": [
3157,
3629
]
} | 19,609 | ||
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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;
assembly {
size := extcodesize(account)
... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
606,
998
]
} | 19,610 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
| /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
1928,
2250
]
} | 19,611 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
3007,
3187
]
} | 19,612 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
3412,
3646
]
} | 19,613 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
4016,
4281
]
} | 19,614 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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");... | /**
* @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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
4532,
5047
]
} | 19,615 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
5227,
5431
]
} | 19,616 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallRe... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
5618,
6018
]
} | 19,617 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
6200,
6405
]
} | 19,618 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallR... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
6594,
6995
]
} | 19,619 |
Square | @openzeppelin/contracts/utils/Address.sol | 0xdc3ce2445439cfd4a0aa9e522ecafeddefa1f6b3 | 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 | verifyCallResult | function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
... | /**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/ | NatSpecMultiLine | v0.8.7+commit.e28d00a7 | MIT | ipfs://3cde325b03c3f8ae5ff885a8f4a5f1c75238d3ea807ccd6b7b60ad282f6025a1 | {
"func_code_index": [
7218,
7935
]
} | 19,620 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Context | contract Context {
/* https://openfair.me */
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor() internal {}
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view retu... | /*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending ... | Comment | _msgSender | function _msgSender() internal view returns (address) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
279,
362
]
} | 19,621 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Ownable | contract Ownable is Context {
/* https://openfair.me */
address private _owner;
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = _msgSender();
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifi... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | isOwner | function isOwner() public view returns (bool) {
return _msgSender() == _owner;
}
| /**
* @dev Returns true if the caller is the current owner.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
480,
567
]
} | 19,622 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Ownable | contract Ownable is Context {
/* https://openfair.me */
address private _owner;
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
_owner = _msgSender();
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifi... | /**
* @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.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functi... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
705,
874
]
} | 19,623 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Roles | library Roles {
/* https://openfair.me */
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = tru... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | add | function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = true;
}
| /**
* @dev Give an account access to this role.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
162,
327
]
} | 19,624 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Roles | library Roles {
/* https://openfair.me */
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = tru... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | remove | function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account does not have role");
role.bearer[account] = false;
}
| /**
* @dev Remove an account's access to this role.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
393,
563
]
} | 19,625 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | Roles | library Roles {
/* https://openfair.me */
struct Role {
mapping(address => bool) bearer;
}
/**
* @dev Give an account access to this role.
*/
function add(Role storage role, address account) internal {
require(!has(role, account), "Roles: account already has role");
role.bearer[account] = tru... | /**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/ | NatSpecMultiLine | has | function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0), "Roles: account is the zero address");
return role.bearer[account];
}
| /**
* @dev Check if an account has this role.
* @return bool
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
641,
831
]
} | 19,626 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a *... | /**
* @dev Multiplies two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
113,
504
]
} | 19,627 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "div zero");
// Solidity only automatically asserts when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
613,
897
]
} | 19,628 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "lower sub bigger");
uint256 c = a - b;
return c;
}
| /**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
1009,
1160
]
} | 19,629 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "overflow");
return c;
}
| /**
* @dev Adds two numbers, reverts on overflow.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
1222,
1365
]
} | 19,630 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "mod zero");
return a % b;
}
| /**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
1496,
1619
]
} | 19,631 |
OpenFair | OpenFair.sol | 0x7ce3e015d83911ccb92aedc2e3ccf532b06fe75a | Solidity | SafeMath | library SafeMath {
/* https://openfair.me */
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
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... | /**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/ | NatSpecMultiLine | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? b : a;
}
| /**
* @dev compare two numbers and returns the smaller one.
*/ | NatSpecMultiLine | v0.5.0+commit.1d4f565a | None | bzzr://110909248871b4e50c43d2039a1ff47c855a133d761e0938877efce9e7d421e0 | {
"func_code_index": [
1691,
1790
]
} | 19,632 |
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | IToken | contract IToken {
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public retur... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
259,
339
]
} | 19,633 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | IToken | contract IToken {
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public retur... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
666,
765
]
} | 19,634 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | BiLinkExchange | contract BiLinkExchange is Ownable {
using SafeMath for uint256;
address public contractBalance;
uint256 public commissionRatio;//percentage
mapping (address => mapping ( bytes32 => uint256)) public account2Order2TradeAmount;
bool public isLegacy;//if true, not allow new trade,new deposi... | trade | function trade(address[] _arr1, uint256[] _arr2, uint8 _vMaker,uint8 _vTaker, bytes32[] _arr3) public {
require(isLegacy== false&& now <= _arr2[3]);
uint256 _amountTokenGiveTrade= _arr2[0].mul(_arr2[2]).div(_arr2[1]);
require(_arr2[2]<= IBalance(contractBalance).getAvailableBalance(_arr1[1], _arr1[2])&&... | //_arr1:tokenGive,tokenGet,maker,taker
//_arr2:amountGive,amountGet,amountGetTrade,expireTime
//_arr3:rMaker,sMaker,rTaker,sTaker
//parameters are from taker's perspective | LineComment | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
1065,
2810
]
} | 19,635 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
/**
* @de... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
99,
297
]
} | 19,636 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
/**
* @de... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
391,
587
]
} | 19,637 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
/**
* @de... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
712,
835
]
} | 19,638 | |||
BiLinkExchange | BiLinkExchange.sol | 0xa7945b42af7de9d96f8d763b5abd38cf0e07bef1 | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
/**
* @de... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | bzzr://f11504748939c7d9c870decf7b98da362e291b749560a9cfa0e4c2d025a1447c | {
"func_code_index": [
909,
1054
]
} | 19,639 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
89,
272
]
} | 19,640 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
356,
636
]
} | 19,641 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
750,
866
]
} | 19,642 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
930,
1066
]
} | 19,643 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PullPayment | contract PullPayment {
using SafeMath for uint256;
mapping(address => uint256) public payments;
uint256 public totalPayments;
/**
* @dev Withdraw accumulated balance, called by payee.
*/
function withdrawPayments() public {
address payee = msg.sender;
uint256 payment = payments[payee]... | /**
* @title PullPayment
* @dev Base contract supporting async send for pull payments. Inherit from this
* contract and use asyncSend instead of send or transfer.
*/ | NatSpecMultiLine | withdrawPayments | function withdrawPayments() public {
address payee = msg.sender;
uint256 payment = payments[payee];
require(payment != 0);
require(address(this).balance >= payment);
totalPayments = totalPayments.sub(payment);
payments[payee] = 0;
payee.transfer(payment);
}
| /**
* @dev Withdraw accumulated balance, called by payee.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
210,
514
]
} | 19,644 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PullPayment | contract PullPayment {
using SafeMath for uint256;
mapping(address => uint256) public payments;
uint256 public totalPayments;
/**
* @dev Withdraw accumulated balance, called by payee.
*/
function withdrawPayments() public {
address payee = msg.sender;
uint256 payment = payments[payee]... | /**
* @title PullPayment
* @dev Base contract supporting async send for pull payments. Inherit from this
* contract and use asyncSend instead of send or transfer.
*/ | NatSpecMultiLine | asyncSend | function asyncSend(address dest, uint256 amount) internal {
payments[dest] = payments[dest].add(amount);
totalPayments = totalPayments.add(amount);
}
| /**
* @dev Called by the payer to store the sent amount as credit to be pulled.
* @param dest The destination address of the funds.
* @param amount The amount to transfer.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
707,
872
]
} | 19,645 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PullPayment | contract PullPayment {
using SafeMath for uint256;
mapping(address => uint256) public payments;
uint256 public totalPayments;
/**
* @dev Withdraw accumulated balance, called by payee.
*/
function withdrawPayments() public {
address payee = msg.sender;
uint256 payment = payments[payee]... | /**
* @title PullPayment
* @dev Base contract supporting async send for pull payments. Inherit from this
* contract and use asyncSend instead of send or transfer.
*/ | NatSpecMultiLine | asyncDebit | function asyncDebit(address dest, uint256 amount) internal {
payments[dest] = payments[dest].sub(amount);
totalPayments = totalPayments.sub(amount);
}
| // Called by children of this contract to remove value from an account | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
949,
1115
]
} | 19,646 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | 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) public onlyOwner {
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.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
631,
812
]
} | 19,647 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleListLib | library SaleListLib {
address public constant nullAddress = address(0);
struct SaleList {
address head;
mapping(address => address) sellerListMapping;
mapping(address => uint) sellerToPrice;
}
function getBest(SaleList storage self) public view returns (address, uint) {
address hea... | /**
* Sorted list of sales for use in the marketplace. Sorting is maintained by linked list.
*/ | NatSpecMultiLine | _remove | function _remove(SaleList storage self, address seller) internal {
self.sellerToPrice[seller] = 0;
self.sellerListMapping[seller] = nullAddress;
}
| // NOTE: This is a purely internal method that *only* zeros out sellerListMapping and sellerToPrice | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
2457,
2619
]
} | 19,648 | |
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | getBestSale | function getBestSale(bytes32 sig) public view returns (address, uint256) {
return SaleListLib.getBest(_sigToSortedSales[sig]);
}
| // Returns (seller, price) tuple | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
834,
973
]
} | 19,649 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | getMySalePrice | function getMySalePrice(bytes32 sig) public view returns (uint256) {
return _addressToSigToSalePrice[msg.sender][sig];
}
| // Returns price that the sender is selling the current sig for (or 0 if not) | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
1057,
1188
]
} | 19,650 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | postGenesisSales | function postGenesisSales(bytes32 sig, uint256 price, uint256 numSales) internal onlyOwner {
SaleListLib.addSale(_sigToSortedSales[sig], owner, price);
_addressToSigToSalePrice[owner][sig] = price;
_ownerSigToNumSales[sig] = _ownerSigToNumSales[sig].add(numSales);
sigToNumSales[sig] = sigToNumSales[sig].a... | // Convenience method used *only* at genesis sale time | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
1308,
1700
]
} | 19,651 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | relistGenesisSales | function relistGenesisSales(bytes32 sig, uint256 newPrice) external onlyOwner {
SaleListLib.addSale(_sigToSortedSales[sig], owner, newPrice);
_addressToSigToSalePrice[owner][sig] = newPrice;
emit SalePosted(owner, sig, newPrice);
}
| // Admin method for re-listing all genesis sales | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
1755,
2009
]
} | 19,652 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | postSale | function postSale(address seller, bytes32 sig, uint256 price) internal {
SaleListLib.addSale(_sigToSortedSales[sig], seller, price);
_addressToSigToSalePrice[seller][sig] = price;
sigToNumSales[sig] = sigToNumSales[sig].add(1);
if (seller == owner) {
_ownerSigToNumSales[sig] = _ownerSigToNumSales[s... | // NOTE: Only allows 1 active sale per address per sig, unless owner | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
2084,
2484
]
} | 19,653 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | SaleRegistry | contract SaleRegistry is Ownable {
using SafeMath for uint256;
/////////
// Events
/////////
event SalePosted(
address indexed _seller,
bytes32 indexed _sig,
uint256 _price
);
event SaleCancelled(
address indexed _seller,
bytes32 indexed _sig
);
////////
//... | cancelSale | function cancelSale(address seller, bytes32 sig) internal {
if (seller == owner) {
_ownerSigToNumSales[sig] = _ownerSigToNumSales[sig].sub(1);
if (_ownerSigToNumSales[sig] == 0) {
SaleListLib.removeSale(_sigToSortedSales[sig], seller);
_addressToSigToSalePrice[seller][sig] = 0;
}
} ... | // NOTE: Special remove logic for contract owner's sale! | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
2547,
3108
]
} | 19,654 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | OwnerRegistry | contract OwnerRegistry {
using SafeMath for uint256;
/////////
// Events
/////////
event CardCreated(
bytes32 indexed _sig,
uint256 _numAdded
);
event CardsTransferred(
bytes32 indexed _sig,
address indexed _oldOwner,
address indexed _newOwner,
uint256 _count
... | addCardToRegistry | function addCardToRegistry(address owner, bytes32 sig, uint256 numToAdd) internal {
// Only allow adding cards that haven't already been added
require(_sigToCount[sig] == 0);
_allSigs.push(sig);
_ownerToSigToCount[owner][sig] = numToAdd;
_sigToCount[sig] = numToAdd;
emit CardCreated(sig, numToAdd)... | //////////////// | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
566,
907
]
} | 19,655 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | OwnerRegistry | contract OwnerRegistry {
using SafeMath for uint256;
/////////
// Events
/////////
event CardCreated(
bytes32 indexed _sig,
uint256 _numAdded
);
event CardsTransferred(
bytes32 indexed _sig,
address indexed _oldOwner,
address indexed _newOwner,
uint256 _count
... | getAllSigs | function getAllSigs() public view returns (bytes32[]) {
return _allSigs;
}
| ///////////// | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
963,
1048
]
} | 19,656 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | OwnerRegistry | contract OwnerRegistry {
using SafeMath for uint256;
/////////
// Events
/////////
event CardCreated(
bytes32 indexed _sig,
uint256 _numAdded
);
event CardsTransferred(
bytes32 indexed _sig,
address indexed _oldOwner,
address indexed _newOwner,
uint256 _count
... | registryTransfer | function registryTransfer(address oldOwner, address newOwner, bytes32 sig, uint256 count) internal {
// Must be transferring at least one card!
require(count > 0);
// Don't allow a transfer when the old owner doesn't enough of the card
require(_ownerToSigToCount[oldOwner][sig] >= count);
_ownerToSigT... | /////////////////// | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
1356,
1912
]
} | 19,657 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | addShareholderAddress | function addShareholderAddress(address newShareholder) external onlyOwner {
// Don't let shareholder be address(0)
require(newShareholder != address(0));
// Contract owner can't be a shareholder
require(newShareholder != owner);
// Must be an open shareholder spot!
require(shareholder1 == address(... | // Used to set initial shareholders | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
648,
1453
]
} | 19,658 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | payShareholders | function payShareholders(uint256 amount) internal {
// If no shareholders, shareholder fees will be held in contract to be withdrawable by owner
if (numShareholders > 0) {
uint256 perShareholderFee = amount.div(numShareholders);
if (shareholder1 != address(0)) {
asyncSend(shareholder1, perShare... | // Splits the amount specified among shareholders equally | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
1517,
2092
]
} | 19,659 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | withdrawContractBalance | function withdrawContractBalance() external onlyOwner {
uint256 contractBalance = address(this).balance;
uint256 withdrawableBalance = contractBalance.sub(totalPayments);
// No withdrawal necessary if <= 0 balance
require(withdrawableBalance > 0);
msg.sender.transfer(withdrawableBalance);
}
| //////////////// | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
2157,
2483
]
} | 19,660 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | createSale | function createSale(bytes32 sig, uint256 price) external {
// Can't sell a card for 0... May want other limits in the future
require(price > 0);
// Can't sell a card you don't own
require(getNumSigsOwned(sig) > 0);
// Can't post a sale if you have one posted already! Unless you're the contract owner
... | /////////////// | NatSpecSingleLine | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
2989,
3452
]
} | 19,661 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | paySellerFee | function paySellerFee(bytes32 sig, address seller, uint256 sellerProfit) private {
if (seller == owner) {
address artist = getArtist(sig);
uint256 artistFee = computeArtistGenesisSaleFee(sig, sellerProfit);
asyncSend(artist, artistFee);
payShareholders(sellerProfit.sub(artistFee));
} else {
... | // If card is held by contract owner, split among artist + shareholders | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
3853,
4239
]
} | 19,662 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | payTxFees | function payTxFees(bytes32 sig, uint256 txFee) private {
uint256 artistFee = computeArtistTxFee(sig, txFee);
address artist = getArtist(sig);
asyncSend(artist, artistFee);
payShareholders(txFee.sub(artistFee));
}
| // Simply pay out tx fees appropriately | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
4285,
4525
]
} | 19,663 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | buy | function buy(bytes32 sig) external payable {
address seller;
uint256 price;
(seller, price) = getBestSale(sig);
// There must be a valid sale for the card
require(price > 0 && seller != address(0));
// Buyer must have enough Eth via wallet and payment to cover posted price
uint256 availableEth ... | // Handle wallet debit if necessary, pay out fees, pay out seller profit, cancel sale, transfer card | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
4632,
5655
]
} | 19,664 | |||
PepeCore | PepeCore.sol | 0xe4bd56cbf537074e3836a1721983107cce9e689f | Solidity | PepeCore | contract PepeCore is PullPayment, OwnerRegistry, SaleRegistry, ArtistRegistry {
using SafeMath for uint256;
uint256 constant public totalTxFeePercent = 4;
////////////////////
// Shareholder stuff
////////////////////
// Only 3 equal shareholders max allowed on this contract representing the thr... | transferSig | function transferSig(bytes32 sig, uint256 count, address newOwner) external {
uint256 numOwned = getNumSigsOwned(sig);
// Can't transfer cards you don't own
require(numOwned >= count);
// If transferring from contract owner, cancel the proper number of sales if necessary
if (msg.sender == owner) {
... | // Can also be used in airdrops, etc. | LineComment | v0.4.23+commit.124ca40d | bzzr://72ada87abffdcf404de6f3759a226a3fd03354d3b1849d444573cbd4cb86c380 | {
"func_code_index": [
5699,
6608
]
} | 19,665 | |||
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
94,
154
]
} | 19,666 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
237,
310
]
} | 19,667 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
534,
616
]
} | 19,668 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
895,
983
]
} | 19,669 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1647,
1726
]
} | 19,670 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
2039,
2141
]
} | 19,671 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
259,
445
]
} | 19,672 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
723,
864
]
} | 19,673 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1162,
1359
]
} | 19,674 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1613,
2089
]
} | 19,675 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
2560,
2697
]
} | 19,676 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
3188,
3471
]
} | 19,677 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
3931,
4066
]
} | 19,678 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
4546,
4717
]
} | 19,679 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
606,
1230
]
} | 19,680 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
2160,
2562
]
} | 19,681 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
3318,
3496
]
} | 19,682 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
3721,
3922
]
} | 19,683 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
4292,
4523
]
} | 19,684 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
4774,
5095
]
} | 19,685 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
566,
650
]
} | 19,686 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1209,
1362
]
} | 19,687 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1512,
1761
]
} | 19,688 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
1929,
2148
]
} | 19,689 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @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 | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
2219,
2517
]
} | 19,690 |
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | ORGY | contract ORGY is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded... | // function withdrawTokens() public onlyOwner {
// uint256 amount = balanceOf(address(this));
// require(amount > 0, "Not enough tokens available to withdraw");
// _tokenTransfer(address(this),owner(),amount,false);
// }
// function withdrawWETH() public onlyOwner {
// IUniswapV2Pair token = IUniswapV2P... | LineComment | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
13837,
14676
]
} | 19,691 | ||
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | ORGY | contract ORGY is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool... | setSwapAndLiquifyEnabled | function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
| // function setMinTokensBeforeSwapPercent(uint256 _minTokensBeforeSwapPercent, uint256 _minTokensBeforeSwapDecimal) public onlyOwner{
// minTokensBeforeSwap = _tTotal.mul(_minTokensBeforeSwapPercent).div(
// 10**(uint256(_minTokensBeforeSwapDecimal) + 2)
// );
// emit MinTokensBeforeSwapUpdated(minT... | LineComment | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
23333,
23509
]
} | 19,692 | ||
ORGY | ORGY.sol | 0x184f3ab67bbdc99c50753b6efacef962f0a342fa | Solidity | ORGY | contract ORGY is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | GNU GPLv2 | ipfs://4dba173b0df75b61fb9a56e62ba03608f5170b5499e2064ab43b7f4a5161b4da | {
"func_code_index": [
23573,
23607
]
} | 19,693 | ||||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance);
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
638,
716
]
} | 19,694 | |||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
953,
1035
]
} | 19,695 | |||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
1358,
1459
]
} | 19,696 | |||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | approve | function approve(address _spender, uint256 _value) public returns (bool success);
| /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
1749,
1835
]
} | 19,697 | |||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | EIP20Interface | contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract sinc... | allowance | function allowance(address _owner, address _spender) public view returns (uint256 remaining);
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
2043,
2141
]
} | 19,698 | |||
BMUS | BMUS.sol | 0x0bb5eac8854eb42908f601e037cc9e711b174b2e | Solidity | BMUS | contract BMUS is EIP20Interface {
uint256 constant private MAX_UINT256 = 2**256 - 1;
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
... | BMUS | function BMUS(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
balances[msg.sender] = _initialAmount; // Give the creator all initial tokens
totalSupply = _initialAmount; // Update total supply
name =... | //An identifier: eg SBX | LineComment | v0.4.18+commit.9cf6e910 | bzzr://388b652f93162ada9a1e5e88ce1835e9dce5e1b243d45b39e3d8859576f7ec8b | {
"func_code_index": [
721,
1374
]
} | 19,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.