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
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
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.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 879, 967 ] }
3,700
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
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.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1618, 1697 ] }
3,701
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
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.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 2002, 2104 ] }
3,702
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 157, 384 ] }
3,703
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 528, 727 ] }
3,704
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // 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 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 873, 1381 ] }
3,705
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1528, 1728 ] }
3,706
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1885, 2085 ] }
3,707
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 2318, 2421 ] }
3,708
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 (consu...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 3193, 3296 ] }
3,709
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 3758, 3969 ] }
3,710
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invali...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 4674, 4884 ] }
3,711
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) retu...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 5528, 5738 ] }
3,712
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
isContract
function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly ...
/** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 590, 1017 ] }
3,713
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @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.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1932, 2334 ] }
3,714
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); }
/** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw ...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 3073, 3251 ] }
3,715
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCall
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 3471, 3671 ] }
3,716
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ *...
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 4031, 4262 ] }
3,717
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionCallWithValue
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disa...
/** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 4508, 5043 ] }
3,718
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 5218, 5422 ] }
3,719
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionStaticCall
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.stat...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 5604, 6031 ] }
3,720
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); }
/** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 6208, 6413 ] }
3,721
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Address
library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return f...
/** * @dev Collection of functions related to the address type */
NatSpecMultiLine
functionDelegateCall
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.deleg...
/** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 6597, 7025 ] }
3,722
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 450, 542 ] }
3,723
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1093, 1246 ] }
3,724
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { _owner = _msgSender(); ...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 1393, 1642 ] }
3,725
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SushiInu
contract SushiInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "SUSHI INU"; string private _symbol = "SUSHIINU"; uint256 private _tTotal = 1000 * 10**9 * 10**uint256(_decimals); ...
//to recieve ETH
LineComment
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 7002, 7036 ] }
3,726
SushiInu
SushiInu.sol
0x54c137667c11c26d13c7bbb7fbfa8b7c50f181a4
Solidity
SushiInu
contract SushiInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint8 private _decimals = 9; // string private _name = "SUSHI INU"; string private _symbol = "SUSHIINU"; uint256 private _tTotal = 1000 * 10**9 * 10**uint256(_decimals); ...
_tokenTransfer
function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipie...
//this method is responsible for taking all fee, if takeFee is true
LineComment
v0.8.3+commit.8d00100c
None
ipfs://9d6f7d9809392a583e6bc787f803f32f149d7cd1d80334dea0efc8fd2dbbc03b
{ "func_code_index": [ 13544, 14367 ] }
3,727
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
AddressUtils
library AddressUtils { /** * Returns whether there is code in the target address * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address address to check * @return ...
/** * Utility library of inline functions on addresses */
NatSpecMultiLine
isContract
function isContract(address addr) internal view returns(bool) { uint256 size; assembly { size: = extcodesize(addr) } return size > 0; }
/** * Returns whether there is code in the target address * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address address to check * @return whether there is code in the target ad...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 372, 540 ] }
3,728
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two num...
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.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 91, 273 ] }
3,729
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two num...
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.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 359, 631 ] }
3,730
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two num...
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.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 748, 863 ] }
3,731
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two num...
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.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 929, 1064 ] }
3,732
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); }
/** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 815, 932 ] }
3,733
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1097, 1205 ] }
3,734
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Ownable
contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * a...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; }
/** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1343, 1521 ] }
3,735
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Roles
library Roles { struct Role { mapping(address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage _role, address _addr) internal { _role.bearer[_addr] = true; } /** * @dev remove an address' access to this role */ function ...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
add
function add(Role storage _role, address _addr) internal { _role.bearer[_addr] = true; }
/** * @dev give an address access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 140, 242 ] }
3,736
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Roles
library Roles { struct Role { mapping(address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage _role, address _addr) internal { _role.bearer[_addr] = true; } /** * @dev remove an address' access to this role */ function ...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
remove
function remove(Role storage _role, address _addr) internal { _role.bearer[_addr] = false; }
/** * @dev remove an address' access to this role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 309, 415 ] }
3,737
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Roles
library Roles { struct Role { mapping(address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage _role, address _addr) internal { _role.bearer[_addr] = true; } /** * @dev remove an address' access to this role */ function ...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
check
function check(Role storage _role, address _addr) internal view { require(has(_role, _addr)); }
/** * @dev check if an address has this role * // reverts */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 494, 606 ] }
3,738
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
Roles
library Roles { struct Role { mapping(address => bool) bearer; } /** * @dev give an address access to this role */ function add(Role storage _role, address _addr) internal { _role.bearer[_addr] = true; } /** * @dev remove an address' access to this role */ function ...
/** * @title Roles * @author Francisco Giordano (@frangio) * @dev Library for managing addresses assigned to a Role. * See RBAC.sol for example usage. */
NatSpecMultiLine
has
function has(Role storage _role, address _addr) internal view returns(bool) { return _role.bearer[_addr]; }
/** * @dev check if an address has this role * @return bool */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 687, 814 ] }
3,739
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping(string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * Supports unlimited numbers of roles and addresses. * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key role...
NatSpecMultiLine
checkRole
function checkRole(address _operator, string _role) public view { roles[_role].check(_operator); }
/** * @dev reverts if addr does not have role * @param _operator address * @param _role the name of the role * // reverts */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 373, 488 ] }
3,740
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping(string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * Supports unlimited numbers of roles and addresses. * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key role...
NatSpecMultiLine
hasRole
function hasRole(address _operator, string _role) public view returns(bool) { return roles[_role].has(_operator); }
/** * @dev determine if addr has role * @param _operator address * @param _role the name of the role * @return bool */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 633, 768 ] }
3,741
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping(string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * Supports unlimited numbers of roles and addresses. * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key role...
NatSpecMultiLine
addRole
function addRole(address _operator, string _role) internal { roles[_role].add(_operator); emit RoleAdded(_operator, _role); }
/** * @dev add a role to an address * @param _operator address * @param _role the name of the role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 892, 1036 ] }
3,742
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBAC
contract RBAC { using Roles for Roles.Role; mapping(string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); /** * @dev reverts if addr does not have role * @param _operator address * @param...
/** * @title RBAC (Role-Based Access Control) * @author Matt Condon (@Shrugs) * @dev Stores and provides setters and getters for roles and addresses. * Supports unlimited numbers of roles and addresses. * See //contracts/mocks/RBACMock.sol for an example of usage. * This RBAC method uses strings to key role...
NatSpecMultiLine
removeRole
function removeRole(address _operator, string _role) internal { roles[_role].remove(_operator); emit RoleRemoved(_operator, _role); }
/** * @dev remove a role from an address * @param _operator address * @param _role the name of the role */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1165, 1317 ] }
3,743
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBACOperator
contract RBACOperator is Ownable, RBAC { /** * A constant role name for indicating operator. */ string public constant ROLE_OPERATOR = "operator"; address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner ...
setPartner
function setPartner(address _partner) public onlyOwner { require(_partner != address(0)); emit SetPartner(partner, _partner); partner = _partner; }
/** * @dev setPartner, set the partner address. * @param _partner the new partner address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 865, 1033 ] }
3,744
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBACOperator
contract RBACOperator is Ownable, RBAC { /** * A constant role name for indicating operator. */ string public constant ROLE_OPERATOR = "operator"; address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner ...
removePartner
function removePartner() public onlyOwner { delete partner; }
/** * @dev removePartner, remove partner address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1103, 1175 ] }
3,745
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBACOperator
contract RBACOperator is Ownable, RBAC { /** * A constant role name for indicating operator. */ string public constant ROLE_OPERATOR = "operator"; address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner ...
addOperater
function addOperater(address _operator) public onlyOwnerOrPartner { addRole(_operator, ROLE_OPERATOR); }
/** * @dev add a operator role to an address * @param _operator address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1418, 1533 ] }
3,746
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
RBACOperator
contract RBACOperator is Ownable, RBAC { /** * A constant role name for indicating operator. */ string public constant ROLE_OPERATOR = "operator"; address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner ...
removeOperater
function removeOperater(address _operator) public onlyOwnerOrPartner { removeRole(_operator, ROLE_OPERATOR); }
/** * @dev remove a operator role from an address * @param _operator address */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1631, 1752 ] }
3,747
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PartnerAuthority
contract PartnerAuthority is Ownable { address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner */ event SetPartner(address oldPartner, address newPartner); /** * @dev Throws if called by any account other ...
setPartner
function setPartner(address _partner) public onlyOwner { require(_partner != address(0)); emit SetPartner(partner, _partner); partner = _partner; }
/** * @dev setPartner, set the partner address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 695, 863 ] }
3,748
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PartnerAuthority
contract PartnerAuthority is Ownable { address public partner; /** * Event for setPartner logging * @param oldPartner the old Partner * @param newPartner the new Partner */ event SetPartner(address oldPartner, address newPartner); /** * @dev Throws if called by any account other ...
removePartner
function removePartner() public onlyOwner { delete partner; }
/** * @dev removePartner, remove partner address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 935, 1007 ] }
3,749
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
takerOrder
function takerOrder(address _taker, uint32 _toTime, uint256 _repaymentSum) public onlyOwnerOrPartner { require(_taker != address(0) && _toTime > 0 && now <= _toTime && _repaymentSum > 0 && status == StatusChoices.NO_LOAN); taker = _taker; toTime = _toTime; repaymentSum = _repaymentSum; // Transfer the ...
/** * @dev Complete an order combination and issue the loan to the borrower. * @param _taker address of investor. * @param _toTime order repayment due date. * @param _repaymentSum total amount of money that the borrower ultimately needs to return. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2806, 3762 ] }
3,750
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
executeOrder
function executeOrder() public onlyOwnerOrPartner { require(now <= toTime && status == StatusChoices.REPAYMENT_WAITING); // The borrower pays off the loan and performs two-way operation. if (loanTokenName.stringCompare(TOKEN_ETH)) { require(ethAmount[maker] >= repaymentSum && address(this).balance >= repa...
/** * @dev Only the full repayment will execute the contract agreement. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 3861, 4644 ] }
3,751
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
forceCloseOrder
function forceCloseOrder() public onlyOwnerOrPartner { require(status == StatusChoices.REPAYMENT_WAITING); uint256 transferSum = 0; if (now <= toTime) { status = StatusChoices.CLOSE_POSITION; } else { status = StatusChoices.OVERDUE_STOP; } if(loanTokenName.stringCompare(TOKEN_ETH)){ ...
/** * @dev Close position or due repayment operation. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 4719, 5571 ] }
3,752
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
withdrawToken
function withdrawToken(address _taker, uint256 _refundSum) public onlyOwnerOrPartner { require(status == StatusChoices.NO_LOAN); require(_taker != address(0) && _refundSum > 0); if (loanTokenName.stringCompare(TOKEN_ETH)) { require(address(this).balance >= _refundSum && ethAmount[_taker] >= _refundSum); ...
/** * @dev Withdrawal of the token invested by the taker. * @param _taker address of investor. * @param _refundSum refundSum number of tokens withdrawn. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 5753, 6377 ] }
3,753
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
safeErc20Transfer
function safeErc20Transfer(address _toAddress,uint256 _transferSum) internal returns (bool) { if(loanTokenName.stringCompare(TOKEN_USDT)){ UsdtERC20(token20).transfer(_toAddress, _transferSum); }else{ require(ERC20(token20).transfer(_toAddress, _transferSum)); } return true; }
/** * @dev Since the implementation of usdt ERC20.sol transfer code does not design the return value, * @dev which is different from most ERC20 token interfaces,most erc20 transfer token agreements return bool. * @dev it is necessary to independently adapt the interface for usdt token in order to transfer success...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 6766, 7083 ] }
3,754
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
OrderManageContract
contract OrderManageContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Status of current business execution contract. */ enum StatusChoices { NO_LOAN, REPAYMENT_WAITING, REPAYMENT_ALL, CLOSE_POSITION, OVERDUE_STOP } ...
/** * @title OrderManageContract * @dev Order process management contract. */
NatSpecMultiLine
getPledgeStatus
function getPledgeStatus() public view returns(string pledgeStatus) { if (status == StatusChoices.NO_LOAN) { pledgeStatus = "NO_LOAN"; } else if (status == StatusChoices.REPAYMENT_WAITING) { pledgeStatus = "REPAYMENT_WAITING"; } else if (status == StatusChoices.REPAYMENT_ALL) { pledgeStatus = "R...
/** * @dev Get current contract order status. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 7150, 7661 ] }
3,755
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeFactory
contract PledgeFactory is RBACOperator { using AddressUtils for address; // initial type of pledge contract. string internal constant INIT_TOKEN_NAME = "UNKNOWN"; mapping(uint256 => EscrowPledge) internal pledgeEscrowById; // pledge number unique screening. mapping(uint256 => bool) internal isPled...
/** * @title PledgeFactory * @dev Pledge factory contract. * @dev Specially provides the pledge guarantee creation and the statistics function. */
NatSpecMultiLine
createPledgeContract
function createPledgeContract(uint256 _pledgeId, address _escrowPartner) public onlyPartner returns(bool) { require(_pledgeId > 0 && !isPledgeId[_pledgeId] && _escrowPartner!=address(0)); // Give the pledge contract the right to update statistics. PledgeContract pledgeAddress = new PledgeContract(_pledgeId, ...
/** * @dev Create a pledge subcontract * @param _pledgeId index number of the pledge contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 838, 1532 ] }
3,756
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeFactory
contract PledgeFactory is RBACOperator { using AddressUtils for address; // initial type of pledge contract. string internal constant INIT_TOKEN_NAME = "UNKNOWN"; mapping(uint256 => EscrowPledge) internal pledgeEscrowById; // pledge number unique screening. mapping(uint256 => bool) internal isPled...
/** * @title PledgeFactory * @dev Pledge factory contract. * @dev Specially provides the pledge guarantee creation and the statistics function. */
NatSpecMultiLine
batchCreatePledgeContract
function batchCreatePledgeContract(uint256[] _pledgeIds, address _escrowPartner) public onlyPartner { require(_pledgeIds.length > 0 && _escrowPartner.isContract()); for (uint i = 0; i < _pledgeIds.length; i++) { require(createPledgeContract(_pledgeIds[i],_escrowPartner)); } }
/** * @dev Batch create a pledge subcontract * @param _pledgeIds index number of the pledge contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1659, 1963 ] }
3,757
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeFactory
contract PledgeFactory is RBACOperator { using AddressUtils for address; // initial type of pledge contract. string internal constant INIT_TOKEN_NAME = "UNKNOWN"; mapping(uint256 => EscrowPledge) internal pledgeEscrowById; // pledge number unique screening. mapping(uint256 => bool) internal isPled...
/** * @title PledgeFactory * @dev Pledge factory contract. * @dev Specially provides the pledge guarantee creation and the statistics function. */
NatSpecMultiLine
getEscrowPledge
function getEscrowPledge(uint256 _pledgeId) public view returns(string tokenName, address pledgeContract) { require(_pledgeId > 0); tokenName = pledgeEscrowById[_pledgeId].tokenName; pledgeContract = pledgeEscrowById[_pledgeId].pledgeContract; }
/** * @dev Use the index to get the basic information of the corresponding pledge contract. * @param _pledgeId index number of the pledge contract */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2131, 2397 ] }
3,758
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeFactory
contract PledgeFactory is RBACOperator { using AddressUtils for address; // initial type of pledge contract. string internal constant INIT_TOKEN_NAME = "UNKNOWN"; mapping(uint256 => EscrowPledge) internal pledgeEscrowById; // pledge number unique screening. mapping(uint256 => bool) internal isPled...
/** * @title PledgeFactory * @dev Pledge factory contract. * @dev Specially provides the pledge guarantee creation and the statistics function. */
NatSpecMultiLine
tokenPoolOperater
function tokenPoolOperater(address _tokenPool, address _pledge) public hasOperationPermission { require(_pledge != address(0) && address(msg.sender).isContract() && address(msg.sender) == _pledge); PledgePoolBase(_tokenPool).addOperater(_pledge); }
/** * @dev Configure permissions to operate on the token pool. * @param _tokenPool token pool contract address. * @param _pledge pledge contract address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2759, 3023 ] }
3,759
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeFactory
contract PledgeFactory is RBACOperator { using AddressUtils for address; // initial type of pledge contract. string internal constant INIT_TOKEN_NAME = "UNKNOWN"; mapping(uint256 => EscrowPledge) internal pledgeEscrowById; // pledge number unique screening. mapping(uint256 => bool) internal isPled...
/** * @title PledgeFactory * @dev Pledge factory contract. * @dev Specially provides the pledge guarantee creation and the statistics function. */
NatSpecMultiLine
updatePledgeType
function updatePledgeType(uint256 _pledgeId, string _tokenName) public hasOperationPermission { require(_pledgeId > 0 && bytes(_tokenName).length > 0 && address(msg.sender).isContract()); pledgeEscrowById[_pledgeId].tokenName = _tokenName; }
/** * @dev Update the basic data of the pledge contract. * @param _pledgeId index number of the pledge contract. * @param _tokenName pledge contract supported token type. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 3221, 3478 ] }
3,760
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
createPledgeContract
function createPledgeContract(uint256 _pledgeId) public onlyPartner returns(bool) { require(_pledgeId > 0 && pledgeFactory!=address(0)); require(PledgeFactory(pledgeFactory).createPledgeContract(_pledgeId,partner)); return true; }
/** * @dev Create a pledge subcontract * @param _pledgeId index number of the pledge contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 530, 781 ] }
3,761
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
batchCreatePledgeContract
function batchCreatePledgeContract(uint256[] _pledgeIds) public onlyPartner { require(_pledgeIds.length > 0); PledgeFactory(pledgeFactory).batchCreatePledgeContract(_pledgeIds,partner); }
/** * @dev Batch create a pledge subcontract * @param _pledgeIds index number of the pledge contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 906, 1109 ] }
3,762
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
getEscrowPledge
function getEscrowPledge(uint256 _pledgeId) public view returns(string tokenName, address pledgeContract) { require(_pledgeId > 0); (tokenName,pledgeContract) = PledgeFactory(pledgeFactory).getEscrowPledge(_pledgeId); }
/** * @dev Use the index to get the basic information of the corresponding pledge contract. * @param _pledgeId index number of the pledge contract */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1279, 1514 ] }
3,763
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
setTokenPool
function setTokenPool(string _tokenName, address _address) public onlyOwner { require(_address != address(0) && bytes(_tokenName).length > 0); nameByPool[_tokenName] = _address; }
/** * @dev setTokenPool, set the token pool contract address of a token name. * @param _tokenName set token pool name. * @param _address the token pool contract address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1711, 1906 ] }
3,764
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
setToken
function setToken(string _tokenName, address _address) public onlyOwner { require(_address != address(0) && bytes(_tokenName).length > 0); nameByToken[_tokenName] = _address; }
/** * @dev setToken, set the token contract address of a token name. * @param _tokenName token name * @param _address the ERC20 token contract address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2084, 2276 ] }
3,765
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
setPledgeFactory
function setPledgeFactory(address _factory) public onlyOwner { require(_factory != address(0)); pledgeFactory = _factory; }
/** * @dev setPledgeFactory, Plant contract for configuration management pledge business. * @param _factory pledge factory contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2429, 2568 ] }
3,766
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
includeTokenPool
function includeTokenPool(string _tokenName) view public returns(address) { require(bytes(_tokenName).length > 0); return nameByPool[_tokenName]; }
/** * @dev Checks whether the current token pool is supported. * @param _tokenName token name */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2683, 2846 ] }
3,767
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EscrowMaintainContract
contract EscrowMaintainContract is PartnerAuthority { address public pledgeFactory; // map of token name to token pool address; mapping(string => address) internal nameByPool; // map of token name to erc20 token address; mapping(string => address) internal nameByToken; // ---------------------...
/** * @title EscrowMaintainContract * @dev Provides configuration and external interfaces. */
NatSpecMultiLine
includeToken
function includeToken(string _tokenName) view public returns(address) { require(bytes(_tokenName).length > 0); return nameByToken[_tokenName]; }
/** * @dev Checks whether the current erc20 token is supported. * @param _tokenName token name */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2964, 3124 ] }
3,768
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
function() external payable { require(status != StatusChoices.PLEDGE_REFUND); // Identify the borrower. if (maker != address(0)) { require(address(msg.sender) == maker); } // Record basic information about the borrower's pledge ETH verifyEthAccount[msg.sender] = verifyEthAccount[msg.sender].add(m...
// ----------------------------------------- // external interface // -----------------------------------------
LineComment
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2058, 2410 ] }
3,769
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
addRecord
function addRecord(string _pledgeTokenName, address _maker, uint256 _pledgeSum, string _loanTokenName) public onlyOwner { require(_maker != address(0) && _pledgeSum > 0 && status != StatusChoices.PLEDGE_REFUND); // Add the pledge information for the first time. if (status == StatusChoices.NO_PLEDGE_INFO) { ...
/** * @dev Add the pledge information and transfer the pledged token into the corresponding currency pool. * @param _pledgeTokenName maker pledge token name. * @param _maker borrower address. * @param _pledgeSum pledge amount. * @param _loanTokenName pledge token type. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2715, 4149 ] }
3,770
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
appendEscrow
function appendEscrow(uint256 _appendSum) public onlyOwner { require(status == StatusChoices.PLEDGE_CREATE_MATCHING); addRecord(pledgeTokenName, maker, _appendSum, loanTokenName); emit AppendEscrow(maker, _appendSum); }
/** * @dev Increase the number of pledged tokens. * @param _appendSum append amount. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 4255, 4495 ] }
3,771
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
withdrawToken
function withdrawToken(address _maker) public onlyOwner { require(status != StatusChoices.PLEDGE_REFUND); uint256 pledgeSum = 0; // there are two types of retractions. if (status == StatusChoices.NO_PLEDGE_INFO) { pledgeSum = classifySquareUp(_maker); } else { status = StatusChoices.PLEDGE_REFU...
/** * @dev Withdraw pledge behavior. * @param _maker borrower address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 4589, 5138 ] }
3,772
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
recycle
function recycle(string _tokenName, uint256 _amount) public onlyOwner { require(status != StatusChoices.NO_PLEDGE_INFO && _amount>0); if (_tokenName.stringCompare(TOKEN_ETH)) { require(address(this).balance >= _amount); owner.transfer(_amount); } else { address token = checkedToken(_tokenName); ...
/** * @dev Executed in some extreme unforsee cases, to avoid eth locked. * @param _tokenName recycle token type. * @param _amount Number of eth to recycle. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 5321, 5790 ] }
3,773
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
safeErc20Transfer
function safeErc20Transfer(address _token20,address _toAddress,uint256 _transferSum) internal returns (bool) { if(loanTokenName.stringCompare(TOKEN_USDT)){ UsdtERC20(_token20).transfer(_toAddress, _transferSum); }else{ require(ERC20(_token20).transfer(_toAddress, _transferSum)); } return true; } ...
/** * @dev Since the implementation of usdt ERC20.sol transfer code does not design the return value, * @dev which is different from most ERC20 token interfaces,most erc20 transfer token agreements return bool. * @dev it is necessary to independently adapt the interface for usdt token in order to transfer success...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 6181, 6517 ] }
3,774
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
createOrderContract
function createOrderContract(string _loanTokenName) internal { require(bytes(_loanTokenName).length > 0); status = StatusChoices.PLEDGE_CREATE_MATCHING; address loanToken20 = checkedToken(_loanTokenName); OrderManageContract newOrder = new OrderManageContract(_loanTokenName, loanToken20, maker); setPartn...
/** * @dev Create an order process management contract for the match and repayment business. * @param _loanTokenName expect loan token type. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 6810, 7358 ] }
3,775
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
classifySquareUp
function classifySquareUp(address _maker) internal returns(uint256 sum) { if (pledgeTokenName.stringCompare(TOKEN_ETH)) { uint256 pledgeSum = verifyEthAccount[_maker]; require(pledgeSum > 0 && address(this).balance >= pledgeSum); _maker.transfer(pledgeSum); verifyEthAccount[_maker] = 0; sum ...
/** * @dev classification withdraw. * @dev Execute without changing the current contract data state. * @param _maker borrower address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 7518, 8068 ] }
3,776
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
checkedToken
function checkedToken(string _tokenName) internal view returns(address) { address tokenAddress = EscrowMaintainContract(escrowContract).includeToken(_tokenName); require(tokenAddress != address(0)); return tokenAddress; }
/** * @dev Check wether the token is included for a token name. * @param _tokenName token name. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 8185, 8427 ] }
3,777
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
checkedTokenPool
function checkedTokenPool(string _tokenName) internal view returns(address) { address tokenPool = EscrowMaintainContract(escrowContract).includeTokenPool(_tokenName); require(tokenPool != address(0)); return tokenPool; }
/** * @dev Check wether the token pool is included for a token name. * @param _tokenName pledge token name. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 8556, 8797 ] }
3,778
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
_conclude
function _conclude() public onlyPartner { require(status == StatusChoices.PLEDGE_CREATE_MATCHING); status = StatusChoices.PLEDGE_REFUND; require(PledgePoolBase(tokenPoolAddress).refundTokens(pledgeId, pledgeAccountSum, maker)); }
/** * @dev Refund of the borrower’s pledge. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 9059, 9309 ] }
3,779
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
_forceConclude
function _forceConclude(address _taker) public onlyPartner { require(_taker != address(0) && status == StatusChoices.PLEDGE_CREATE_MATCHING); status = StatusChoices.PLEDGE_REFUND; require(PledgePoolBase(tokenPoolAddress).refundTokens(pledgeId, pledgeAccountSum, _taker)); }
/** * @dev Expired for repayment or close position. * @param _taker address of investor. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 9419, 9713 ] }
3,780
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
getPledgeStatus
function getPledgeStatus() public view returns(string pledgeStatus) { if (status == StatusChoices.NO_PLEDGE_INFO) { pledgeStatus = "NO_PLEDGE_INFO"; } else if (status == StatusChoices.PLEDGE_CREATE_MATCHING) { pledgeStatus = "PLEDGE_CREATE_MATCHING"; } else { pledgeStatus = "PLEDGE_REFUND"; }...
/** * @dev Get current contract order status. * @return pledgeStatus state indicate. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 9960, 10302 ] }
3,781
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
getOrderContract
function getOrderContract() public view returns(address) { return orderContract; }
/** * @dev get order contract address. use no gas. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 10370, 10463 ] }
3,782
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
getPledgeAccountSum
function getPledgeAccountSum() public view returns(uint256) { return pledgeAccountSum; }
/** * @dev Gets the total number of tokens pledged under the current contract. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 10559, 10658 ] }
3,783
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
getMakerAddress
function getMakerAddress() public view returns(address) { return maker; }
/** * @dev get current contract borrower address. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 10725, 10809 ] }
3,784
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgeContract
contract PledgeContract is PartnerAuthority { using SafeMath for uint256; using SafeCompare for string; /** * @dev Type of execution state of the pledge contract(irreversible) */ enum StatusChoices { NO_PLEDGE_INFO, PLEDGE_CREATE_MATCHING, PLEDGE_REFUND } string public ple...
/** * @title PledgeContract * @dev Pledge process management contract */
NatSpecMultiLine
getPledgeId
function getPledgeId() external view returns(uint256) { return pledgeId; }
/** * @dev get current contract pledge Id. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 10869, 10954 ] }
3,785
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
addRecord
function addRecord(address _payerAddress, uint256 _pledgeSum, uint256 _pledgeId, string _tokenName) public hasOperationPermission returns(bool) { _preValidateAddRecord(_payerAddress, _pledgeSum, _pledgeId, _tokenName); _processAddRecord(_payerAddress, _pledgeSum, _pledgeId, _tokenName); return true; }
/** * @dev addRecord, interface to add record. * @param _payerAddress Address performing the pleadge. * @param _pledgeSum the value to pleadge. * @param _pledgeId pledge contract index number. * @param _tokenName pledge token name. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 743, 1066 ] }
3,786
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
withdrawToken
function withdrawToken(uint256 _pledgeId, address _maker, uint256 _num) public hasOperationPermission returns(bool) { _preValidateWithdraw(_maker, _num, _pledgeId); _processWithdraw(_maker, _num, _pledgeId); return true; }
/** * @dev withdrawToken, withdraw pledge token. * @param _pledgeId pledge contract index number. * @param _maker borrower address. * @param _num withdraw token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1269, 1512 ] }
3,787
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
refundTokens
function refundTokens(uint256 _pledgeId, uint256 _returnSum, address _targetAddress) public hasOperationPermission returns(bool) { _preValidateRefund(_returnSum, _targetAddress, _pledgeId); _processRefund(_returnSum, _targetAddress, _pledgeId); return true; }
/** * @dev refundTokens, interface to refund * @param _pledgeId pledge contract index number. * @param _targetAddress transfer target address. * @param _returnSum return token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1724, 2004 ] }
3,788
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
getLedger
function getLedger(uint256 _pledgeId) public view returns(uint256 num, address payerAddress, string tokenName) { require(_pledgeId > 0); num = escrows[_pledgeId].pledgeSum; payerAddress = escrows[_pledgeId].payerAddress; tokenName = escrows[_pledgeId].tokenName; }
/** * @dev getLedger, Query the pledge details of the pledge number in the pool. * @param _pledgeId pledge contract index number. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2155, 2445 ] }
3,789
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_preValidateAddRecord
function _preValidateAddRecord(address _payerAddress, uint256 _pledgeSum, uint256 _pledgeId, string _tokenName) view internal { require(_pledgeSum > 0 && _pledgeId > 0 && _payerAddress != address(0) && bytes(_tokenName).length > 0 && address(msg.sender).isContract() && PledgeContract(msg.sender)....
/** * @dev _preValidateAddRecord, Validation of an incoming AddRecord. Use require statemens to revert state when conditions are not met. * @param _payerAddress Address performing the pleadge. * @param _pledgeSum the value to pleadge. * @param _pledgeId pledge contract index number. * @param _tokenName pledge...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 2955, 3325 ] }
3,790
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_processAddRecord
function _processAddRecord(address _payerAddress, uint256 _pledgeSum, uint256 _pledgeId, string _tokenName) internal { Escrow memory escrow = Escrow(_pledgeSum, _payerAddress, _tokenName); escrows[_pledgeId] = escrow; }
/** * @dev _processAddRecord, Executed when a AddRecord has been validated and is ready to be executed. Not necessarily emits/sends tokens. * @param _payerAddress Address performing the pleadge. * @param _pledgeSum the value to pleadge. * @param _pledgeId pledge contract index number. * @param _tokenName pled...
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 3683, 3918 ] }
3,791
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_preValidateRefund
function _preValidateRefund(uint256 _returnSum, address _targetAddress, uint256 _pledgeId) view internal { require(_returnSum > 0 && _pledgeId > 0 && _targetAddress != address(0) && address(msg.sender).isContract() && _returnSum <= escrows[_pledgeId].pledgeSum && PledgeContract(msg.sender).getPle...
/** * @dev _preValidateRefund, Validation of an incoming refund. Use require statemens to revert state when conditions are not met. * @param _pledgeId pledge contract index number. * @param _targetAddress transfer target address. * @param _returnSum return token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 4219, 4583 ] }
3,792
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_processRefund
function _processRefund(uint256 _returnSum, address _targetAddress, uint256 _pledgeId) internal { escrows[_pledgeId].pledgeSum = escrows[_pledgeId].pledgeSum.sub(_returnSum); }
/** * @dev _processRefund, Executed when a Refund has been validated and is ready to be executed. Not necessarily emits/sends tokens. * @param _pledgeId pledge contract index number. * @param _targetAddress transfer target address. * @param _returnSum return token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 4884, 5071 ] }
3,793
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_preValidateWithdraw
function _preValidateWithdraw(address _maker, uint256 _num, uint256 _pledgeId) view internal { require(_num > 0 && _pledgeId > 0 && _maker != address(0) && address(msg.sender).isContract() && _num <= escrows[_pledgeId].pledgeSum && PledgeContract(msg.sender).getPledgeId()==_pledgeId ); } ...
/** * @dev _preValidateWithdraw, Withdraw initiated parameter validation. * @param _pledgeId pledge contract index number. * @param _maker borrower address. * @param _num withdraw token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 5295, 5631 ] }
3,794
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
PledgePoolBase
contract PledgePoolBase is RBACOperator { using SafeMath for uint256; using AddressUtils for address; // Record pledge details. mapping(uint256 => Escrow) internal escrows; /** * @dev Information structure of pledge. */ struct Escrow { uint256 pledgeSum; address payerAddress; ...
/** * @title pledge pool base * @dev a base tokenPool, any tokenPool for a specific token should inherit from this tokenPool. */
NatSpecMultiLine
_processWithdraw
function _processWithdraw(address _maker, uint256 _num, uint256 _pledgeId) internal { escrows[_pledgeId].pledgeSum = escrows[_pledgeId].pledgeSum.sub(_num); }
/** * @dev _processWithdraw, Withdraw data update. * @param _pledgeId pledge contract index number. * @param _maker borrower address. * @param _num withdraw token sum. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 5830, 5999 ] }
3,795
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EthPledgePool
contract EthPledgePool is PledgePoolBase { using SafeMath for uint256; using AddressUtils for address; // ----------------------------------------- // TokenPool external interface // ----------------------------------------- /** * @dev fallback function */ function() external payable {} ...
/** * @title eth pledge pool. * @dev the tokenPool for ETH. */
NatSpecMultiLine
function() external payable {}
/** * @dev fallback function */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 286, 319 ] }
3,796
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EthPledgePool
contract EthPledgePool is PledgePoolBase { using SafeMath for uint256; using AddressUtils for address; // ----------------------------------------- // TokenPool external interface // ----------------------------------------- /** * @dev fallback function */ function() external payable {} ...
/** * @title eth pledge pool. * @dev the tokenPool for ETH. */
NatSpecMultiLine
recycle
function recycle(uint256 _amount,address _contract) public onlyOwner returns(bool) { require(_amount <= address(this).balance && _contract.isContract()); _contract.transfer(_amount); return true; }
/** * @dev recycle, Executed in some extreme unforsee cases, to avoid eth locked. * @param _amount Number of eth to withdraw * @param _contract Multi-signature contracts, for the fair and just treatment of funds. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 559, 777 ] }
3,797
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EthPledgePool
contract EthPledgePool is PledgePoolBase { using SafeMath for uint256; using AddressUtils for address; // ----------------------------------------- // TokenPool external interface // ----------------------------------------- /** * @dev fallback function */ function() external payable {} ...
/** * @title eth pledge pool. * @dev the tokenPool for ETH. */
NatSpecMultiLine
kills
function kills() public onlyOwner { selfdestruct(owner); }
/** * @dev kill, kills the contract and send everything to `_address`.. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 868, 937 ] }
3,798
EthPledgePool
EthPledgePool.sol
0xda4d3539c4fa5b76c242f42a8a751cfa8d104b73
Solidity
EthPledgePool
contract EthPledgePool is PledgePoolBase { using SafeMath for uint256; using AddressUtils for address; // ----------------------------------------- // TokenPool external interface // ----------------------------------------- /** * @dev fallback function */ function() external payable {} ...
/** * @title eth pledge pool. * @dev the tokenPool for ETH. */
NatSpecMultiLine
_processRefund
function _processRefund(uint256 _returnSum, address _targetAddress, uint256 _pledgeId) internal { super._processRefund(_returnSum, _targetAddress, _pledgeId); require(address(this).balance >= _returnSum); _targetAddress.transfer(_returnSum); }
/** * @dev Executed when a Refund has been validated and is ready to be executed. * Not necessarily emits/sends tokens. */
NatSpecMultiLine
v0.4.25+commit.59dbf8f1
bzzr://283d2ad813330ec0fe8e481dcbecbf64dce32d626fc76fd7d4771b47dc32a30c
{ "func_code_index": [ 1230, 1494 ] }
3,799