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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/CosmosBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | CosmosBank | contract CosmosBank is CosmosBankStorage, ToLower {
using SafeMath for uint256;
/*
* @dev: Event declarations
*/
event LogNewBridgeToken(address _token, string _symbol);
event LogBridgeTokenMint(
address _token,
string _symbol,
uint256 _amount,
address _benefi... | /**
* @title CosmosBank
* @dev Manages the deployment and minting of ERC20 compatible BridgeTokens
* which represent assets based on the Cosmos blockchain.
**/ | NatSpecMultiLine | mintNewBridgeTokens | function mintNewBridgeTokens(
address payable _intendedRecipient,
address _bridgeTokenAddress,
string memory _symbol,
uint256 _amount
) internal {
require(
controlledBridgeTokens[_symbol] == _bridgeTokenAddress,
"Token must be a controlled bridge token"
);
// Mint bridge tok... | /*
* @dev: Mints new cosmos tokens
*
* @param _cosmosSender: The sender's Cosmos address in bytes.
* @param _ethereumRecipient: The intended recipient's Ethereum address.
* @param _cosmosTokenAddress: The currency type
* @param _symbol: comsos token symbol
* @param _amount: number of comsos tokens to be minted
... | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
2950,
3635
]
} | 17,900 | ||
CNSRegistryForwarder | contracts/metatx/CNSRegistryForwarder.sol | 0x97b0e89fc1b7ed4a8b237d9d8fcce9b234f25a37 | Solidity | CNSRegistryForwarder | contract CNSRegistryForwarder is BaseRoutingForwarder {
IForwarder private _target;
constructor(IForwarder target) {
_target = target;
_addRoute('transferFrom(address,address,uint256)', 'transferFromFor(address,address,uint256,bytes)');
_addRoute('safeTransferFrom(address,address,uint25... | /**
* @title CNSRegistryForwarder
* @dev CNSRegistryForwarder simplifies operation with legacy meta-transactions.
* It works on top of existing SignatureController contract.
*/ | NatSpecMultiLine | _buildRouteData | function _buildRouteData(
bytes4 selector,
bytes memory data,
bytes memory signature
) internal pure override returns (bytes memory) {
if(selector == 0xef2c3088) {
(address p1, address p2, uint256 p3) = abi.decode(data, (address, address, uint256));
return abi.encodeWithSelector(selector... | /**
* 0xef2c3088 = bytes4(keccak256('transferFromFor(address,address,uint256,bytes)'))
* 0x6debcb8d = bytes4(keccak256('safeTransferFromFor(address,address,uint256,bytes)'))
* 0x280d9b05 = bytes4(keccak256('safeTransferFromFor(address,address,uint256,bytes,bytes)'))
* 0x61603dd9 = bytes4(keccak256('burnFor(uint256,... | NatSpecMultiLine | v0.8.0+commit.c7dfd78e | {
"func_code_index": [
3336,
6240
]
} | 17,901 | ||
IntegralOracle | IntegralOracle.sol | 0x3661a53b76b3ac0eb0bc454b87df434762f045e0 | Solidity | IntegralOracle | contract IntegralOracle is IIntegralOracle {
using FixedSafeMath for int256;
using SafeMath for int256;
using SafeMath for uint256;
using Normalizer for uint256;
address public override owner;
address public uniswapPair;
int256 public override price;
uint32 public override epoch;
... | tradeX | function tradeX(
uint256 xAfter,
uint256 xBefore,
uint256 yBefore
) public view override returns (uint256 yAfter) {
int256 xAfterInt = normalizeAmount(xDecimals, xAfter);
int256 xBeforeInt = normalizeAmount(xDecimals, xBefore);
int256 yBeforeInt = normalizeAmount(yDecimals, yBefore);
// We d... | // TRADE | LineComment | v0.7.5+commit.eb77ed08 | None | {
"func_code_index": [
4723,
5354
]
} | 17,902 | |||
IntegralOracle | IntegralOracle.sol | 0x3661a53b76b3ac0eb0bc454b87df434762f045e0 | Solidity | IntegralOracle | contract IntegralOracle is IIntegralOracle {
using FixedSafeMath for int256;
using SafeMath for int256;
using SafeMath for uint256;
using Normalizer for uint256;
address public override owner;
address public uniswapPair;
int256 public override price;
uint32 public override epoch;
... | integral | function integral(int256 q) private view returns (int256) {
// we are integrating over a curve that represents the order book
if (q > 0) {
// integrate over bid orders, our trade can be a bid or an ask
return integralBid(q);
} else if (q < 0) {
// integrate over ask orders, our trade... | // INTEGRALS | LineComment | v0.7.5+commit.eb77ed08 | None | {
"func_code_index": [
6015,
6476
]
} | 17,903 | |||
IntegralOracle | IntegralOracle.sol | 0x3661a53b76b3ac0eb0bc454b87df434762f045e0 | Solidity | IntegralOracle | contract IntegralOracle is IIntegralOracle {
using FixedSafeMath for int256;
using SafeMath for int256;
using SafeMath for uint256;
using Normalizer for uint256;
address public override owner;
address public uniswapPair;
int256 public override price;
uint32 public override epoch;
... | getSpotPrice | function getSpotPrice(uint256 xCurrent, uint256 xBefore) public view override returns (uint256 spotPrice) {
int256 xCurrentInt = normalizeAmount(xDecimals, xCurrent);
int256 xBeforeInt = normalizeAmount(xDecimals, xBefore);
int256 spotPriceInt = derivative(xCurrentInt.sub(xBeforeInt));
require(spotPrice... | // SPOT PRICE | LineComment | v0.7.5+commit.eb77ed08 | None | {
"func_code_index": [
12103,
12523
]
} | 17,904 | |||
IntegralOracle | IntegralOracle.sol | 0x3661a53b76b3ac0eb0bc454b87df434762f045e0 | Solidity | IntegralOracle | contract IntegralOracle is IIntegralOracle {
using FixedSafeMath for int256;
using SafeMath for int256;
using SafeMath for uint256;
using Normalizer for uint256;
address public override owner;
address public uniswapPair;
int256 public override price;
uint32 public override epoch;
... | derivative | function derivative(int256 t) public view returns (int256) {
if (t > 0) {
return derivativeBid(t);
} else if (t < 0) {
return derivativeAsk(t);
} else {
return price;
}
}
| // DERIVATIVES | LineComment | v0.7.5+commit.eb77ed08 | None | {
"func_code_index": [
12545,
12791
]
} | 17,905 | |||
Spellsword | Spellsword.sol | 0xacc5193408f99bb4a8991e0ea6adee15d7035c56 | Solidity | Context | contract Context {
constructor() internal {}
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns(address payable) {
return msg.sender;
}
} | _msgSender | function _msgSender() internal view returns(address payable) {
return msg.sender;
}
| // solhint-disable-previous-line no-empty-blocks | LineComment | v0.5.17+commit.d19bba13 | MIT | bzzr://3f2cc9586c4185a3515fed3f580b47825189f8e3e487bcb5a3d391e0312900d1 | {
"func_code_index": [
105,
207
]
} | 17,906 | ||
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
94,
154
]
} | 17,907 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
237,
310
]
} | 17,908 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
534,
616
]
} | 17,909 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
895,
983
]
} | 17,910 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
1647,
1726
]
} | 17,911 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IERC20 | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**... | /**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
2039,
2175
]
} | 17,912 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
259,
445
]
} | 17,913 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
723,
864
]
} | 17,914 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | sub | function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
1162,
1393
]
} | 17,915 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
1647,
2123
]
} | 17,916 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
2594,
2731
]
} | 17,917 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | div | function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
3222,
3539
]
} | 17,918 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
3999,
4134
]
} | 17,919 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming la... | NatSpecMultiLine | mod | function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
4614,
4819
]
} | 17,920 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
606,
1055
]
} | 17,921 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: ... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
1985,
2385
]
} | 17,922 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
3141,
3321
]
} | 17,923 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
3546,
3781
]
} | 17,924 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
4151,
4416
]
} | 17,925 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessa... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
4667,
5031
]
} | 17,926 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function ... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | safeApprove | function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
824,
1462
]
} | 17,927 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function ... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target ad... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
2549,
3328
]
} | 17,928 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IStaking | interface IStaking {
function getEpochId(uint256 timestamp) external view returns (uint256); // get epoch id
function getEpochUserBalance(
address user,
address token,
uint128 epoch
) external view returns (uint256);
function getEpochPoolSize(address token, uint128 epo... | getEpochUserBalance | function getEpochUserBalance(
address user,
address token,
uint128 epoch
) external view returns (uint256);
| // get epoch id | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
117,
261
]
} | 17,929 | ||
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | ICompositeVault | interface ICompositeVault {
function cap() external view returns (uint256);
function getConverter() external view returns (address);
function getVaultMaster() external view returns (address);
function balance() external view returns (uint256);
function tvl() external view returns (uint2... | token | function token() external view returns (address);
| // total dollar value | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
350,
404
]
} | 17,930 | ||
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | ICompositeVault | interface ICompositeVault {
function cap() external view returns (uint256);
function getConverter() external view returns (address);
function getVaultMaster() external view returns (address);
function balance() external view returns (uint256);
function tvl() external view returns (uint2... | deposit | function deposit(
address _input,
uint256 _amount,
uint256 _min_mint_amount
) external returns (uint256);
| // average dollar value of vault share token | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
1398,
1540
]
} | 17,931 | ||
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | IController | interface IController {
function vault() external view returns (address);
function strategyLength() external view returns (uint256);
function strategyBalance() external view returns (uint256);
function getStrategyCount() external view returns (uint256);
function strategies(uint256 _stra... | investDisabled | function investDisabled() external view returns (bool);
| // eg. 3CRV => pJar: 0.5% (50/10000) | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
792,
852
]
} | 17,932 | ||
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IUniswapV2Router public unirouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public valueLiquidEthValuePool = address(0xbd63d492bbb13d081D680CE1f295... | /*
A strategy must implement the following calls;
- deposit()
- withdraw(address) must exclude any tokens used in the yield - Controller role - withdraw should return to Controller
- withdraw(uint) - Controller | Vault role - withdraw should always return to vault
- withdrawAll() - Controller | Vault ro... | Comment | withdraw | function withdraw(uint256 _amount) external onlyAuthorized returns (uint256) {
uint256 _balance = IERC20(lpPair).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
IERC20(lpPair).safeTransfer(addr... | // Withdraw partial funds, normally used with a vault withdrawal | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
5775,
6177
]
} | 17,933 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IUniswapV2Router public unirouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public valueLiquidEthValuePool = address(0xbd63d492bbb13d081D680CE1f295... | /*
A strategy must implement the following calls;
- deposit()
- withdraw(address) must exclude any tokens used in the yield - Controller role - withdraw should return to Controller
- withdraw(uint) - Controller | Vault role - withdraw should always return to vault
- withdrawAll() - Controller | Vault ro... | Comment | withdrawAll | function withdrawAll() external onlyAuthorized returns (uint256 balance) {
_withdrawAll();
balance = IERC20(lpPair).balanceOf(address(this));
IERC20(lpPair).safeTransfer(address(vault), balance);
}
| // Withdraw all funds, normally used when migrating strategies | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
6248,
6482
]
} | 17,934 |
StrategyBarnBridgeUsdc | StrategyBarnBridgeUsdc.sol | 0xb6bf3eba4ab600090235f4bee5894ae17b255e1b | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IUniswapV2Router public unirouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public valueLiquidEthValuePool = address(0xbd63d492bbb13d081D680CE1f295... | /*
A strategy must implement the following calls;
- deposit()
- withdraw(address) must exclude any tokens used in the yield - Controller role - withdraw should return to Controller
- withdraw(uint) - Controller | Vault role - withdraw should always return to vault
- withdrawAll() - Controller | Vault ro... | Comment | executeTransaction | function executeTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data
) public returns (bytes memory) {
require(msg.sender == timelock, "!timelock");
bytes memory callData;
if (bytes(signature).length == 0) {
callData = data;
} else ... | /**
* @dev This is from Timelock contract.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://15c11efe0d9a16ce49af746d681b9775613b57645382077076a9b222c3f6ea84 | {
"func_code_index": [
12122,
12960
]
} | 17,935 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
937,
1056
]
} | 17,936 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
1278,
1403
]
} | 17,937 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
1749,
2021
]
} | 17,938 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
2533,
2746
]
} | 17,939 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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 transfe... | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
3285,
3633
]
} | 17,940 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
3916,
4068
]
} | 17,941 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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 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.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
4431,
4753
]
} | 17,942 |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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 () public payable {
revert();
}
| // ------------------------------------------------------------------------
// Don't accept ETH
// ------------------------------------------------------------------------ | LineComment | v0.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
4945,
5004
]
} | 17,943 | |
RBTCToken | RBTCToken.sol | 0x8c0c55585953316d2a9e72dea3c4fc169b1f9a84 | Solidity | RBTCToken | contract RBTCToken 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.4.26+commit.4563c3fc | None | bzzr://09cc1171a0fdd1d0f39dc90b0e831f336b559d62ddbcab5ff1535f59106879f3 | {
"func_code_index": [
5237,
5426
]
} | 17,944 |
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | initialize | function initialize(
address _operatorAddress,
address _cosmosBridgeAddress,
address _owner,
address _pauser
) public {
require(!_initialized, "Init");
EthereumWhiteList.initialize();
CosmosWhiteList.initialize();
Pausable.initialize(_pauser);
operator = _operatorAddress;
cosmo... | /*
* @dev: Initializer, sets operator
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
250,
851
]
} | 17,945 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | verifySifPrefix | function verifySifPrefix(bytes memory _sifAddress) public pure returns (bool) {
bytes3 sifInHex = 0x736966;
for (uint256 i = 0; i < sifInHex.length; i++) {
if (sifInHex[i] != _sifAddress[i]) {
return false;
}
}
return true;
}
| /*
* @dev: function to validate if a sif address has a correct prefix
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
2112,
2418
]
} | 17,946 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | createNewBridgeToken | function createNewBridgeToken(string memory _symbol)
public
onlyCosmosBridge
returns (address)
{
address newTokenAddress = deployNewBridgeToken(_symbol);
setTokenInCosmosWhiteList(newTokenAddress, true);
return newTokenAddress;
}
| /*
* @dev: Creates a new BridgeToken
*
* @param _symbol: The new BridgeToken's symbol
* @return: The new BridgeToken contract's address
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
2588,
2878
]
} | 17,947 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | addExistingBridgeToken | function addExistingBridgeToken(
address _contractAddress
) public onlyOwner returns (address) {
setTokenInCosmosWhiteList(_contractAddress, true);
return useExistingBridgeToken(_contractAddress);
}
| /*
* @dev: Creates a new BridgeToken
*
* @param _symbol: The new BridgeToken's symbol
* @return: The new BridgeToken contract's address
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
3048,
3283
]
} | 17,948 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | updateEthWhiteList | function updateEthWhiteList(address _token, bool _inList)
public
onlyOperator
returns (bool)
{
string memory symbol = BridgeToken(_token).symbol();
address listAddress = lockedTokenList[symbol];
// Do not allow a token with the same symbol to be whitelisted
if (_inList) {
//... | /*
* @dev: Set the token address in whitelist
*
* @param _token: ERC 20's address
* @param _inList: set the _token in list or not
* @return: new value of if _token in whitelist
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
3499,
4430
]
} | 17,949 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | _updateTokenLimits | function _updateTokenLimits(address _token, uint256 _amount) private {
string memory symbol = _token == address(0) ? "eth" : BridgeToken(_token).symbol();
maxTokenAmount[symbol] = _amount;
}
| // Method that is only for doing the setting of the mapping
// private so that it is not inheritable or able to be called
// by anyone other than this contract | LineComment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
4604,
4818
]
} | 17,950 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | mintBridgeTokens | function mintBridgeTokens(
address payable _intendedRecipient,
address _bridgeTokenAddress,
string memory _symbol,
uint256 _amount
) public onlyCosmosBridge whenNotPaused {
return
mintNewBridgeTokens(
_intendedRecipient,
_bridgeTokenAddress,
_symbol,
... | /*
* @dev: Mints new BankTokens
*
* @param _cosmosSender: The sender's Cosmos address in bytes.
* @param _ethereumRecipient: The intended recipient's Ethereum address.
* @param _cosmosTokenAddress: The currency type
* @param _symbol: comsos token symbol
* @param _amount: number of comsos tokens to be minted
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
6013,
6416
]
} | 17,951 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | burn | function burn(
bytes memory _recipient,
address _token,
uint256 _amount
) public validSifAddress(_recipient) onlyCosmosTokenWhiteList(_token) whenNotPaused {
string memory symbol = BridgeToken(_token).symbol();
if (_amount > maxTokenAmount[symbol]) {
revert("Amount being transferred is over... | /*
* @dev: Burns BridgeTokens representing native Cosmos assets.
*
* @param _recipient: bytes representation of destination address.
* @param _token: token address in origin chain (0x0 if ethereum)
* @param _amount: value of deposit
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
6688,
7212
]
} | 17,952 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | lock | function lock(
bytes memory _recipient,
address _token,
uint256 _amount
) public payable onlyEthTokenWhiteList(_token) validSifAddress(_recipient) whenNotPaused {
string memory symbol;
// Ethereum deposit
if (msg.value > 0) {
require(
_token == address(0),
"!addr... | /*
* @dev: Locks received Ethereum/ERC20 funds.
*
* @param _recipient: bytes representation of destination address.
* @param _token: token address in origin chain (0x0 if ethereum)
* @param _amount: value of deposit
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
7467,
8497
]
} | 17,953 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | unlock | function unlock(
address payable _recipient,
string memory _symbol,
uint256 _amount
) public onlyCosmosBridge whenNotPaused {
// Confirm that the bank has sufficient locked balances of this token type
require(
getLockedFunds(_symbol) >= _amount,
"!Bank funds"
);
// Confirm t... | /*
* @dev: Unlocks Ethereum and ERC20 tokens held on the contract.
*
* @param _recipient: recipient's Ethereum address
* @param _token: token contract address
* @param _symbol: token symbol
* @param _amount: wei amount or ERC20 token count
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
8781,
9735
]
} | 17,954 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/BridgeBank/BridgeBank.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | BridgeBank | contract BridgeBank is BankStorage,
CosmosBank,
EthereumBank,
EthereumWhiteList,
CosmosWhiteList,
Pausable {
bool private _initialized;
using SafeMath for uint256;
/*
* @dev: Initializer, sets operator
*/
function initialize(
address _operatorAddress,
add... | /*
* @title BridgeBank
* @dev Bank contract which coordinates asset-related functionality.
* CosmosBank manages the minting and burning of tokens which
* represent Cosmos based assets, while EthereumBank manages
* the locking and unlocking of Ethereum and ERC20 token assets
* based on Ethereum... | Comment | tokenFallback | function tokenFallback(address _from, uint _value, bytes memory _data) public {}
| /*
* @dev fallback function for ERC223 tokens so that we can receive these tokens in our contract
* Don't need to do anything to handle these tokens
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
9905,
9989
]
} | 17,955 | ||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/Oracle.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | Oracle | contract Oracle is OracleStorage, Valset {
using SafeMath for uint256;
bool private _initialized;
/*
* @dev: Event declarations
*/
event LogNewOracleClaim(
uint256 _prophecyID,
address _validatorAddress
);
event LogProphecyProcessed(
uint256 _prophecyID,
... | _initialize | function _initialize(
address _operator,
uint256 _consensusThreshold,
address[] memory _initValidators,
uint256[] memory _initPowers
) internal {
require(!_initialized, "Initialized");
require(
_consensusThreshold > 0,
"Consensus threshold must be positive."
);
require(
... | /*
* @dev: Initialize Function
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
666,
1311
]
} | 17,956 | ||||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/Oracle.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | Oracle | contract Oracle is OracleStorage, Valset {
using SafeMath for uint256;
bool private _initialized;
/*
* @dev: Event declarations
*/
event LogNewOracleClaim(
uint256 _prophecyID,
address _validatorAddress
);
event LogProphecyProcessed(
uint256 _prophecyID,
... | newOracleClaim | function newOracleClaim(
uint256 _prophecyID,
address validatorAddress
) internal
returns (bool)
{
// Confirm that this address has not already made an oracle claim on this prophecy
require(
!hasMadeClaim[_prophecyID][validatorAddress],
"Cannot make duplicate oracle claims from the s... | /*
* @dev: newOracleClaim
* Allows validators to make new OracleClaims on an existing Prophecy
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
1436,
2321
]
} | 17,957 | ||||
BridgeBank | /private/tmp/sifnode/smart-contracts/contracts/Oracle.sol | 0xeca46baed9fbe8543b5963571aa93762343b7f9f | Solidity | Oracle | contract Oracle is OracleStorage, Valset {
using SafeMath for uint256;
bool private _initialized;
/*
* @dev: Event declarations
*/
event LogNewOracleClaim(
uint256 _prophecyID,
address _validatorAddress
);
event LogProphecyProcessed(
uint256 _prophecyID,
... | getProphecyThreshold | function getProphecyThreshold(uint256 _prophecyID)
public
view
returns (bool, uint256, uint256)
{
uint256 signedPower = 0;
uint256 totalPower = totalPower;
signedPower = oracleClaimValidators[_prophecyID];
// Prophecy must reach total signed power % threshold in order to pass consensus
... | /*
* @dev: processProphecy
* Calculates the status of a prophecy. The claim is considered valid if the
* combined active signatory validator powers pass the consensus threshold.
* The threshold is x% of Total power, where x is the consensusThreshold param.
*/ | Comment | v0.5.16+commit.9c3226ce | {
"func_code_index": [
2630,
3460
]
} | 17,958 | ||||
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | CarlosMatos | function CarlosMatos()
public
{
// add administrators here
administrators[0x235910f4682cfe7250004430a4ffb5ac78f5217e1f6a4bf99c937edf757c3330] = true;
// add the ambassadors here.
// One lonely developer
ambassadors_[0x6405C296d5728de46517609B78DA3713097163dB] = true;
... | /*
* -- APPLICATION ENTRY POINTS --
*/ | Comment | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
4992,
5617
]
} | 17,959 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | buy | function buy(address _referredBy)
public
payable
returns(uint256)
{
purchaseTokens(msg.value, _referredBy);
}
| /**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any)
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
5757,
5917
]
} | 17,960 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | function()
payable
public
{
purchaseTokens(msg.value, 0x0);
}
| /**
* Fallback function to handle ethereum that was send straight to the contract
* Unfortunately we cannot use a referral address this way.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
6091,
6194
]
} | 17,961 | ||
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | reinvest | function reinvest()
onlyStronghands()
public
{
// fetch dividends
uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code
// pay out the dividends virtually
address _customerAddress = msg.sender;
payoutsTo_[_customerAddress] += (int256) (_dividend... | /**
* Converts all of caller's dividends to tokens.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
6273,
7045
]
} | 17,962 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | exit | function exit()
public
{
// get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if(_tokens > 0) sell(_tokens);
// lambo delivery service
withdraw();
}
| /**
* Alias of sell() and withdraw().
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
7110,
7435
]
} | 17,963 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | withdraw | function withdraw()
onlyStronghands()
public
{
// setup data
address _customerAddress = msg.sender;
uint256 _dividends = myDividends(false); // get ref. bonus later in the code
// update dividend tracker
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
... | /**
* Withdraws all of the callers earnings.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
7503,
8186
]
} | 17,964 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | sell | function sell(uint256 _amountOfTokens)
onlyBagholders()
public
{
// setup data
address _customerAddress = msg.sender;
// russian hackers BTFO
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereu... | /**
* Liquifies tokens to ethereum.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
8249,
9554
]
} | 17,965 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | transfer | function transfer(address _toAddress, uint256 _amountOfTokens)
onlyBagholders()
public
returns(bool)
{
// setup
address _customerAddress = msg.sender;
// make sure we have the requested tokens
// also disables transfers until ambassador phase is over
// ( we dont want ... | /**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
9692,
11479
]
} | 17,966 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | disableInitialStage | function disableInitialStage()
onlyAdministrator()
public
{
onlyAmbassadors = false;
}
| /**
* In case the amassador quota is not met, the administrator can manually disable the ambassador phase.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
11675,
11803
]
} | 17,967 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | setAdministrator | function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
administrators[_identifier] = _status;
}
| /**
* In case one of us dies, we need to replace ourselves.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
11890,
12062
]
} | 17,968 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | setStakingRequirement | function setStakingRequirement(uint256 _amountOfTokens)
onlyAdministrator()
public
{
stakingRequirement = _amountOfTokens;
}
| /**
* Precautionary measures in case we need to adjust the masternode rate.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
12165,
12331
]
} | 17,969 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | setName | function setName(string _name)
onlyAdministrator()
public
{
name = _name;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
12395,
12512
]
} | 17,970 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | setSymbol | function setSymbol(string _symbol)
onlyAdministrator()
public
{
symbol = _symbol;
}
| /**
* If we want to rebrand, we can.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
12576,
12701
]
} | 17,971 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | totalEthereumBalance | function totalEthereumBalance()
public
view
returns(uint)
{
return this.balance;
}
| /**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
12892,
13025
]
} | 17,972 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | totalSupply | function totalSupply()
public
view
returns(uint256)
{
return tokenSupply_;
}
| /**
* Retrieve the total token supply.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
13091,
13218
]
} | 17,973 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | myTokens | function myTokens()
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
| /**
* Retrieve the tokens owned by the caller.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
13292,
13479
]
} | 17,974 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | myDividends | function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
address _customerAddress = msg.sender;
return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ;
}
| /**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
13836,
14151
]
} | 17,975 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | balanceOf | function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
return tokenBalanceLedger_[_customerAddress];
}
| /**
* Retrieve the token balance of any single address.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
14234,
14408
]
} | 17,976 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | dividendsOf | function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
}
| /**
* Retrieve the dividend balance of any single address.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
14494,
14753
]
} | 17,977 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | sellPrice | function sellPrice()
public
view
returns(uint256)
{
// our calculation relies on the token supply, so we need supply. Doh.
if(tokenSupply_ == 0){
return tokenPriceInitial_ - tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256... | /**
* Return the buy price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
14830,
15378
]
} | 17,978 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | buyPrice | function buyPrice()
public
view
returns(uint256)
{
// our calculation relies on the token supply, so we need supply. Doh.
if(tokenSupply_ == 0){
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 ... | /**
* Return the sell price of 1 individual token.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
15456,
16003
]
} | 17,979 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | calculateTokensReceived | function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
uint256 _dividends = SafeMath.div(_ethereumToSpend, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);... | /**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
16119,
16522
]
} | 17,980 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | calculateEthereumReceived | function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
require(_tokensToSell <= tokenSupply_);
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(... | /**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
16639,
17058
]
} | 17,981 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | purchaseTokens | function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
antiEarlyWhale(_incomingEthereum)
internal
returns(uint256)
{
// data setup
address _customerAddress = msg.sender;
uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_);
uint256 _referralBon... | /*==========================================
= INTERNAL FUNCTIONS =
==========================================*/ | Comment | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
17221,
20670
]
} | 17,982 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | ethereumToTokens_ | function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
(
(
// underflow attempts BTFO
SafeMath.sub(
(sqrt
(
... | /**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
20961,
21942
]
} | 17,983 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | tokensToEthereum_ | function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _etherReceived =
(
// underflow attempts BTFO
SafeMath.sub(
(
(
... | /**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
22203,
22931
]
} | 17,984 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | Solidity | CarlosMatos | contract CarlosMatos {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// only people with profits
modifier onl... | /*
HEY HEY HEY
WASSA WASSA WASSA WASSA
BITCONECCCCCCCCCCCCCCCCCCCCCCCCCC
*/ | Comment | sqrt | function sqrt(uint x) internal pure returns (uint y) {
uint z = (x + 1) / 2;
y = x;
while (z < y) {
y = z;
z = (x / z + z) / 2;
}
}
| //This is where all your gas goes, sorry
//Not sorry, you probably only paid 1 gwei | LineComment | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
23038,
23241
]
} | 17,985 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | 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;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
95,
308
]
} | 17,986 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | 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;
}
/**
... | /**
* @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.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
398,
691
]
} | 17,987 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | 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;
}
/**
... | /**
* @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.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
812,
940
]
} | 17,988 | |
CarlosMatos | CarlosMatos.sol | 0x96f3e4086575e2b9d76ab5b1871a94b8b3a08d39 | 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;
}
/**
... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://ba35bb48d271693803ec6734e356c5f0149497463adc57f6b9fa639555715e5e | {
"func_code_index": [
1010,
1162
]
} | 17,989 | |
OwnedUpgradeabilityProxy | contracts/proxies/UpgradeabilityProxy.sol | 0x0177e992ed8561d31e856c38d2ff3a41d343030b | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev This event will be emitted every time the implementation gets upgraded
* @param implementation representing the address of the upgraded implementation
*/
event Upgraded(address indexed implementation);
// Storage position of the address ... | /**
* @title UpgradeabilityProxy
* @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded
*/ | NatSpecMultiLine | implementation | function implementation() public view override returns (address impl) {
bytes32 position = IMPLEMENTATION_POSITION;
assembly {
impl := sload(position)
}
}
| /**
* @dev Tells the address of the current implementation
* @return impl address of the current implementation
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5705643fff66e8be14966d6b85575a7874064134878cc4b385999f9f9cc22111 | {
"func_code_index": [
674,
878
]
} | 17,990 |
OwnedUpgradeabilityProxy | contracts/proxies/UpgradeabilityProxy.sol | 0x0177e992ed8561d31e856c38d2ff3a41d343030b | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev This event will be emitted every time the implementation gets upgraded
* @param implementation representing the address of the upgraded implementation
*/
event Upgraded(address indexed implementation);
// Storage position of the address ... | /**
* @title UpgradeabilityProxy
* @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded
*/ | NatSpecMultiLine | _setImplementation | function _setImplementation(address _newImplementation) internal {
bytes32 position = IMPLEMENTATION_POSITION;
assembly {
sstore(position, _newImplementation)
}
}
| /**
* @dev Sets the address of the current implementation
* @param _newImplementation address representing the new implementation to be set
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5705643fff66e8be14966d6b85575a7874064134878cc4b385999f9f9cc22111 | {
"func_code_index": [
1044,
1252
]
} | 17,991 |
OwnedUpgradeabilityProxy | contracts/proxies/UpgradeabilityProxy.sol | 0x0177e992ed8561d31e856c38d2ff3a41d343030b | Solidity | UpgradeabilityProxy | contract UpgradeabilityProxy is Proxy {
/**
* @dev This event will be emitted every time the implementation gets upgraded
* @param implementation representing the address of the upgraded implementation
*/
event Upgraded(address indexed implementation);
// Storage position of the address ... | /**
* @title UpgradeabilityProxy
* @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded
*/ | NatSpecMultiLine | _upgradeTo | function _upgradeTo(address _newImplementation) internal {
address currentImplementation = implementation();
require(currentImplementation != _newImplementation);
_setImplementation(_newImplementation);
emit Upgraded(_newImplementation);
}
| /**
* @dev Upgrades the implementation address
* @param _newImplementation representing the address of the new implementation to be set
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://5705643fff66e8be14966d6b85575a7874064134878cc4b385999f9f9cc22111 | {
"func_code_index": [
1414,
1699
]
} | 17,992 |
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | totalSupply | function totalSupply() constant returns (uint256 supply) {}
| /// @return total amount of tokens | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
61,
125
]
} | 17,993 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | balanceOf | function balanceOf(address _owner) constant returns (uint256 balance) {}
| /// @param _owner The address from which the balance will be retrieved
/// @return The balance | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
234,
311
]
} | 17,994 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | transfer | function transfer(address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
549,
626
]
} | 17,995 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
| /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
950,
1046
]
} | 17,996 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | approve | function approve(address _spender, uint256 _value) returns (bool success) {}
| /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
1331,
1412
]
} | 17,997 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Token | contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}
/... | allowance | function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
| /// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent | NatSpecSingleLine | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
1621,
1718
]
} | 17,998 | |||
Vdex | Vdex.sol | 0x759ae71caf10af4a26d2e418ef2fa374f08df89c | Solidity | Vdex | contract Vdex is StandardToken {
function () {
//if ether is sent to this address, send it back.
throw;
}
/* Public variables of the token */
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customi... | //name this contract whatever you'd like | LineComment | Vdex | function Vdex(
) {
balances[msg.sender] = 100000000000000; // Give the creator all initial tokens (100000 for example)
totalSupply = 100000000000000; // Update total supply (100000 for example)
name = "Vdex"; // Set the name for ... | //human 0.1 standard. Just an arbitrary versioning scheme.
//
// CHANGE THESE VALUES FOR YOUR TOKEN
//
//make sure this function name matches the contract name above. So if you're token is called TutorialToken, make sure the //contract name above is also TutorialToken instead of ERC20Token | LineComment | v0.4.9+commit.364da425 | bzzr://1d81b11149fc9654d56ae450013b63db4b240079601baf7cd6bd0e90ac6239b2 | {
"func_code_index": [
1159,
1711
]
} | 17,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.